On 2016-05-12 11:55, David Bremner <david@tethera.net> wrote: >> (defun gnus-alias-ensure-message-mode () >> "Assert that the current buffer is a message buffer." >> (when (not (derived-mode-p 'notmuch-message-mode)) >> (gnus-alias-error "Must be in `message-mode' or mode derived from it. "))) >> (add-hook 'message-setup-hook 'gnus-alias-determine-identity) > > Maybe upstream Emacs would accept something like that if it says > "(derived-mode-p 'message-mode)". Agreed! That's what I meant to write (a yank bug somewhere along the line). I am happy to ask upstream on the emacs list, unless you think it would be more likely to be accepted if coming from notmuch developers. -Sanjoy