[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/transient cf37817bb5 06/19: Use string-replace instead
From: |
Jonas Bernoulli |
Subject: |
[elpa] externals/transient cf37817bb5 06/19: Use string-replace instead of replace-regexp-in-string |
Date: |
Mon, 2 May 2022 05:08:25 -0400 (EDT) |
branch: externals/transient
commit cf37817bb553229788e47a467423e4b3d76ad7a1
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>
Use string-replace instead of replace-regexp-in-string
---
lisp/transient.el | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/lisp/transient.el b/lisp/transient.el
index ee37ce7081..30a1a224b1 100644
--- a/lisp/transient.el
+++ b/lisp/transient.el
@@ -3413,18 +3413,18 @@ Optional support for popup buttons is also implemented
here."
((equal (seq-take seq len) transient--redisplay-key)
(let ((pre (key-description (vconcat (seq-take seq len))))
(suf (key-description (vconcat (seq-drop seq len)))))
- (setq pre (replace-regexp-in-string "RET" "C-m" pre t))
- (setq pre (replace-regexp-in-string "TAB" "C-i" pre t))
- (setq suf (replace-regexp-in-string "RET" "C-m" suf t))
- (setq suf (replace-regexp-in-string "TAB" "C-i" suf t))
+ (setq pre (string-replace "RET" "C-m" pre))
+ (setq pre (string-replace "TAB" "C-i" pre))
+ (setq suf (string-replace "RET" "C-m" suf))
+ (setq suf (string-replace "TAB" "C-i" suf))
;; We use e.g. "-k" instead of the more correct "- k",
;; because the former is prettier. If we did that in
;; the definition, then we want to drop the space that
;; is reinserted above. False-positives are possible
;; for silly bindings like "-C-c C-c".
(unless (string-match-p " " key)
- (setq pre (replace-regexp-in-string " " "" pre))
- (setq suf (replace-regexp-in-string " " "" suf)))
+ (setq pre (string-replace " " "" pre))
+ (setq suf (string-replace " " "" suf)))
(concat (propertize pre 'face 'transient-unreachable-key)
(and (string-prefix-p (concat pre " ") key) " ")
(transient--colorize-key suf cmd)
- [elpa] externals/transient 682fe574fe 09/19: Silence older byte-compilers, (continued)
- [elpa] externals/transient 682fe574fe 09/19: Silence older byte-compilers, Jonas Bernoulli, 2022/05/02
- [elpa] externals/transient c088aaccbb 01/19: transient--insert-group: Support multi-row cells, Jonas Bernoulli, 2022/05/02
- [elpa] externals/transient 19cf9bef5d 02/19: Revert "transient--insert-group: Support multi-row cells", Jonas Bernoulli, 2022/05/02
- [elpa] externals/transient 158d023bd0 04/19: Use pcase's quote upattern, Jonas Bernoulli, 2022/05/02
- [elpa] externals/transient 22ef906b5a 07/19: Use string-search instead of string-match-p, Jonas Bernoulli, 2022/05/02
- [elpa] externals/transient 35c4b73419 10/19: Refresh library header, Jonas Bernoulli, 2022/05/02
- [elpa] externals/transient 5ae3c4014e 05/19: Depend on compat package from GNU Elpa, Jonas Bernoulli, 2022/05/02
- [elpa] externals/transient fabd8c9b61 14/19: Put eval-when-compile and require on one line, Jonas Bernoulli, 2022/05/02
- [elpa] externals/transient d4fb853d49 15/19: transient--show: Also hide the header-line, Jonas Bernoulli, 2022/05/02
- [elpa] externals/transient 8c0d827319 12/19: make: Improve creation of autoloads file, Jonas Bernoulli, 2022/05/02
- [elpa] externals/transient cf37817bb5 06/19: Use string-replace instead of replace-regexp-in-string,
Jonas Bernoulli <=
- [elpa] externals/transient 71de86e8ea 17/19: Fix invoking the suffix the cursor is on in the transient buffer, Jonas Bernoulli, 2022/05/02
- [elpa] externals/transient ed2febd005 16/19: Support use of an infix argument following a prefix argument, Jonas Bernoulli, 2022/05/02
- [elpa] externals/transient 2ef62fac89 13/19: transient--insert-group: Support multi-row cells, Jonas Bernoulli, 2022/05/02
- [elpa] externals/transient 84f2d12ef3 19/19: Fix doc-string typo, Jonas Bernoulli, 2022/05/02
- [elpa] externals/transient 62ba30e7d8 11/19: make: Right-align target verbs, Jonas Bernoulli, 2022/05/02
- [elpa] externals/transient d02b4f23e0 18/19: Change key binding for invoking the current suffix, Jonas Bernoulli, 2022/05/02