diff options
| author | Karoly Lorentey | 2004-08-31 16:31:03 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2004-08-31 16:31:03 +0000 |
| commit | 8328a03d0cf23b4851e22e3c45d4d24106916766 (patch) | |
| tree | 8c8f6f0a95f6fbc5b677193e936c31834e800bef /lisp/progmodes | |
| parent | bfe3b03c6a537ffbdfa25e3b16acd40ae6a833ef (diff) | |
| parent | 2aa2f8b8c979787390f8ebf6ebe22fa81bbe7c06 (diff) | |
| download | emacs-8328a03d0cf23b4851e22e3c45d4d24106916766.tar.gz emacs-8328a03d0cf23b4851e22e3c45d4d24106916766.zip | |
Merged in changes from CVS trunk.
Patches applied:
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-509
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-510
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-511
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-512
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-513
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-514
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-515
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-516
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-517
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-518
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-239
Diffstat (limited to 'lisp/progmodes')
| -rw-r--r-- | lisp/progmodes/etags.el | 20 | ||||
| -rw-r--r-- | lisp/progmodes/grep.el | 23 |
2 files changed, 1 insertions, 42 deletions
diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el index 4464df3a916..ddbd2ce6f35 100644 --- a/lisp/progmodes/etags.el +++ b/lisp/progmodes/etags.el | |||
| @@ -772,26 +772,6 @@ Assumes the tags table is the current buffer." | |||
| 772 | (all-completions string (tags-completion-table) predicate) | 772 | (all-completions string (tags-completion-table) predicate) |
| 773 | (try-completion string (tags-completion-table) predicate)))) | 773 | (try-completion string (tags-completion-table) predicate)))) |
| 774 | 774 | ||
| 775 | ;; Return a default tag to search for, based on the text at point. | ||
| 776 | (defun find-tag-default () | ||
| 777 | (save-excursion | ||
| 778 | (while (looking-at "\\sw\\|\\s_") | ||
| 779 | (forward-char 1)) | ||
| 780 | (if (or (re-search-backward "\\sw\\|\\s_" | ||
| 781 | (save-excursion (beginning-of-line) (point)) | ||
| 782 | t) | ||
| 783 | (re-search-forward "\\(\\sw\\|\\s_\\)+" | ||
| 784 | (save-excursion (end-of-line) (point)) | ||
| 785 | t)) | ||
| 786 | (progn (goto-char (match-end 0)) | ||
| 787 | (buffer-substring-no-properties | ||
| 788 | (point) | ||
| 789 | (progn (forward-sexp -1) | ||
| 790 | (while (looking-at "\\s'") | ||
| 791 | (forward-char 1)) | ||
| 792 | (point)))) | ||
| 793 | nil))) | ||
| 794 | |||
| 795 | ;; Read a tag name from the minibuffer with defaulting and completion. | 775 | ;; Read a tag name from the minibuffer with defaulting and completion. |
| 796 | (defun find-tag-tag (string) | 776 | (defun find-tag-tag (string) |
| 797 | (let* ((completion-ignore-case (if (memq tags-case-fold-search '(t nil)) | 777 | (let* ((completion-ignore-case (if (memq tags-case-fold-search '(t nil)) |
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. |