[PATCH] emacs: add compatability functions for emacs 23
Mark Walters
markwalters1009 at gmail.com
Thu Oct 27 02:38:43 PDT 2016
On Thu, 27 Oct 2016, Matt Armstrong <marmstrong at google.com> wrote:
> Mark Walters <markwalters1009 at gmail.com> writes:
>
>> +;; Compatability functions for emacs 23.
>> +
>> +(unless (fboundp 'setq-local)
>> + (defmacro setq-local (var val)
>> + `(set (make-local-variable ',var) ,val)))
>
> A concern I have with this approach is that it modifies symbols outside
> the notmuch namespace. Could people on old Emacsen come to rely on the
> newer Emacs interfaces inadvertently, and wonder how they came to be,
> etc?
This is a good point. I think I don't mind too much if they do -- they
should see it is provided by notmuch-lib if they do describe-function
etc. But maybe bremner would like to comment?
However, maybe other packages are doing the same. Thus I think we should
not put in a cut down version of read-char-choice but just include the
whole command from the emacs24 source. That way if any other package is
doing the same load order doesn't matter -- we don't stomp on them and
they don't stomp on us.
(As an aside if we do that do we need to include any copyright notice or
similar? -- maybe notmuch-lib.el could include notmuch-compat.el which
would contain all the compatability functions?)
> The only other package I have non-trivial experience working with is
> Gnus, and the practice there was to place portability interfaces in the
> gnus- namespace, and refrain from calling the "native" interfaces
> directly.
I think this would introduce a lot of clutter, so I would prefer not to
go that route.
Best wishes
Mark
More information about the notmuch
mailing list