From: hmurata Date: Thu, 8 Mar 2007 17:23:09 +0000 (+0000) Subject: * wl-util.el (wl-read-shell-commande): New function or alias. X-Git-Tag: wl-2_15_6-fixes~88 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=611bdeb2f343b37fae32a9c8cacadc9d35c793c4;p=elisp%2Fwanderlust.git * wl-util.el (wl-read-shell-commande): New function or alias. * wl-summary.el (wl-summary-pipe-message): Use `wl-read-shell-command' instead of `read-string'. (wl-summary-target-mark-pipe): Ditto. --- diff --git a/wl/ChangeLog b/wl/ChangeLog index 895bdcf..8b64f56 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,11 @@ +2007-03-08 Hiroya Murata + + * wl-util.el (wl-read-shell-commande): New function or alias. + + * wl-summary.el (wl-summary-pipe-message): Use + `wl-read-shell-command' instead of `read-string'. + (wl-summary-target-mark-pipe): Ditto. + 2007-02-13 Yoichi NAKAYAMA * wl-summary.el (wl-summary-reply): Fix docstring. diff --git a/wl/wl-summary.el b/wl/wl-summary.el index 2c40834..0f4e6ec 100644 --- a/wl/wl-summary.el +++ b/wl/wl-summary.el @@ -4795,8 +4795,8 @@ If ARG is numeric number, decode message as following: (interactive (list current-prefix-arg nil)) (if (null (wl-summary-message-number)) (message "No message.") - (setq command (read-string "Shell command on message: " - wl-summary-shell-command-last)) + (setq command (wl-read-shell-command "Shell command on message: " + wl-summary-shell-command-last)) (if (y-or-n-p "Send this message to pipe? ") (wl-summary-pipe-message-subr prefix command)))) @@ -4805,8 +4805,9 @@ If ARG is numeric number, decode message as following: (interactive (list current-prefix-arg nil)) (if (null wl-summary-buffer-target-mark-list) (message "No marked message.") - (setq command (read-string "Shell command on each marked message: " - wl-summary-shell-command-last)) + (setq command (wl-read-shell-command + "Shell command on each marked message: " + wl-summary-shell-command-last)) (when (y-or-n-p "Send each marked message to pipe? ") (while (car wl-summary-buffer-target-mark-list) (let ((num (car wl-summary-buffer-target-mark-list))) diff --git a/wl/wl-util.el b/wl/wl-util.el index 0bba527..1c63885 100644 --- a/wl/wl-util.el +++ b/wl/wl-util.el @@ -1213,6 +1213,15 @@ is enclosed by at least one regexp grouping construct." (defalias 'wl-completing-read-multiple 'completing-read-multiple))) +(cond + ((fboundp 'shell-command-read-minibuffer) + (defun wl-read-shell-command (prompt &optional + initial-contents keymap read hist) + (shell-command-read-minibuffer prompt default-directory + initial-contents keymap read hist))) + (t + (defalias 'wl-read-shell-command 'read-from-minibuffer))) + (require 'product) (product-provide (provide 'wl-util) (require 'wl-version))