X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=man%2Flispref%2Fpositions.texi;h=78049178bdaf376eb0fdb3a3bfac8c22c244a4d6;hb=f95b7eb04061bc74da5c06474338b82eac5ab6d0;hp=13832019512e29a9cd435604451b8f42ede72b88;hpb=d3dd71489ab2730d79536ebdc3c56cca82766e9d;p=chise%2Fxemacs-chise.git.1 diff --git a/man/lispref/positions.texi b/man/lispref/positions.texi index 1383201..7804917 100644 --- a/man/lispref/positions.texi +++ b/man/lispref/positions.texi @@ -1,6 +1,6 @@ @c -*-texinfo-*- @c This is part of the XEmacs Lisp Reference Manual. -@c Copyright (C) 1990, 1991, 1992, 1993, 1994 Free Software Foundation, Inc. +@c Copyright (C) 1990, 1991, 1992, 1993, 1994 Free Software Foundation, Inc. @c See the file lispref.texi for copying conditions. @setfilename ../../info/positions.info @node Positions, Markers, Consoles and Devices, Top @@ -193,28 +193,27 @@ In an interactive call, @var{count} is the numeric prefix argument. These functions for parsing words use the syntax table to decide whether a given character is part of a word. @xref{Syntax Tables}. -@deffn Command forward-word count &optional buffer +@deffn Command forward-word &optional count buffer This function moves point forward @var{count} words (or backward if @var{count} is negative). Normally it returns @code{t}. If this motion encounters the beginning or end of the buffer, or the limits of the accessible portion when narrowing is in effect, point stops there and -the value is @code{nil}. @var{buffer} defaults to the current buffer if -omitted. +the value is @code{nil}. + +@var{count} defaults to @code{1} and @var{buffer} defaults to the +current buffer. In an interactive call, @var{count} is set to the numeric prefix argument. @end deffn -@deffn Command backward-word count &optional buffer +@deffn Command backward-word &optional count buffer This function is just like @code{forward-word}, except that it moves backward until encountering the front of a word, rather than forward. @var{buffer} defaults to the current buffer if omitted. In an interactive call, @var{count} is set to the numeric prefix argument. - -This function is rarely used in programs, as it is more efficient to -call @code{forward-word} with a negative argument. @end deffn @defvar words-include-escapes @@ -249,26 +248,26 @@ Likewise, to move to the end of the buffer, use: documented here to warn you not to use them in Lisp programs, because they set the mark and display messages in the echo area. -@deffn Command beginning-of-buffer &optional n +@deffn Command beginning-of-buffer &optional count This function moves point to the beginning of the buffer (or the limits of the accessible portion, when narrowing is in effect), setting the -mark at the previous position. If @var{n} is non-@code{nil}, then it -puts point @var{n} tenths of the way from the beginning of the buffer. +mark at the previous position. If @var{count} is non-@code{nil}, then it +puts point @var{count} tenths of the way from the beginning of the buffer. -In an interactive call, @var{n} is the numeric prefix argument, -if provided; otherwise @var{n} defaults to @code{nil}. +In an interactive call, @var{count} is the numeric prefix argument, +if provided; otherwise @var{count} defaults to @code{nil}. Don't use this function in Lisp programs! @end deffn -@deffn Command end-of-buffer &optional n +@deffn Command end-of-buffer &optional count This function moves point to the end of the buffer (or the limits of the accessible portion, when narrowing is in effect), setting the mark -at the previous position. If @var{n} is non-@code{nil}, then it puts -point @var{n} tenths of the way from the end of the buffer. +at the previous position. If @var{count} is non-@code{nil}, then it puts +point @var{count} tenths of the way from the end of the buffer. -In an interactive call, @var{n} is the numeric prefix argument, -if provided; otherwise @var{n} defaults to @code{nil}. +In an interactive call, @var{count} is the numeric prefix argument, +if provided; otherwise @var{count} defaults to @code{nil}. Don't use this function in Lisp programs! @end deffn @@ -353,7 +352,7 @@ the end of the last line, and the value will be 2. In an interactive call, @var{count} is the numeric prefix argument. @end deffn -@defun count-lines start end +@defun count-lines start end &optional ignore-invisible-lines-flag @cindex lines in region This function returns the number of lines between the positions @var{start} and @var{end} in the current buffer. If @var{start} and @@ -362,6 +361,16 @@ This function returns the number of lines between the positions because the text between them, considered in isolation, must contain at least one line unless it is empty. +With optional @var{ignore-invisible-lines-flag} non-@code{nil}, lines +collapsed with selective-display are excluded from the line count. + +@strong{Note:} The expression to return the current line number is not +obvious: + +@example +(1+ (count-lines 1 (point-at-bol))) +@end example + Here is an example of using @code{count-lines}: @example @@ -475,7 +484,7 @@ performance of your code. @xref{Text Lines, cache-long-line-scans}. This function moves point to the start of the frame line @var{count} frame lines down from the frame line containing point. If @var{count} is negative, it moves up instead. The optional second argument -@var{window} may be used to specify a window other than the +@var{window} may be used to specify a window other than the selected window in which to perform the motion. Normally, @code{vertical-motion} returns the number of lines moved. The @@ -592,7 +601,7 @@ beginning of the first screen line. @xref{Minibuffer Misc}. @end ignore @node List Motion -@subsection Moving over Balanced Expressions +@subsection Moving over Balanced Expressions @cindex sexp motion @cindex Lisp expression motion @cindex list motion @@ -602,7 +611,7 @@ expressions (also called @dfn{sexps} in connection with moving across them in XEmacs). The syntax table controls how these functions interpret various characters; see @ref{Syntax Tables}. @xref{Parsing Expressions}, for lower-level primitives for scanning sexps or parts of -sexps. For user-level commands, see @ref{Lists and Sexps,,, emacs, XEmacs +sexps. For user-level commands, see @ref{Lists and Sexps,,, xemacs, XEmacs Reference Manual}. @deffn Command forward-list &optional arg @@ -612,29 +621,30 @@ quotes are ignored.) @var{arg} defaults to 1 if omitted. If @var{arg} is negative, move backward across that many groups of parentheses. @end deffn -@deffn Command backward-list &optional arg -This function moves backward across @var{arg} balanced groups of +@deffn Command backward-list &optional count +This function moves backward across @var{count} balanced groups of parentheses. (Other syntactic entities such as words or paired string -quotes are ignored.) @var{arg} defaults to 1 if omitted. If @var{arg} -is negative, move forward across that many groups of parentheses. +quotes are ignored.) @var{count} defaults to 1 if omitted. If +@var{count} is negative, move forward across that many groups of +parentheses. @end deffn -@deffn Command up-list arg -This function moves forward out of @var{arg} levels of parentheses. +@deffn Command up-list &optional count +This function moves forward out of @var{count} levels of parentheses. A negative argument means move backward but still to a less deep spot. @end deffn -@deffn Command down-list arg -This function moves forward into @var{arg} levels of parentheses. A -negative argument means move backward but still go -deeper in parentheses (@minus{}@var{arg} levels). +@deffn Command down-list &optional count +This function moves forward into @var{count} levels of parentheses. +A negative argument means move backward but still go deeper in +parentheses (@minus{}@var{count} levels). @end deffn -@deffn Command forward-sexp &optional arg -This function moves forward across @var{arg} balanced expressions. +@deffn Command forward-sexp &optional count +This function moves forward across @var{count} balanced expressions. Balanced expressions include both those delimited by parentheses and -other kinds, such as words and string constants. @var{arg} defaults to -1 if omitted. If @var{arg} is negative, move backward across that many +other kinds, such as words and string constants. @var{count} defaults to +1 if omitted. If @var{count} is negative, move backward across that many balanced expressions. For example, @example @@ -655,24 +665,24 @@ balanced expressions. For example, @end example @end deffn -@deffn Command backward-sexp &optional arg -This function moves backward across @var{arg} balanced expressions. -@var{arg} defaults to 1 if omitted. If @var{arg} is negative, move +@deffn Command backward-sexp &optional count +This function moves backward across @var{count} balanced expressions. +@var{count} defaults to 1 if omitted. If @var{count} is negative, move forward across that many balanced expressions. @end deffn -@deffn Command beginning-of-defun &optional arg -This function moves back to the @var{arg}th beginning of a defun. If -@var{arg} is negative, this actually moves forward, but it still moves -to the beginning of a defun, not to the end of one. @var{arg} defaults -to 1 if omitted. +@deffn Command beginning-of-defun &optional count +This function moves back to the @var{count}th beginning of a defun. +If @var{count} is negative, this actually moves forward, but it still +moves to the beginning of a defun, not to the end of one. @var{count} +defaults to 1 if omitted. @end deffn -@deffn Command end-of-defun &optional arg -This function moves forward to the @var{arg}th end of a defun. If -@var{arg} is negative, this actually moves backward, but it still moves -to the end of a defun, not to the beginning of one. @var{arg} defaults -to 1 if omitted. +@deffn Command end-of-defun &optional count +This function moves forward to the @var{count}th end of a defun. +If @var{count} is negative, this actually moves backward, but it still +moves to the end of a defun, not to the beginning of one. @var{count} +defaults to 1 if omitted. @end deffn @defopt defun-prompt-regexp @@ -813,9 +823,9 @@ This special form evaluates @var{forms} with @var{buffer} as the current buffer. It returns the value of the last form. @end defspec -@defspec with-temp-file file forms@dots{} +@defspec with-temp-file filename forms@dots{} This special form creates a new buffer, evaluates @var{forms} there, and -writes the buffer to @var{file}. It returns the value of the last form +writes the buffer to @var{filename}. It returns the value of the last form evaluated. @end defspec @@ -925,13 +935,13 @@ tool for the job. Here is what you must use instead: @example @group -(let ((beg (point-min-marker)) +(let ((start (point-min-marker)) (end (point-max-marker))) (unwind-protect (progn @var{body}) (save-excursion - (set-buffer (marker-buffer beg)) - (narrow-to-region beg end)))) + (set-buffer (marker-buffer start)) + (narrow-to-region start end)))) @end group @end example