diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2000-11-14 19:30:53 +0000 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2000-11-14 19:30:53 +0000 |
commit | 3f314699c38f3b23109d7d54e3cdccf92afe5605 (patch) | |
tree | ef5b7a2c778033d0fd3d63925b9c518caf9ef2ad /lisp/progmodes/compile.el | |
parent | 25c269ef6e910382e8a1e9b97cc0c87480ae5653 (diff) | |
download | emacs-3f314699c38f3b23109d7d54e3cdccf92afe5605.tar.gz |
(grep): `tag-default' can be nil.
Diffstat (limited to 'lisp/progmodes/compile.el')
-rw-r--r-- | lisp/progmodes/compile.el | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index 77bf8bf0ad0..cf46b2d661c 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -609,20 +609,20 @@ if that history list is empty)." (unless grep-command (grep-compute-defaults)) (when arg - (let* ((tag-default - (funcall (or find-tag-default-function - (get major-mode 'find-tag-default-function) - ;; We use grep-tag-default instead of - ;; find-tag-default, to avoid loading etags. - 'grep-tag-default)))) + (let ((tag-default + (funcall (or find-tag-default-function + (get major-mode 'find-tag-default-function) + ;; We use grep-tag-default instead of + ;; find-tag-default, to avoid loading etags. + 'grep-tag-default)))) (setq grep-default (or (car grep-history) grep-command)) ;; Replace the thing matching for with that around cursor (when (string-match "[^ ]+\\s +\\(-[^ ]+\\s +\\)*\\(\"[^\"]+\"\\|[^ ]+\\)\\(\\s-+\\S-+\\)?" grep-default) (unless (or (match-beginning 3) (not (stringp buffer-file-name))) (setq grep-default (concat grep-default "*." (file-name-extension buffer-file-name)))) - (setq grep-default (replace-match tag-default t t - grep-default 2))))) + (setq grep-default (replace-match (or tag-default "") + t t grep-default 2))))) (list (read-from-minibuffer "Run grep (like this): " (or grep-default grep-command) nil nil 'grep-history)))) |