# HG changeset patch # User scop # Date 1145994384 0 # Node ID 9fddb79e8a883fa33673fad549919446a2e65a60 # Parent 316fddbf58e217445208332d5a86f5bfba7dd723 [xemacs-hg @ 2006-04-25 19:46:23 by scop] Add optional buffer arg to goto-line, update next-line-add-newlines docs. diff -r 316fddbf58e2 -r 9fddb79e8a88 lisp/ChangeLog --- 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ä + + * 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 Repair busted commit and gratuitous doc improvements. diff -r 316fddbf58e2 -r 9fddb79e8a88 lisp/simple.el --- 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)