diff options
| author | Stefan Monnier | 2014-05-27 10:59:08 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2014-05-27 10:59:08 -0400 |
| commit | 9828d523192e9fc02b9aa78a84a8c012c8cc2a75 (patch) | |
| tree | fd9c9e1d055db0d5962e27cdf478c0ad4c800708 | |
| parent | 53bc1e2982f6ac29a75ce63bc9a35bb19e0f58e1 (diff) | |
| download | emacs-9828d523192e9fc02b9aa78a84a8c012c8cc2a75.tar.gz emacs-9828d523192e9fc02b9aa78a84a8c012c8cc2a75.zip | |
* 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.
| -rw-r--r-- | lisp/ChangeLog | 4 | ||||
| -rw-r--r-- | lisp/simple.el | 18 |
2 files changed, 11 insertions, 11 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index fe34854ab53..51ce071ba74 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,9 @@ | |||
| 1 | 2014-05-27 Stefan Monnier <monnier@iro.umontreal.ca> | 1 | 2014-05-27 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 2 | ||
| 3 | * simple.el (deactivate-mark): Set mark-active to nil even if deactivation | ||
| 4 | is done via setting transient-mark-mode to nil, since one is | ||
| 5 | buffer-local and the other is global. | ||
| 6 | |||
| 3 | * emacs-lisp/byte-opt.el (byte-optimize-binary-predicate): Don't assume | 7 | * emacs-lisp/byte-opt.el (byte-optimize-binary-predicate): Don't assume |
| 4 | there can't be more than 2 arguments (bug#17584). | 8 | there can't be more than 2 arguments (bug#17584). |
| 5 | 9 | ||
diff --git a/lisp/simple.el b/lisp/simple.el index f8499744194..7bcd6cf7e71 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -4412,17 +4412,13 @@ run `deactivate-mark-hook'." | |||
| 4412 | (x-set-selection 'PRIMARY | 4412 | (x-set-selection 'PRIMARY |
| 4413 | (funcall region-extract-function nil))))) | 4413 | (funcall region-extract-function nil))))) |
| 4414 | (when mark-active (force-mode-line-update)) ;Refresh toolbar (bug#16382). | 4414 | (when mark-active (force-mode-line-update)) ;Refresh toolbar (bug#16382). |
| 4415 | (if (and (null force) | 4415 | (cond |
| 4416 | (or (eq transient-mark-mode 'lambda) | 4416 | ((eq (car-safe transient-mark-mode) 'only) |
| 4417 | (and (eq (car-safe transient-mark-mode) 'only) | 4417 | (setq transient-mark-mode (cdr transient-mark-mode))) |
| 4418 | (null (cdr transient-mark-mode))))) | 4418 | ((eq transient-mark-mode 'lambda) |
| 4419 | ;; When deactivating a temporary region, don't change | 4419 | (setq transient-mark-mode nil))) |
| 4420 | ;; `mark-active' or run `deactivate-mark-hook'. | 4420 | (setq mark-active nil) |
| 4421 | (setq transient-mark-mode nil) | 4421 | (run-hooks 'deactivate-mark-hook) |
| 4422 | (if (eq (car-safe transient-mark-mode) 'only) | ||
| 4423 | (setq transient-mark-mode (cdr transient-mark-mode))) | ||
| 4424 | (setq mark-active nil) | ||
| 4425 | (run-hooks 'deactivate-mark-hook)) | ||
| 4426 | (redisplay--update-region-highlight (selected-window)))) | 4422 | (redisplay--update-region-highlight (selected-window)))) |
| 4427 | 4423 | ||
| 4428 | (defun activate-mark (&optional no-tmm) | 4424 | (defun activate-mark (&optional no-tmm) |