From: Juanma Barranquero <lekktu@gmail.com>
To: Drew Adams <drew.adams@oracle.com>
Cc: 2470@debbugs.gnu.org
Subject: bug#2470: 23.0.90; auto-fill-mode, :minor-mode-function
Date: Sun, 10 Jul 2011 00:16:10 +0200 [thread overview]
Message-ID: <CAAeL0SQdUNgiN2EwtY8az=_sj0=BYx3JemVsc7g4fyt-myMSyw@mail.gmail.com> (raw)
In-Reply-To: <003701c99772$d0fbab30$c2b22382@us.oracle.com>
On Wed, Feb 25, 2009 at 18:59, Drew Adams <drew.adams@oracle.com> wrote:
> I said to check the mode variable. The reply was that
> auto-fill-mode has no mode variable.
As you point out below, the "mode variable" for auto-fill-mode is
auto-fill-function. Is what gets set in minor-mode-alist, and its a
reliable way to know whether the mode is active or not.
> ;; FIXME: turn into a proper minor mode.
> ;; Add a global minor mode version of it.
> (defun auto-fill-mode (&optional arg)
> ...
>
> So it seems to be in need of a fix, but I see no bug filed against it.
It now says:
;; FIXME: turn into a proper minor mode.
;; Add a global minor mode version of it.
(define-minor-mode auto-fill-mode
The comment (from 2002) is still there, but the mode was converted to
define-minor-mode in 2010.
> Is this mechanism still needed if `define-minor-mode' is used? Is it
> just for compatibility with XEmacs code and legacy code?
define-minor-mode has an equivalent :variable keyword, used, as in
this case, when it is preferable to get/set the mode variable
differently, or use another variable. It is not, AFAIK, because of
XEmacs compatibility, but cases where the variable is not just a
toggle; for example, overwrite-mode uses it too, and also the new
emacs-lock-mode that I committed a few days ago.
> How about documenting it - at least with a comment in the code
> somewhere: what is for, how and when to use it.
About :minor-mode-function, Stefan already answered you that should
not be used in new code, so nothing to document.
Is anything more to be done about this bug?
Juanma
next prev parent reply other threads:[~2011-07-09 22:16 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <AcmXctCJzHsFMr8USuWNNuSa9WxT6w==>
2009-02-25 17:59 ` bug#2470: 23.0.90; auto-fill-mode, :minor-mode-function Drew Adams
2009-02-25 19:56 ` Stefan Monnier
2009-02-25 20:02 ` Drew Adams
2011-07-09 22:16 ` Juanma Barranquero [this message]
2011-07-09 23:10 ` Drew Adams
2011-07-09 23:18 ` Juanma Barranquero
2011-07-10 9:54 ` Drew Adams
2011-07-16 18:43 ` Lars Magne Ingebrigtsen
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAAeL0SQdUNgiN2EwtY8az=_sj0=BYx3JemVsc7g4fyt-myMSyw@mail.gmail.com' \
--to=lekktu@gmail.com \
--cc=2470@debbugs.gnu.org \
--cc=drew.adams@oracle.com \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.