From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Phil Sainty Newsgroups: gmane.emacs.bugs Subject: bug#38601: describe-mode never says the most important thing Date: Mon, 16 Dec 2019 11:32:24 +1300 Message-ID: References: <87d0crpzxg.5.fsf@jidanni.org> <23f279f3-f2a6-6327-b1eb-0d167cdfad22@orcon.net.nz> <877e2xtfkk.fsf@fliptop.i-did-not-set--mail-host-address--so-tickle-me> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="47471"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 Cc: 38601@debbugs.gnu.org To: Tomas Nordin Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Dec 15 23:33:50 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1igcSR-000CAl-U8 for geb-bug-gnu-emacs@m.gmane.org; Sun, 15 Dec 2019 23:33:48 +0100 Original-Received: from localhost ([::1]:43662 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1igcSQ-0007pZ-H7 for geb-bug-gnu-emacs@m.gmane.org; Sun, 15 Dec 2019 17:33:46 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45449) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1igcS1-0007gS-NA for bug-gnu-emacs@gnu.org; Sun, 15 Dec 2019 17:33:41 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1igcRi-0007Vs-D9 for bug-gnu-emacs@gnu.org; Sun, 15 Dec 2019 17:33:21 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:59641) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1igcRi-0007UW-3E for bug-gnu-emacs@gnu.org; Sun, 15 Dec 2019 17:33:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1igcRi-0002nX-1W for bug-gnu-emacs@gnu.org; Sun, 15 Dec 2019 17:33:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Phil Sainty Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 15 Dec 2019 22:33:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 38601 X-GNU-PR-Package: emacs Original-Received: via spool by 38601-submit@debbugs.gnu.org id=B38601.157644915010702 (code B ref 38601); Sun, 15 Dec 2019 22:33:01 +0000 Original-Received: (at 38601) by debbugs.gnu.org; 15 Dec 2019 22:32:30 +0000 Original-Received: from localhost ([127.0.0.1]:37378 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1igcRB-0002mY-Ny for submit@debbugs.gnu.org; Sun, 15 Dec 2019 17:32:29 -0500 Original-Received: from smtp-2.orcon.net.nz ([60.234.4.43]:56647) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1igcR9-0002mQ-Rv for 38601@debbugs.gnu.org; Sun, 15 Dec 2019 17:32:28 -0500 Original-Received: from [116.251.203.246] (port=37456 helo=[192.168.20.103]) by smtp-2.orcon.net.nz with esmtpa (Exim 4.90_1) (envelope-from ) id 1igcR6-0006DG-Nd; Mon, 16 Dec 2019 11:32:24 +1300 In-Reply-To: <877e2xtfkk.fsf@fliptop.i-did-not-set--mail-host-address--so-tickle-me> Content-Language: en-GB X-GeoIP: NZ X-Spam_score: -2.9 X-Spam_score_int: -28 X-Spam_bar: -- 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: 209.51.188.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:173404 Archived-At: On 16/12/19 11:00 AM, Tomas Nordin wrote: > Phil Sainty writes: >> (I do think there's an argument for showing the mode symbol rather >> than a capitalised variant of the name in the `describe-mode' help; >> but that's a different conversation.) > > A different conversation but I didn't see that so I take the > opportunity to agree here. The capitalized variants of the command > name was always confusing to me -- is it the command name, only > with a big letter in the beginning, or is it some sort of doxy > description that is not the same as the command name. Easy to check, > but anyway. For the major mode it's just the `mode-name' value. For the minor modes it's the symbol name, sans "-minor-mode"/"-mode", passed through `capitalize': "foo-bar-mode" becomes "Foo-Bar". This is hard-coded in `describe-mode', which produces the following: (pp-eval-expression '(let (minor-modes) ;; Older packages do not register in minor-mode-list but only in ;; minor-mode-alist. (dolist (x minor-mode-alist) (setq x (car x)) (unless (memq x minor-mode-list) (push x minor-mode-list))) ;; Find enabled minor mode we will want to mention. (dolist (mode minor-mode-list) ;; Document a minor mode if it is listed in minor-mode-alist, ;; non-nil, and has a function definition. (let ((fmode (or (get mode :minor-mode-function) mode))) (and (boundp mode) (symbol-value mode) (fboundp fmode) (let ((pretty-minor-mode (if (string-match "\\(\\(-minor\\)?-mode\\)?\\'" (symbol-name fmode)) (capitalize (substring (symbol-name fmode) 0 (match-beginning 0))) fmode))) (push (list fmode pretty-minor-mode (format-mode-line (assq mode minor-mode-alist))) minor-modes))))) minor-modes))