* bug#37673: [PATCH] Simplify the search of the default tags file in, `visit-tags-table'
@ 2019-10-09 4:59 Hong Xu
2019-10-09 5:04 ` Lars Ingebrigtsen
0 siblings, 1 reply; 3+ messages in thread
From: Hong Xu @ 2019-10-09 4:59 UTC (permalink / raw
To: 37673; +Cc: Phil Sainty, Lars Ingebrigtsen
* lisp/progmodes/etags.el (visit-tags-table): Reimplement
`tags--find-default-tags-dir-recursively' using the much simpler
`locate-dominating-file'. Following up bug#37518.
---
lisp/progmodes/etags.el | 15 +--------------
1 file changed, 1 insertion(+), 14 deletions(-)
diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el
index 906ab37c6b9f..6784894ba87e 100644
--- a/lisp/progmodes/etags.el
+++ b/lisp/progmodes/etags.el
@@ -274,19 +274,6 @@ tags-table-mode
(setq buffer-undo-list t)
(initialize-new-tags-table))
-(defun tags--find-default-tags-dir-recursively (current-dir)
- "Find the directory in which the default TAGS file lives.
-It is the first directory that contains a file named TAGS
-encountered when recursively searching upward from CURRENT-DIR."
- (let ((tag-filename (expand-file-name "TAGS" current-dir)))
- (if (file-exists-p tag-filename)
- current-dir
- (let ((parent-dir
- (file-name-directory (directory-file-name current-dir))))
- (if (string= parent-dir current-dir) ;; root dir is reached
- nil
- (tags--find-default-tags-dir-recursively parent-dir))))))
-
;;;###autoload
(defun visit-tags-table (file &optional local)
"Tell tags commands to use tags table file FILE.
@@ -301,7 +288,7 @@ visit-tags-table
file the tag was in."
(interactive
(let ((default-tag-dir
- (or (tags--find-default-tags-dir-recursively default-directory)
+ (or (locate-dominating-file default-directory "TAGS")
default-directory)))
(list (read-file-name
"Visit tags table (default TAGS): "
--
2.20.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* bug#37673: [PATCH] Simplify the search of the default tags file in, `visit-tags-table'
2019-10-09 4:59 bug#37673: [PATCH] Simplify the search of the default tags file in, `visit-tags-table' Hong Xu
@ 2019-10-09 5:04 ` Lars Ingebrigtsen
2019-10-12 18:55 ` Hong Xu
0 siblings, 1 reply; 3+ messages in thread
From: Lars Ingebrigtsen @ 2019-10-09 5:04 UTC (permalink / raw
To: Hong Xu; +Cc: psainty, 37673
Hong Xu <hong@topbug.net> writes:
> * lisp/progmodes/etags.el (visit-tags-table): Reimplement
> `tags--find-default-tags-dir-recursively' using the much simpler
> `locate-dominating-file'. Following up bug#37518.
Looks good to me; applied to Emacs 27 now.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#37673: [PATCH] Simplify the search of the default tags file in, `visit-tags-table'
2019-10-09 5:04 ` Lars Ingebrigtsen
@ 2019-10-12 18:55 ` Hong Xu
0 siblings, 0 replies; 3+ messages in thread
From: Hong Xu @ 2019-10-12 18:55 UTC (permalink / raw
To: Lars Ingebrigtsen; +Cc: Phil Sainty, 37673-done
On 10/8/19 10:04 PM, Lars Ingebrigtsen wrote:
> Looks good to me; applied to Emacs 27 now.
>
Shall we close this one?
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-10-12 18:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-09 4:59 bug#37673: [PATCH] Simplify the search of the default tags file in, `visit-tags-table' Hong Xu
2019-10-09 5:04 ` Lars Ingebrigtsen
2019-10-12 18:55 ` Hong Xu
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.