bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#37611: [PATCH] Default FILE to the current buffer for list-tags


From: Eli Zaretskii
Subject: bug#37611: [PATCH] Default FILE to the current buffer for list-tags
Date: Fri, 04 Oct 2019 10:59:02 +0300

> From: Hong Xu <hong@topbug.net>
> Date: Thu, 3 Oct 2019 19:05:08 -0700
> 
> * lisp/progmodes/etags.el (list-tags)
> (tags--get-current-buffer-name-in-tags-file): Default FILE to the
> current buffer for list-tags.
> ---
>   lisp/progmodes/etags.el | 18 +++++++++++++++---
>   1 file changed, 15 insertions(+), 3 deletions(-)
> 
> diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el
> index a03516100087..23acffcac299 100644
> --- a/lisp/progmodes/etags.el
> +++ b/lisp/progmodes/etags.el
> @@ -1852,15 +1852,27 @@ tags-complete-tags-table-file
>       (all-completions string (tags-table-files) predicate)
>         (try-completion string (tags-table-files) predicate))))
>   
> +(defun tags--get-current-buffer-name-in-tags-file ()
> +  "Get the file name that the current buffer corresponds in the tags file."

Thanks.  The doc string of list-tags needs an update as result of
this, and also its documentation in the user manual.

Did you try this in the Emacs source tree?  We use the TAGS 'include'
facility to include various TAGS files in a single master file.  This
seems to get in the way when you invoke this command from a Lisp file,
because list-tags only recognizes one of the C source files as
completion candidates.  What does this do with your changes?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]