[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Lennart Borgman (gmail)
Thu, 08 Feb 2007 02:13:57 +0100
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:220.127.116.11) Gecko/20061207 Thunderbird/18.104.22.168 Mnenhy/0.7.4.666
Karl Fogel wrote:
"Lennart Borgman (gmail)" <address@hidden> writes:
The elisp manual
(info "(elisp) Major Mode Conventions")
Each major mode should have a normal "mode hook" named
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."
Hmm, for one thing, I'm not sure why it doesn't just say
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?
I am not sure what to answer at the moment. I just found this
inconsistency when I tried to check if a function was a major mode
function. I tested to see if the hook variable existed (probably not the
best way, but that is what I did).
I then remembered that there are no hook for new buffers. Are they not
set up in fundamental-mode?
BTW, there are more major modes missing this hook: Info-mode, xml-mode
is what I have noticed so far.
Re: fundamental-mode-hook, Juanma Barranquero, 2007/02/07