Mercurial > emacs
comparison lisp/progmodes/etags.el @ 56827:12cc6bc5d550
(find-tag-default): Moved to subr.el.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sat, 28 Aug 2004 15:30:31 +0000 |
parents | 8699eccc1a33 |
children | 55eb88327d84 3219f94257bc |
comparison
equal
deleted
inserted
replaced
56826:c5624ad1554b | 56827:12cc6bc5d550 |
---|---|
770 (visit-tags-table-buffer)) | 770 (visit-tags-table-buffer)) |
771 (if (eq what t) | 771 (if (eq what t) |
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)) |
798 tags-case-fold-search | 778 tags-case-fold-search |
799 case-fold-search)) | 779 case-fold-search)) |