From: "Štěpán Němec" <stepnem@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Juanma Barranquero <lekktu@gmail.com>, Chong Yidong <cyd@gnu.org>,
9214@debbugs.gnu.org
Subject: bug#9214: `fundamental-mode-hook' not run when setting up `fundamental-mode' under certain circumstances; Info documentation incorrect
Date: Mon, 30 Jan 2012 05:45:50 +0100 [thread overview]
Message-ID: <20120130044549.GA32445@headley> (raw)
In-Reply-To: <jwvehuhq15p.fsf-monnier+INBOX@gnu.org>
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
prev parent reply other threads:[~2012-01-30 4:45 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-01 10:22 bug#9214: `fundamental-mode-hook' not run when setting up `fundamental-mode' under certain circumstances; Info documentation incorrect Štěpán Němec
2012-01-28 10:37 ` Chong Yidong
2012-01-28 20:24 ` Štěpán Němec
2012-01-28 22:54 ` Stefan Monnier
2012-01-28 23:34 ` Juanma Barranquero
2012-01-29 1:40 ` Chong Yidong
2012-01-29 1:44 ` Juanma Barranquero
2012-01-29 16:34 ` Štěpán Němec
2012-01-30 4:16 ` Stefan Monnier
2012-01-30 4:45 ` Štěpán Němec [this message]
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=20120130044549.GA32445@headley \
--to=stepnem@gmail.com \
--cc=9214@debbugs.gnu.org \
--cc=cyd@gnu.org \
--cc=lekktu@gmail.com \
--cc=monnier@iro.umontreal.ca \
/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.