[PATCH] emacs: use define-derived-mode for defining modes.
Tomi Ollila
tomi.ollila at iki.fi
Sat Sep 10 01:08:57 PDT 2016
On Sat, Sep 10 2016, Steven Allen <steven at stebalien.com> wrote:
> [ Unknown signature status ]
>
> David Bremner <david at tethera.net> writes:
>> Steven Allen <steven at stebalien.com> writes:
>>
>>> This sets up and runs all the correct hooks and reduces some redundancy.
>>> ---
>>
>> The idea seems sane, but shouldn't we derive from special-mode?
>
> Special mode pre-defines some keybindings (although they appear to be
> similar, I haven't really looked into it). For precedent, gnus derives
> From fundamental-mode.
I patched the patch and changed fundamental-mode to special-mode --
read-only hello buffer prevented me to write custom search
(M-x toggle-read-only helped there)
I grepped emacs 24.5 sources derived-mo.*special-mo,
derived-mo.*fundamental-mo and derived-mo.*nil and line counts
were 48, 54 and 28, respectively.
all gnus modes (that use define-derived-mode) derive from fundamental
mode -- but perhaps gnus precedes special-mode (or not, it may be that
special mode were there before big bang (like all other stuff not created
by humans), who knows ;)
Anyway, I think it is safer choice to use fundamental-mode (don't know
about nil) than special-mode -- as there are so many corners in manual
testing that would need to be covered...
Tests passed using the original patch.
Tomi
>
> --
> Steven Allen
> ((Do Not Email <honeypot at stebalien.com>))
> _______________________________________________
> notmuch mailing list
> notmuch at notmuchmail.org
> https://notmuchmail.org/mailman/listinfo/notmuch
More information about the notmuch
mailing list