GNU bug report logs - #24891
25.1: Falsehood on page "Major Modes" of Emacs manual.

Previous Next

Package: emacs;

Reported by: Alan Mackenzie <acm <at> muc.de>

Date: Sun, 6 Nov 2016 22:26:02 UTC

Severity: minor

Found in version 25.1

Done: Alan Mackenzie <acm <at> muc.de>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Alan Mackenzie <acm <at> muc.de>
To: 24891 <at> debbugs.gnu.org
Cc: acm <at> muc.de
Subject: bug#24891: 25.1: Falsehood on page "Major Modes" of Emacs manual.
Date: Mon, 7 Nov 2016 22:03:59 +0000
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).




This bug report was last modified 8 years and 197 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.