diff options
Diffstat (limited to 'lisp/mh-e/mh-seq.el')
-rw-r--r-- | lisp/mh-e/mh-seq.el | 30 |
1 files changed, 11 insertions, 19 deletions
diff --git a/lisp/mh-e/mh-seq.el b/lisp/mh-e/mh-seq.el index e8a03f6704b..9cdf39f7f1e 100644 --- a/lisp/mh-e/mh-seq.el +++ b/lisp/mh-e/mh-seq.el @@ -1,4 +1,4 @@ -;;; mh-seq.el --- MH-E sequences support +;;; mh-seq.el --- MH-E sequences support -*- lexical-binding: t; -*- ;; Copyright (C) 1993, 1995, 2001-2021 Free Software Foundation, Inc. @@ -26,8 +26,6 @@ ;; Sequences are stored in the alist `mh-seq-list' in the form: ;; ((seq-name msgs ...) (seq-name msgs ...) ...) -;;; Change Log: - ;;; Code: (require 'mh-e) @@ -156,7 +154,7 @@ The list appears in a buffer named \"*MH-E Sequences*\"." (let ((name (mh-seq-name (car seq-list))) (sorted-seq-msgs (mh-coalesce-msg-list - (sort (copy-sequence (mh-seq-msgs (car seq-list))) '<))) + (sort (copy-sequence (mh-seq-msgs (car seq-list))) #'<))) name-spec) (insert (setq name-spec (format (format "%%%ss:" max-len) name))) (while sorted-seq-msgs @@ -191,7 +189,7 @@ MESSAGE appears." (cond (dest-folder (format " (to be refiled to %s)" dest-folder)) (deleted-flag (format " (to be deleted)")) (t "")) - (mapconcat 'concat + (mapconcat #'concat (mh-list-to-string (mh-seq-containing-msg message t)) " ")))) @@ -390,10 +388,7 @@ Prompt with PROMPT, raise an error if the sequence is empty and the NOT-EMPTY flag is non-nil, and supply an optional DEFAULT sequence. A reply of `%' defaults to the first sequence containing the current message." - (let* ((input (completing-read (format "%s sequence%s: " prompt - (if default - (format " (default %s)" default) - "")) + (let* ((input (completing-read (format-prompt "%s sequence" default prompt) (mh-seq-names mh-seq-list) nil nil nil 'mh-sequence-history)) (seq (cond ((equal input "%") @@ -494,13 +489,13 @@ folder buffer are not updated." ;; Add to a SEQUENCE each message the list of MSGS. (if (and (mh-valid-seq-p seq) (not (mh-folder-name-p seq))) (if msgs - (apply 'mh-exec-cmd "mark" mh-current-folder "-add" + (apply #'mh-exec-cmd "mark" mh-current-folder "-add" "-sequence" (symbol-name seq) (mh-coalesce-msg-list msgs))))) (defun mh-canonicalize-sequence (msgs) "Sort MSGS in decreasing order and remove duplicates." - (let* ((sorted-msgs (sort (copy-sequence msgs) '>)) + (let* ((sorted-msgs (sort (copy-sequence msgs) #'>)) (head sorted-msgs)) (while (cdr head) (if (= (car head) (cadr head)) @@ -565,7 +560,7 @@ OP is one of `widen' and `unthread'." (defvar mh-range-seq-names) (defvar mh-range-history ()) (defvar mh-range-completion-map (copy-keymap minibuffer-local-completion-map)) -(define-key mh-range-completion-map " " 'self-insert-command) +(define-key mh-range-completion-map " " #'self-insert-command) ;;;###mh-autoload (defun mh-interactive-range (range-prompt &optional default) @@ -646,13 +641,10 @@ should be replaced with: ((stringp default) default) ((symbolp default) (symbol-name default)))) (prompt (cond ((and guess large default) - (format "%s (folder has %s messages, default %s)" - prompt (car counts) default)) - ((and guess large) - (format "%s (folder has %s messages)" - prompt (car counts))) + (format-prompt "%s (folder has %s messages)" + default prompt (car counts))) (default - (format "%s (default %s)" prompt default)))) + (format-prompt prompt default)))) (minibuffer-local-completion-map mh-range-completion-map) (seq-list (if (eq folder mh-current-folder) mh-seq-list @@ -662,7 +654,7 @@ should be replaced with: (mh-seq-names seq-list))) (input (cond ((and (not ask-flag) unseen) (symbol-name mh-unseen-seq)) ((and (not ask-flag) (not large)) "all") - (t (completing-read (format "%s: " prompt) + (t (completing-read prompt 'mh-range-completion-function nil nil nil 'mh-range-history default)))) msg-list) |