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) |
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 ", ") |
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) |
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) |