emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] emacs-24 r117682: * lisp/emulation/cua-base.el (cua--selec


From: Stefan Monnier
Subject: [Emacs-diffs] emacs-24 r117682: * lisp/emulation/cua-base.el (cua--select-keymaps): Use region-active-p.
Date: Fri, 07 Nov 2014 19:55:44 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 117682
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=18952
committer: Stefan Monnier <address@hidden>
branch nick: emacs-24
timestamp: Fri 2014-11-07 14:55:39 -0500
message:
  * lisp/emulation/cua-base.el (cua--select-keymaps): Use region-active-p.
  (cua-set-mark, cua--pre-command-handler-1,cua--post-command-handler-1):
  * lisp/emulation/cua-gmrk.el (cua-cancel-global-mark): Same.
modified:
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/emulation/cua-base.el     cuabase.el-20091113204419-o5vbwnq5f7feedwu-2415
  lisp/emulation/cua-gmrk.el     cuagmrk.el-20091113204419-o5vbwnq5f7feedwu-2416
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2014-11-07 14:42:51 +0000
+++ b/lisp/ChangeLog    2014-11-07 19:55:39 +0000
@@ -1,3 +1,10 @@
+2014-11-07  Stefan Monnier  <address@hidden>
+
+       * emulation/cua-base.el (cua--select-keymaps): Use region-active-p
+       (bug#18952).
+       (cua-set-mark, cua--pre-command-handler-1,cua--post-command-handler-1):
+       * emulation/cua-gmrk.el (cua-cancel-global-mark): Same.
+
 2014-11-07  Michael Albinus  <address@hidden>
 
        * files.el (file-name-non-special): Wrap the call of

=== modified file 'lisp/emulation/cua-base.el'
--- a/lisp/emulation/cua-base.el        2014-10-31 15:31:27 +0000
+++ b/lisp/emulation/cua-base.el        2014-11-07 19:55:39 +0000
@@ -1015,7 +1015,7 @@
     (or (and cua-auto-mark-last-change
             (cua-pop-to-last-change))
        (pop-to-mark-command)))
-   ((and cua-toggle-set-mark mark-active)
+   ((and cua-toggle-set-mark (region-active-p))
     (cua--deactivate)
     (message "Mark cleared"))
    (t
@@ -1114,7 +1114,7 @@
 
    ;; Set mark if user explicitly said to do so
    (cua--rectangle ;FIXME: ??
-    (unless mark-active
+    (unless (region-active-p)
       (push-mark-command nil nil))))
 
   ;; Detect extension of rectangles by mouse or other movement
@@ -1140,7 +1140,7 @@
   (if cua--debug
       (cond
        (cua--rectangle (cua--rectangle-assert))
-       (mark-active (message "Mark=%d Point=%d" (mark t) (point)))))
+       ((region-active-p) (message "Mark=%d Point=%d" (mark t) (point)))))
 
   (if cua-enable-cursor-indications
       (cua--update-indications))
@@ -1199,7 +1199,7 @@
 (defun cua--select-keymaps ()
   ;; Setup conditions for selecting the proper keymaps in cua--keymap-alist.
   (setq cua--ena-region-keymap
-       (and mark-active (not deactivate-mark)))
+       (and (region-active-p) (not deactivate-mark)))
   (setq cua--ena-prefix-override-keymap
        (and cua--ena-region-keymap
             cua-enable-cua-keys

=== modified file 'lisp/emulation/cua-gmrk.el'
--- a/lisp/emulation/cua-gmrk.el        2014-01-01 07:43:34 +0000
+++ b/lisp/emulation/cua-gmrk.el        2014-11-07 19:55:39 +0000
@@ -321,7 +321,7 @@
 (defun cua-cancel-global-mark ()
   "Cancel the global mark."
   (interactive)
-  (if mark-active
+  (if (region-active-p)
       (cua-cancel)
     (if (cua--global-mark-active)
        (cua--deactivate-global-mark t)))


reply via email to

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