From 611bdeb2f343b37fae32a9c8cacadc9d35c793c4 Mon Sep 17 00:00:00 2001 From: hmurata Date: Thu, 8 Mar 2007 17:23:09 +0000 Subject: [PATCH] * 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. --- wl/ChangeLog | 8 ++++++++ wl/wl-summary.el | 9 +++++---- wl/wl-util.el | 9 +++++++++ 3 files changed, 22 insertions(+), 4 deletions(-) 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)) -- 1.7.10.4