]> git.eshelyaron.com Git - emacs.git/commitdiff
(set-mark): When POS is nil, always clear mark-active.
authorRichard M. Stallman <rms@gnu.org>
Tue, 30 Aug 1994 00:36:48 +0000 (00:36 +0000)
committerRichard M. Stallman <rms@gnu.org>
Tue, 30 Aug 1994 00:36:48 +0000 (00:36 +0000)
lisp/simple.el

index 8dc5fa1af740c0f7634d4f18d458c72f4a751157..1725dd6585b30be228692ea5c7ce5bb9b9e6623f 100644 (file)
@@ -1335,8 +1335,12 @@ store it in a Lisp variable.  Example:
        (setq mark-active t)
        (run-hooks 'activate-mark-hook)
        (set-marker (mark-marker) pos (current-buffer)))
-    (deactivate-mark)
-    (set-marker (mark-marker) pos (current-buffer))))
+    ;; Normally we never clear mark-active except in Transient Mark mode.
+    ;; But when we actually clear out the mark value too,
+    ;; we must clear mark-active in any mode.
+    (setq mark-active nil)
+    (run-hooks 'deactivate-mark-hook)
+    (set-marker (mark-marker) nil)))
 
 (defvar mark-ring nil
   "The list of saved former marks of the current buffer,