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

[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: Jim Porter
Subject: bug#66752: 30.0.50; [PATCH] Add support for 'thing-at-point' to 'bug-reference-mode'
Date: Sat, 4 Nov 2023 13:07:38 -0700

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?





reply via email to

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