From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#24891: 25.1: Falsehood on page "Major Modes" of Emacs manual. Date: Mon, 7 Nov 2016 22:03:59 +0000 Message-ID: <20161107220359.GA3447@acm.fritz.box> References: <20161106221832.GB5605@acm.fritz.box> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1478556365 11868 195.159.176.226 (7 Nov 2016 22:06:05 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 7 Nov 2016 22:06:05 +0000 (UTC) User-Agent: Mutt/1.5.24 (2015-08-30) Cc: acm@muc.de To: 24891@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Nov 07 23:06:01 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c3s2Q-0005e1-Pt for geb-bug-gnu-emacs@m.gmane.org; Mon, 07 Nov 2016 23:05:10 +0100 Original-Received: from localhost ([::1]:56877 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c3s2T-0003mO-Py for geb-bug-gnu-emacs@m.gmane.org; Mon, 07 Nov 2016 17:05:13 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41752) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c3s2N-0003kA-7N for bug-gnu-emacs@gnu.org; Mon, 07 Nov 2016 17:05:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c3s2I-0000We-Uv for bug-gnu-emacs@gnu.org; Mon, 07 Nov 2016 17:05:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:33373) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1c3s2I-0000WZ-R6 for bug-gnu-emacs@gnu.org; Mon, 07 Nov 2016 17:05:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1c3s2I-0008Qo-Dy for bug-gnu-emacs@gnu.org; Mon, 07 Nov 2016 17:05:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 07 Nov 2016 22:05:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24891 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 24891-submit@debbugs.gnu.org id=B24891.147855626332355 (code B ref 24891); Mon, 07 Nov 2016 22:05:02 +0000 Original-Received: (at 24891) by debbugs.gnu.org; 7 Nov 2016 22:04:23 +0000 Original-Received: from localhost ([127.0.0.1]:48772 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c3s1f-0008Pn-Jh for submit@debbugs.gnu.org; Mon, 07 Nov 2016 17:04:23 -0500 Original-Received: from ocolin.muc.de ([193.149.48.4]:15543 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1c3s1d-0008Pe-FJ for 24891@debbugs.gnu.org; Mon, 07 Nov 2016 17:04:21 -0500 Original-Received: (qmail 31533 invoked by uid 3782); 7 Nov 2016 22:04:20 -0000 Original-Received: from acm.muc.de (p548C6E8D.dip0.t-ipconnect.de [84.140.110.141]) by colin.muc.de (tmda-ofmipd) with ESMTP; Mon, 07 Nov 2016 23:04:19 +0100 Original-Received: (qmail 3504 invoked by uid 1000); 7 Nov 2016 22:03:59 -0000 Content-Disposition: inline In-Reply-To: <20161106221832.GB5605@acm.fritz.box> X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:125449 Archived-At: 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).