From: hmurata Date: Sat, 16 Oct 2004 07:25:55 +0000 (+0000) Subject: * wl-address.el (wl-address-minibuffer-history): New variable. X-Git-Tag: wl-2_12-root~55 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=50109dbd425e472eb00556d02d12c6bfdbe22d97;p=elisp%2Fwanderlust.git * 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'. --- diff --git a/wl/ChangeLog b/wl/ChangeLog index abea254..61219f8 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,12 @@ +2004-10-16 Hiroya Murata + + * 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 * Version number is increased to 2.11.32. @@ -4636,7 +4645,7 @@ message is not displayed yet. (wl-summary-prev-page): Ditto. -2002-03-11 J.ANirNtme Marant +2002-03-11 J,Ai(Br,At(Bme Marant * wl-folder.el (wl-folder-mode-menu-spec): Fixed typo. diff --git a/wl/wl-action.el b/wl/wl-action.el index 31c6f4c..4e0e21a 100644 --- a/wl/wl-action.el +++ b/wl/wl-action.el @@ -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)) diff --git a/wl/wl-address.el b/wl/wl-address.el index 8029568..d539d6b 100644 --- a/wl/wl-address.el +++ b/wl/wl-address.el @@ -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))