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

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

bug#53749: 29.0.50; [PATCH] Xref backend for TeX buffers


From: Dmitry Gutov
Subject: bug#53749: 29.0.50; [PATCH] Xref backend for TeX buffers
Date: Wed, 13 Sep 2023 18:23:13 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0

Hi David!

Thanks for the new patch.

I'm skipping over the etags parser changes (others might comment, I'm just assuming they are good).

And "thing at point" code is, I think, at your discretion (if the result is useful, then that seems good). I would probably not call the function the same way given that we don't install this "thing" globally, just using it from several the major modes in a particular way. Anyway, that is a minor affair.

I'd like to suggest two simplifications for the xref-related stuff, if those work for you.

On 13/09/2023 14:10, David Fussner via Bug reports for GNU Emacs, the Swiss army knife of text editors wrote:

<...> I also manipulate some
variables buffer-locally to make things like project-find-regexp and
isearch-forward-thing-at-point work better in such buffers.

These won't be affected either way, right? Because project-find-regexp defaults its input to (thing-at-point 'symbol t), and isearch... probably also uses "symbol" if you ask it to.

So... why not just make tex-thingatpt-include-escape a boolean? What commands need to be distinguished that way? I think 'find-tag' (it's obsolete but still used sometimes) would need to obey this var as well.

And the second thing: you're putting the symbol on major modes.

+(dolist (texmode tex-thingatpt-modes-list)
+  (put texmode 'find-tag-default-function 'tex--thing-at-point))

Why not set the variable find-tag-default-function instead? That seems easier and more appropriate to do inside a major mode function.

Thanks.





reply via email to

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