emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master 1ddb81a: Fix previous commit


From: Daniel Colascione
Subject: [Emacs-diffs] master 1ddb81a: Fix previous commit
Date: Mon, 04 May 2015 22:41:45 +0000

branch: master
commit 1ddb81a686a1e2cd6898cbd8b65878a74579ca71
Author: Daniel Colascione <address@hidden>
Commit: Daniel Colascione <address@hidden>

    Fix previous commit
---
 lisp/simple.el |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/lisp/simple.el b/lisp/simple.el
index 9f42f00..47c9cd3 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



reply via email to

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