* wl-util.el (wl-read-shell-commande): New function or alias.
authorhmurata <hmurata>
Thu, 8 Mar 2007 17:23:09 +0000 (17:23 +0000)
committerhmurata <hmurata>
Thu, 8 Mar 2007 17:23:09 +0000 (17:23 +0000)
* wl-summary.el (wl-summary-pipe-message): Use
`wl-read-shell-command' instead of `read-string'.
(wl-summary-target-mark-pipe): Ditto.

wl/ChangeLog
wl/wl-summary.el
wl/wl-util.el

index 895bdcf..8b64f56 100644 (file)
@@ -1,3 +1,11 @@
+2007-03-08  Hiroya Murata  <lapis-lazuli@pop06.odn.ne.jp>
+
+       * 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  <yoichi@geiin.org>
 
        * wl-summary.el (wl-summary-reply): Fix docstring.
index 2c40834..0f4e6ec 100644 (file)
@@ -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)))
index 0bba527..1c63885 100644 (file)
@@ -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))