]> git.notmuchmail.org Git - notmuch/commitdiff
emacs: use setq instead of set
authorJonas Bernoulli <jonas@bernoul.li>
Sun, 10 Jan 2021 14:00:37 +0000 (15:00 +0100)
committerDavid Bremner <david@tethera.net>
Wed, 13 Jan 2021 10:56:40 +0000 (06:56 -0400)
Commonly `set' is only used if there is no way around it;
i.e. when the variable cannot be known until runtime.

emacs/notmuch-tree.el
emacs/notmuch.el

index 57843e256f437d5f6206ef31e5aab9915d10e49a..17863f6ac1b0395cfd79733ef7a1abfd233a2311 100644 (file)
@@ -1133,7 +1133,7 @@ The arguments are:
        (inhibit-read-only t))
     (pop-to-buffer-same-window buffer))
   ;; Don't track undo information for this buffer
-  (set 'buffer-undo-list t)
+  (setbuffer-undo-list t)
   (notmuch-tree-worker query query-context target open-target unthreaded)
   (setq notmuch-tree-parent-buffer parent-buffer)
   (setq truncate-lines t))
index 132e7724d3fabe61f50f3338bd0e7f8111441d54..bba4ca036662b72240012e527e4cefeffd399241 100644 (file)
@@ -693,7 +693,7 @@ of the result."
                    (throw 'return nil))
                  (when (and atbob
                             (not (string= notmuch-search-target-thread "found")))
-                   (set 'never-found-target-thread t)))))
+                   (setnever-found-target-thread t)))))
            (when (and never-found-target-thread
                       notmuch-search-target-line)
              (goto-char (point-min))
@@ -996,11 +996,11 @@ the configured default sort order."
       (pop-to-buffer-same-window buffer))
     (notmuch-search-mode)
     ;; Don't track undo information for this buffer
-    (set 'buffer-undo-list t)
-    (set 'notmuch-search-query-string query)
-    (set 'notmuch-search-oldest-first oldest-first)
-    (set 'notmuch-search-target-thread target-thread)
-    (set 'notmuch-search-target-line target-line)
+    (setbuffer-undo-list t)
+    (setnotmuch-search-query-string query)
+    (setnotmuch-search-oldest-first oldest-first)
+    (setnotmuch-search-target-thread target-thread)
+    (setnotmuch-search-target-line target-line)
     (notmuch-tag-clear-cache)
     (let ((proc (get-buffer-process (current-buffer)))
          (inhibit-read-only t))
@@ -1048,7 +1048,7 @@ same relative position within the new buffer."
 This command toggles the sort order for the current search. The
 default sort order is defined by `notmuch-search-oldest-first'."
   (interactive)
-  (set 'notmuch-search-oldest-first (not notmuch-search-oldest-first))
+  (setnotmuch-search-oldest-first (not notmuch-search-oldest-first))
   (notmuch-search-refresh-view))
 
 (defun notmuch-group-disjunctive-query-string (query-string)