/[emacs]/emacs/lisp/mh-e/mh-alias.el
ViewVC logotype

Diff of /emacs/lisp/mh-e/mh-alias.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by wohler, Sun Jan 26 02:38:37 2003 UTC revision 1.2 by wohler, Mon Feb 3 20:55:30 2003 UTC
# Line 91  Line 91 
91  ;;  `mh-alias-insert-file').  In particular, there is a tool-bar icon to grab  ;;  `mh-alias-insert-file').  In particular, there is a tool-bar icon to grab
92  ;;  an alias from the From line of the current message.  ;;  an alias from the From line of the current message.
93    
94    ;;; Change Log:
95    
96    ;; $Id$
97    
98  ;;; Code:  ;;; Code:
99    
100  (require 'mh-e)  (require 'mh-e)
# Line 283  Blind aliases or users from /etc/passwd Line 287  Blind aliases or users from /etc/passwd
287                    (multi-prompt "," nil prompt mh-alias-alist nil nil))                    (multi-prompt "," nil prompt mh-alias-alist nil nil))
288                   (t                   (t
289                    (split-string                    (split-string
290                     (completing-read "To: " mh-alias-alist nil nil)                     (completing-read prompt mh-alias-alist nil nil)
291                     ","))))))                     ","))))))
292        (if (not mh-alias-expand-aliases-flag)        (if (not mh-alias-expand-aliases-flag)
293            (mapconcat 'identity the-answer ", ")            (mapconcat 'identity the-answer ", ")
# Line 447  Set `mh-alias-insert-file' or set AliasF Line 451  Set `mh-alias-insert-file' or set AliasF
451              (completing-read "Alias file [press Tab]: "              (completing-read "Alias file [press Tab]: "
452                               (mapcar 'list autolist) nil t))))))))                               (mapcar 'list autolist) nil t))))))))
453    
454    ;;;###mh-autoload
455  (defun mh-alias-address-to-alias (address)  (defun mh-alias-address-to-alias (address)
456    "Return the ADDRESS alias if defined, or nil."    "Return the ADDRESS alias if defined, or nil."
457    (let* ((aliases (mh-alias-ali address t)))    (let* ((aliases (mh-alias-ali address t)))
458      (if (string-equal aliases address)      (if (string-equal aliases address)
459          nil                             ; ali returned same string -> no.          nil                             ; ali returned same string -> no.
460        ;; For the comma-separated aliases reyurned by ali, check that one of        ;; Double-check that we have an individual alias. This means that the
461        ;; them doesn't expand into a list.  e.g. we do have an individual        ;; alias doesn't expand into a list (of which this address is part).
       ;; alias for that adress.  
462        (car (delq nil (mapcar        (car (delq nil (mapcar
463                        (function                        (function
464                         (lambda (alias)                         (lambda (alias)
# Line 501  after it." Line 505  after it."
505                  ((string-match "^a" answer)                  ((string-match "^a" answer)
506                   (forward-line 1))                   (forward-line 1))
507                  (t                  (t
508                   error "Quitting."))))                   (error "Quitting")))))
509         ;; No, so sort-in at the right place         ;; No, so sort-in at the right place
510         ;; search for "^alias", then "^alia", etc.         ;; search for "^alias", then "^alia", etc.
511         ((eq mh-alias-insertion-location 'sorted)         ((eq mh-alias-insertion-location 'sorted)

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26