GNU bug report logs -
#2470
23.0.90; auto-fill-mode, :minor-mode-function
Previous Next
Reported by: "Drew Adams" <drew.adams <at> oracle.com>
Date: Wed, 25 Feb 2009 18:05:05 UTC
Severity: minor
Tags: fixed
Fixed in version 24.1
Done: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
1. Someone on EmacsWiki asked how to tell if a given minor mode is
on. I said to check the mode variable. The reply was that
auto-fill-mode has no mode variable.
The code shows this:
(put 'auto-fill-function :minor-mode-function 'auto-fill-mode)
;; 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.
2. What is :minor-mode-function? It is used in a couple of places in
the Emacs Lisp sources, with no comment or other explanation. It is
not in the Elisp manual. It seems to be a way to associate a
different function with a minor mode - a function with a different
name from the mode itself. For example, `auto-fill-function' is the
:minor-mode-function for `auto-fill-mode'.
Is this mechanism still needed if `define-minor-mode' is used? Is it
just for compatibility with XEmacs code and legacy code?
How about documenting it - at least with a comment in the code
somewhere: what is for, how and when to use it.
In GNU Emacs 23.0.90.1 (i386-mingw-nt5.1.2600)
of 2009-02-01 on SOFT-MJASON
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (3.4)'
This bug report was last modified 14 years and 8 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.