changeset 93114:57fa8ebfd227

* progmodes/compile.el (compile): * progmodes/grep.el (grep, grep-find): Use read-shell-command.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Thu, 20 Mar 2008 19:56:58 +0000
parents c0af5c9f100b
children f9b87932bf05
files lisp/ChangeLog lisp/progmodes/compile.el lisp/progmodes/grep.el
diffstat 3 files changed, 19 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Thu Mar 20 19:52:30 2008 +0000
+++ b/lisp/ChangeLog	Thu Mar 20 19:56:58 2008 +0000
@@ -1,3 +1,12 @@
+2008-03-20  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* progmodes/compile.el (compile):
+	* progmodes/grep.el (grep, grep-find): Use read-shell-command.
+
+	* simple.el	(minibuffer-local-shell-command-map): New var.
+	(minibuffer-complete-shell-command, read-shell-command): New funs.
+	(shell-command, shell-command-on-region): Use them.
+
 2008-03-20  Dan Nicolaescu  <dann@ics.uci.edu>
 
 	* vc.el (vc-status-mark-buffer-changed): New function to implement
--- a/lisp/progmodes/compile.el	Thu Mar 20 19:52:30 2008 +0000
+++ b/lisp/progmodes/compile.el	Thu Mar 20 19:56:58 2008 +0000
@@ -1031,11 +1031,10 @@
    (list
     (let ((command (eval compile-command)))
       (if (or compilation-read-command current-prefix-arg)
-	  (read-from-minibuffer "Compile command: "
-				command nil nil
-				(if (equal (car compile-history) command)
-				    '(compile-history . 1)
-				  'compile-history))
+	  (read-shell-command "Compile command: " command
+                              (if (equal (car compile-history) command)
+                                  '(compile-history . 1)
+                                'compile-history))
 	command))
     (consp current-prefix-arg)))
   (unless (equal command (eval compile-command))
--- a/lisp/progmodes/grep.el	Thu Mar 20 19:52:30 2008 +0000
+++ b/lisp/progmodes/grep.el	Thu Mar 20 19:56:58 2008 +0000
@@ -644,11 +644,10 @@
    (progn
      (grep-compute-defaults)
      (let ((default (grep-default-command)))
-       (list (read-from-minibuffer "Run grep (like this): "
-				   (if current-prefix-arg
-				       default grep-command)
-				   nil nil 'grep-history
-				   (if current-prefix-arg nil default))))))
+       (list (read-shell-command "Run grep (like this): "
+                                 (if current-prefix-arg default grep-command)
+                                 'grep-history
+                                 (if current-prefix-arg nil default))))))
 
   ;; Setting process-setup-function makes exit-message-function work
   ;; even when async processes aren't supported.
@@ -671,9 +670,8 @@
    (progn
      (grep-compute-defaults)
      (if grep-find-command
-	 (list (read-from-minibuffer "Run find (like this): "
-				     grep-find-command nil nil
-                                     'grep-find-history))
+	 (list (read-shell-command "Run find (like this): "
+                                   grep-find-command 'grep-find-history))
        ;; No default was set
        (read-string
         "compile.el: No `grep-find-command' command available. Press RET.")