From: "Lennart Borgman (gmail)" <lennart.borgman@gmail.com>
To: kfogel@red-bean.com
Cc: Emacs Devel <emacs-devel@gnu.org>
Subject: Re: fundamental-mode-hook
Date: Thu, 08 Feb 2007 02:13:57 +0100 [thread overview]
Message-ID: <45CA7955.1020602@gmail.com> (raw)
In-Reply-To: <877iutvu8v.fsf@floss.red-bean.com>
Karl Fogel wrote:
> "Lennart Borgman (gmail)" <lennart.borgman@gmail.com> 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?
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.
next prev parent reply other threads:[~2007-02-08 1:13 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-08 0:38 fundamental-mode-hook Lennart Borgman (gmail)
2007-02-08 10:06 ` fundamental-mode-hook Karl Fogel
2007-02-08 1:13 ` Lennart Borgman (gmail) [this message]
2007-02-08 19:46 ` fundamental-mode-hook Richard Stallman
2007-02-08 22:29 ` fundamental-mode-hook Lennart Borgman (gmail)
2007-02-08 22:50 ` fundamental-mode-hook Stefan Monnier
2007-02-08 23:03 ` fundamental-mode-hook Lennart Borgman (gmail)
2007-02-08 22:55 ` fundamental-mode-hook Edward O'Connor
2007-02-08 23:05 ` fundamental-mode-hook Lennart Borgman (gmail)
2007-02-09 14:23 ` fundamental-mode-hook Richard Stallman
2007-02-08 1:30 ` fundamental-mode-hook Juanma Barranquero
2007-02-08 1:40 ` fundamental-mode-hook Lennart Borgman (gmail)
2007-02-08 15:36 ` fundamental-mode-hook Karl Fogel
2007-02-08 18:25 ` fundamental-mode-hook Lennart Borgman (gmail)
2007-02-08 19:45 ` fundamental-mode-hook Richard Stallman
2007-02-09 5:56 ` fundamental-mode-hook Karl Fogel
2007-02-08 19:46 ` fundamental-mode-hook Richard Stallman
2007-02-08 22:44 ` fundamental-mode-hook Lennart Borgman (gmail)
2007-02-09 14:23 ` fundamental-mode-hook Richard Stallman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=45CA7955.1020602@gmail.com \
--to=lennart.borgman@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=kfogel@red-bean.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.