X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=emacs%2Fnotmuch-lib.el;fp=emacs%2Fnotmuch-lib.el;h=3add992b46f1dbe4479f48576a77297b8d322da1;hp=1bdfc2b91a87b4a5885b6752167faee92225c4e8;hb=16b2db0986ce0ed7c420a69d0a98bb41e9ca4bd8;hpb=1bbbde4a0c3153f6caa30724bd173397be43144f diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el index 1bdfc2b9..3add992b 100644 --- a/emacs/notmuch-lib.el +++ b/emacs/notmuch-lib.el @@ -192,8 +192,8 @@ will be signaled. Otherwise the output will be returned." (with-temp-buffer - (let* ((status (apply #'call-process notmuch-command nil t nil args)) - (output (buffer-string))) + (let ((status (apply #'call-process notmuch-command nil t nil args)) + (output (buffer-string))) (notmuch-check-exit-status status (cons notmuch-command args) output) output))) @@ -248,7 +248,8 @@ displays both values separately." (len (length val))) ;; Trim off the trailing newline (if the value is empty or not ;; configured, there will be no newline) - (if (and (> len 0) (= (aref val (- len 1)) ?\n)) + (if (and (> len 0) + (= (aref val (- len 1)) ?\n)) (substring val 0 -1) val))) @@ -538,13 +539,12 @@ This replaces spaces, percents, and double quotes in STR with ;;; Generic Utilities (defun notmuch-plist-delete (plist property) - (let* ((xplist (cons nil plist)) - (pred xplist)) - (while (cdr pred) - (when (eq (cadr pred) property) - (setcdr pred (cdddr pred))) - (setq pred (cddr pred))) - (cdr xplist))) + (let (p) + (while plist + (unless (eq property (car plist)) + (setq p (plist-put p (car plist) (cadr plist)))) + (setq plist (cddr plist))) + p)) ;;; MML Utilities @@ -555,8 +555,10 @@ This replaces spaces, percents, and double quotes in STR with (if (or (string= (cadr st1) "*") (string= (cadr st2) "*")) ;; Comparison of content types should be case insensitive. - (string= (downcase (car st1)) (downcase (car st2))) - (string= (downcase t1) (downcase t2))))) + (string= (downcase (car st1)) + (downcase (car st2))) + (string= (downcase t1) + (downcase t2))))) (defvar notmuch-multipart/alternative-discouraged '(;; Avoid HTML parts.