all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* goto-line documentation update.
@ 2008-11-19  6:01 Lute Kamstra
  2008-11-19 19:09 ` Eli Zaretskii
  2008-11-19 23:28 ` Juri Linkov
  0 siblings, 2 replies; 4+ messages in thread
From: Lute Kamstra @ 2008-11-19  6:01 UTC (permalink / raw)
  To: emacs-devel

I've updated the documentation of goto-line in the lisp manual.  Any
objections?

  Lute.

Index: doc/lispref/ChangeLog
===================================================================
RCS file: /sources/emacs/emacs/doc/lispref/ChangeLog,v
retrieving revision 1.147
diff -c -r1.147 ChangeLog
*** doc/lispref/ChangeLog	19 Nov 2008 04:25:49 -0000	1.147
--- doc/lispref/ChangeLog	19 Nov 2008 05:56:39 -0000
***************
*** 1,3 ****
--- 1,7 ----
+ 2008-11-19  Lute Kamstra  <lute@gnu.org>
+ 
+ 	* positions.texi (Text Lines): Update goto-line documentation.
+ 
  2008-11-19  Glenn Morris  <rgm@gnu.org>
  
  	* doclicense.texi: Update to FDL 1.3.
Index: doc/lispref/positions.texi
===================================================================
RCS file: /sources/emacs/emacs/doc/lispref/positions.texi,v
retrieving revision 1.6
diff -c -r1.6 positions.texi
*** doc/lispref/positions.texi	27 Oct 2008 21:30:00 -0000	1.6
--- doc/lispref/positions.texi	19 Nov 2008 05:56:39 -0000
***************
*** 299,317 ****
  of the window, by line continuation in display, or by how tabs and
  control characters are displayed.
  
! @deffn Command goto-line line
  This function moves point to the front of the @var{line}th line,
! counting from line 1 at beginning of the buffer.  If @var{line} is less
! than 1, it moves point to the beginning of the buffer.  If @var{line} is
! greater than the number of lines in the buffer, it moves point to the
! end of the buffer---that is, the @emph{end of the last line} of the
! buffer.  This is the only case in which @code{goto-line} does not
! necessarily move to the beginning of a line.
  
  If narrowing is in effect, then @var{line} still counts from the
  beginning of the buffer, but point cannot go outside the accessible
! portion.  So @code{goto-line} moves point to the beginning or end of the
! accessible portion, if the line number specifies an inaccessible
  position.
  
  The return value of @code{goto-line} is the difference between
--- 299,316 ----
  of the window, by line continuation in display, or by how tabs and
  control characters are displayed.
  
! @deffn Command goto-line line &optional buffer
  This function moves point to the front of the @var{line}th line,
! counting from line 1 at beginning of the buffer, and leaves mark at
! the previous position.  If @var{line} is less than 1, it moves point
! to the beginning of the buffer.  If @var{line} is greater than the
! number of lines in the buffer, it moves point to the end of the
! buffer---that is, the @emph{end of the last line} of the buffer.
  
  If narrowing is in effect, then @var{line} still counts from the
  beginning of the buffer, but point cannot go outside the accessible
! portion.  So @code{goto-line} moves point to the beginning or end of
! the accessible portion, if the line number specifies an inaccessible
  position.
  
  The return value of @code{goto-line} is the difference between
***************
*** 319,329 ****
  able to move (in the full buffer, before taking account of narrowing).
  Thus, the value is positive if the scan encounters the real end of the
  buffer before finding the specified line.  The value is zero if scan
! encounters the end of the accessible portion but not the real end of the
! buffer.
  
  In an interactive call, @var{line} is the numeric prefix argument if
! one has been provided.  Otherwise @var{line} is read in the minibuffer.
  @end deffn
  
  @deffn Command beginning-of-line &optional count
--- 318,336 ----
  able to move (in the full buffer, before taking account of narrowing).
  Thus, the value is positive if the scan encounters the real end of the
  buffer before finding the specified line.  The value is zero if scan
