aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2014-07-01 14:13:28 -0400
committerStefan Monnier2014-07-01 14:13:28 -0400
commit6372fc12fe9c5d22a825e2c812c4a788cda175f6 (patch)
tree08fc8f1091b1a8e725ace80b4e71e26fe871f520
parent854b22ea18090cc226703c4a828a3fc0bfaa0ccd (diff)
downloademacs-6372fc12fe9c5d22a825e2c812c4a788cda175f6.tar.gz
emacs-6372fc12fe9c5d22a825e2c812c4a788cda175f6.zip
* 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
-rw-r--r--lisp/ChangeLog3
-rw-r--r--lisp/simple.el10
2 files changed, 10 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 054bef5697d..6f279c7b454 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,8 @@
12014-07-01 Stefan Monnier <monnier@iro.umontreal.ca> 12014-07-01 Stefan Monnier <monnier@iro.umontreal.ca>
2 2
3 * simple.el (deactivate-mark, set-mark-command, handle-shift-selection):
4 Don't keep transient-mark-mode buffer-local when not needed (bug#6316).
5
3 * xt-mouse.el (turn-on-xterm-mouse-tracking-on-terminal) 6 * xt-mouse.el (turn-on-xterm-mouse-tracking-on-terminal)
4 (turn-off-xterm-mouse-tracking-on-terminal): Don't burp if the terminal 7 (turn-off-xterm-mouse-tracking-on-terminal): Don't burp if the terminal
5 is suspended (bug#17857). 8 is suspended (bug#17857).
diff --git a/lisp/simple.el b/lisp/simple.el
index a8689aaf2e3..6fd50197a10 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -4527,9 +4527,11 @@ run `deactivate-mark-hook'."
4527 (when mark-active (force-mode-line-update)) ;Refresh toolbar (bug#16382). 4527 (when mark-active (force-mode-line-update)) ;Refresh toolbar (bug#16382).
4528 (cond 4528 (cond
4529 ((eq (car-safe transient-mark-mode) 'only) 4529 ((eq (car-safe transient-mark-mode) 'only)
4530 (setq transient-mark-mode (cdr transient-mark-mode))) 4530 (setq transient-mark-mode (cdr transient-mark-mode))
4531 (if (eq transient-mark-mode (default-value 'transient-mark-mode))
4532 (kill-local-variable 'transient-mark-mode)))
4531 ((eq transient-mark-mode 'lambda) 4533 ((eq transient-mark-mode 'lambda)
4532 (setq transient-mark-mode nil))) 4534 (kill-local-variable 'transient-mark-mode)))
4533 (setq mark-active nil) 4535 (setq mark-active nil)
4534 (run-hooks 'deactivate-mark-hook) 4536 (run-hooks 'deactivate-mark-hook)
4535 (redisplay--update-region-highlight (selected-window)))) 4537 (redisplay--update-region-highlight (selected-window))))
@@ -4756,7 +4758,7 @@ Novice Emacs Lisp programmers often try to use the mark for the wrong
4756purposes. See the documentation of `set-mark' for more information." 4758purposes. See the documentation of `set-mark' for more information."
4757 (interactive "P") 4759 (interactive "P")
4758 (cond ((eq transient-mark-mode 'lambda) 4760 (cond ((eq transient-mark-mode 'lambda)
4759 (setq transient-mark-mode nil)) 4761 (kill-local-variable 'transient-mark-mode))
4760 ((eq (car-safe transient-mark-mode) 'only) 4762 ((eq (car-safe transient-mark-mode) 'only)
4761 (deactivate-mark))) 4763 (deactivate-mark)))
4762 (cond 4764 (cond
@@ -4894,6 +4896,8 @@ its earlier value."
4894 (push-mark nil nil t))) 4896 (push-mark nil nil t)))
4895 ((eq (car-safe transient-mark-mode) 'only) 4897 ((eq (car-safe transient-mark-mode) 'only)
4896 (setq transient-mark-mode (cdr transient-mark-mode)) 4898 (setq transient-mark-mode (cdr transient-mark-mode))
4899 (if (eq transient-mark-mode (default-value 'transient-mark-mode))
4900 (kill-local-variable 'transient-mark-mode))
4897 (deactivate-mark)))) 4901 (deactivate-mark))))
4898 4902
4899(define-minor-mode transient-mark-mode 4903(define-minor-mode transient-mark-mode