Mercurial > hg > xemacs-beta
diff lisp/simple.el @ 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 | b350e85a2a5e |
children | bd7189f2e967 |
line wrap: on
line diff
--- 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)