From f73f4ce69f4b2e8f6c422aca8f8cc36ef72fa725 Mon Sep 17 00:00:00 2001 From: Xue Fuqiao Date: Tue, 13 Aug 2013 22:26:39 +0800 Subject: [PATCH] Doc fix for forward-word and backward-word. * doc/lispref/positions.texi (Word Motion): Remove redundant sentence. * lisp/simple.el (backward-word): Mention the optional argument. * src/syntax.c (forward_word): Mention the optional argument. --- doc/lispref/ChangeLog | 4 ++++ doc/lispref/positions.texi | 6 +++--- lisp/ChangeLog | 4 ++++ lisp/simple.el | 4 +++- src/ChangeLog | 1 + src/syntax.c | 1 + 6 files changed, 16 insertions(+), 4 deletions(-) diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 6df8c3912a3..42b9600a0ac 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@ -1,3 +1,7 @@ +2013-08-13 Xue Fuqiao + + * positions.texi (Word Motion): Remove redundant sentence. + 2013-08-13 Glenn Morris * lists.texi (List Elements): diff --git a/doc/lispref/positions.texi b/doc/lispref/positions.texi index 119ad98a53d..5cb1a851a5b 100644 --- a/doc/lispref/positions.texi +++ b/doc/lispref/positions.texi @@ -191,8 +191,8 @@ whether a given character is part of a word. @xref{Syntax Tables}. @deffn Command forward-word &optional count This function moves point forward @var{count} words (or backward if -@var{count} is negative). If @var{count} is @code{nil}, it moves -forward one word. +@var{count} is negative). If @var{count} is omitted or @code{nil}, it +defaults to 1. ``Moving one word'' means moving until point crosses a word-constituent character and then encounters a word-separator @@ -210,7 +210,7 @@ If @code{inhibit-field-text-motion} is non-@code{nil}, this function ignores field boundaries. In an interactive call, @var{count} is specified by the numeric prefix -argument. If @var{count} is omitted or @code{nil}, it defaults to 1. +argument. @end deffn @deffn Command backward-word &optional count diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ff9f4ff8707..0c8791d8af7 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2013-08-13 Xue Fuqiao + + * simple.el (backward-word): Mention the optional argument. + 2013-08-13 Stefan Monnier * frameset.el (frameset--make): Rename constructor from make-frameset. diff --git a/lisp/simple.el b/lisp/simple.el index 0edf5ca8d9c..6825c41becc 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -3338,6 +3338,7 @@ extract characters that are special to a buffer, and should not be copied into other buffers." (funcall filter-buffer-substring-function beg end delete)) +;; FIXME: `with-wrapper-hook' is obsolete (defun buffer-substring--filter (beg end &optional delete) (with-wrapper-hook filter-buffer-substring-functions (beg end delete) (cond @@ -5670,7 +5671,8 @@ current object." (defun backward-word (&optional arg) "Move backward until encountering the beginning of a word. -With argument ARG, do this that many times." +With argument ARG, do this that many times. +If ARG is omitted or nil, move point backward one word." (interactive "^p") (forward-word (- (or arg 1)))) diff --git a/src/ChangeLog b/src/ChangeLog index a0a37f0628d..28e8ab66e37 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,6 @@ 2013-08-13 Xue Fuqiao + * syntax.c (forward_word): * cmds.c (forward_char, backward_char): Mention the optional argument. 2013-08-13 Dmitry Antipov diff --git a/src/syntax.c b/src/syntax.c index 6d52d115889..f5b37303a4a 100644 --- a/src/syntax.c +++ b/src/syntax.c @@ -1464,6 +1464,7 @@ scan_words (register ptrdiff_t from, register EMACS_INT count) DEFUN ("forward-word", Fforward_word, Sforward_word, 0, 1, "^p", doc: /* Move point forward ARG words (backward if ARG is negative). +If ARG is omitted or nil, move point forward one word. Normally returns t. If an edge of the buffer or a field boundary is reached, point is left there and the function returns nil. Field boundaries are not noticed if -- 2.39.2