Commit 9828d523 authored by Stefan Monnier's avatar Stefan Monnier

* lisp/simple.el (deactivate-mark): Set mark-active to nil even if deactivation

is done via setting transient-mark-mode to nil, since one is
buffer-local and the other is global.
parent 53bc1e29
2014-05-27 Stefan Monnier <monnier@iro.umontreal.ca>
* simple.el (deactivate-mark): Set mark-active to nil even if deactivation
is done via setting transient-mark-mode to nil, since one is
buffer-local and the other is global.
* emacs-lisp/byte-opt.el (byte-optimize-binary-predicate): Don't assume
there can't be more than 2 arguments (bug#17584).
......
......@@ -4412,17 +4412,13 @@ run `deactivate-mark-hook'."
(x-set-selection 'PRIMARY
(funcall region-extract-function nil)))))
(when mark-active (force-mode-line-update)) ;Refresh toolbar (bug#16382).
(if (and (null force)
(or (eq transient-mark-mode 'lambda)
(and (eq (car-safe transient-mark-mode) 'only)
(null (cdr transient-mark-mode)))))
;; When deactivating a temporary region, don't change
;; `mark-active' or run `deactivate-mark-hook'.
(setq transient-mark-mode nil)
(if (eq (car-safe transient-mark-mode) 'only)
(setq transient-mark-mode (cdr transient-mark-mode)))
(setq mark-active nil)
(run-hooks 'deactivate-mark-hook))
(cond
((eq (car-safe transient-mark-mode) 'only)
(setq transient-mark-mode (cdr transient-mark-mode)))
((eq transient-mark-mode 'lambda)
(setq transient-mark-mode nil)))
(setq mark-active nil)
(run-hooks 'deactivate-mark-hook)
(redisplay--update-region-highlight (selected-window))))
(defun activate-mark (&optional no-tmm)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment