diff options
author | Richard Hansen <rhansen@rhansen.org> | 2022-06-22 19:02:42 -0400 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2022-09-11 13:46:30 +0200 |
commit | dd02725c57088550255ec00438513f849dcf6a4c (patch) | |
tree | a4e8d033c96e61272530ff4a2e3bcbe1e1654277 | |
parent | b6da1e4221ae50fe75c246deafe9d2455d4ca558 (diff) | |
download | emacs-dd02725c57088550255ec00438513f849dcf6a4c.tar.gz |
; whitespace: Use `defvar-local' for buffer-local vars
-rw-r--r-- | lisp/whitespace.el | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lisp/whitespace.el b/lisp/whitespace.el index 1d28ae2e1ca..57c22146956 100644 --- a/lisp/whitespace.el +++ b/lisp/whitespace.el @@ -1129,24 +1129,24 @@ SYMBOL is a valid symbol associated with CHAR. See `whitespace-style-value-list'.") -(defvar whitespace-active-style nil +(defvar-local whitespace-active-style nil "Used to save locally `whitespace-style' value.") -(defvar whitespace-point (point) +(defvar-local whitespace-point (point) "Used to save locally current point value. Used by function `whitespace-trailing-regexp' (which see).") (defvar-local whitespace-point--used nil "Region whose highlighting depends on `whitespace-point'.") -(defvar whitespace-bob-marker nil +(defvar-local whitespace-bob-marker nil "Used to save locally the bob marker value. Used by function `whitespace-post-command-hook' (which see).") -(defvar whitespace-eob-marker nil +(defvar-local whitespace-eob-marker nil "Used to save locally the eob marker value. Used by function `whitespace-post-command-hook' (which see).") -(defvar whitespace-buffer-changed nil +(defvar-local whitespace-buffer-changed nil "Used to indicate locally if buffer changed. Used by `whitespace-post-command-hook' and `whitespace-buffer-changed' functions (which see).") @@ -1766,7 +1766,7 @@ cleaning up these problems." ;;;; Internal functions -(defvar whitespace-font-lock-keywords nil +(defvar-local whitespace-font-lock-keywords nil "Used to save the value `whitespace-color-on' adds to `font-lock-keywords'.") @@ -1993,10 +1993,10 @@ resultant list will be returned." the-list) -(defvar whitespace-display-table nil +(defvar-local whitespace-display-table nil "Used to save a local display table.") -(defvar whitespace-display-table-was-local nil +(defvar-local whitespace-display-table-was-local nil "Used to remember whether a buffer initially had a local display table.") (defun whitespace-turn-on () |