all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* cmds.c patch: document omitted argument behaviour
@ 2006-11-13 17:48 Markus Triska
  2006-11-15  3:14 ` Richard Stallman
  0 siblings, 1 reply; 4+ messages in thread
From: Markus Triska @ 2006-11-13 17:48 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 419 bytes --]


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  <triska@gmx.at>

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





[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: cmds.patch --]
[-- Type: text/x-patch, Size: 1644 bytes --]

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,

[-- Attachment #3: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-11-16  6:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-13 17:48 cmds.c patch: document omitted argument behaviour Markus Triska
2006-11-15  3:14 ` Richard Stallman
2006-11-15 17:51   ` Markus Triska
2006-11-16  6:23     ` Richard Stallman

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.