[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ivy-hydra 22028d4 146/395: counsel.el (counsel--string-
From: |
Basil L. Contovounesios |
Subject: |
[elpa] externals/ivy-hydra 22028d4 146/395: counsel.el (counsel--string-trim-left): Add |
Date: |
Thu, 25 Feb 2021 08:31:50 -0500 (EST) |
branch: externals/ivy-hydra
commit 22028d46476036a8277bdfcb9f506d9657e5b7a5
Author: Oleh Krehel <ohwoeowho@gmail.com>
Commit: Oleh Krehel <ohwoeowho@gmail.com>
counsel.el (counsel--string-trim-left): Add
Fixes #2451
Fixes #2452
Fixes #2448
---
counsel.el | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/counsel.el b/counsel.el
index f78825f..697b68e 100644
--- a/counsel.el
+++ b/counsel.el
@@ -882,11 +882,17 @@ packages are, in order of precedence, `amx' and `smex'."
(defvar counsel-M-x-history nil
"History for `counsel-M-x'.")
-(declare-function string-trim-left "subr-x")
+(defsubst counsel--string-trim-left (string &optional regexp)
+ "Trim STRING of leading string matching REGEXP.
+
+REGEXP defaults to \"[ \\t\\n\\r]+\"."
+ (if (string-match (concat "\\`\\(?:" (or regexp "[ \t\n\r]+") "\\)") string)
+ (replace-match "" t t string)
+ string))
(defun counsel-M-x-action (cmd)
"Execute CMD."
- (setq cmd (intern (string-trim-left cmd "\\^")))
+ (setq cmd (intern (counsel--string-trim-left cmd "\\^")))
(cond ((bound-and-true-p amx-initialized)
(amx-rank cmd))
((bound-and-true-p smex-initialized-p)
- [elpa] externals/ivy-hydra 4d161cc 128/395: counsel-kmacro: Clarify copying of values for next macro user defines., (continued)
- [elpa] externals/ivy-hydra 4d161cc 128/395: counsel-kmacro: Clarify copying of values for next macro user defines., Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 16298bc 137/395: ivy.el (ivy-read-action-format-function): Upgrade to defcustom, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 269583d 125/395: counsel.el (counsel-locate-cmd-es): Switch flags order, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 098f8fe 133/395: swiper.el (swiper-isearch-toggle): Fix up, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra b20a6db 135/395: counsel.el (counsel-recentf-candidates): Sort remote files better, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra d1c3613 140/395: Fix ivy-{next, previous}-line-or-history when input is empty, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 2229801 142/395: counsel.el (counsel-M-x-action): Trim left ^, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra af51ffd 139/395: ivy.el (ivy-read-action-ivy): Don't reset ivy-marked-candidates to nil, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 8f3e589 138/395: counsel.el: Add "overwrite" action to counsel-bookmark, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 6930d72 143/395: ivy.el (ivy--kill-current-candidate): Specialize and fix for buffers, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 22028d4 146/395: counsel.el (counsel--string-trim-left): Add,
Basil L. Contovounesios <=
- [elpa] externals/ivy-hydra ba4c1d5 151/395: swiper.el (swiper-C-s): New command bound to "C-s" for swiper, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 83873c7 152/395: ivy.el (ivy--dynamic-collection-cands): Accept alist from dynamic-collection, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra db45501 153/395: Add counsel-find-file action: find-file-literally, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra b83d271 171/395: ivy.el (ivy-backward-kill-word): Actually kill-word, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 4b4f7c8 163/395: swiper.el (swiper-occur): Works with marked candidates, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 3915890 172/395: ivy.el (ivy-format-function-line): Add doc about :extend t, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra ea1e4f3 165/395: ivy.el (ivy-avy): Add a warning for M-x, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 40b4705 160/395: ivy.el (ivy--dynamic-collection-cands): Handle the case of coll 0, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra c782b48 161/395: ivy.el (ivy-read-action-by-key): Fix for Emacs27, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 1933f6d 178/395: ivy.el (ivy-resume): Don't re-calculate for :dynamic-collection, Basil L. Contovounesios, 2021/02/25