GNU bug report logs -
#9214
`fundamental-mode-hook' not run when setting up `fundamental-mode' under certain circumstances; Info documentation incorrect
Previous Next
Reported by: Štěpán Němec <stepnem <at> gmail.com>
Date: Mon, 1 Aug 2011 10:28:01 UTC
Severity: normal
Done: Chong Yidong <cyd <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
On Sun, Jan 29, 2012 at 11:16:11PM -0500, Stefan Monnier wrote:
> > Exactly. I need a way to run code for _any_ new buffer (I don't
> > really need to run the code for temporary buffers which never get
> > any user interaction, but I don't think there is a way to set those
> > apart), no
>
> There is a way: whether they call a major-mode function or not.
Ooh, I did not know that. Thanks. Is this documented somewhere? (I.e., a
recommendation that a major mode function should be called in any buffer
of potential interest to the user.)
In that case, `after-change-major-mode-hook' should do, after all.
> Of course, some packages may erroneously forget to call a major-mode
> function for those buffers, but the problem is in those packages.
Yes, I admit I have code around that does(n't do) that myself (e.g.
simple dumping of some text into a buffer left in fundamental-mode), as
I had no idea calling e.g. `fundamental-mode' in a buffer already in
fundamental-mode was supposed to be of some value (until I bumped into
this problem, that is).
--
Štěpán
This bug report was last modified 13 years and 175 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.