From 1ddb81a686a1e2cd6898cbd8b65878a74579ca71 Mon Sep 17 00:00:00 2001 From: Daniel Colascione Date: Mon, 4 May 2015 15:40:55 -0700 Subject: [PATCH] Fix previous commit --- lisp/simple.el | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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 -- 2.39.2