From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Robert J. Chassell" Newsgroups: gmane.emacs.devel Subject: Re: keep|flush-lines, how-many to be used backward. Date: Fri, 28 Sep 2007 10:52:37 +0000 (UTC) Message-ID: References: <87d4w8ujux.fsf@cadilhac.name> <871wcmjx8s.fsf@cadilhac.name> <871wcmxy4j.fsf@jurta.org> <87sl52ihmj.fsf@cadilhac.name> <871wcmquw6.fsf@jurta.org> <87lkardtk8.fsf@cadilhac.name> Reply-To: bob@rattlesnake.com NNTP-Posting-Host: lo.gmane.org X-Trace: sea.gmane.org 1190976772 6400 80.91.229.12 (28 Sep 2007 10:52:52 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 28 Sep 2007 10:52:52 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Sep 28 12:52:44 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IbDSc-000453-JF for ged-emacs-devel@m.gmane.org; Fri, 28 Sep 2007 12:52:42 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IbDSZ-0001Zr-7h for ged-emacs-devel@m.gmane.org; Fri, 28 Sep 2007 06:52:39 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IbDSV-0001X9-9Z for emacs-devel@gnu.org; Fri, 28 Sep 2007 06:52:35 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IbDSU-0001WR-Md for emacs-devel@gnu.org; Fri, 28 Sep 2007 06:52:34 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IbDSU-0001WG-Ey for emacs-devel@gnu.org; Fri, 28 Sep 2007 06:52:34 -0400 Original-Received: from cpe-69-204-164-144.nycap.res.rr.com ([69.204.164.144] helo=rattlesnake.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IbDST-00052o-Vu for emacs-devel@gnu.org; Fri, 28 Sep 2007 06:52:34 -0400 Original-Received: by rattlesnake.com via sendmail from stdin id (Debian Smail3.2.0.115) Fri, 28 Sep 2007 10:52:37 +0000 (UTC) In-reply-to: <87lkardtk8.fsf@cadilhac.name> (michael@cadilhac.name) X-Detected-Kernel: Linux 2.6 (newer, 1) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:79989 Archived-At: What I fail to agree with, is that a prefix argument can be a three-state boolean=A0: present, negative or positive. It is straight forward to provide three options or two depending on whether the code distinguishes between a list and an integer. (You can also distinguish between the integer -1 and the symbol `-', but I never have.) See: (info "(elisp)Prefix Command Arguments") which says, Here are the possible values of a raw prefix argument: * `nil', meaning there is no prefix argument. Its numeric value is 1, but numerous commands make a distinction between `nil' and the integer 1. * An integer, which stands for itself. * A list of one element, which is an integer. This form of prefix argument results from one or a succession of `C-u''s with no digits. The numeric value is the integer in the list, but some commands make a distinction between such a list and an integer alone. * The symbol `-'. This indicates that `M--' or `C-u -' was typed, without following digits. The equivalent numeric value is -1, but some commands make a distinction between the integer -1 and the symbol `-'. That Info shows the results of interactively invoking a defun called `display-prefix' in nine different ways. (The whole defun is shown, so you can copy it.) With a slightly different definition for display-prefix than provided by the manual, (defun display-prefix (arg) "Display the value of the raw prefix arg." (interactive "P") (if (listp arg) (message "%s: is a list" arg) (message "%s: is not a list" arg))) we find: list present M-x display-prefix -| nil: is a list C-u M-x display-prefix -| (4): is a list C-u C-u M-x display-prefix -| (16): is a list no list; number positive. C-u 4 M-x display-prefix -| 4: is not a list M-4 M-x display-prefix -| 4: is not a list ; (Same as `C-u 4'.) no list; number negative or non-existant C-u - M-x display-prefix -| -: is not a list M-- M-x display-prefix -| -: is not a list ; (Same as `C-u -'.) C-u - 7 M-x display-prefix -| -7: is not a list M-- 7 M-x display-prefix -| -7: is not a list ; (Same as `C-u -7'.) -- Robert J. Chassell GnuPG Key ID: 004B4AC8 bob@rattlesnake.com bob@gnu.org http://www.rattlesnake.com http://www.teak.cc