[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/urgrep fe13a3cbb5 081/115: Fix project-root call on Ema
From: |
ELPA Syncer |
Subject: |
[elpa] externals/urgrep fe13a3cbb5 081/115: Fix project-root call on Emacs 27 |
Date: |
Wed, 10 May 2023 03:00:46 -0400 (EDT) |
branch: externals/urgrep
commit fe13a3cbb534aae1e2d009f286e3b0e47a051ff8
Author: Jim Porter <jporterbugs@gmail.com>
Commit: Jim Porter <jporterbugs@gmail.com>
Fix project-root call on Emacs 27
---
urgrep.el | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/urgrep.el b/urgrep.el
index 6f52d07564..3da8ac5e88 100644
--- a/urgrep.el
+++ b/urgrep.el
@@ -115,6 +115,12 @@ The currently-used tool can be inspected from the hook via
(format " (default %s)" default))
": "))))
+;; `project-root' was added in project.el 0.3.0 (Emacs 28.1).
+(defalias 'urgrep--project-root
+ (if (fboundp 'project-root)
+ #'project-root
+ (lambda (project) (car (project-roots project)))))
+
(defun urgrep--convert-regexp (expr from-syntax to-syntax)
"Convert the regexp EXPR from FROM-SYNTAX to TO-SYNTAX."
(cond ((and (not (eq from-syntax to-syntax))
@@ -386,7 +392,7 @@ This caches the default tool per-host in
`urgrep--host-defaults'."
(when-let (((and tool-vc-backend (not vc-backend-name)))
(proj (project-current)))
(setq vc-backend-name (vc-responsible-backend
- (project-root proj))))
+ (urgrep--project-root proj))))
;; If we find the executable (and it's for the right VC
;; backend, if relevant), cache it and then return it.
(when (and (executable-find tool-executable t)
@@ -985,7 +991,7 @@ value is 4, return the current directory. Otherwise,
prompt for the
directory."
(cond
((not arg) (let ((proj (project-current)))
- (if proj (project-root proj) default-directory)))
+ (if proj (urgrep--project-root proj) default-directory)))
((= (prefix-numeric-value arg) 4) default-directory)
(t (read-directory-name "In directory: " nil nil t))))
- [elpa] externals/urgrep ba2b01b91b 042/115: Remove no-longer-needed `post-arguments', (continued)
- [elpa] externals/urgrep ba2b01b91b 042/115: Remove no-longer-needed `post-arguments', ELPA Syncer, 2023/05/10
- [elpa] externals/urgrep 3643c933c4 055/115: Add support for ugrep, ELPA Syncer, 2023/05/10
- [elpa] externals/urgrep 0de93bfdb9 068/115: Fix use of wgrep on long urgrep results, ELPA Syncer, 2023/05/10
- [elpa] externals/urgrep e2e8898ab2 074/115: Update copyright, ELPA Syncer, 2023/05/10
- [elpa] externals/urgrep 0c966b2001 075/115: Ensure `default-directory' stays in sync, ELPA Syncer, 2023/05/10
- [elpa] externals/urgrep c15be33112 076/115: Wrap shell argument quoting with `with-connection-local-variables`, ELPA Syncer, 2023/05/10
- [elpa] externals/urgrep e63c6c5173 089/115: Add link to wgrep package and clarify the README, ELPA Syncer, 2023/05/10
- [elpa] externals/urgrep 61478da305 077/115: Improve reliability of running urgrep over Tramp, ELPA Syncer, 2023/05/10
- [elpa] externals/urgrep 77fcfc1916 090/115: Use `push` instead of `add-to-list`, ELPA Syncer, 2023/05/10
- [elpa] externals/urgrep 559b2c07cd 091/115: Add a unit test for getting the preferred tool on multiple hosts, ELPA Syncer, 2023/05/10
- [elpa] externals/urgrep fe13a3cbb5 081/115: Fix project-root call on Emacs 27,
ELPA Syncer <=
- [elpa] externals/urgrep f2c87e7520 080/115: Improve robustness of tests for grep command generation, ELPA Syncer, 2023/05/10
- [elpa] externals/urgrep b03a3d84ec 098/115: Add `suffix` argument to `urgrep--get-prop(-pcase)?`, ELPA Syncer, 2023/05/10
- [elpa] externals/urgrep eb5191bfd5 097/115: Update copyright year, ELPA Syncer, 2023/05/10
- [elpa] externals/urgrep 43c82e84ec 082/115: Add CI for Emacs 27.1, ELPA Syncer, 2023/05/10
- [elpa] externals/urgrep 3082d89bd9 099/115: Add support for abbreviating the command in urgrep buffers, ELPA Syncer, 2023/05/10
- [elpa] externals/urgrep b5b426e9ca 084/115: Fix hiding excessive part of rgrep command in Emacs 28, ELPA Syncer, 2023/05/10
- [elpa] externals/urgrep 56acdfe434 087/115: Improve how we wait for urgrep to finish in tests, ELPA Syncer, 2023/05/10
- [elpa] externals/urgrep 30cc9e363e 085/115: Fix context-line detection for find/grep, ELPA Syncer, 2023/05/10
- [elpa] externals/urgrep 0b036cdcf4 100/115: Improve explanation of `C-u C-u` for choosing directory, ELPA Syncer, 2023/05/10
- [elpa] externals/urgrep 6614dfe651 102/115: Update checkout action in CI, ELPA Syncer, 2023/05/10