summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1994-09-21 18:37:00 +0000
committerRichard M. Stallman <rms@gnu.org>1994-09-21 18:37:00 +0000
commit4cc32db661d4b28159da5451397cd612685f5993 (patch)
treee8e9a1efaa147339944753ee56c66cf75e4bc633
parent810163a3aaba4fe1d99cbfef852f61df890dd927 (diff)
downloademacs-4cc32db661d4b28159da5451397cd612685f5993.tar.gz
(find-tag-noselect): Simplify.
Always run find-tag-hook at the tag's location.
-rw-r--r--lisp/progmodes/etags.el48
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'."
(visit-tags-table-buffer)
;; Record TAGNAME for a future call with NEXT-P non-nil.
(setq last-tag tagname))
- (prog1
- ;; Record the location so we can pop back to it later.
- (marker-buffer
- (car
- (setq tags-location-stack
- (cons (let ((marker (make-marker)))
- (save-excursion
- (set-buffer
- ;; find-tag-in-order does the real work.
- (find-tag-in-order
- (if next-p last-tag tagname)
- (if regexp-p
- find-tag-regexp-search-function
- find-tag-search-function)
- (if regexp-p
- find-tag-regexp-tag-order
- find-tag-tag-order)
- (if regexp-p
- find-tag-regexp-next-line-after-failure-p
- find-tag-next-line-after-failure-p)
- (if regexp-p "matching" "containing")
- (not next-p)))
- (set-marker marker (point))))
- tags-location-stack))))
- (run-hooks 'local-find-tag-hook)))))
+ ;; Record the location so we can pop back to it later.
+ (let ((marker (make-marker)))
+ (save-excursion
+ (set-buffer
+ ;; find-tag-in-order does the real work.
+ (find-tag-in-order
+ (if next-p last-tag tagname)
+ (if regexp-p
+ find-tag-regexp-search-function
+ find-tag-search-function)
+ (if regexp-p
+ find-tag-regexp-tag-order
+ find-tag-tag-order)
+ (if regexp-p
+ find-tag-regexp-next-line-after-failure-p
+ find-tag-next-line-after-failure-p)
+ (if regexp-p "matching" "containing")
+ (not next-p)))
+ (set-marker marker (point))
+ (run-hooks 'local-find-tag-hook)
+ (setq tags-location-stack
+ (cons marker tags-location-stack))
+ (current-buffer))))))
;;;###autoload
(defun find-tag (tagname &optional next-p regexp-p)