unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Luc Teirlinck <teirllm@dms.auburn.edu>
Cc: emacs-devel@gnu.org
Subject: Re: `define-minor-mode' makes erroneous docstrings.
Date: Tue, 12 Apr 2005 12:04:46 -0500 (CDT)	[thread overview]
Message-ID: <200504121704.j3CH4kO15006@raven.dms.auburn.edu> (raw)
In-Reply-To: <m1oeck642w.fsf-monnier+emacs@gnu.org> (message from Stefan Monnier on Mon, 11 Apr 2005 23:57:05 -0400)

Stefan Monnier wrote:

   The comment about not setting the variable locally should not be added if
   the mode is not declared to be global.

If the mode is not global, the comment is less explicit, but still says:

   Use the command `visible-mode' to change this variable.

In the case of Visible mode, this is actually correct: just setting
the variable does not work.

Whether or not setting the variable works does not depend on whether
the mode is global or local.  The only difference is that for local
modes, setting through Custom does not work.

Maybe if the minor mode defined using `define-minor-mode', local or
global, has an empty explicitly specified function definition, the
docstring could explicitly say that setting the variable has the same
effect as calling the function, except for some side stuff, like
running the mode hooks.

Examples include line-number-mode, column-number-mode, size-indication-mode
and transient-mark-mode.  I guess that there must be many others.

There is the problem of reconciling stuff in `(emacs)Minor Modes' with
the behavior of `define-minor-mode'.  Part of that might be updating
the node, but part of it might be correcting misfeatures of
`define-minor-mode'.

Sincerely,

Luc.

  reply	other threads:[~2005-04-12 17:04 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-12  2:45 `define-minor-mode' makes erroneous docstrings Luc Teirlinck
2005-04-12  3:09 ` Luc Teirlinck
2005-04-12  3:29   ` Luc Teirlinck
2005-04-12  3:57 ` Stefan Monnier
2005-04-12 17:04   ` Luc Teirlinck [this message]
2005-04-12 17:23 ` Richard Stallman
2005-04-13  2:33   ` Luc Teirlinck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200504121704.j3CH4kO15006@raven.dms.auburn.edu \
    --to=teirllm@dms.auburn.edu \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).