[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#66752: 30.0.50; [PATCH] Add support for 'thing-at-point' to 'bug-ref
From: |
Eli Zaretskii |
Subject: |
bug#66752: 30.0.50; [PATCH] Add support for 'thing-at-point' to 'bug-reference-mode' |
Date: |
Sun, 05 Nov 2023 07:31:30 +0200 |
> 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>
>
> On 11/4/2023 12:24 PM, Tassilo Horn wrote:
> > Jim Porter <jporterbugs@gmail.com> writes:
> >> (jit-lock-unregister #'bug-reference-fontify)
> >> + (setq thing-at-point-provider-alist
> >> + (delete '((url . bug-reference--url-at-point))
> >> + thing-at-point-provider-alist))
> >> + (when (equal thing-at-point-provider-alist
> >> + (default-value 'thing-at-point-provider-alist))
> >> + (kill-local-variable 'thing-at-point-provider-alist))
> >
> > Is that conventional, nuking a buffer-local value once it's back to its
> > default value. Just asking out of curiosity.
>
> I'm not sure. The only example I saw for adding to
> 'thing-at-provider-alist' was for EWW (a major mode). I thought, "What
> if someone activated and deactivated 'bug-reference-mode' and then later
> added something to the default value of 'thing-at-provider-alist'?"
>
> 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.