Commit b1d6ddd4 authored by Kelly Dean's avatar Kelly Dean Committed by Artur Malabarba

Push mark before goto-char in jump-to-register and check-parens

* register.el (jump-to-register):
* emacs-lisp/lisp.el (check-parens):
Push mark before goto-char so user doesn't lose his previous place.
parent 56f5ea17
2015-02-18 Kelly Dean <kelly@prtime.org>
* register.el (jump-to-register):
* emacs-lisp/lisp.el (check-parens):
Push mark before goto-char so user doesn't lose his previous place.
2015-02-18 Kelly Dean <kelly@prtime.org>
* rect.el (rectangle-mark-mode):
......
......@@ -714,7 +714,8 @@ character."
(condition-case data
;; Buffer can't have more than (point-max) sexps.
(scan-sexps (point-min) (point-max))
(scan-error (goto-char (nth 2 data))
(scan-error (push-mark)
(goto-char (nth 2 data))
;; Could print (nth 1 data), which is either
;; "Containing expression ends prematurely" or
;; "Unbalanced parentheses", but those may not be so
......
......@@ -254,6 +254,9 @@ Interactively, reads the register using `register-read-with-preview'."
(or (marker-buffer val)
(user-error "That register's buffer no longer exists"))
(switch-to-buffer (marker-buffer val))
(unless (or (= (point) (marker-position val))
(eq last-command 'jump-to-register))
(push-mark))
(goto-char val))
((and (consp val) (eq (car val) 'file))
(find-file (cdr val)))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment