summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1994-08-30 00:36:48 +0000
committerRichard M. Stallman <rms@gnu.org>1994-08-30 00:36:48 +0000
commit24c22852415ce86821b95db64fa70b4e84a4e383 (patch)
tree37bcdd33ee2e1a7e4ce89e6551cf187f454a1754 /lisp
parentbb1e67a02259d3c6d4ab8eda691f549a5b41f524 (diff)
downloademacs-24c22852415ce86821b95db64fa70b4e84a4e383.tar.gz
emacs-24c22852415ce86821b95db64fa70b4e84a4e383.tar.bz2
emacs-24c22852415ce86821b95db64fa70b4e84a4e383.zip
(set-mark): When POS is nil, always clear mark-active.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/simple.el8
1 files changed, 6 insertions, 2 deletions
diff --git a/lisp/simple.el b/lisp/simple.el
index 8dc5fa1af74..1725dd6585b 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -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,