all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Markus Triska <triska@gmx.at>
Subject: cmds.c patch: document omitted argument behaviour
Date: Mon, 13 Nov 2006 18:48:31 +0100	[thread overview]
Message-ID: <87ac2vw840.fsf@gmx.at> (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

             reply	other threads:[~2006-11-13 17:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-13 17:48 Markus Triska [this message]
2006-11-15  3:14 ` cmds.c patch: document omitted argument behaviour Richard Stallman
2006-11-15 17:51   ` Markus Triska
2006-11-16  6:23     ` Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ac2vw840.fsf@gmx.at \
    --to=triska@gmx.at \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.