1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

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.
This commit is contained in:
Stefan Kangas 2021-01-31 14:17:16 +01:00
parent d7405e474b
commit 035ef9f5ae
2 changed files with 5 additions and 9 deletions

View file

@ -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