emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/simple.el,v


From: Juri Linkov
Subject: [Emacs-diffs] Changes to emacs/lisp/simple.el,v
Date: Sun, 16 Mar 2008 17:44:32 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Juri Linkov <jurta>     08/03/16 17:44:32

Index: simple.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/simple.el,v
retrieving revision 1.906
retrieving revision 1.907
diff -u -b -r1.906 -r1.907
--- simple.el   14 Mar 2008 17:42:16 -0000      1.906
+++ simple.el   16 Mar 2008 17:44:31 -0000      1.907
@@ -819,10 +819,11 @@
 
 (defun goto-line (arg &optional buffer)
   "Goto line ARG, counting from line 1 at beginning of buffer.
-Normally, move point in the current buffer.
-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.
+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
@@ -859,6 +860,9 @@
       (let ((window (get-buffer-window buffer)))
        (if window (select-window window)
          (switch-to-buffer-other-window buffer))))
+  ;; Leave mark at previous position
+  (or (and transient-mark-mode mark-active)
+      (push-mark))
   ;; Move to the specified line number in that buffer.
   (save-restriction
     (widen)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]