aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Kangas2021-01-31 14:17:16 +0100
committerStefan Kangas2021-01-31 14:17:16 +0100
commit035ef9f5aec01d61ea8b7de353cfbe3d2b15f731 (patch)
treebf8547cb684171a09617d3124424e92f4f66776e
parentd7405e474b43ba5c4238cc27f2aaa61341b828b4 (diff)
downloademacs-035ef9f5aec01d61ea8b7de353cfbe3d2b15f731.tar.gz
emacs-035ef9f5aec01d61ea8b7de353cfbe3d2b15f731.zip
Prefer defvar-local in cua
* lisp/emulation/cua-base.el (cua-inhibit-cua-keys) (cua--status-string): * lisp/emulation/cua-rect.el (cua--rectangle) (cua--rectangle-overlays): Prefer defvar-local.
-rw-r--r--lisp/emulation/cua-base.el8
-rw-r--r--lisp/emulation/cua-rect.el6
2 files changed, 5 insertions, 9 deletions
diff --git a/lisp/emulation/cua-base.el b/lisp/emulation/cua-base.el
index 881eff7f801..a64274bc0c1 100644
--- a/lisp/emulation/cua-base.el
+++ b/lisp/emulation/cua-base.el
@@ -634,9 +634,8 @@ a cons (TYPE . COLOR), then both properties are affected."
634 634
635;;; Low-level Interface 635;;; Low-level Interface
636 636
637(defvar cua-inhibit-cua-keys nil 637(defvar-local cua-inhibit-cua-keys nil
638 "Buffer-local variable that may disable the CUA keymappings.") 638 "Buffer-local variable that may disable the CUA keymappings.")
639(make-variable-buffer-local 'cua-inhibit-cua-keys)
640 639
641;;; Aux. variables 640;;; Aux. variables
642 641
@@ -644,9 +643,8 @@ a cons (TYPE . COLOR), then both properties are affected."
644;; checked in post-command hook to see if point was moved 643;; checked in post-command hook to see if point was moved
645(defvar cua--buffer-and-point-before-command nil) 644(defvar cua--buffer-and-point-before-command nil)
646 645
647;; status string for mode line indications 646(defvar-local cua--status-string nil
648(defvar cua--status-string nil) 647 "Status string for mode line indications.")
649(make-variable-buffer-local 'cua--status-string)
650 648
651(defvar cua--debug nil) 649(defvar cua--debug nil)
652 650
diff --git a/lisp/emulation/cua-rect.el b/lisp/emulation/cua-rect.el
index ea5dad2aa0b..be2d7c0fd8a 100644
--- a/lisp/emulation/cua-rect.el
+++ b/lisp/emulation/cua-rect.el
@@ -37,7 +37,7 @@
37 37
38(require 'rect) 38(require 'rect)
39 39
40(defvar cua--rectangle nil 40(defvar-local cua--rectangle nil
41 "If non-nil, restrict current region to this rectangle. 41 "If non-nil, restrict current region to this rectangle.
42A cua-rectangle definition is a vector used for all actions in 42A cua-rectangle definition is a vector used for all actions in
43`cua-rectangle-mark-mode', of the form: 43`cua-rectangle-mark-mode', of the form:
@@ -59,7 +59,6 @@ If VIRT is non-nil, virtual straight edges are enabled.
59 59
60If SELECT is a regexp, only lines starting with that regexp are 60If SELECT is a regexp, only lines starting with that regexp are
61affected.") 61affected.")
62(make-variable-buffer-local 'cua--rectangle)
63 62
64(defvar cua--last-rectangle nil 63(defvar cua--last-rectangle nil
65 "Most recent rectangle geometry. 64 "Most recent rectangle geometry.
@@ -85,9 +84,8 @@ See `cua--rectangle'.")
85;; "active " "sert on" " straig" " lines ") 84;; "active " "sert on" " straig" " lines ")
86(defvar cua--last-killed-rectangle nil) 85(defvar cua--last-killed-rectangle nil)
87 86
88(defvar cua--rectangle-overlays nil 87(defvar-local cua--rectangle-overlays nil
89 "List of overlays used to display current rectangle.") 88 "List of overlays used to display current rectangle.")
90(make-variable-buffer-local 'cua--rectangle-overlays)
91(put 'cua--rectangle-overlays 'permanent-local t) 89(put 'cua--rectangle-overlays 'permanent-local t)
92 90
93(defvar cua--overlay-keymap 91(defvar cua--overlay-keymap