summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Kangas <stefan@marxist.se>2021-10-18 01:33:21 +0200
committerStefan Kangas <stefan@marxist.se>2021-10-18 01:40:00 +0200
commit140e587dd505849cb09c5b3f183bbc686ac020b7 (patch)
tree2cf17ec9092f38c922e360b554b5b24852d62a80
parent7a876397b271c52d603381858750c0224e600e3b (diff)
downloademacs-140e587dd505849cb09c5b3f183bbc686ac020b7.tar.gz
Prefer defvar-local in MH-E
* lisp/mh-e/mh-comp.el (mh-insert-auto-fields-done-local): * lisp/mh-e/mh-e.el (mh-thread-scan-line-map) (mh-thread-scan-line-map-stack): * lisp/mh-e/mh-identity.el (mh-identity-pgg-default-user-id) (mh-identity-local): * lisp/mh-e/mh-scan.el (mh-cmd-note): * lisp/mh-e/mh-seq.el (mh-non-seq-mode-line-annotation): * lisp/mh-e/mh-thread.el (mh-thread-id-hash) (mh-thread-subject-hash, mh-thread-id-table) (mh-thread-index-id-map, mh-thread-id-index-map) (mh-thread-subject-container-hash, mh-thread-duplicates) (mh-thread-history): Prefer defvar-local.
-rw-r--r--lisp/mh-e/mh-comp.el3
-rw-r--r--lisp/mh-e/mh-e.el6
-rw-r--r--lisp/mh-e/mh-identity.el6
-rw-r--r--lisp/mh-e/mh-scan.el3
-rw-r--r--lisp/mh-e/mh-seq.el3
-rw-r--r--lisp/mh-e/mh-thread.el24
6 files changed, 15 insertions, 30 deletions
diff --git a/lisp/mh-e/mh-comp.el b/lisp/mh-e/mh-comp.el
index b42527f1bf5..130d3784ddd 100644
--- a/lisp/mh-e/mh-comp.el
+++ b/lisp/mh-e/mh-comp.el
@@ -177,9 +177,8 @@ Used by the \\[mh-edit-again] and \\[mh-extract-rejected-mail] commands.")
"Messages annotated, either a sequence name or a list of message numbers.
This variable can be used by `mh-annotate-msg-hook'.")
-(defvar mh-insert-auto-fields-done-local nil
+(defvar-local mh-insert-auto-fields-done-local nil
"Buffer-local variable set when `mh-insert-auto-fields' called successfully.")
-(make-variable-buffer-local 'mh-insert-auto-fields-done-local)
diff --git a/lisp/mh-e/mh-e.el b/lisp/mh-e/mh-e.el
index f47b6f46cf9..4e1ca2897bc 100644
--- a/lisp/mh-e/mh-e.el
+++ b/lisp/mh-e/mh-e.el
@@ -345,15 +345,13 @@ when searching for a separator.")
"This regular expression matches the signature separator.
See `mh-signature-separator'.")
-(defvar mh-thread-scan-line-map nil
+(defvar-local mh-thread-scan-line-map nil
"Map of message index to various parts of the scan line.")
-(make-variable-buffer-local 'mh-thread-scan-line-map)
-(defvar mh-thread-scan-line-map-stack nil
+(defvar-local mh-thread-scan-line-map-stack nil
"Old map of message index to various parts of the scan line.
This is the original map that is stored when the folder is
narrowed.")
-(make-variable-buffer-local 'mh-thread-scan-line-map-stack)
(defcustom mh-x-mailer-string nil
"String containing the contents of the X-Mailer header field.
diff --git a/lisp/mh-e/mh-identity.el b/lisp/mh-e/mh-identity.el
index 3643e462318..994ab713915 100644
--- a/lisp/mh-e/mh-identity.el
+++ b/lisp/mh-e/mh-identity.el
@@ -39,11 +39,10 @@
(autoload 'mml-insert-tag "mml")
-(defvar mh-identity-pgg-default-user-id nil
+(defvar-local mh-identity-pgg-default-user-id nil
"Holds the GPG key ID to be used by pgg.el.
This is normally set as part of an Identity in
`mh-identity-list'.")
-(make-variable-buffer-local 'mh-identity-pgg-default-user-id)
(defvar mh-identity-menu nil
"The Identity menu.")
@@ -90,9 +89,8 @@ See `mh-identity-make-menu'."
(declare (obsolete nil "29.1"))
nil)
-(defvar mh-identity-local nil
+(defvar-local mh-identity-local nil
"Buffer-local variable that holds the identity currently in use.")
-(make-variable-buffer-local 'mh-identity-local)
(defun mh-header-field-delete (field value-only)
"Delete header FIELD, or only its value if VALUE-ONLY is t.
diff --git a/lisp/mh-e/mh-scan.el b/lisp/mh-e/mh-scan.el
index 5aa599942e3..5a1a671aee2 100644
--- a/lisp/mh-e/mh-scan.el
+++ b/lisp/mh-e/mh-scan.el
@@ -315,7 +315,7 @@ produced by \"inc\".")
;;; Widths, Offsets and Columns
-(defvar mh-cmd-note 4
+(defvar-local mh-cmd-note 4
"Column for notations.
This variable should be set with the function `mh-set-cmd-note'.
@@ -323,7 +323,6 @@ This variable may be updated dynamically if
`mh-adaptive-cmd-note-flag' is on.
Note that columns in Emacs start with 0.")
-(make-variable-buffer-local 'mh-cmd-note)
(defvar mh-scan-cmd-note-width 1
"Number of columns consumed by the cmd-note field in `mh-scan-format'.
diff --git a/lisp/mh-e/mh-seq.el b/lisp/mh-e/mh-seq.el
index f4dd65177f7..077e289c01d 100644
--- a/lisp/mh-e/mh-seq.el
+++ b/lisp/mh-e/mh-seq.el
@@ -38,9 +38,8 @@
(defvar mh-last-seq-used nil
"Name of seq to which a msg was last added.")
-(defvar mh-non-seq-mode-line-annotation nil
+(defvar-local mh-non-seq-mode-line-annotation nil
"Saved value of `mh-mode-line-annotation' when narrowed to a seq.")
-(make-variable-buffer-local 'mh-non-seq-mode-line-annotation)
(defvar mh-internal-seqs '(answered cur deleted forwarded printed))
diff --git a/lisp/mh-e/mh-thread.el b/lisp/mh-e/mh-thread.el
index a4b4151bcf8..21954da6acd 100644
--- a/lisp/mh-e/mh-thread.el
+++ b/lisp/mh-e/mh-thread.el
@@ -86,41 +86,33 @@
message parent children
(real-child-p t))
-(defvar mh-thread-id-hash nil
+(defvar-local mh-thread-id-hash nil
"Hash table used to canonicalize message identifiers.")
-(make-variable-buffer-local 'mh-thread-id-hash)
-(defvar mh-thread-subject-hash nil
+(defvar-local mh-thread-subject-hash nil
"Hash table used to canonicalize subject strings.")
-(make-variable-buffer-local 'mh-thread-subject-hash)
-(defvar mh-thread-id-table nil
+(defvar-local mh-thread-id-table nil
"Thread ID table maps from message identifiers to message containers.")
-(make-variable-buffer-local 'mh-thread-id-table)
-(defvar mh-thread-index-id-map nil
+(defvar-local mh-thread-index-id-map nil
"Table to look up message identifier from message index.")
-(make-variable-buffer-local 'mh-thread-index-id-map)
-(defvar mh-thread-id-index-map nil
+(defvar-local mh-thread-id-index-map nil
"Table to look up message index number from message identifier.")
-(make-variable-buffer-local 'mh-thread-id-index-map)
-(defvar mh-thread-subject-container-hash nil
+(defvar-local mh-thread-subject-container-hash nil
"Hash table used to group messages by subject.")
-(make-variable-buffer-local 'mh-thread-subject-container-hash)
-(defvar mh-thread-duplicates nil
+(defvar-local mh-thread-duplicates nil
"Hash table used to associate messages with the same message identifier.")
-(make-variable-buffer-local 'mh-thread-duplicates)
-(defvar mh-thread-history ()
+(defvar-local mh-thread-history ()
"Variable to remember the transformations to the thread tree.
When new messages are added, these transformations are rewound,
then the links are added from the newly seen messages. Finally
the transformations are redone to get the new thread tree. This
makes incremental threading easier.")
-(make-variable-buffer-local 'mh-thread-history)
(defvar mh-thread-body-width nil
"Width of scan substring that contains subject and body of message.")