diff options
Diffstat (limited to 'lisp/mh-e/mh-alias.el')
-rw-r--r-- | lisp/mh-e/mh-alias.el | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/lisp/mh-e/mh-alias.el b/lisp/mh-e/mh-alias.el index 012725cab60..37fdb166011 100644 --- a/lisp/mh-e/mh-alias.el +++ b/lisp/mh-e/mh-alias.el @@ -1,4 +1,4 @@ -;;; mh-alias.el --- MH-E mail alias completion and expansion +;;; mh-alias.el --- MH-E mail alias completion and expansion -*- lexical-binding: t; -*- ;; Copyright (C) 1994-1997, 2001-2021 Free Software Foundation, Inc. @@ -24,8 +24,6 @@ ;;; Commentary: -;;; Change Log: - ;;; Code: (require 'mh-e) @@ -42,8 +40,8 @@ "Time aliases were last loaded.") (defvar mh-alias-read-address-map (let ((map (copy-keymap minibuffer-local-completion-map))) - (define-key map "," 'mh-alias-minibuffer-confirm-address) - (define-key map " " 'self-insert-command) + (define-key map "," #'mh-alias-minibuffer-confirm-address) + (define-key map " " #'self-insert-command) map)) (defcustom mh-alias-system-aliases @@ -113,10 +111,10 @@ COMMA-SEPARATOR is non-nil." (string-match "^\\([^,]+\\)," res)) (setq res (match-string 1 res))) ;; Replace "&" with capitalized username - (if (string-match "&" res) + (if (string-search "&" res) (setq res (mh-replace-regexp-in-string "&" (capitalize username) res))) ;; Remove " character - (if (string-match "\"" res) + (if (string-search "\"" res) (setq res (mh-replace-regexp-in-string "\"" "" res))) ;; If empty string, use username instead (if (string-equal "" res) @@ -270,9 +268,9 @@ Blind aliases or users from /etc/passwd are not expanded." (t (split-string (completing-read prompt mh-alias-alist nil nil) ","))))) (if (not mh-alias-expand-aliases-flag) - (mapconcat 'identity the-answer ", ") + (mapconcat #'identity the-answer ", ") ;; Loop over all elements, checking if in passwd alias or blind first - (mapconcat 'mh-alias-expand the-answer ",\n "))))) + (mapconcat #'mh-alias-expand the-answer ",\n "))))) ;;;###mh-autoload (defun mh-alias-minibuffer-confirm-address () @@ -287,7 +285,7 @@ Blind aliases or users from /etc/passwd are not expanded." (message "%s -> %s" the-name (mh-alias-expand the-name)) ;; Check if it was a single word likely to be an alias (if (and (equal mh-alias-flash-on-comma 1) - (not (string-match " " the-name))) + (not (string-search " " the-name))) (message "No alias for %s" the-name)))))) (self-insert-command 1)) @@ -427,10 +425,10 @@ contains it." (if (or (not alias) (string-equal alias (mh-alias-ali alias))) ;alias doesn't exist (completing-read "Alias file: " - (mapcar 'list mh-alias-insert-file) nil t) + (mapcar #'list mh-alias-insert-file) nil t) (or (mh-alias-which-file-has-alias alias mh-alias-insert-file) (completing-read "Alias file: " - (mapcar 'list mh-alias-insert-file) nil t))))) + (mapcar #'list mh-alias-insert-file) nil t))))) ((and mh-alias-insert-file (stringp mh-alias-insert-file)) mh-alias-insert-file) (t @@ -449,11 +447,10 @@ set `mh-alias-insert-file' or the \"Aliasfile:\" profile component")) (car autolist)) ((or (not alias) (string-equal alias (mh-alias-ali alias))) ;alias doesn't exist - (completing-read "Alias file: " (mapcar 'list autolist) nil t)) + (completing-read "Alias file: " autolist nil t)) (t (or (mh-alias-which-file-has-alias alias autolist) - (completing-read "Alias file: " - (mapcar 'list autolist) nil t)))))))) + (completing-read "Alias file: " autolist nil t)))))))) ;;;###mh-autoload (defun mh-alias-address-to-alias (address) |