From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: W. Greenhouse Newsgroups: gmane.emacs.help Subject: Re: Does the role of minor-mode-alist variable is to only help in displaying the mode name? Date: Sun, 09 Feb 2014 18:16:56 +0000 Message-ID: <87fvnsywvb.fsf@tachikoma.kusanagi> References: <1391866610.96105.YahooMailBasic@web126006.mail.ne1.yahoo.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1391969858 16718 80.91.229.3 (9 Feb 2014 18:17:38 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 9 Feb 2014 18:17:38 +0000 (UTC) To: help-gnu-emacs-mXXj517/zsQ@public.gmane.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org-mXXj517/zsQ@public.gmane.org Sun Feb 09 19:17:47 2014 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WCYwt-0004AQ-05 for geh-help-gnu-emacs@m.gmane.org; Sun, 09 Feb 2014 19:17:47 +0100 Original-Received: from localhost ([::1]:51740 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WCYws-0000eP-JJ for geh-help-gnu-emacs@m.gmane.org; Sun, 09 Feb 2014 13:17:46 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46913) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WCYwb-0000eG-6X for help-gnu-emacs-mXXj517/zsQ@public.gmane.org; Sun, 09 Feb 2014 13:17:36 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WCYwR-0005LJ-4M for help-gnu-emacs-mXXj517/zsQ@public.gmane.org; Sun, 09 Feb 2014 13:17:29 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:34537) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WCYwQ-0005KS-Tz for help-gnu-emacs-mXXj517/zsQ@public.gmane.org; Sun, 09 Feb 2014 13:17:19 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1WCYwP-0003zx-V5 for help-gnu-emacs-mXXj517/zsQ@public.gmane.org; Sun, 09 Feb 2014 19:17:17 +0100 Original-Received: from herngaard.torservers.net ([96.44.189.102]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 09 Feb 2014 19:17:17 +0100 Original-Received: from wgreenhouse by herngaard.torservers.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 09 Feb 2014 19:17:17 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 40 Original-X-Complaints-To: usenet-dbVV3NMTNubNLxjTenLetw@public.gmane.org X-Gmane-NNTP-Posting-Host: herngaard.torservers.net X-Archive: encrypt User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:1VIp03HJJM4EinU9K36RFNuCzXo= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: help-gnu-emacs-mXXj517/zsQ@public.gmane.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org-mXXj517/zsQ@public.gmane.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org-mXXj517/zsQ@public.gmane.org Xref: news.gmane.org gmane.emacs.help:96011 Archived-At: Talespin Kit writes: > In the elisp document the role of the minor-mode-alist variable is > described as below. > > > 23.3.1 Conventions for Writing Minor Modes > ---------------------------------------------------------------- > > Add an element to `minor-mode-alist' for each minor mode (*note > Definition of minor-mode-alist::), if you want to indicate the > minor mode in the mode line. > > But the function "describe-mode" uses the variable "minor-mode-alist" > to find the list of minor modes. Does this mean the document is to be > updated. Because it gives the impression the information about the > minor modes are stored somewhere else. Although i am not able to find > it out. Yes, `describe-mode' uses `major-mode' to discover which major mode's documentation to show and `minor-mode-alist' to discover which minor modes' documentation to show. There is no other listing of enabled minor modes. It should therefore be considered not merely a breach of convention but a serious design flaw if a major or minor mode fails to set these variables. Fortunately, most major modes are created with `define-derived-mode' and most minor modes with `define-minor-mode', which take care of these and other mode-related bureaucratic tasks automatically. Perhaps the language of (info "(elisp) Minor Mode Conventions") could be strengthened to match that of (info "(elisp) Major Mode Conventions"), which says: --8<---------------cut here---------------start------------->8--- * The major mode command should set the variable `major-mode' to the major mode command symbol. This is how `describe-mode' discovers which documentation to print. --8<---------------cut here---------------end--------------->8--- Hope that clarifies things a bit.