emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: fundamental-mode-hook


From: Karl Fogel
Subject: Re: fundamental-mode-hook
Date: Thu, 08 Feb 2007 02:06:24 -0800
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.93 (gnu/linux)

"Lennart Borgman (gmail)" <address@hidden> writes:
> The elisp manual
>
>   (info "(elisp) Major Mode Conventions")
>
> says that
>
>   Each major mode should have a normal "mode hook" named
>   `MODENAME-mode-hook'.
>
> fundamental-mode does not have such a hook.

Do you have a use in mind for such a hook, or is the inconsistency
just bugging you?  (Not a facetious question, I'm honestly trying to
figure out if the situation is a problem or not.)

In simple.el, fundamental-mode's definition is pretty tiny:

   (defun fundamental-mode ()
     "Major mode not specialized for anything in particular.
   Other major modes are defined by comparison with this one."
     (interactive)
     (kill-all-local-variables)
     (unless delay-mode-hooks
       (run-hooks 'after-change-major-mode-hook)))

Hmm, for one thing, I'm not sure why it doesn't just say

   (delay-mode-hooks 'after-change-major-mode-hook)

instead of checking the variable delay-mode-hooks manually.  Aside
from that, it would be pretty easy to stick a run-hooks call in there,
but would it really help anyone do anything they couldn't do before?

-Karl




reply via email to

[Prev in Thread] Current Thread [Next in Thread]