comparison lispref/positions.texi @ 22252:40089afa2b1d

*** empty log message ***
author Richard M. Stallman <rms@gnu.org>
date Tue, 26 May 1998 18:56:56 +0000
parents d4ac295a98b3
children f0cd03a7dac9
comparison
equal deleted inserted replaced
22251:5989fa41cda6 22252:40089afa2b1d
178 These functions for parsing words use the syntax table to decide 178 These functions for parsing words use the syntax table to decide
179 whether a given character is part of a word. @xref{Syntax Tables}. 179 whether a given character is part of a word. @xref{Syntax Tables}.
180 180
181 @deffn Command forward-word count 181 @deffn Command forward-word count
182 This function moves point forward @var{count} words (or backward if 182 This function moves point forward @var{count} words (or backward if
183 @var{count} is negative). More precisely, it keeps moving until it 183 @var{count} is negative). ``Moving one word'' means moving until point
184 moves across a word-constituent character and encounters a 184 crosses a word-constituent character and then encounters a
185 word-separator character, then returns @code{t}. 185 word-separator character (or the boundary of the accessible part of the
186 186 buffer).
187 If this motion encounters the beginning or end of the buffer, or the 187
188 limits of the accessible portion when narrowing is in effect, point 188 If it is possible to move @var{count} words, without being stopped by
189 stops there and the value is @code{nil}. 189 the buffer boundary (except perhaps after the last word), the value is
190 @code{t}. Otherwise, the return value is @code{nil} and point stops
191 at the buffer boundary.
190 192
191 In an interactive call, @var{count} is set to the numeric prefix 193 In an interactive call, @var{count} is set to the numeric prefix
192 argument. 194 argument.
193 @end deffn 195 @end deffn
194 196
655 @defun skip-chars-forward character-set &optional limit 657 @defun skip-chars-forward character-set &optional limit
656 This function moves point in the current buffer forward, skipping over a 658 This function moves point in the current buffer forward, skipping over a
657 given set of characters. It examines the character following point, 659 given set of characters. It examines the character following point,
658 then advances point if the character matches @var{character-set}. This 660 then advances point if the character matches @var{character-set}. This
659 continues until it reaches a character that does not match. The 661 continues until it reaches a character that does not match. The
660 function returns @code{nil}. 662 function returns the number of characters moved over.
661 663
662 The argument @var{character-set} is like the inside of a 664 The argument @var{character-set} is like the inside of a
663 @samp{[@dots{}]} in a regular expression except that @samp{]} is never 665 @samp{[@dots{}]} in a regular expression except that @samp{]} is never
664 special and @samp{\} quotes @samp{^}, @samp{-} or @samp{\}. Thus, 666 special and @samp{\} quotes @samp{^}, @samp{-} or @samp{\}. Thus,
665 @code{"a-zA-Z"} skips over all letters, stopping before the first 667 @code{"a-zA-Z"} skips over all letters, stopping before the first
697 699
698 @defun skip-chars-backward character-set &optional limit 700 @defun skip-chars-backward character-set &optional limit
699 This function moves point backward, skipping characters that match 701 This function moves point backward, skipping characters that match
700 @var{character-set}, until @var{limit}. It is just like 702 @var{character-set}, until @var{limit}. It is just like
701 @code{skip-chars-forward} except for the direction of motion. 703 @code{skip-chars-forward} except for the direction of motion.
704
705 The return value indicates the distance traveled. It is an integer that
706 is zero or less.
702 @end defun 707 @end defun
703 708
704 @node Excursions 709 @node Excursions
705 @section Excursions 710 @section Excursions
706 @cindex excursion 711 @cindex excursion
763 @end defspec 768 @end defspec
764 769
765 @strong{Warning:} Ordinary insertion of text adjacent to the saved 770 @strong{Warning:} Ordinary insertion of text adjacent to the saved
766 point value relocates the saved value, just as it relocates all markers. 771 point value relocates the saved value, just as it relocates all markers.
767 Therefore, when the saved point value is restored, it normally comes 772 Therefore, when the saved point value is restored, it normally comes
768 after the inserted text. 773 before the inserted text.
769 774
770 Although @code{save-excursion} saves the location of the mark, it does 775 Although @code{save-excursion} saves the location of the mark, it does
771 not prevent functions which modify the buffer from setting 776 not prevent functions which modify the buffer from setting
772 @code{deactivate-mark}, and thus causing the deactivation of the mark 777 @code{deactivate-mark}, and thus causing the deactivation of the mark
773 after the command finishes. @xref{The Mark}. 778 after the command finishes. @xref{The Mark}.