]> git.notmuchmail.org Git - notmuch/commitdiff
emacs: Remove notmuch-setq-local
authorJonas Bernoulli <jonas@bernoul.li>
Sat, 8 Aug 2020 11:50:04 +0000 (13:50 +0200)
committerDavid Bremner <david@tethera.net>
Mon, 10 Aug 2020 00:15:27 +0000 (21:15 -0300)
Just use setq-local, which existed since Emacs 24.3.

emacs/notmuch-address.el
emacs/notmuch-company.el
emacs/notmuch-compat.el

index cd0ffb67fcfab19eacd1b1d6a6258ac185e2ed4e..8a6d299cb3061bc7234c932a59a73f7e6da87e21 100644 (file)
@@ -172,11 +172,11 @@ toggles the setting in this buffer."
   (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.
index 24e7446c81bf3b97d9ead8d906f3976bbd507c41..9ee8ceca2922076ce3e459f098939c0e3025c289 100644 (file)
@@ -62,7 +62,7 @@
   ;; 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)
index 370cafa19bcdc6a5ebe637aa331b772c28db84c2..fafc64f3338849db3026114294c337613e8f9c65 100644 (file)
 (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)