diff options
| author | Richard M. Stallman | 2004-08-28 15:31:20 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2004-08-28 15:31:20 +0000 |
| commit | 8a9cad92b1c9eecbdc9268a885413b7c5d08c7fa (patch) | |
| tree | c8edee4b3303d496032a45ca79e39d6c89ebb3fc | |
| parent | fb1558445c2d42add2852e4dd26b79d69cf321c9 (diff) | |
| download | emacs-8a9cad92b1c9eecbdc9268a885413b7c5d08c7fa.tar.gz emacs-8a9cad92b1c9eecbdc9268a885413b7c5d08c7fa.zip | |
(grep-default-command): Use find-tag-default.
(grep-tag-default): Function deleted.
| -rw-r--r-- | lisp/progmodes/grep.el | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el index 5b678f26171..f4acd564a3c 100644 --- a/lisp/progmodes/grep.el +++ b/lisp/progmodes/grep.el | |||
| @@ -384,9 +384,7 @@ Set up `compilation-exit-message-function' and run `grep-setup-hook'." | |||
| 384 | (let ((tag-default | 384 | (let ((tag-default |
| 385 | (funcall (or find-tag-default-function | 385 | (funcall (or find-tag-default-function |
| 386 | (get major-mode 'find-tag-default-function) | 386 | (get major-mode 'find-tag-default-function) |
| 387 | ;; We use grep-tag-default instead of | 387 | 'find-tag-default))) |
| 388 | ;; find-tag-default, to avoid loading etags. | ||
| 389 | 'grep-tag-default))) | ||
| 390 | (sh-arg-re "\\(\\(?:\"\\(?:[^\"]\\|\\\\\"\\)+\"\\|'[^']+'\\|[^\"' \t\n]\\)+\\)") | 388 | (sh-arg-re "\\(\\(?:\"\\(?:[^\"]\\|\\\\\"\\)+\"\\|'[^']+'\\|[^\"' \t\n]\\)+\\)") |
| 391 | (grep-default (or (car grep-history) grep-command))) | 389 | (grep-default (or (car grep-history) grep-command))) |
| 392 | ;; Replace the thing matching for with that around cursor. | 390 | ;; Replace the thing matching for with that around cursor. |
| @@ -457,25 +455,6 @@ temporarily highlight in visited source lines." | |||
| 457 | (set (make-local-variable 'compilation-error-regexp-alist) | 455 | (set (make-local-variable 'compilation-error-regexp-alist) |
| 458 | grep-regexp-alist)) | 456 | grep-regexp-alist)) |
| 459 | 457 | ||
| 460 | ;; This is a copy of find-tag-default from etags.el. | ||
| 461 | ;;;###autoload | ||
| 462 | (defun grep-tag-default () | ||
| 463 | (save-excursion | ||
| 464 | (while (looking-at "\\sw\\|\\s_") | ||
| 465 | (forward-char 1)) | ||
| 466 | (when (or (re-search-backward "\\sw\\|\\s_" | ||
| 467 | (save-excursion (beginning-of-line) (point)) | ||
| 468 | t) | ||
| 469 | (re-search-forward "\\(\\sw\\|\\s_\\)+" | ||
| 470 | (save-excursion (end-of-line) (point)) | ||
| 471 | t)) | ||
| 472 | (goto-char (match-end 0)) | ||
| 473 | (buffer-substring (point) | ||
| 474 | (progn (forward-sexp -1) | ||
| 475 | (while (looking-at "\\s'") | ||
| 476 | (forward-char 1)) | ||
| 477 | (point)))))) | ||
| 478 | |||
| 479 | ;;;###autoload | 458 | ;;;###autoload |
| 480 | (defun grep-find (command-args) | 459 | (defun grep-find (command-args) |
| 481 | "Run grep via find, with user-specified args COMMAND-ARGS. | 460 | "Run grep via find, with user-specified args COMMAND-ARGS. |