changeset 3361:9fddb79e8a88

[xemacs-hg @ 2006-04-25 19:46:23 by scop] Add optional buffer arg to goto-line, update next-line-add-newlines docs.
author scop
date Tue, 25 Apr 2006 19:46:24 +0000
parents 316fddbf58e2
children 031be39a01f4
files lisp/ChangeLog lisp/simple.el
diffstat 2 files changed, 15 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Tue Apr 25 14:02:09 2006 +0000
+++ b/lisp/ChangeLog	Tue Apr 25 19:46:24 2006 +0000
@@ -1,3 +1,9 @@
+2006-04-23  Ville Skyttä  <scop@xemacs.org>
+
+	* simple.el (goto-line): Add optional `buffer' argument, from
+	GNU Emacs CVS.
+	(next-line-add-newlines): Remove obsolete comments from the docs.
+
 2006-04-25  Stephen J. Turnbull  <stephen@xemacs.org>
 
 	Repair busted commit and gratuitous doc improvements.
--- a/lisp/simple.el	Tue Apr 25 14:02:09 2006 +0000
+++ b/lisp/simple.el	Tue Apr 25 19:46:24 2006 +0000
@@ -899,10 +899,14 @@
 ;; next-complete-history-element
 ;; previous-complete-history-element
 
-(defun goto-line (line)
-  "Goto line LINE, counting from line 1 at beginning of buffer."
+(defun goto-line (line &optional buffer)
+  "Goto line LINE, counting from line 1 at beginning of BUFFER."
   (interactive "NGoto line: ")
   (setq line (prefix-numeric-value line))
+  (if buffer
+      (let ((window (get-buffer-window buffer)))
+	(if window (select-window window)
+	  (switch-to-buffer-other-window buffer))))
   (save-restriction
     (widen)
     (goto-char 1)
@@ -1964,11 +1968,10 @@
   :type 'boolean
   :group 'editing-basics)
 
-;;; After 8 years of waiting ... -sb
-(defcustom next-line-add-newlines nil  ; XEmacs
+(defcustom next-line-add-newlines nil
   "*If non-nil, `next-line' inserts newline when the point is at end of buffer.
-This behavior used to be the default, and is still default in FSF Emacs.
-We think it is an unnecessary and unwanted side-effect."
+This behavior used to be the default, but is now considered an unnecessary and
+unwanted side-effect."
   :type 'boolean
   :group 'editing-basics)