From 98b63c412b46b91d77022bc3f88a635e4712e521 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Thu, 23 Dec 1993 02:43:28 +0000 Subject: [PATCH] (grep-command): New variable. (grep): Use it. Don't repeat at load time any bindings that are autoloaded. --- lisp/progmodes/compile.el | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index 0ef6f17fdfc..565ebd1447e 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -163,6 +163,9 @@ name, and the LINE-IDX'th subexpression gives the line number.") '(("^\\([^:( \t\n]+\\)[:( \t]+\\([0-9]+\\)[:) \t]" 1 2)) "Regexp used to match grep hits. See `compilation-error-regexp-alist'.") +(defvar grep-command "grep -n " + "Last grep command used in \\{grep}; default for next grep.") + ;;;###autoload (defvar compilation-search-path '(nil) "*List of directories to search for source files named in error messages. @@ -240,7 +243,7 @@ This command uses a special history list for its arguments, so you can easily repeat a grep command." (interactive (list (read-from-minibuffer "Run grep (like this): " - "grep -n " nil nil 'grep-history))) + grep-command nil nil 'grep-history))) (compile-internal (concat command-args " /dev/null") "No more grep hits" "grep" ;; Give it a simpler regexp to match. @@ -857,8 +860,7 @@ See variables `compilation-parse-errors-function' and (set-window-point w (car next-error)) (set-window-start w (car next-error))))) -;;;###autoload -(define-key ctl-x-map "`" 'next-error) +;;;###autoload (define-key ctl-x-map "`" 'next-error) ;; Find a buffer for file FILENAME. ;; Search the directories in compilation-search-path. -- 2.39.5