From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lute Kamstra Newsgroups: gmane.emacs.devel Subject: goto-line documentation update. Date: Wed, 19 Nov 2008 07:01:04 +0100 Message-ID: <874p242r1b.fsf@speer.lan> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1227074482 19430 80.91.229.12 (19 Nov 2008 06:01:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 19 Nov 2008 06:01:22 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Nov 19 07:02:23 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1L2g8s-0001QY-DC for ged-emacs-devel@m.gmane.org; Wed, 19 Nov 2008 07:02:23 +0100 Original-Received: from localhost ([127.0.0.1]:43608 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L2g7j-0005L6-F0 for ged-emacs-devel@m.gmane.org; Wed, 19 Nov 2008 01:01:11 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L2g7d-0005Ko-K3 for emacs-devel@gnu.org; Wed, 19 Nov 2008 01:01:05 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L2g7b-0005Kc-3V for emacs-devel@gnu.org; Wed, 19 Nov 2008 01:01:05 -0500 Original-Received: from [199.232.76.173] (port=50873 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L2g7a-0005KZ-ST for emacs-devel@gnu.org; Wed, 19 Nov 2008 01:01:02 -0500 Original-Received: from smtp-vbr11.xs4all.nl ([194.109.24.31]:4020) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1L2g7Z-0000xx-Tn for emacs-devel@gnu.org; Wed, 19 Nov 2008 01:01:02 -0500 Original-Received: from speer.lan (a80-101-193-22.adsl.xs4all.nl [80.101.193.22]) by smtp-vbr11.xs4all.nl (8.13.8/8.13.8) with ESMTP id mAJ60u5d026700 for ; Wed, 19 Nov 2008 07:00:57 +0100 (CET) (envelope-from Lute.Kamstra.lists@xs4all.nl) Original-Received: from lute by speer.lan with local (Exim 4.69) (envelope-from ) id 1L2g7c-0006mB-GM for emacs-devel@gnu.org; Wed, 19 Nov 2008 07:01:04 +0100 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) Original-Lines: 179 X-Virus-Scanned: by XS4ALL Virus Scanner X-detected-operating-system: by monty-python.gnu.org: FreeBSD 4.6-4.9 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:105806 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 + + * positions.texi (Text Lines): Update goto-line documentation. + 2008-11-19 Glenn Morris * 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 + * simple.el (goto-line): Rename argument. + * autoinsert.el (auto-insert-alist): Don't use match data. 2008-11-19 Glenn Morris 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."