|
From: | Jim Porter |
Subject: | bug#66752: 30.0.50; [PATCH] Add support for 'thing-at-point' to 'bug-reference-mode' |
Date: | Sat, 4 Nov 2023 23:21:59 -0700 |
On 11/4/2023 10:31 PM, Eli Zaretskii wrote:
Date: Sat, 4 Nov 2023 13:07:38 -0700 Cc: 66752@debbugs.gnu.org, Eli Zaretskii <eliz@gnu.org> From: Jim Porter <jporterbugs@gmail.com> I don't know if that's a case we want to support; maybe I'm just being overly cautious. (Or maybe there should be - or already is - some utility function that does this for us.) Eli, do you have any thoughts on this part?I don't see any problems with this. But I added Stefan in case he has an opinion.
Another implementation option might be:1. When activating 'bug-reference-mode', only add 'bug-reference--url-at-point' to 'thing-at-point-provider-alist' if it's not already there,
2. Do nothing when deactivating 'bug-reference-mode', and3. Inside bug-reference--url-at-point' always return nil if 'bug-reference-mode' is inactive.
Though I suppose this would use 'cl-pushnew' for (1), which might be inadvisable given the recent discussion on emacs-devel. (Or we could use 'add-to-list', but its docstring says "please do not abuse it in Elisp code, where you are usually better off using ‘push’ or ‘cl-pushnew’.")
I don't have a very strong opinion on this part, so I'll do whatever makes everyone happy here.
[Prev in Thread] | Current Thread | [Next in Thread] |