From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Frederik Fouvry Newsgroups: gmane.emacs.bugs Subject: documentation bug Date: Wed, 27 Oct 2004 16:19:06 +0200 (CEST) Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Message-ID: <20041027141906.97A4A10C80@cc.at.coli.uni-sb.de> Reply-To: Frederik.Fouvry@CoLi.Uni-SB.DE NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1098886816 9559 80.91.229.6 (27 Oct 2004 14:20:16 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 27 Oct 2004 14:20:16 +0000 (UTC) Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Oct 27 16:20:04 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CMoeh-0001sR-00 for ; Wed, 27 Oct 2004 16:20:03 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CMomR-0008Sf-RH for geb-bug-gnu-emacs@m.gmane.org; Wed, 27 Oct 2004 10:28:03 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CMomI-0008Pz-2D for bug-gnu-emacs@gnu.org; Wed, 27 Oct 2004 10:27:54 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CMomG-0008PW-Ml for bug-gnu-emacs@gnu.org; Wed, 27 Oct 2004 10:27:53 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CMomG-0008PF-Dl for bug-gnu-emacs@gnu.org; Wed, 27 Oct 2004 10:27:52 -0400 Original-Received: from [134.96.7.3] (helo=indyio.rz.uni-saarland.de) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CMods-0004eL-1N for bug-gnu-emacs@gnu.org; Wed, 27 Oct 2004 10:19:12 -0400 Original-Received: from top.coli.uni-sb.de (top.coli.uni-sb.de [134.96.68.10]) by indyio.rz.uni-saarland.de (8.12.10/8.12.10) with ESMTP id i9REJ7c813925686 for ; Wed, 27 Oct 2004 16:19:08 +0200 (CST) Original-Received: from cc.at.coli.uni-sb.de (cc.at.coli.uni-sb.de [134.96.104.80]) by top.coli.uni-sb.de (8.9.3p3/8.9.3) with ESMTP id QAA22331 for ; Wed, 27 Oct 2004 16:19:06 +0200 (MET DST) Original-Received: by cc.at.coli.uni-sb.de (Postfix, from userid 1292) id 97A4A10C80; Wed, 27 Oct 2004 16:19:06 +0200 (CEST) Original-To: bug-gnu-emacs@gnu.org X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-1.5.1 (indyio.rz.uni-saarland.de [134.96.7.3]); Wed, 27 Oct 2004 16:19:08 +0200 (CEST) X-AntiVirus: checked by AntiVir Milter 1.0.6; AVE 6.28.0.12; VDF 6.28.0.41 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.bugs:9474 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:9474 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))))