unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Does the role of minor-mode-alist variable is to only help in displaying the mode name?
@ 2014-02-08 13:36 Talespin Kit
  2014-02-09 18:16 ` W. Greenhouse
  0 siblings, 1 reply; 2+ messages in thread
From: Talespin Kit @ 2014-02-08 13:36 UTC (permalink / raw)
  To: help-gnu-emacs

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. 

Regards,
Talespin





^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Does the role of minor-mode-alist variable is to only help in displaying the mode name?
  2014-02-08 13:36 Does the role of minor-mode-alist variable is to only help in displaying the mode name? Talespin Kit
@ 2014-02-09 18:16 ` W. Greenhouse
  0 siblings, 0 replies; 2+ messages in thread
From: W. Greenhouse @ 2014-02-09 18:16 UTC (permalink / raw)
  To: help-gnu-emacs-mXXj517/zsQ

Talespin Kit <talespin_kit-/E1597aS9LQAvxtiuMwx3w@public.gmane.org> 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.




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-02-09 18:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-08 13:36 Does the role of minor-mode-alist variable is to only help in displaying the mode name? Talespin Kit
2014-02-09 18:16 ` W. Greenhouse

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).