From: Lars Ingebrigtsen <larsi@gnus.org>
To: Hong Xu <hong@topbug.net>
Cc: 37518@debbugs.gnu.org
Subject: bug#37518: [PATCH] Search upward from current dir for the default TAGS file
Date: Mon, 07 Oct 2019 06:19:17 +0200 [thread overview]
Message-ID: <87imp19ohm.fsf@gnus.org> (raw)
In-Reply-To: <b1a3bfe6-d7be-28cc-da10-118da65e79fd@topbug.net> (Hong Xu's message of "Thu, 26 Sep 2019 02:52:30 -0700")
Hong Xu <hong@topbug.net> writes:
> * lisp/progmodes/etags.el (tags--find-default-tags-dir)
> (tags--find-default-tags-dir-impl, visit-tags-table): Search
> upward from current dir for the default TAGS file
Sounds good. Some minor comments:
[...]
> +(defun tags--find-default-tags-dir-impl (current-dir)
We don't really call functions for "-impl" or the like -- as this
recurses upwards, what about calling it something more descriptive like
`tags--find-default-tags-dir-recursively'?
[...]
> +(defun tags--find-default-tags-dir ()
> + "Find the directory that hosts the default TAGS file.
> +It is the first directory that contains a file named TAGS encountered
> +searching upward from `default-directory'."
> + (let ((default-tag-dir
> + (tags--find-default-tags-dir-impl default-directory)))
> + (if default-tag-dir
> + default-tag-dir
> + default-directory)))
This is basically
(or (tags--find-default-tags-dir-impl default-directory)
default-directory)
so I don't think this intermediary function is needed.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
next prev parent reply other threads:[~2019-10-07 4:19 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-26 9:52 bug#37518: [PATCH] Search upward from current dir for the default TAGS file Hong Xu
2019-10-07 4:19 ` Lars Ingebrigtsen [this message]
2019-10-07 4:48 ` Hong Xu
2019-10-07 16:24 ` Eli Zaretskii
2019-10-07 17:36 ` Hong Xu
2019-10-07 18:43 ` Eli Zaretskii
2019-10-07 18:52 ` Hong Xu
2019-10-08 16:45 ` Lars Ingebrigtsen
2019-10-08 19:46 ` Phil Sainty
2019-10-09 0:38 ` Hong Xu
2019-10-09 5:01 ` Hong Xu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87imp19ohm.fsf@gnus.org \
--to=larsi@gnus.org \
--cc=37518@debbugs.gnu.org \
--cc=hong@topbug.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.