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
This commit is contained in:
Eric Danan 2017-12-27 22:11:08 +01:00
parent 2e0be045a1
commit 2bb7f2758c

View file

@ -261,7 +261,7 @@ is the concatenation of these two keys will be called."
for a in (cdr action) for a in (cdr action)
if (and (string-prefix-p prefix (car a)) if (and (string-prefix-p prefix (car a))
(not (string= 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)))) (cdr a))))
;; adapted from `ivy-read-action' from here on ;; adapted from `ivy-read-action' from here on
(hint (funcall ivy-read-action-format-function sub-action)) (hint (funcall ivy-read-action-format-function sub-action))