emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] trunk r117383: * lisp/simple.el (handle-shift-selection, e


From: Stefan Monnier
Subject: [Emacs-diffs] trunk r117383: * lisp/simple.el (handle-shift-selection, exchange-point-and-mark)
Date: Mon, 23 Jun 2014 15:32:44 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 117383
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=6316
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Mon 2014-06-23 11:32:24 -0400
message:
  * 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.
modified:
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/emulation/edt.el          edt.el-20091113204419-o5vbwnq5f7feedwu-116
  lisp/mouse.el                  mouse.el-20091113204419-o5vbwnq5f7feedwu-123
  lisp/obsolete/pc-select.el     pcselect.el-20091113204419-o5vbwnq5f7feedwu-909
  lisp/org/ChangeLog             changelog-20091113204419-o5vbwnq5f7feedwu-8688
  lisp/org/org-compat.el         
orgcompat.el-20091113204419-o5vbwnq5f7feedwu-8646
  lisp/simple.el                 simple.el-20091113204419-o5vbwnq5f7feedwu-403
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2014-06-23 15:27:16 +0000
+++ b/lisp/ChangeLog    2014-06-23 15:32:24 +0000
@@ -1,7 +1,18 @@
+2014-06-23  Stefan Monnier  <address@hidden>
+
+       * simple.el (handle-shift-selection, exchange-point-and-mark)
+       (activate-mark): Set transient-mark-mode buffer-locally (bug#6316).
+       (transient-mark-mode): Use&set the global value.
+       * mouse.el (mouse-set-region-1, mouse-drag-track): Idem.
+       * emulation/edt.el (edt-emulation-off): Save&restore the global
+       transient-mark-mode setting.
+       * obsolete/pc-select.el (pc-selection-mode): Use the
+       transient-mark-mode function.
+
 2014-06-23  Eli Zaretskii  <address@hidden>
 
-       * international/fontset.el (script-representative-chars): Add
-       representative characters for scripts added in Unicode 7.0.
+       * international/fontset.el (script-representative-chars):
+       Add representative characters for scripts added in Unicode 7.0.
        (otf-script-alist): Synchronize with the latest registry of OTF
        script tags.
 
@@ -29,8 +40,8 @@
        * obsolete/vi.el (vi-set-mark):
        * term.el (term-handle-scroll):
        * textmodes/bibtex.el (bibtex-fill-field, bibtex-fill-entry):
-       * wid-edit.el (widget-editable-list-value-create): Prefer
-       point-marker to copy-marker of point.
+       * wid-edit.el (widget-editable-list-value-create):
+       Prefer point-marker to copy-marker of point.
 
 2014-06-21  Fabián Ezequiel Gallina  <address@hidden>
 
@@ -233,9 +244,9 @@
        (calculator-expt, calculator-truncate): Minor code improvements.
        (calculator-need-3-lines): New function pulling out code from
        `calculator'.
-       (calculator-get-display): Renamed from `calculator-get-prompt', and
+       (calculator-get-display): Rename from `calculator-get-prompt', and
        improved.
-       (calculator-push-curnum): Renamed from `calculator-curnum-value', and
+       (calculator-push-curnum): Rename from `calculator-curnum-value', and
        extended for all uses of it.  All callers changed.
        (calculator-groupize-number): New utility for splitting a number into
        groups.
@@ -247,11 +258,11 @@
        `pcase' for conciseness and clarity).
        (calculator-reduce-stack): Now doing just the reduction loop using
        `calculator-reduce-stack-once'.
-       (calculator-funcall): Improved code, make it work in v24.3.1 too.
-       (calculator-last-input): Improved code, remove some old cruft.
+       (calculator-funcall): Improve code, make it work in v24.3.1 too.
+       (calculator-last-input): Improve code, remove some old cruft.
        (calculator-quit): Kill `calculator-buffer' in electric mode too.
-       (calculator-integer-p): Removed.
-       (calculator-fact): Improved code, make it work on non-integer values
+       (calculator-integer-p): Remove.
+       (calculator-fact): Improve code, make it work on non-integer values
        too (using truncated numbers).
 
 2014-06-15  Michael Albinus  <address@hidden>

=== modified file 'lisp/emulation/edt.el'
--- a/lisp/emulation/edt.el     2014-02-25 08:41:47 +0000
+++ b/lisp/emulation/edt.el     2014-06-23 15:32:24 +0000
@@ -2033,7 +2033,8 @@
   ;; Make highlighting of selected text work properly for EDT commands.
   (if (featurep 'emacs)
       (progn
-       (setq edt-orig-transient-mark-mode transient-mark-mode)
+       (setq edt-orig-transient-mark-mode
+              (default-value 'transient-mark-mode))
        (add-hook 'activate-mark-hook
                  (function
                   (lambda ()
@@ -2068,7 +2069,7 @@
   (edt-reset)
   (force-mode-line-update t)
   (if (featurep 'emacs)
-    (setq transient-mark-mode edt-orig-transient-mark-mode))
+      (setq-default transient-mark-mode edt-orig-transient-mark-mode))
   (message "Original key bindings restored; EDT Emulation disabled"))
 
 (defun edt-default-menu-bar-update-buffers ()

=== modified file 'lisp/mouse.el'
--- a/lisp/mouse.el     2014-06-21 19:45:59 +0000
+++ b/lisp/mouse.el     2014-06-23 15:32:24 +0000
@@ -579,10 +579,10 @@
 (defun mouse-set-region-1 ()
   ;; Set transient-mark-mode for a little while.
   (unless (eq (car-safe transient-mark-mode) 'only)
-    (setq transient-mark-mode
-         (cons 'only
-               (unless (eq transient-mark-mode 'lambda)
-                 transient-mark-mode))))
+    (setq-local transient-mark-mode
+                (cons 'only
+                      (unless (eq transient-mark-mode 'lambda)
+                        transient-mark-mode))))
   (setq mouse-last-region-beg (region-beginning))
   (setq mouse-last-region-end (region-end))
   (setq mouse-last-region-tick (buffer-modified-tick)))
@@ -801,10 +801,10 @@
 
     ;; Activate the region, using `mouse-start-end' to determine where
     ;; to put point and mark (e.g., double-click will select a word).
-    (setq transient-mark-mode
-         (if (eq transient-mark-mode 'lambda)
-             '(only)
-           (cons 'only transient-mark-mode)))
+    (setq-local transient-mark-mode
+                (if (eq transient-mark-mode 'lambda)
+                    '(only)
+                  (cons 'only transient-mark-mode)))
     (let ((range (mouse-start-end start-point start-point click-count)))
       (push-mark (nth 0 range) t t)
       (goto-char (nth 1 range)))

=== modified file 'lisp/obsolete/pc-select.el'
--- a/lisp/obsolete/pc-select.el        2014-01-01 07:43:34 +0000
+++ b/lisp/obsolete/pc-select.el        2014-06-23 15:32:24 +0000
@@ -388,7 +388,7 @@
                   (fboundp 'normal-erase-is-backspace-mode))
          (normal-erase-is-backspace-mode 1))
        (setq highlight-nonselected-windows nil)
-       (setq transient-mark-mode t)
+       (transient-mark-mode 1)
        (setq mark-even-if-inactive t)
        (delete-selection-mode 1))
     ;;else

=== modified file 'lisp/org/ChangeLog'
--- a/lisp/org/ChangeLog        2014-06-22 23:12:17 +0000
+++ b/lisp/org/ChangeLog        2014-06-23 15:32:24 +0000
@@ -1,3 +1,7 @@
+2014-06-23  Stefan Monnier  <address@hidden>
+
+       * org-compat.el (activate-mark): Set transient-mark-mode buffer-locally.
+
 2014-06-22  Mario Lang  <address@hidden>
 
        * org-list.el (org-list-insert-item): The the -> the.

=== modified file 'lisp/org/org-compat.el'
--- a/lisp/org/org-compat.el    2014-05-29 03:45:29 +0000
+++ b/lisp/org/org-compat.el    2014-06-23 15:32:24 +0000
@@ -295,7 +295,7 @@
       (setq mark-active t)
       (when (and (boundp 'transient-mark-mode)
                 (not transient-mark-mode))
-       (setq transient-mark-mode 'lambda))
+       (set (make-local-variable 'transient-mark-mode) 'lambda))
       (when (boundp 'zmacs-regions)
        (setq zmacs-regions t)))))
 

=== modified file 'lisp/simple.el'
--- a/lisp/simple.el    2014-06-21 19:45:59 +0000
+++ b/lisp/simple.el    2014-06-23 15:32:24 +0000
@@ -4522,7 +4522,7 @@
       (force-mode-line-update) ;Refresh toolbar (bug#16382).
       (setq mark-active t)
       (unless (or transient-mark-mode no-tmm)
-        (setq transient-mark-mode 'lambda))
+        (setq-local transient-mark-mode 'lambda))
       (run-hooks 'activate-mark-hook))))
 
 (defun set-mark (pos)
@@ -4828,7 +4828,7 @@
     (set-mark (point))
     (goto-char omark)
     (cond (temp-highlight
-          (setq transient-mark-mode (cons 'only transient-mark-mode)))
+          (setq-local transient-mark-mode (cons 'only transient-mark-mode)))
          ((or (and arg (region-active-p)) ; (xor arg (not (region-active-p)))
               (not (or arg (region-active-p))))
           (deactivate-mark))
@@ -4867,10 +4867,10 @@
   (cond ((and shift-select-mode this-command-keys-shift-translated)
          (unless (and mark-active
                      (eq (car-safe transient-mark-mode) 'only))
-          (setq transient-mark-mode
-                 (cons 'only
-                       (unless (eq transient-mark-mode 'lambda)
-                         transient-mark-mode)))
+          (setq-local transient-mark-mode
+                       (cons 'only
+                             (unless (eq transient-mark-mode 'lambda)
+                               transient-mark-mode)))
            (push-mark nil nil t)))
         ((eq (car-safe transient-mark-mode) 'only)
          (setq transient-mark-mode (cdr transient-mark-mode))
@@ -4901,7 +4901,7 @@
 or \"mark.*active\" at the prompt."
   :global t
   ;; It's defined in C/cus-start, this stops the d-m-m macro defining it again.
-  :variable transient-mark-mode)
+  :variable (default-value 'transient-mark-mode))
 
 (defvar widen-automatically t
   "Non-nil means it is ok for commands to call `widen' when they want to.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]