summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Kangas <stefan@marxist.se>2021-01-31 14:17:16 +0100
committerStefan Kangas <stefan@marxist.se>2021-01-31 14:17:16 +0100
commit035ef9f5aec01d61ea8b7de353cfbe3d2b15f731 (patch)
treebf8547cb684171a09617d3124424e92f4f66776e
parentd7405e474b43ba5c4238cc27f2aaa61341b828b4 (diff)
downloademacs-035ef9f5aec01d61ea8b7de353cfbe3d2b15f731.tar.gz
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."
;;; Low-level Interface
-(defvar cua-inhibit-cua-keys nil
+(defvar-local cua-inhibit-cua-keys nil
"Buffer-local variable that may disable the CUA keymappings.")
-(make-variable-buffer-local 'cua-inhibit-cua-keys)
;;; Aux. variables
@@ -644,9 +643,8 @@ a cons (TYPE . COLOR), then both properties are affected."
;; checked in post-command hook to see if point was moved
(defvar cua--buffer-and-point-before-command nil)
-;; status string for mode line indications
-(defvar cua--status-string nil)
-(make-variable-buffer-local 'cua--status-string)
+(defvar-local cua--status-string nil
+ "Status string for mode line indications.")
(defvar cua--debug nil)
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 @@
(require 'rect)
-(defvar cua--rectangle nil
+(defvar-local cua--rectangle nil
"If non-nil, restrict current region to this rectangle.
A cua-rectangle definition is a vector used for all actions in
`cua-rectangle-mark-mode', of the form:
@@ -59,7 +59,6 @@ If VIRT is non-nil, virtual straight edges are enabled.
If SELECT is a regexp, only lines starting with that regexp are
affected.")
-(make-variable-buffer-local 'cua--rectangle)
(defvar cua--last-rectangle nil
"Most recent rectangle geometry.
@@ -85,9 +84,8 @@ See `cua--rectangle'.")
;; "active " "sert on" " straig" " lines ")
(defvar cua--last-killed-rectangle nil)
-(defvar cua--rectangle-overlays nil
+(defvar-local cua--rectangle-overlays nil
"List of overlays used to display current rectangle.")
-(make-variable-buffer-local 'cua--rectangle-overlays)
(put 'cua--rectangle-overlays 'permanent-local t)
(defvar cua--overlay-keymap