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 | 3 +--
 emacs/notmuch-parser.el  | 5 ++---
 emacs/notmuch.el         | 2 +-
 3 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/emacs/notmuch-company.el b/emacs/notmuch-company.el
index 9e743029..b50e73c8 100644
--- a/emacs/notmuch-company.el
+++ b/emacs/notmuch-company.el
@@ -55,8 +55,7 @@ (defvar notmuch-address-command)
 ;;;###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
diff --git a/emacs/notmuch-parser.el b/emacs/notmuch-parser.el
index 3aa5bd8f..4a437016 100644
--- a/emacs/notmuch-parser.el
+++ b/emacs/notmuch-parser.el
@@ -168,9 +168,8 @@ (defun notmuch-sexp-parse-partial-list (result-function 
result-buffer)
 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
diff --git a/emacs/notmuch.el b/emacs/notmuch.el
index 3ca27b26..95770fc3 100644
--- a/emacs/notmuch.el
+++ b/emacs/notmuch.el
@@ -391,7 +391,7 @@ (define-derived-mode notmuch-search-mode fundamental-mode 
"notmuch-search"
   (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)
-- 
2.29.1
_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org

Reply via email to