emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

cmds.c patch: document omitted argument behaviour


From: Markus Triska
Subject: cmds.c patch: document omitted argument behaviour
Date: Mon, 13 Nov 2006 18:48:31 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.90 (gnu/linux)

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  <address@hidden>

        * cmds.c (backward-char, forward-char, forward-line): Document
        behaviour for omitted optional arguments




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,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]