[PATCH] emacs: use define-derived-mode for defining modes.
David Bremner
david at tethera.net
Fri Sep 9 17:38:03 PDT 2016
Steven Allen <steven at stebalien.com> writes:
> This sets up and runs all the correct hooks and reduces some redundancy.
> ---
> emacs/notmuch-hello.el | 8 +-------
> emacs/notmuch-show.el | 7 +------
> emacs/notmuch-tree.el | 7 +------
> emacs/notmuch.el | 7 +------
> 4 files changed, 4 insertions(+), 25 deletions(-)
>
> diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el
> index 75ccf57..d582bff 100644
> --- a/emacs/notmuch-hello.el
> +++ b/emacs/notmuch-hello.el
> @@ -671,7 +671,7 @@ with `notmuch-hello-query-counts'."
> "Keymap for \"notmuch hello\" buffers.")
> (fset 'notmuch-hello-mode-map notmuch-hello-mode-map)
>
> -(defun notmuch-hello-mode ()
> +(define-derived-mode notmuch-hello-mode fundamental-mode "notmuch-hello"
> "Major mode for convenient notmuch navigation. This is your entry portal into notmuch.
The idea seems sane, but shouldn't we derive from special-mode?
d
More information about the notmuch
mailing list