(wl-address-minibuffer-local-map): New keymap.
(wl-address-read-from-minibuffer): New function.
* wl-action.el (wl-summary-get-resend-address): Use
`wl-address-read-from-minibuffer' instead of `completing-read'.
+2004-10-16 Hiroya Murata <lapis-lazuli@pop06.odn.ne.jp>
+
+ * wl-address.el (wl-address-minibuffer-history): New variable.
+ (wl-address-minibuffer-local-map): New keymap.
+ (wl-address-read-from-minibuffer): New function.
+
+ * wl-action.el (wl-summary-get-resend-address): Use
+ `wl-address-read-from-minibuffer' instead of `completing-read'.
+
2004-10-11 Hiroya Murata <lapis-lazuli@pop06.odn.ne.jp>
* Version number is increased to 2.11.32.
message is not displayed yet.
(wl-summary-prev-page): Ditto.
-2002-03-11 J\e.A\eNir\eNtme Marant <jerome.marant@free.fr>
+2002-03-11 J\e,Ai\e(Br\e,At\e(Bme Marant <jerome.marant@free.fr>
* wl-folder.el (wl-folder-mode-menu-spec): Fixed typo.
;; Resend.
(defun wl-summary-get-resend-address (action number)
"Decide resend address."
- (completing-read "Resend message to: " 'wl-complete-address))
+ (wl-address-read-from-minibuffer "Resend message to: "))
(defun wl-summary-exec-action-resend (mark-list)
(let ((failure 0))
(wl-address-init)
(list (or new-addr address) the-petname the-realname)))))
+;; Read addresses from minibuffer with completion.
+(defvar wl-address-minibuffer-history nil)
+(defvar wl-address-minibuffer-local-map nil
+ "Keymap to use when reading address from the minibuffer.")
+
+(unless wl-address-minibuffer-local-map
+ (let ((map (make-sparse-keymap)))
+ (set-keymap-parent map minibuffer-local-map)
+ (define-key map "\C-i"
+ (lambda ()
+ (interactive)
+ (wl-complete-field-body wl-address-completion-list
+ ?@ nil wl-use-ldap)))
+ (setq wl-address-minibuffer-local-map map)))
+
+(defun wl-address-read-from-minibuffer (prompt &optional
+ initial-contents
+ default-value)
+ (read-from-minibuffer prompt
+ initial-contents
+ wl-address-minibuffer-local-map
+ nil
+ 'wl-address-minibuffer-history
+ default-value))
+
(require 'product)
(product-provide (provide 'wl-address) (require 'wl-version))