]> git.notmuchmail.org Git - notmuch/commitdiff
emacs: use setq-local
authorJonas Bernoulli <jonas@bernoul.li>
Mon, 16 Nov 2020 21:28:39 +0000 (22:28 +0100)
committerDavid Bremner <david@tethera.net>
Sun, 6 Dec 2020 20:22:33 +0000 (16:22 -0400)
It is available since Emacs 24.3 and we require at least Emacs 25.
It makes the variable buffer-local if it isn't always buffer-local
anyway.

emacs/notmuch-company.el
emacs/notmuch-parser.el
emacs/notmuch.el

index 9e7430295773faa7559894a898363be1ad7d814c..b50e73c8899bda57525bff9528920f17c479bc93 100644 (file)
@@ -55,8 +55,7 @@
 ;;;###autoload
 (defun notmuch-company-setup ()
   (company-mode)
-  (make-local-variable 'company-backends)
-  (setq company-backends '(notmuch-company))
+  (setq-local company-backends '(notmuch-company))
   ;; Disable automatic company completion unless an internal
   ;; completion method is configured. Company completion (using
   ;; internal completion) can still be accessed via standard company
index 3aa5bd8ff1cdc45f6265d9f2133e9e8b9e070c57..4a437016dc6b47d6e6e6fa33d76c31fa6ac1e5df 100644 (file)
@@ -168,9 +168,8 @@ additional data.  The caller just needs to ensure it does not
 move point in the input buffer."
   ;; Set up the initial state
   (unless (local-variable-p 'notmuch-sexp--parser)
-    (set (make-local-variable 'notmuch-sexp--parser)
-        (notmuch-sexp-create-parser))
-    (set (make-local-variable 'notmuch-sexp--state) 'begin))
+    (setq-local notmuch-sexp--parser (notmuch-sexp-create-parser))
+    (setq-local notmuch-sexp--state 'begin))
   (let (done)
     (while (not done)
       (cl-case notmuch-sexp--state
index 3ca27b26f866d298a125c0eff376a23f8092d757..95770fc3034e067ca4ec2cf39773b14be9527b3b 100644 (file)
@@ -391,7 +391,7 @@ Complete list of currently available key bindings:
   (make-local-variable 'notmuch-search-target-thread)
   (make-local-variable 'notmuch-search-target-line)
   (setq notmuch-buffer-refresh-function #'notmuch-search-refresh-view)
-  (set (make-local-variable 'scroll-preserve-screen-position) t)
+  (setq-local scroll-preserve-screen-position t)
   (add-to-invisibility-spec (cons 'ellipsis t))
   (setq truncate-lines t)
   (setq buffer-read-only t)