]> git.eshelyaron.com Git - emacs.git/commitdiff
Prefer defvar-local in nxml/*.el
authorStefan Kangas <stefan@marxist.se>
Sun, 31 Jan 2021 14:00:41 +0000 (15:00 +0100)
committerStefan Kangas <stefan@marxist.se>
Sun, 31 Jan 2021 14:00:41 +0000 (15:00 +0100)
* lisp/nxml/rng-cmpct.el (rng-c-current-token)
(rng-c-escape-positions, rng-c-file-name):
* lisp/nxml/rng-pttrn.el (rng-current-schema):
* lisp/nxml/rng-valid.el (rng-validate-timer)
(rng-validate-quick-timer, rng-error-count, rng-message-overlay)
(rng-message-overlay-inhibit-point, rng-message-overlay-current)
(rng-validate-up-to-date-end, rng-conditional-up-to-date-start)
(rng-conditional-up-to-date-end, rng-dtd): Prefer defvar-local.

lisp/nxml/rng-cmpct.el
lisp/nxml/rng-pttrn.el
lisp/nxml/rng-valid.el

index dcbd7ed1dd76708fe0bc9715d8e2f5904dd51b62..45a69a73f357bd9038f6b45d0a3f0a54a2fbf1dd 100644 (file)
@@ -123,8 +123,7 @@ Return a pattern."
   (set-buffer-multibyte t)
   (set-syntax-table rng-c-syntax-table))
 
-(defvar rng-c-current-token nil)
-(make-variable-buffer-local 'rng-c-current-token)
+(defvar-local rng-c-current-token nil)
 
 (defun rng-c-advance ()
   (cond ((looking-at rng-c-token-re)
@@ -334,11 +333,9 @@ OVERRIDE is either nil, require or t."
 
 ;;; Parsing
 
-(defvar rng-c-escape-positions nil)
-(make-variable-buffer-local 'rng-c-escape-positions)
+(defvar-local rng-c-escape-positions nil)
 
-(defvar rng-c-file-name nil)
-(make-variable-buffer-local 'rng-c-file-name)
+(defvar-local rng-c-file-name nil)
 
 (defvar rng-c-file-index nil)
 
index 12ffa578200ac3797f49a8c3f25d97a7492893c6..034671feeb0c612beaf1a13804ab382d65728a0b 100644 (file)
@@ -66,9 +66,8 @@
 (defvar rng-schema-change-hook nil
   "Hook to be run after `rng-current-schema' changes.")
 
-(defvar rng-current-schema nil
+(defvar-local rng-current-schema nil
   "Pattern to be used as schema for the current buffer.")
-(make-variable-buffer-local 'rng-current-schema)
 
 (defun rng-make-ref (name)
   (list 'ref nil name))
index 6ea893404cbf2a03a73cd15abc6ed22847a6af78..a5eb893c55426e198aa2a4f7021ec36b73162b63 100644 (file)
@@ -132,36 +132,30 @@ A quick validation validates at most one chunk."
 
 ;; Global variables
 
-(defvar rng-validate-timer nil)
-(make-variable-buffer-local 'rng-validate-timer)
+(defvar-local rng-validate-timer nil)
 ;; ensure that we can cancel the timer even after a kill-all-local-variables
 (put 'rng-validate-timer 'permanent-local t)
 
-(defvar rng-validate-quick-timer nil)
-(make-variable-buffer-local 'rng-validate-quick-timer)
+(defvar-local rng-validate-quick-timer nil)
 ;; ensure that we can cancel the timer even after a kill-all-local-variables
 (put 'rng-validate-quick-timer 'permanent-local t)
 
-(defvar rng-error-count nil
+(defvar-local rng-error-count nil
   "Number of errors in the current buffer.
 Always equal to number of overlays with category `rng-error'.")
-(make-variable-buffer-local 'rng-error-count)
 
-(defvar rng-message-overlay nil
+(defvar-local rng-message-overlay nil
   "Overlay in this buffer whose `help-echo' property was last printed.
 It is nil if none.")
-(make-variable-buffer-local 'rng-message-overlay)
 
-(defvar rng-message-overlay-inhibit-point nil
+(defvar-local rng-message-overlay-inhibit-point nil
   "Position at which message from overlay should be inhibited.
 If point is equal to this and the error overlay around
 point is `rng-message-overlay', then the `help-echo' property
 of the error overlay should not be printed with `message'.")
-(make-variable-buffer-local 'rng-message-overlay-inhibit-point)
 
-(defvar rng-message-overlay-current nil
+(defvar-local rng-message-overlay-current nil
   "Non-nil if `rng-message-overlay' is still the current message.")
-(make-variable-buffer-local 'rng-message-overlay-current)
 
 (defvar rng-open-elements nil
   "Stack of names of open elements represented as a list.
@@ -178,11 +172,10 @@ indicating an unresolvable entity or character reference.")
 
 (defvar rng-collecting-text nil)
 
-(defvar rng-validate-up-to-date-end nil
+(defvar-local rng-validate-up-to-date-end nil
   "Last position where validation is known to be up to date.")
-(make-variable-buffer-local 'rng-validate-up-to-date-end)
 
-(defvar rng-conditional-up-to-date-start nil
+(defvar-local rng-conditional-up-to-date-start nil
   "Marker for the start of the conditionally up-to-date region.
 It is nil if there is no conditionally up-to-date region.  The
 conditionally up-to-date region must be such that for any cached
@@ -191,20 +184,17 @@ if at some point it is determined that S becomes correct for P,
 then all states with position >= P in the conditionally up to
 date region must also then be correct and all errors between P
 and the end of the region must then be correctly marked.")
-(make-variable-buffer-local 'rng-conditional-up-to-date-start)
 
-(defvar rng-conditional-up-to-date-end nil
+(defvar-local rng-conditional-up-to-date-end nil
   "Marker for the end of the conditionally up-to-date region.
 It is nil if there is no conditionally up-to-date region.
 See the variable `rng-conditional-up-to-date-start'.")
-(make-variable-buffer-local 'rng-conditional-up-to-date-end)
 
 (defvar rng-parsing-for-state nil
   "Non-nil means we are currently parsing just to compute the state.
 Should be dynamically bound.")
 
-(defvar rng-dtd nil)
-(make-variable-buffer-local 'rng-dtd)
+(defvar-local rng-dtd nil)
 
 ;;;###autoload
 (define-minor-mode rng-validate-mode