Commit 8a9cad92 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(grep-default-command): Use find-tag-default.

(grep-tag-default): Function deleted.
parent fb155844
......@@ -384,9 +384,7 @@ Set up `compilation-exit-message-function' and run `grep-setup-hook'."
(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.
(sh-arg-re "\\(\\(?:\"\\(?:[^\"]\\|\\\\\"\\)+\"\\|'[^']+'\\|[^\"' \t\n]\\)+\\)")
(grep-default (or (car grep-history) grep-command)))
;; Replace the thing matching for with that around cursor.
......@@ -457,25 +455,6 @@ temporarily highlight in visited source lines."
(set (make-local-variable 'compilation-error-regexp-alist)
;; This is a copy of find-tag-default from etags.el.
(defun grep-tag-default ()
(while (looking-at "\\sw\\|\\s_")
(forward-char 1))
(when (or (re-search-backward "\\sw\\|\\s_"
(save-excursion (beginning-of-line) (point))
(re-search-forward "\\(\\sw\\|\\s_\\)+"
(save-excursion (end-of-line) (point))
(goto-char (match-end 0))
(buffer-substring (point)
(progn (forward-sexp -1)
(while (looking-at "\\s'")
(forward-char 1))
(defun grep-find (command-args)
"Run grep via find, with user-specified args COMMAND-ARGS.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment