From 2bb7f2758c8bab2d51f6436b9a241acc6887a803 Mon Sep 17 00:00:00 2001 From: Eric Danan Date: Wed, 27 Dec 2017 22:11:08 +0100 Subject: [PATCH] Don't depende on string-remove-prefix Otherwise would need to add a dependency to emacs 24.4 (counsel and projectile only depend on 24.3). See #65 --- counsel-projectile.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/counsel-projectile.el b/counsel-projectile.el index 15c2167..150698f 100644 --- a/counsel-projectile.el +++ b/counsel-projectile.el @@ -261,7 +261,7 @@ is the concatenation of these two keys will be called." for a in (cdr action) if (and (string-prefix-p prefix (car a)) (not (string= prefix (car a)))) - collect (cons (string-remove-prefix prefix (car a)) + collect (cons (substring (car a) (length prefix)) (cdr a)))) ;; adapted from `ivy-read-action' from here on (hint (funcall ivy-read-action-format-function sub-action))