[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
documentation bug
From: |
Frederik Fouvry |
Subject: |
documentation bug |
Date: |
Wed, 27 Oct 2004 16:19:06 +0200 (CEST) |
This bug report will be sent to the Free Software Foundation,
not to your local site managers!
Please write in English, because the Emacs maintainers do not have
translators to read other languages for them.
Your bug report will be posted to the bug-gnu-emacs@gnu.org mailing list,
and to the gnu.emacs.bug news group.
In GNU Emacs 21.3.1 (i686-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
of 2004-02-19 on cc.at.coli.uni-sb.de
configured using `configure --prefix=/export/black --with-xpm --with-jpeg
--with-tiff --with-gif --with-png --with-x --with-gcc --with-pop --with-sound'
Important settings:
value of $LC_ALL: nil
value of $LC_COLLATE: POSIX
value of $LC_CTYPE: nil
value of $LC_MESSAGES: nil
value of $LC_MONETARY: de_DE@euro
value of $LC_NUMERIC: nil
value of $LC_TIME: nil
value of $LANG: en_GB
locale-coding-system: iso-latin-1
default-enable-multibyte-characters: t
Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:
In the Elisp manual, there is the following section (in
"Conventions for Writing Minor Modes"):
The command should accept one optional argument. If the argument
is `nil', it should toggle the mode (turn it on if it is off, and
off if it is on). Otherwise, it should turn the mode on if the
argument is a positive integer, a symbol other than `nil' or `-',
or a list whose CAR is such an integer or symbol; it should turn
the mode off otherwise.
Here is an example taken from the definition of
`transient-mark-mode'. It shows the use of `transient-mark-mode'
as a variable that enables or disables the mode's behavior, and
also shows the proper way to toggle, enable or disable the minor
mode based on the raw prefix argument value.
(setq transient-mark-mode
(if (null arg) (not transient-mark-mode)
(> (prefix-numeric-value arg) 0)))
The given example does not behave as documented for the arguments
'(-) and '(nil):
(prefix-numeric-value '(-)) -> 1
(prefix-numeric-value '(nil)) -> 1
According to the quoted text, these arguments should switch off
the mode.
Either prefix-numeric-value() is not behaving correctly, or the
example is not complete. In the latter case, one could write
(setq transient-mark-mode
(let ((larg (if (consp arg) (car arg) arg)))
(if (null larg) (not transient-mark-mode)
(> (prefix-numeric-value larg) 0))))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- documentation bug,
Frederik Fouvry <=