diff options
| author | Richard M. Stallman | 1993-12-23 02:43:28 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1993-12-23 02:43:28 +0000 |
| commit | 98b63c412b46b91d77022bc3f88a635e4712e521 (patch) | |
| tree | a1ccabf53169e15119c1ec869d8d42fec1ab8664 | |
| parent | e9c772d53eceab0022e2d9d4d461316ad45d81a5 (diff) | |
| download | emacs-98b63c412b46b91d77022bc3f88a635e4712e521.tar.gz emacs-98b63c412b46b91d77022bc3f88a635e4712e521.zip | |
(grep-command): New variable.
(grep): Use it.
Don't repeat at load time any bindings that are autoloaded.
| -rw-r--r-- | lisp/progmodes/compile.el | 8 |
1 files 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.") | |||
| 163 | '(("^\\([^:( \t\n]+\\)[:( \t]+\\([0-9]+\\)[:) \t]" 1 2)) | 163 | '(("^\\([^:( \t\n]+\\)[:( \t]+\\([0-9]+\\)[:) \t]" 1 2)) |
| 164 | "Regexp used to match grep hits. See `compilation-error-regexp-alist'.") | 164 | "Regexp used to match grep hits. See `compilation-error-regexp-alist'.") |
| 165 | 165 | ||
| 166 | (defvar grep-command "grep -n " | ||
| 167 | "Last grep command used in \\{grep}; default for next grep.") | ||
| 168 | |||
| 166 | ;;;###autoload | 169 | ;;;###autoload |
| 167 | (defvar compilation-search-path '(nil) | 170 | (defvar compilation-search-path '(nil) |
| 168 | "*List of directories to search for source files named in error messages. | 171 | "*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 | |||
| 240 | easily repeat a grep command." | 243 | easily repeat a grep command." |
| 241 | (interactive | 244 | (interactive |
| 242 | (list (read-from-minibuffer "Run grep (like this): " | 245 | (list (read-from-minibuffer "Run grep (like this): " |
| 243 | "grep -n " nil nil 'grep-history))) | 246 | grep-command nil nil 'grep-history))) |
| 244 | (compile-internal (concat command-args " /dev/null") | 247 | (compile-internal (concat command-args " /dev/null") |
| 245 | "No more grep hits" "grep" | 248 | "No more grep hits" "grep" |
| 246 | ;; Give it a simpler regexp to match. | 249 | ;; Give it a simpler regexp to match. |
| @@ -857,8 +860,7 @@ See variables `compilation-parse-errors-function' and | |||
| 857 | (set-window-point w (car next-error)) | 860 | (set-window-point w (car next-error)) |
| 858 | (set-window-start w (car next-error))))) | 861 | (set-window-start w (car next-error))))) |
| 859 | 862 | ||
| 860 | ;;;###autoload | 863 | ;;;###autoload (define-key ctl-x-map "`" 'next-error) |
| 861 | (define-key ctl-x-map "`" 'next-error) | ||
| 862 | 864 | ||
| 863 | ;; Find a buffer for file FILENAME. | 865 | ;; Find a buffer for file FILENAME. |
| 864 | ;; Search the directories in compilation-search-path. | 866 | ;; Search the directories in compilation-search-path. |