changeset 8660:bb7bd2b068bf

(set-mark): When POS is nil, always clear mark-active.
author Richard M. Stallman <rms@gnu.org>
date Tue, 30 Aug 1994 00:36:48 +0000
parents 611c63ebc778
children 7615ef8778de
files lisp/simple.el
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/simple.el	Tue Aug 30 00:34:35 1994 +0000
+++ b/lisp/simple.el	Tue Aug 30 00:36:48 1994 +0000
@@ -1335,8 +1335,12 @@
 	(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,