From: Stefan Monnier Date: Thu, 20 Mar 2008 19:56:58 +0000 (+0000) Subject: * progmodes/compile.el (compile): X-Git-Tag: emacs-pretest-23.0.90~7015 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=286d4b3b7da0dbaf579923bf1b6e295b661de2e9;p=emacs.git * progmodes/compile.el (compile): * progmodes/grep.el (grep, grep-find): Use read-shell-command. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b2809bf0090..fa1ce50aaa7 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,12 @@ +2008-03-20 Stefan Monnier + + * 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 * vc.el (vc-status-mark-buffer-changed): New function to implement diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index 86db755b234..be69da1d7f6 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -1031,11 +1031,10 @@ to a function that generates a unique name." (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)) diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el index e1bce497224..6cd5c657aef 100644 --- a/lisp/progmodes/grep.el +++ b/lisp/progmodes/grep.el @@ -644,11 +644,10 @@ list is empty)." (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 @@ easily repeat a find command." (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.")