]> git.cworth.org Git - notmuch/commitdiff
emacs: use string-empty-p
authorJonas Bernoulli <jonas@bernoul.li>
Sun, 10 Jan 2021 14:01:09 +0000 (15:01 +0100)
committerDavid Bremner <david@tethera.net>
Fri, 15 Jan 2021 10:47:28 +0000 (06:47 -0400)
emacs/notmuch-lib.el
emacs/notmuch-mua.el
emacs/notmuch-show.el
emacs/notmuch-tag.el
emacs/notmuch.el

index 05d3be10bb7e1d4cfd191f575087d8dc65c1e4c9..bc550dc26808f2abb2db7eb209a1382826c09c10 100644 (file)
@@ -285,7 +285,7 @@ depending on the value of `notmuch-poll-script'."
   (interactive)
   (message "Polling mail...")
   (if (stringp notmuch-poll-script)
-      (unless (string= notmuch-poll-script "")
+      (unless (string-empty-p notmuch-poll-script)
        (unless (equal (call-process notmuch-poll-script nil nil) 0)
          (error "Notmuch: poll script `%s' failed!" notmuch-poll-script)))
     (notmuch-call-notmuch-process "new"))
index c5b1b4829b0d1f1fcc045f4c1298b1ba97851470..08c73c1637abf4bdb88101165a5f09c9723c770b 100644 (file)
@@ -388,7 +388,7 @@ instead of `message-mode' and SWITCH-FUNCTION is mandatory."
   (interactive)
   (when notmuch-mua-user-agent-function
     (let ((user-agent (funcall notmuch-mua-user-agent-function)))
-      (unless (string= "" user-agent)
+      (unless (string-empty-p user-agent)
        (push (cons 'User-Agent user-agent) other-headers))))
   (unless (assq 'From other-headers)
     (push (cons 'From (message-make-from
index ea4444e5d744bb76aaaebe2640e175e2bac52455..fdf4ab3c289b62f7b38e1bd619a767588041326e 100644 (file)
@@ -333,7 +333,7 @@ operation on the contents of the current buffer."
         (header (concat
                  "Subject: " subject "\n"
                  "To: " to "\n"
-                 (if (not (string= cc ""))
+                 (if (not (string-empty-p cc))
                      (concat "Cc: " cc "\n")
                    "")
                  "From: " from "\n"
@@ -1790,7 +1790,7 @@ user decision and we should not override it."
 Reshows the current thread with matches defined by the new query-string."
   (interactive (list (notmuch-read-query "Filter thread: ")))
   (let ((msg-id (notmuch-show-get-message-id)))
-    (setq notmuch-show-query-context (if (string= query "") nil query))
+    (setq notmuch-show-query-context (if (string-empty-p query) nil query))
     (notmuch-show-refresh-view t)
     (notmuch-show-goto-message msg-id)))
 
index 982b372c41b11956d6f289716c07877c3428eed9..f348d4ae2dc82c1b0c57570269cf4015a54d939b 100644 (file)
@@ -452,7 +452,7 @@ present or a \"-\" to indicate that the tag should be removed
 from TAGS if present."
   (let ((result-tags (copy-sequence tags)))
     (dolist (tag-change tag-changes)
-      (let ((tag (and (not (string= tag-change ""))
+      (let ((tag (and (not (string-empty-p tag-change))
                      (substring tag-change 1))))
        (cl-case (aref tag-change 0)
          (?+ (unless (member tag result-tags)
index d2e87b1b1256f5aaa456b726df8667e13cead700..26efcccd3fae5817717adc8d5156c60a290f47d9 100644 (file)
@@ -814,13 +814,13 @@ non-authors is found, assume that all of the authors match."
        (setq invisible-string (notmuch-search-author-propertize invisible-string)))
       ;; If there is any invisible text, add it as a tooltip to the
       ;; visible text.
-      (unless (string= invisible-string "")
+      (unless (string-empty-p invisible-string)
        (setq visible-string
              (propertize visible-string
                          'help-echo (concat "..." invisible-string))))
       ;; Insert the visible and, if present, invisible author strings.
       (insert visible-string)
-      (unless (string= invisible-string "")
+      (unless (string-empty-p invisible-string)
        (let ((start (point))
              overlay)
          (insert invisible-string)