[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/urgrep 6503497188 4/4: Provide a setter for `urgrep-pre
|
From: |
ELPA Syncer |
|
Subject: |
[elpa] externals/urgrep 6503497188 4/4: Provide a setter for `urgrep-preferred-tools` to clear the cached tool |
|
Date: |
Fri, 10 Nov 2023 18:58:52 -0500 (EST) |
branch: externals/urgrep
commit 65034971888fa7af2bba4aa8bb62430d298cf0d5
Author: Jim Porter <jporterbugs@gmail.com>
Commit: Jim Porter <jporterbugs@gmail.com>
Provide a setter for `urgrep-preferred-tools` to clear the cached tool
---
urgrep.el | 29 ++++++++++++++++-------------
1 file changed, 16 insertions(+), 13 deletions(-)
diff --git a/urgrep.el b/urgrep.el
index 88251b82b8..24037a3412 100644
--- a/urgrep.el
+++ b/urgrep.el
@@ -452,6 +452,18 @@ See also `grep-process-setup'."
(context-arguments . ,urgrep--context-arguments)))
"An alist of known tools to try when running urgrep.")
+(defvar urgrep--cached-tool nil
+ "The cached urgrep tool to use.
+This value is connection-local.")
+
+(connection-local-set-profile-variables
+ 'urgrep-connection-local-profile
+ '((urgrep--cached-tool . nil)))
+
+(connection-local-set-profiles
+ '(:application tramp)
+ 'urgrep-connection-local-profile)
+
(defcustom urgrep-preferred-tools nil
"List of urgrep tools to search for.
This can be nil to use the default list of tools in `urgrep-tools'
@@ -468,19 +480,10 @@ if there are multiple exeuctables)."
(append tool-choice
`((cons :tag "(tool . path)"
,tool-choice (string :tag "Path")))))))
- :group 'urgrep)
-
-(defvar urgrep--cached-tool nil
- "The cached urgrep tool to use.
-This value is connection-local.")
-
-(connection-local-set-profile-variables
- 'urgrep-connection-local-profile
- '((urgrep--cached-tool . nil)))
-
-(connection-local-set-profiles
- '(:application tramp)
- 'urgrep-connection-local-profile)
+ :set (lambda (symbol value)
+ (setq urgrep--cached-tool nil)
+ (set-default symbol value))
+ :group 'urgrep)
(defsubst urgrep-connection-local-profile ()
"Get a connection-local profile name for urgrep."