! encounters the end of the accessible portion but not the real end of
! the buffer.
! 
! If you provide the optional argument @var{buffer}, @code{goto-line}
! uses @var{buffer} instead of the current buffer and and displays it in
! another window if it was not already visible.
  
  In an interactive call, @var{line} is the numeric prefix argument if
! you provide one.  Otherwise @var{line} is read in the minibuffer.  If
! there is a number in the buffer at point, it is the default for
! @var{line}.  If you just provide the universal argument,
! @code{goto-line} uses the most recently selected buffer other than the
! current buffer and reads @var{line} in the minibuffer.
  @end deffn
  
  @deffn Command beginning-of-line &optional count
Index: lisp/ChangeLog
===================================================================
RCS file: /sources/emacs/emacs/lisp/ChangeLog,v
retrieving revision 1.14803
diff -c -r1.14803 ChangeLog
*** lisp/ChangeLog	19 Nov 2008 05:51:30 -0000	1.14803
--- lisp/ChangeLog	19 Nov 2008 05:56:45 -0000
***************
*** 1,5 ****
--- 1,7 ----
  2008-11-19  Lute Kamstra  <lute@gnu.org>
  
+ 	* simple.el (goto-line): Rename argument.
+ 
  	* autoinsert.el (auto-insert-alist): Don't use match data.
  
  2008-11-19  Glenn Morris  <rgm@gnu.org>
Index: lisp/simple.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/simple.el,v
retrieving revision 1.954
diff -c -r1.954 simple.el
*** lisp/simple.el	17 Nov 2008 01:54:05 -0000	1.954
--- lisp/simple.el	19 Nov 2008 05:56:47 -0000
***************
*** 837,851 ****
  
  ;; Counting lines, one way or another.
  
! (defun goto-line (arg &optional buffer)
!   "Goto line ARG, counting from line 1 at beginning of buffer.
! Normally, move point in the current buffer, and leave mark at previous
! position.  With just \\[universal-argument] as argument, move point
! in the most recently displayed other buffer, and switch to it.
! When called from Lisp code, the optional argument BUFFER specifies
! a buffer to switch to.
  
! If there's a number in the buffer at point, it is the default for ARG."
    (interactive
     (if (and current-prefix-arg (not (consp current-prefix-arg)))
         (list (prefix-numeric-value current-prefix-arg))
--- 837,852 ----
  
  ;; Counting lines, one way or another.
  
! (defun goto-line (line &optional buffer)
!   "Goto line LINE, counting from line 1 at beginning of buffer.
! Normally, move point in the current buffer, and leave mark at the
! previous position.  With just \\[universal-argument] as argument,
! move point in the most recently selected other buffer, and switch
! to it.  When called from Lisp code, the optional argument BUFFER
! specifies a buffer to switch to.
  
! If there's a number in the buffer at point, it is the default for
! LINE."
    (interactive
     (if (and current-prefix-arg (not (consp current-prefix-arg)))
         (list (prefix-numeric-value current-prefix-arg))
***************
*** 887,894 ****
      (widen)
      (goto-char 1)
      (if (eq selective-display t)
! 	(re-search-forward "[\n\C-m]" nil 'end (1- arg))
!       (forward-line (1- arg)))))
  
  (defun count-lines-region (start end)
    "Print number of lines and characters in the region."
--- 888,895 ----
      (widen)
      (goto-char 1)
      (if (eq selective-display t)
! 	(re-search-forward "[\n\C-m]" nil 'end (1- line))
!       (forward-line (1- line)))))
  
  (defun count-lines-region (start end)
    "Print number of lines and characters in the region."




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

end of thread, other threads:[~2008-11-20  6:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-19  6:01 goto-line documentation update Lute Kamstra
2008-11-19 19:09 ` Eli Zaretskii
2008-11-20  6:36   ` Lute Kamstra
2008-11-19 23:28 ` Juri Linkov

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.