diff options
| author | Richard M. Stallman | 1994-09-21 18:37:00 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1994-09-21 18:37:00 +0000 |
| commit | 4cc32db661d4b28159da5451397cd612685f5993 (patch) | |
| tree | e8e9a1efaa147339944753ee56c66cf75e4bc633 | |
| parent | 810163a3aaba4fe1d99cbfef852f61df890dd927 (diff) | |
| download | emacs-4cc32db661d4b28159da5451397cd612685f5993.tar.gz emacs-4cc32db661d4b28159da5451397cd612685f5993.zip | |
(find-tag-noselect): Simplify.
Always run find-tag-hook at the tag's location.
| -rw-r--r-- | lisp/progmodes/etags.el | 48 |
1 files changed, 23 insertions, 25 deletions
diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el index 58b53dc1d47..e39f706b429 100644 --- a/lisp/progmodes/etags.el +++ b/lisp/progmodes/etags.el | |||
| @@ -713,31 +713,29 @@ See documentation of variable `tags-file-name'." | |||
| 713 | (visit-tags-table-buffer) | 713 | (visit-tags-table-buffer) |
| 714 | ;; Record TAGNAME for a future call with NEXT-P non-nil. | 714 | ;; Record TAGNAME for a future call with NEXT-P non-nil. |
| 715 | (setq last-tag tagname)) | 715 | (setq last-tag tagname)) |
| 716 | (prog1 | 716 | ;; Record the location so we can pop back to it later. |
| 717 | ;; Record the location so we can pop back to it later. | 717 | (let ((marker (make-marker))) |
| 718 | (marker-buffer | 718 | (save-excursion |
| 719 | (car | 719 | (set-buffer |
| 720 | (setq tags-location-stack | 720 | ;; find-tag-in-order does the real work. |
| 721 | (cons (let ((marker (make-marker))) | 721 | (find-tag-in-order |
| 722 | (save-excursion | 722 | (if next-p last-tag tagname) |
| 723 | (set-buffer | 723 | (if regexp-p |
| 724 | ;; find-tag-in-order does the real work. | 724 | find-tag-regexp-search-function |
| 725 | (find-tag-in-order | 725 | find-tag-search-function) |
| 726 | (if next-p last-tag tagname) | 726 | (if regexp-p |
| 727 | (if regexp-p | 727 | find-tag-regexp-tag-order |
| 728 | find-tag-regexp-search-function | 728 | find-tag-tag-order) |
| 729 | find-tag-search-function) | 729 | (if regexp-p |
| 730 | (if regexp-p | 730 | find-tag-regexp-next-line-after-failure-p |
| 731 | find-tag-regexp-tag-order | 731 | find-tag-next-line-after-failure-p) |
| 732 | find-tag-tag-order) | 732 | (if regexp-p "matching" "containing") |
| 733 | (if regexp-p | 733 | (not next-p))) |
| 734 | find-tag-regexp-next-line-after-failure-p | 734 | (set-marker marker (point)) |
| 735 | find-tag-next-line-after-failure-p) | 735 | (run-hooks 'local-find-tag-hook) |
| 736 | (if regexp-p "matching" "containing") | 736 | (setq tags-location-stack |
| 737 | (not next-p))) | 737 | (cons marker tags-location-stack)) |
| 738 | (set-marker marker (point)))) | 738 | (current-buffer)))))) |
| 739 | tags-location-stack)))) | ||
| 740 | (run-hooks 'local-find-tag-hook))))) | ||
| 741 | 739 | ||
| 742 | ;;;###autoload | 740 | ;;;###autoload |
| 743 | (defun find-tag (tagname &optional next-p regexp-p) | 741 | (defun find-tag (tagname &optional next-p regexp-p) |