Commit 6372fc12 authored by Stefan Monnier's avatar Stefan Monnier
Browse files

* lisp/simple.el (deactivate-mark, set-mark-command, handle-shift-selection):

Don't keep transient-mark-mode buffer-local when not needed.

Fixes: debbugs:6316
parent 854b22ea
2014-07-01 Stefan Monnier <monnier@iro.umontreal.ca> 2014-07-01 Stefan Monnier <monnier@iro.umontreal.ca>
   
* simple.el (deactivate-mark, set-mark-command, handle-shift-selection):
Don't keep transient-mark-mode buffer-local when not needed (bug#6316).
* xt-mouse.el (turn-on-xterm-mouse-tracking-on-terminal) * xt-mouse.el (turn-on-xterm-mouse-tracking-on-terminal)
(turn-off-xterm-mouse-tracking-on-terminal): Don't burp if the terminal (turn-off-xterm-mouse-tracking-on-terminal): Don't burp if the terminal
is suspended (bug#17857). is suspended (bug#17857).
......
...@@ -4527,9 +4527,11 @@ run `deactivate-mark-hook'." ...@@ -4527,9 +4527,11 @@ run `deactivate-mark-hook'."
(when mark-active (force-mode-line-update)) ;Refresh toolbar (bug#16382). (when mark-active (force-mode-line-update)) ;Refresh toolbar (bug#16382).
(cond (cond
((eq (car-safe transient-mark-mode) 'only) ((eq (car-safe transient-mark-mode) 'only)
(setq transient-mark-mode (cdr transient-mark-mode))) (setq transient-mark-mode (cdr transient-mark-mode))
(if (eq transient-mark-mode (default-value 'transient-mark-mode))
(kill-local-variable 'transient-mark-mode)))
((eq transient-mark-mode 'lambda) ((eq transient-mark-mode 'lambda)
(setq transient-mark-mode nil))) (kill-local-variable 'transient-mark-mode)))
(setq mark-active nil) (setq mark-active nil)
(run-hooks 'deactivate-mark-hook) (run-hooks 'deactivate-mark-hook)
(redisplay--update-region-highlight (selected-window)))) (redisplay--update-region-highlight (selected-window))))
...@@ -4756,7 +4758,7 @@ Novice Emacs Lisp programmers often try to use the mark for the wrong ...@@ -4756,7 +4758,7 @@ Novice Emacs Lisp programmers often try to use the mark for the wrong
purposes. See the documentation of `set-mark' for more information." purposes. See the documentation of `set-mark' for more information."
(interactive "P") (interactive "P")
(cond ((eq transient-mark-mode 'lambda) (cond ((eq transient-mark-mode 'lambda)
(setq transient-mark-mode nil)) (kill-local-variable 'transient-mark-mode))
((eq (car-safe transient-mark-mode) 'only) ((eq (car-safe transient-mark-mode) 'only)
(deactivate-mark))) (deactivate-mark)))
(cond (cond
...@@ -4894,6 +4896,8 @@ its earlier value." ...@@ -4894,6 +4896,8 @@ its earlier value."
(push-mark nil nil t))) (push-mark nil nil t)))
((eq (car-safe transient-mark-mode) 'only) ((eq (car-safe transient-mark-mode) 'only)
(setq transient-mark-mode (cdr transient-mark-mode)) (setq transient-mark-mode (cdr transient-mark-mode))
(if (eq transient-mark-mode (default-value 'transient-mark-mode))
(kill-local-variable 'transient-mark-mode))
(deactivate-mark)))) (deactivate-mark))))
(define-minor-mode transient-mark-mode (define-minor-mode transient-mark-mode
......
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