* wl-address.el (wl-address-minibuffer-history): New variable.
authorhmurata <hmurata>
Sat, 16 Oct 2004 07:25:55 +0000 (07:25 +0000)
committerhmurata <hmurata>
Sat, 16 Oct 2004 07:25:55 +0000 (07:25 +0000)
(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'.

wl/ChangeLog
wl/wl-action.el
wl/wl-address.el

index abea254..61219f8 100644 (file)
@@ -1,3 +1,12 @@
+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.
 
index 31c6f4c..4e0e21a 100644 (file)
@@ -543,7 +543,7 @@ Return number if put mark succeed"
 ;; 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))
index 8029568..d539d6b 100644 (file)
@@ -733,6 +733,31 @@ If already registerd, change it."
        (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))