[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ivy-hydra dd43ab1 346/395: Add Emacs 27 executable-find
From: |
Basil L. Contovounesios |
Subject: |
[elpa] externals/ivy-hydra dd43ab1 346/395: Add Emacs 27 executable-find compatibility shim |
Date: |
Thu, 25 Feb 2021 08:32:35 -0500 (EST) |
branch: externals/ivy-hydra
commit dd43ab1217f72948dc5cd669467e33b8b568db44
Author: Basil L. Contovounesios <contovob@tcd.ie>
Commit: Basil L. Contovounesios <contovob@tcd.ie>
Add Emacs 27 executable-find compatibility shim
* counsel.el (counsel--executable-find): New function wrapping 2-arg
executable-find in Emacs 27.
(counsel-require-program): Use it to move version check from runtime
to load time, and pacify byte-compiler.
Re: #2618.
---
counsel.el | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/counsel.el b/counsel.el
index 6cfb652..8c8434e 100644
--- a/counsel.el
+++ b/counsel.el
@@ -114,6 +114,14 @@ complex regexes."
str)
str))
+(defalias 'counsel--executable-find
+ ;; Gained optional argument in 27.1.
+ (if (>= emacs-major-version 27)
+ #'executable-find
+ (lambda (command &optional _remote)
+ (executable-find command)))
+ "Compatibility shim for `executable-find'.")
+
(defun counsel-require-program (cmd)
"Check system for program used in CMD, printing error if not found.
CMD is either a string or a list of strings.
@@ -124,9 +132,7 @@ To skip the `executable-find' check, start the string with
a space."
(car (split-string cmd)))))
(or (and (stringp program)
(not (string= program ""))
- (if (<= 27 emacs-major-version)
- (executable-find program t)
- (executable-find program)))
+ (counsel--executable-find program t))
(user-error "Required program \"%s\" not found in your path"
program)))))
(declare-function eshell-split-path "esh-util")
- [elpa] externals/ivy-hydra ea9bd06 353/395: Encode --pcre switch correctly for ivy-occur, (continued)
- [elpa] externals/ivy-hydra ea9bd06 353/395: Encode --pcre switch correctly for ivy-occur, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 63549da 354/395: Fix counsel-descbinds for Emacs 28, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 387390b 312/395: Prefer derived-mode-p for major-mode comparisons, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 8d840b2 317/395: counsel.el (counsel-find-file-undo): Undo changing current directory, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 9bb6841 347/395: counsel.el (counsel-highlight-with-face): Fix preselect on next call, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra dd9c88f 319/395: ivy-avy.el: Fix package-lint warnings, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 544e7de 314/395: ivy.el (ivy-completing-read): Work better with find-file-at-point, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 4f98f97 332/395: targets/plain.el: Install avy automatically, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 6a22192 360/395: ivy.el (ivy--highlight-default): Use match faces consistently, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra f8b1ab8 328/395: Minor fixes for recent additions, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra dd43ab1 346/395: Add Emacs 27 executable-find compatibility shim,
Basil L. Contovounesios <=
- [elpa] externals/ivy-hydra c76d797 370/395: Clean up some stuff around counsel-locate, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 34a203f 374/395: counsel.el: Add prompt param to counsel-mark--ivy-read, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 71c59ae 377/395: ivy.el (ivy--format-minibuffer-line): Check for annotation-function in one more place, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 80101ca 383/395: counsel.el (counsel-ag-function): User switches override -i/-s, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra e0374dc 385/395: Support empty isearch in swiper-from-isearch, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 1477144 391/395: * .gitignore: Anchor ELPA files at project root., Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 63f1af0 392/395: * doc/scripts.el: Add copyright to tame the checking script, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra d47e354 393/395: Update copyright notices for 2021, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 65f5783 395/395: Select files relevant for the ivy-hydra package, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 968eea5 057/395: ivy.el (ivy-partial-or-done): Check if completion-cycle-threshold is a number, Basil L. Contovounesios, 2021/02/25