From: Alan Mackenzie <acm@muc.de>
To: 24891@debbugs.gnu.org
Cc: acm@muc.de
Subject: bug#24891: 25.1: Falsehood on page "Major Modes" of Emacs manual.
Date: Mon, 7 Nov 2016 22:03:59 +0000 [thread overview]
Message-ID: <20161107220359.GA3447@acm.fritz.box> (raw)
In-Reply-To: <20161106221832.GB5605@acm.fritz.box>
Hello, Emacs.
On Sun, Nov 06, 2016 at 10:18:32PM +0000, Alan Mackenzie wrote:
> In the Emacs manual, page "Major Modes" appears the following:
> all programming language modes run `prog-mode-hook', prior to
> running their own mode hooks.
> This is not true. A counter example is stand alone CC Mode. There will
> be other examples, too, in code not maintained by Emacs. I suggest
> amending this sentence to something like:
> many programming language modes (including all these distributed
> with Emacs) run `prog-mode-hook', prior to runnuing their own mode
> hooks.
Here's a patch incorporating some of the points other people have made:
diff --git a/doc/emacs/modes.texi b/doc/emacs/modes.texi
index c1564e9..c8da68a 100644
--- a/doc/emacs/modes.texi
+++ b/doc/emacs/modes.texi
@@ -113,7 +113,10 @@ Major Modes
is enabled in a buffer. @xref{Hooks}, for more information about
hooks. Each mode hook is named after its major mode, e.g., Fortran
mode has @code{fortran-mode-hook}. Furthermore, all text-based major
-modes run @code{text-mode-hook}, and all programming language modes
+modes run @code{text-mode-hook}, and many programming language modes
+(including all those distributed with Emacs)@footnote{More
+specifically, the modes which are ''derived'' from @code{prog-mode}
+(@pxref{Derived Modes,,, elisp, The Emacs Lisp Reference Manual}).}
run @code{prog-mode-hook}, prior to running their own mode hooks.
Hook functions can look at the value of the variable @code{major-mode}
to see which mode is actually being entered.
Any objections to me installing this in the Emacs-25 branch?
--
Alan Mackenzie (Nuremberg, Germany).
next prev parent reply other threads:[~2016-11-07 22:03 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-06 22:18 bug#24891: 25.1: Falsehood on page "Major Modes" of Emacs manual Alan Mackenzie
2016-11-06 23:19 ` Drew Adams
2016-11-06 23:55 ` Evgeny Roubinchtein
2016-11-07 20:29 ` Alan Mackenzie
2016-11-07 20:39 ` Alan Mackenzie
2016-11-07 20:51 ` Drew Adams
2016-11-07 22:14 ` Alan Mackenzie
2016-11-07 0:05 ` Dmitry Gutov
2016-11-07 14:43 ` Richard Stallman
2016-11-07 19:46 ` Alan Mackenzie
2016-11-07 22:03 ` Alan Mackenzie [this message]
2016-11-10 21:26 ` Alan Mackenzie
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=20161107220359.GA3447@acm.fritz.box \
--to=acm@muc.de \
--cc=24891@debbugs.gnu.org \
/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.