From: Daniel Colascione Date: Mon, 4 May 2015 22:40:55 +0000 (-0700) Subject: Fix previous commit X-Git-Tag: emacs-25.0.90~2215 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=1ddb81a686a1e2cd6898cbd8b65878a74579ca71;p=emacs.git Fix previous commit --- diff --git a/lisp/simple.el b/lisp/simple.el index 9f42f00b149..47c9cd30c17 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -4873,7 +4873,7 @@ store it in a Lisp variable. Example: (defun save-mark-and-excursion--save () (cons (let ((mark (mark-marker))) - (and mark (marker-position mark) (copy-marker mark))) + (and (marker-position mark) (copy-marker mark))) mark-active)) (defun save-mark-and-excursion--restore (saved-mark-info) @@ -4883,17 +4883,18 @@ store it in a Lisp variable. Example: (saved-mark-active (cdr saved-mark-info))) ;; Mark marker (if (null saved-mark) - (set-marker (mark-marker nil)) + (set-marker (mark-marker) nil) (setf nmark (marker-position saved-mark)) (set-marker (mark-marker) nmark) (set-marker saved-mark nil)) ;; Mark active (let ((cur-mark-active mark-active)) - (setf mark-active saved-mark-active) + (setq mark-active saved-mark-active) ;; If mark is active now, and either was not active or was at a ;; different place, run the activate hook. (if saved-mark-active - (unless (eq omark nmark) + (when (or (not cur-mark-active) + (not (eq omark nmark))) (run-hooks 'activate-mark-hook)) ;; If mark has ceased to be active, run deactivate hook. (when cur-mark-active