diff options
| author | Stefan Monnier | 2014-06-23 11:32:24 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2014-06-23 11:32:24 -0400 |
| commit | 5d2638bd31586fc276ddd4444a49627e855cf7fa (patch) | |
| tree | 5546b75f40f2fa8ce7afab34b667351dd786fa10 | |
| parent | f6a09385237ca681010b5510e3786dd1cc538098 (diff) | |
| download | emacs-5d2638bd31586fc276ddd4444a49627e855cf7fa.tar.gz emacs-5d2638bd31586fc276ddd4444a49627e855cf7fa.zip | |
* lisp/simple.el (handle-shift-selection, exchange-point-and-mark)
(activate-mark): Set transient-mark-mode buffer-locally.
(transient-mark-mode): Use&set the global value.
* lisp/mouse.el (mouse-set-region-1, mouse-drag-track): Idem.
* lisp/org/org-compat.el (activate-mark): Idem.
* lisp/emulation/edt.el (edt-emulation-off): Save&restore the global
transient-mark-mode setting.
* lisp/obsolete/pc-select.el (pc-selection-mode): Use the
transient-mark-mode function.
Fixes: debbugs:6316
| -rw-r--r-- | lisp/ChangeLog | 31 | ||||
| -rw-r--r-- | lisp/emulation/edt.el | 5 | ||||
| -rw-r--r-- | lisp/mouse.el | 16 | ||||
| -rw-r--r-- | lisp/obsolete/pc-select.el | 2 | ||||
| -rw-r--r-- | lisp/org/ChangeLog | 4 | ||||
| -rw-r--r-- | lisp/org/org-compat.el | 2 | ||||
| -rw-r--r-- | lisp/simple.el | 14 |
7 files changed, 45 insertions, 29 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4f99f83eeb9..8c2fb12da4e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,7 +1,18 @@ | |||
| 1 | 2014-06-23 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * simple.el (handle-shift-selection, exchange-point-and-mark) | ||
| 4 | (activate-mark): Set transient-mark-mode buffer-locally (bug#6316). | ||
| 5 | (transient-mark-mode): Use&set the global value. | ||
| 6 | * mouse.el (mouse-set-region-1, mouse-drag-track): Idem. | ||
| 7 | * emulation/edt.el (edt-emulation-off): Save&restore the global | ||
| 8 | transient-mark-mode setting. | ||
| 9 | * obsolete/pc-select.el (pc-selection-mode): Use the | ||
| 10 | transient-mark-mode function. | ||
| 11 | |||
| 1 | 2014-06-23 Eli Zaretskii <eliz@gnu.org> | 12 | 2014-06-23 Eli Zaretskii <eliz@gnu.org> |
| 2 | 13 | ||
| 3 | * international/fontset.el (script-representative-chars): Add | 14 | * international/fontset.el (script-representative-chars): |
| 4 | representative characters for scripts added in Unicode 7.0. | 15 | Add representative characters for scripts added in Unicode 7.0. |
| 5 | (otf-script-alist): Synchronize with the latest registry of OTF | 16 | (otf-script-alist): Synchronize with the latest registry of OTF |
| 6 | script tags. | 17 | script tags. |
| 7 | 18 | ||
| @@ -29,8 +40,8 @@ | |||
| 29 | * obsolete/vi.el (vi-set-mark): | 40 | * obsolete/vi.el (vi-set-mark): |
| 30 | * term.el (term-handle-scroll): | 41 | * term.el (term-handle-scroll): |
| 31 | * textmodes/bibtex.el (bibtex-fill-field, bibtex-fill-entry): | 42 | * textmodes/bibtex.el (bibtex-fill-field, bibtex-fill-entry): |
| 32 | * wid-edit.el (widget-editable-list-value-create): Prefer | 43 | * wid-edit.el (widget-editable-list-value-create): |
| 33 | point-marker to copy-marker of point. | 44 | Prefer point-marker to copy-marker of point. |
| 34 | 45 | ||
| 35 | 2014-06-21 Fabián Ezequiel Gallina <fgallina@gnu.org> | 46 | 2014-06-21 Fabián Ezequiel Gallina <fgallina@gnu.org> |
| 36 | 47 | ||
| @@ -233,9 +244,9 @@ | |||
| 233 | (calculator-expt, calculator-truncate): Minor code improvements. | 244 | (calculator-expt, calculator-truncate): Minor code improvements. |
| 234 | (calculator-need-3-lines): New function pulling out code from | 245 | (calculator-need-3-lines): New function pulling out code from |
| 235 | `calculator'. | 246 | `calculator'. |
| 236 | (calculator-get-display): Renamed from `calculator-get-prompt', and | 247 | (calculator-get-display): Rename from `calculator-get-prompt', and |
| 237 | improved. | 248 | improved. |
| 238 | (calculator-push-curnum): Renamed from `calculator-curnum-value', and | 249 | (calculator-push-curnum): Rename from `calculator-curnum-value', and |
| 239 | extended for all uses of it. All callers changed. | 250 | extended for all uses of it. All callers changed. |
| 240 | (calculator-groupize-number): New utility for splitting a number into | 251 | (calculator-groupize-number): New utility for splitting a number into |
| 241 | groups. | 252 | groups. |
| @@ -247,11 +258,11 @@ | |||
| 247 | `pcase' for conciseness and clarity). | 258 | `pcase' for conciseness and clarity). |
| 248 | (calculator-reduce-stack): Now doing just the reduction loop using | 259 | (calculator-reduce-stack): Now doing just the reduction loop using |
| 249 | `calculator-reduce-stack-once'. | 260 | `calculator-reduce-stack-once'. |
| 250 | (calculator-funcall): Improved code, make it work in v24.3.1 too. | 261 | (calculator-funcall): Improve code, make it work in v24.3.1 too. |
| 251 | (calculator-last-input): Improved code, remove some old cruft. | 262 | (calculator-last-input): Improve code, remove some old cruft. |
| 252 | (calculator-quit): Kill `calculator-buffer' in electric mode too. | 263 | (calculator-quit): Kill `calculator-buffer' in electric mode too. |
| 253 | (calculator-integer-p): Removed. | 264 | (calculator-integer-p): Remove. |
| 254 | (calculator-fact): Improved code, make it work on non-integer values | 265 | (calculator-fact): Improve code, make it work on non-integer values |
| 255 | too (using truncated numbers). | 266 | too (using truncated numbers). |
| 256 | 267 | ||
| 257 | 2014-06-15 Michael Albinus <michael.albinus@gmx.de> | 268 | 2014-06-15 Michael Albinus <michael.albinus@gmx.de> |
diff --git a/lisp/emulation/edt.el b/lisp/emulation/edt.el index a32fb612adb..e0e2660b70a 100644 --- a/lisp/emulation/edt.el +++ b/lisp/emulation/edt.el | |||
| @@ -2033,7 +2033,8 @@ created." | |||
| 2033 | ;; Make highlighting of selected text work properly for EDT commands. | 2033 | ;; Make highlighting of selected text work properly for EDT commands. |
| 2034 | (if (featurep 'emacs) | 2034 | (if (featurep 'emacs) |
| 2035 | (progn | 2035 | (progn |
| 2036 | (setq edt-orig-transient-mark-mode transient-mark-mode) | 2036 | (setq edt-orig-transient-mark-mode |
| 2037 | (default-value 'transient-mark-mode)) | ||
| 2037 | (add-hook 'activate-mark-hook | 2038 | (add-hook 'activate-mark-hook |
| 2038 | (function | 2039 | (function |
| 2039 | (lambda () | 2040 | (lambda () |
| @@ -2068,7 +2069,7 @@ created." | |||
| 2068 | (edt-reset) | 2069 | (edt-reset) |
| 2069 | (force-mode-line-update t) | 2070 | (force-mode-line-update t) |
| 2070 | (if (featurep 'emacs) | 2071 | (if (featurep 'emacs) |
| 2071 | (setq transient-mark-mode edt-orig-transient-mark-mode)) | 2072 | (setq-default transient-mark-mode edt-orig-transient-mark-mode)) |
| 2072 | (message "Original key bindings restored; EDT Emulation disabled")) | 2073 | (message "Original key bindings restored; EDT Emulation disabled")) |
| 2073 | 2074 | ||
| 2074 | (defun edt-default-menu-bar-update-buffers () | 2075 | (defun edt-default-menu-bar-update-buffers () |
diff --git a/lisp/mouse.el b/lisp/mouse.el index f5a09f45a07..7beea8e26e6 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el | |||
| @@ -579,10 +579,10 @@ command alters the kill ring or not." | |||
| 579 | (defun mouse-set-region-1 () | 579 | (defun mouse-set-region-1 () |
| 580 | ;; Set transient-mark-mode for a little while. | 580 | ;; Set transient-mark-mode for a little while. |
| 581 | (unless (eq (car-safe transient-mark-mode) 'only) | 581 | (unless (eq (car-safe transient-mark-mode) 'only) |
| 582 | (setq transient-mark-mode | 582 | (setq-local transient-mark-mode |
| 583 | (cons 'only | 583 | (cons 'only |
| 584 | (unless (eq transient-mark-mode 'lambda) | 584 | (unless (eq transient-mark-mode 'lambda) |
| 585 | transient-mark-mode)))) | 585 | transient-mark-mode)))) |
| 586 | (setq mouse-last-region-beg (region-beginning)) | 586 | (setq mouse-last-region-beg (region-beginning)) |
| 587 | (setq mouse-last-region-end (region-end)) | 587 | (setq mouse-last-region-end (region-end)) |
| 588 | (setq mouse-last-region-tick (buffer-modified-tick))) | 588 | (setq mouse-last-region-tick (buffer-modified-tick))) |
| @@ -801,10 +801,10 @@ The region will be defined with mark and point." | |||
| 801 | 801 | ||
| 802 | ;; Activate the region, using `mouse-start-end' to determine where | 802 | ;; Activate the region, using `mouse-start-end' to determine where |
| 803 | ;; to put point and mark (e.g., double-click will select a word). | 803 | ;; to put point and mark (e.g., double-click will select a word). |
| 804 | (setq transient-mark-mode | 804 | (setq-local transient-mark-mode |
| 805 | (if (eq transient-mark-mode 'lambda) | 805 | (if (eq transient-mark-mode 'lambda) |
| 806 | '(only) | 806 | '(only) |
| 807 | (cons 'only transient-mark-mode))) | 807 | (cons 'only transient-mark-mode))) |
| 808 | (let ((range (mouse-start-end start-point start-point click-count))) | 808 | (let ((range (mouse-start-end start-point start-point click-count))) |
| 809 | (push-mark (nth 0 range) t t) | 809 | (push-mark (nth 0 range) t t) |
| 810 | (goto-char (nth 1 range))) | 810 | (goto-char (nth 1 range))) |
diff --git a/lisp/obsolete/pc-select.el b/lisp/obsolete/pc-select.el index e5ac1e1427d..5ee0818a1e5 100644 --- a/lisp/obsolete/pc-select.el +++ b/lisp/obsolete/pc-select.el | |||
| @@ -388,7 +388,7 @@ but before calling PC Selection mode): | |||
| 388 | (fboundp 'normal-erase-is-backspace-mode)) | 388 | (fboundp 'normal-erase-is-backspace-mode)) |
| 389 | (normal-erase-is-backspace-mode 1)) | 389 | (normal-erase-is-backspace-mode 1)) |
| 390 | (setq highlight-nonselected-windows nil) | 390 | (setq highlight-nonselected-windows nil) |
| 391 | (setq transient-mark-mode t) | 391 | (transient-mark-mode 1) |
| 392 | (setq mark-even-if-inactive t) | 392 | (setq mark-even-if-inactive t) |
| 393 | (delete-selection-mode 1)) | 393 | (delete-selection-mode 1)) |
| 394 | ;;else | 394 | ;;else |
diff --git a/lisp/org/ChangeLog b/lisp/org/ChangeLog index 0a11eafb959..7ad601b1719 100644 --- a/lisp/org/ChangeLog +++ b/lisp/org/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2014-06-23 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * org-compat.el (activate-mark): Set transient-mark-mode buffer-locally. | ||
| 4 | |||
| 1 | 2014-06-22 Mario Lang <mlang@delysid.org> | 5 | 2014-06-22 Mario Lang <mlang@delysid.org> |
| 2 | 6 | ||
| 3 | * org-list.el (org-list-insert-item): The the -> the. | 7 | * org-list.el (org-list-insert-item): The the -> the. |
diff --git a/lisp/org/org-compat.el b/lisp/org/org-compat.el index e5d6a49f318..c3ccf062db9 100644 --- a/lisp/org/org-compat.el +++ b/lisp/org/org-compat.el | |||
| @@ -295,7 +295,7 @@ Works on both Emacs and XEmacs." | |||
| 295 | (setq mark-active t) | 295 | (setq mark-active t) |
| 296 | (when (and (boundp 'transient-mark-mode) | 296 | (when (and (boundp 'transient-mark-mode) |
| 297 | (not transient-mark-mode)) | 297 | (not transient-mark-mode)) |
| 298 | (setq transient-mark-mode 'lambda)) | 298 | (set (make-local-variable 'transient-mark-mode) 'lambda)) |
| 299 | (when (boundp 'zmacs-regions) | 299 | (when (boundp 'zmacs-regions) |
| 300 | (setq zmacs-regions t))))) | 300 | (setq zmacs-regions t))))) |
| 301 | 301 | ||
diff --git a/lisp/simple.el b/lisp/simple.el index 63bfbb51419..9983943298f 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -4522,7 +4522,7 @@ If NO-TMM is non-nil, leave `transient-mark-mode' alone." | |||
| 4522 | (force-mode-line-update) ;Refresh toolbar (bug#16382). | 4522 | (force-mode-line-update) ;Refresh toolbar (bug#16382). |
| 4523 | (setq mark-active t) | 4523 | (setq mark-active t) |
| 4524 | (unless (or transient-mark-mode no-tmm) | 4524 | (unless (or transient-mark-mode no-tmm) |
| 4525 | (setq transient-mark-mode 'lambda)) | 4525 | (setq-local transient-mark-mode 'lambda)) |
| 4526 | (run-hooks 'activate-mark-hook)))) | 4526 | (run-hooks 'activate-mark-hook)))) |
| 4527 | 4527 | ||
| 4528 | (defun set-mark (pos) | 4528 | (defun set-mark (pos) |
| @@ -4828,7 +4828,7 @@ mode temporarily." | |||
| 4828 | (set-mark (point)) | 4828 | (set-mark (point)) |
| 4829 | (goto-char omark) | 4829 | (goto-char omark) |
| 4830 | (cond (temp-highlight | 4830 | (cond (temp-highlight |
| 4831 | (setq transient-mark-mode (cons 'only transient-mark-mode))) | 4831 | (setq-local transient-mark-mode (cons 'only transient-mark-mode))) |
| 4832 | ((or (and arg (region-active-p)) ; (xor arg (not (region-active-p))) | 4832 | ((or (and arg (region-active-p)) ; (xor arg (not (region-active-p))) |
| 4833 | (not (or arg (region-active-p)))) | 4833 | (not (or arg (region-active-p)))) |
| 4834 | (deactivate-mark)) | 4834 | (deactivate-mark)) |
| @@ -4867,10 +4867,10 @@ its earlier value." | |||
| 4867 | (cond ((and shift-select-mode this-command-keys-shift-translated) | 4867 | (cond ((and shift-select-mode this-command-keys-shift-translated) |
| 4868 | (unless (and mark-active | 4868 | (unless (and mark-active |
| 4869 | (eq (car-safe transient-mark-mode) 'only)) | 4869 | (eq (car-safe transient-mark-mode) 'only)) |
| 4870 | (setq transient-mark-mode | 4870 | (setq-local transient-mark-mode |
| 4871 | (cons 'only | 4871 | (cons 'only |
| 4872 | (unless (eq transient-mark-mode 'lambda) | 4872 | (unless (eq transient-mark-mode 'lambda) |
| 4873 | transient-mark-mode))) | 4873 | transient-mark-mode))) |
| 4874 | (push-mark nil nil t))) | 4874 | (push-mark nil nil t))) |
| 4875 | ((eq (car-safe transient-mark-mode) 'only) | 4875 | ((eq (car-safe transient-mark-mode) 'only) |
| 4876 | (setq transient-mark-mode (cdr transient-mark-mode)) | 4876 | (setq transient-mark-mode (cdr transient-mark-mode)) |
| @@ -4901,7 +4901,7 @@ Transient Mark mode, invoke \\[apropos-documentation] and type \"transient\" | |||
| 4901 | or \"mark.*active\" at the prompt." | 4901 | or \"mark.*active\" at the prompt." |
| 4902 | :global t | 4902 | :global t |
| 4903 | ;; It's defined in C/cus-start, this stops the d-m-m macro defining it again. | 4903 | ;; It's defined in C/cus-start, this stops the d-m-m macro defining it again. |
| 4904 | :variable transient-mark-mode) | 4904 | :variable (default-value 'transient-mark-mode)) |
| 4905 | 4905 | ||
| 4906 | (defvar widen-automatically t | 4906 | (defvar widen-automatically t |
| 4907 | "Non-nil means it is ok for commands to call `widen' when they want to. | 4907 | "Non-nil means it is ok for commands to call `widen' when they want to. |