[PATCH v3 29/34] emacs: Remove notmuch-setq-local

Subject: [PATCH v3 29/34] emacs: Remove notmuch-setq-local

Date: Sat, 8 Aug 2020 13:50:04 +0200

To: notmuch@notmuchmail.org

Cc:

From: Jonas Bernoulli


Just use setq-local, which existed since Emacs 24.3.
---
 emacs/notmuch-address.el | 4 ++--
 emacs/notmuch-company.el | 2 +-
 emacs/notmuch-compat.el  | 8 --------
 3 files changed, 3 insertions(+), 11 deletions(-)

diff --git a/emacs/notmuch-address.el b/emacs/notmuch-address.el
index cd0ffb67..8a6d299c 100644
--- a/emacs/notmuch-address.el
+++ b/emacs/notmuch-address.el
@@ -172,11 +172,11 @@ (defun notmuch-address-toggle-internal-completion ()
   (interactive)
   (if (local-variable-p 'notmuch-address-command)
       (kill-local-variable 'notmuch-address-command)
-    (notmuch-setq-local notmuch-address-command 'internal))
+    (setq-local notmuch-address-command 'internal))
   (when (boundp 'company-idle-delay)
     (if (local-variable-p 'company-idle-delay)
 	(kill-local-variable 'company-idle-delay)
-      (notmuch-setq-local company-idle-delay nil))))
+      (setq-local company-idle-delay nil))))
 
 (defun notmuch-address-matching (substring)
   "Returns a list of completion candidates matching SUBSTRING.
diff --git a/emacs/notmuch-company.el b/emacs/notmuch-company.el
index 24e7446c..9ee8ceca 100644
--- a/emacs/notmuch-company.el
+++ b/emacs/notmuch-company.el
@@ -62,7 +62,7 @@ (defun notmuch-company-setup ()
   ;; internal completion) can still be accessed via standard company
   ;; functions, e.g., company-complete.
   (unless (eq notmuch-address-command 'internal)
-    (notmuch-setq-local company-idle-delay nil)))
+    (setq-local company-idle-delay nil)))
 
 ;;;###autoload
 (defun notmuch-company (command &optional arg &rest _ignore)
diff --git a/emacs/notmuch-compat.el b/emacs/notmuch-compat.el
index 370cafa1..fafc64f3 100644
--- a/emacs/notmuch-compat.el
+++ b/emacs/notmuch-compat.el
@@ -40,14 +40,6 @@ (defun notmuch-message--fold-long-headers ()
 (unless (fboundp 'message--fold-long-headers)
   (add-hook 'message-header-hook 'notmuch-message--fold-long-headers))
 
-(if (fboundp 'setq-local)
-    (defalias 'notmuch-setq-local 'setq-local)
-  (defmacro notmuch-setq-local (var val)
-    "Set variable VAR to value VAL in current buffer.
-
-Backport of setq-local for emacs without setq-local (pre 24.3)."
-    `(set (make-local-variable ',var) ,val)))
-
 (if (fboundp 'read-char-choice)
     (defalias 'notmuch-read-char-choice 'read-char-choice)
   (defun notmuch-read-char-choice (prompt chars &optional inhibit-keyboard-quit)
-- 
2.28.0
_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org

Thread: