diff lisp/mh-e/mh-alias.el @ 68213:a08b47775f9b

* mh-acros.el (require): Remove defadvice of require as defadvice is verboten within Emacs and our implementation was returning the wrong value from require. Upcoming restructuring should make this unnecessary. (mh-assoc-ignore-case): Replace with defsubst assoc-string. * mh-alias.el (mh-alias-local-users, mh-alias-reload, mh-alias-expand, mh-alias-minibuffer-confirm-address): Use it. * mh-identity.el (mh-identity-field-handler): Use it.
author Bill Wohler <wohler@newt.com>
date Mon, 16 Jan 2006 21:34:50 +0000
parents 5012e59a73c7
children 37d03b3298bf d88caeac70d7
line wrap: on
line diff
--- a/lisp/mh-e/mh-alias.el	Mon Jan 16 20:05:14 2006 +0000
+++ b/lisp/mh-e/mh-alias.el	Mon Jan 16 21:34:50 2006 +0000
@@ -179,7 +179,7 @@
                     (if (string-equal username realname)
                         (concat "<" username ">")
                       (concat realname " <" username ">"))))
-              (when (not (mh-assoc-ignore-case alias-name mh-alias-alist))
+              (when (not (assoc-string alias-name mh-alias-alist t))
                 (setq passwd-alist (cons (list alias-name alias-translation)
                                          passwd-alist)))))))
         (forward-line 1)))
@@ -209,12 +209,12 @@
       (cond
        ((looking-at "^[ \t]"))          ;Continuation line
        ((looking-at "\\(.+\\): .+: .*$") ; A new -blind- MH alias
-        (when (not (mh-assoc-ignore-case (match-string 1) mh-alias-blind-alist))
+        (when (not (assoc-string (match-string 1) mh-alias-blind-alist t))
           (setq mh-alias-blind-alist
                 (cons (list (match-string 1)) mh-alias-blind-alist))
           (setq mh-alias-alist (cons (list (match-string 1)) mh-alias-alist))))
        ((looking-at "\\(.+\\): .*$")    ; A new MH alias
-        (when (not (mh-assoc-ignore-case (match-string 1) mh-alias-alist))
+        (when (not (assoc-string (match-string 1) mh-alias-alist t))
           (setq mh-alias-alist
                 (cons (list (match-string 1)) mh-alias-alist)))))
       (forward-line 1)))
@@ -225,7 +225,7 @@
           user)
       (while local-users
         (setq user (car local-users))
-        (if (not (mh-assoc-ignore-case (car user) mh-alias-alist))
+        (if (not (assoc-string (car user) mh-alias-alist t))
             (setq mh-alias-alist (append mh-alias-alist (list user))))
         (setq local-users (cdr local-users)))))
   (run-hooks 'mh-alias-reloaded-hook)
@@ -262,10 +262,10 @@
   "Return expansion for ALIAS.
 Blind aliases or users from /etc/passwd are not expanded."
   (cond
-   ((mh-assoc-ignore-case alias mh-alias-blind-alist)
+   ((assoc-string alias mh-alias-blind-alist t)
     alias)                              ; Don't expand a blind alias
-   ((mh-assoc-ignore-case alias mh-alias-passwd-alist)
-    (cadr (mh-assoc-ignore-case alias mh-alias-passwd-alist)))
+   ((assoc-string alias mh-alias-passwd-alist t)
+    (cadr (assoc-string alias mh-alias-passwd-alist t)))
    (t
     (mh-alias-ali alias))))
 
@@ -300,7 +300,7 @@
       (let* ((case-fold-search t)
              (beg (mh-beginning-of-word))
              (the-name (buffer-substring-no-properties beg (point))))
-        (if (mh-assoc-ignore-case the-name mh-alias-alist)
+        (if (assoc-string the-name mh-alias-alist t)
             (message "%s -> %s" the-name (mh-alias-expand the-name))
           ;; Check if if was a single word likely to be an alias
           (if (and (equal mh-alias-flash-on-comma 1)