From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Markus Triska Newsgroups: gmane.emacs.devel Subject: cmds.c patch: document omitted argument behaviour Date: Mon, 13 Nov 2006 18:48:31 +0100 Message-ID: <87ac2vw840.fsf@gmx.at> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: sea.gmane.org 1163488205 13640 80.91.229.2 (14 Nov 2006 07:10:05 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 14 Nov 2006 07:10:05 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Nov 14 08:09:59 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GjsQg-0007Jl-Cu for ged-emacs-devel@m.gmane.org; Tue, 14 Nov 2006 08:09:58 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GjsQf-0005Hx-QP for ged-emacs-devel@m.gmane.org; Tue, 14 Nov 2006 02:09:57 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GjsQT-0005H9-Lb for emacs-devel@gnu.org; Tue, 14 Nov 2006 02:09:45 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GjsQQ-0005Gf-Pi for emacs-devel@gnu.org; Tue, 14 Nov 2006 02:09:44 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GjsQQ-0005Gc-Kv for emacs-devel@gnu.org; Tue, 14 Nov 2006 02:09:42 -0500 Original-Received: from [199.232.41.67] (helo=mx20.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1GjsQQ-0001ce-Dd for emacs-devel@gnu.org; Tue, 14 Nov 2006 02:09:42 -0500 Original-Received: from [193.170.75.14] (helo=stud4.tuwien.ac.at) by mx20.gnu.org with esmtp (Exim 4.52) id 1Gjfw0-00022f-Qp for emacs-devel@gnu.org; Mon, 13 Nov 2006 12:49:29 -0500 Original-Received: from localhost.localdomain (v212-157.vps.tuwien.ac.at [128.131.212.157]) by stud4.tuwien.ac.at (8.9.3 (PHNE_29774)/8.9.3) with ESMTP id SAA19152 for ; Mon, 13 Nov 2006 18:48:10 +0100 (MET) Original-To: emacs-devel@gnu.org User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.90 (gnu/linux) 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:62284 Archived-At: --=-=-= A patch documenting behaviour for omitted optional arguments in `forward-char', `backward-char' and `forward-line' follows. While it's clear from context, one could also change "Move N lines/characters" to "Move abs(N) lines/characters" to be precise. ChangeLog: 2006-11-13 Markus Triska * cmds.c (backward-char, forward-char, forward-line): Document behaviour for omitted optional arguments --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=cmds.patch Index: cmds.c =================================================================== RCS file: /sources/emacs/emacs/src/cmds.c,v retrieving revision 1.98 diff -u -p -r1.98 cmds.c --- cmds.c 18 Jul 2006 13:26:05 -0000 1.98 +++ cmds.c 13 Nov 2006 17:30:34 -0000 @@ -56,8 +56,9 @@ DEFUN ("forward-point", Fforward_point, } DEFUN ("forward-char", Fforward_char, Sforward_char, 0, 1, "p", - doc: /* Move point right N characters (left if N is negative). -On reaching end of buffer, stop and signal error. */) + doc: /* Move point right (left if N is negative) N characters, +and one character if N is nil or omitted. On reaching end of buffer, +stop and signal error. */) (n) Lisp_Object n; { @@ -92,8 +93,9 @@ On reaching end of buffer, stop and sign } DEFUN ("backward-char", Fbackward_char, Sbackward_char, 0, 1, "p", - doc: /* Move point left N characters (right if N is negative). -On attempt to pass beginning or end of buffer, stop and signal error. */) + doc: /* Move point left (right if N is negative) N characters, +and one character if N is nil or omitted. On attempt to pass +beginning or end of buffer, stop and signal error. */) (n) Lisp_Object n; { @@ -108,6 +110,7 @@ On attempt to pass beginning or end of b DEFUN ("forward-line", Fforward_line, Sforward_line, 0, 1, "p", doc: /* Move N lines forward (backward if N is negative). +N nil or omitted is equivalent to N = 1. Precisely, if point is on line I, move to the start of line I + N. If there isn't room, go as far as possible (no error). Returns the count of lines left to move. If moving forward, --=-=-= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel --=-=-=--