[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ivy-hydra 47ec37b 203/395: ivy.el: Fix some string pred
From: |
Basil L. Contovounesios |
Subject: |
[elpa] externals/ivy-hydra 47ec37b 203/395: ivy.el: Fix some string predicates |
Date: |
Thu, 25 Feb 2021 08:32:03 -0500 (EST) |
branch: externals/ivy-hydra
commit 47ec37b395cc1b304bbf91e804f138634544a9df
Author: Basil L. Contovounesios <contovob@tcd.ie>
Commit: Basil L. Contovounesios <contovob@tcd.ie>
ivy.el: Fix some string predicates
(ivy--dirname-p, ivy--magic-file-slash): Simplify now that Ivy
requires Emacs 24.5 or later by using string-suffix-p instead of
slower regexp matching.
(ivy--occur-insert-lines): Escape leading dot in regexp by using
existing helper ivy--starts-with-dotslash.
Re: #1817, #1845, #1846
---
ivy.el | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/ivy.el b/ivy.el
index afc3595..9360857 100644
--- a/ivy.el
+++ b/ivy.el
@@ -2078,7 +2078,7 @@ An :init is a function with no arguments.
#'directory-name-p
(lambda (name)
"Return non-nil if NAME ends with a directory separator."
- (string-match-p "/\\'" name))))
+ (string-suffix-p "/" name))))
(defun ivy--sorted-files (dir)
"Return the list of files in DIR.
@@ -3251,7 +3251,7 @@ Possible choices are
'ivy-magic-slash-non-match-cd-selected,
(cond ((member ivy-text ivy--all-candidates)
(ivy--cd canonical))
((and (eq system-type 'windows-nt) (string= ivy-text "//")))
- ((string-match-p "//\\'" ivy-text)
+ ((string-suffix-p "//" ivy-text)
(ivy--cd
(ivy--magic-file-doubleslash-directory)))
((string-match-p "\\`/ssh:" ivy-text)
@@ -5038,7 +5038,7 @@ When `ivy-calling' isn't nil, call `ivy-occur-press'."
highlight
help-echo "mouse-1: call ivy-action")
cand)
- (insert (if (string-match-p "\\`.[/\\]" cand) "" " ")
+ (insert (if (ivy--starts-with-dotslash cand) "" " ")
cand ?\n)))
(defun ivy--occur-default (cands)
- [elpa] externals/ivy-hydra ea1e4f3 165/395: ivy.el (ivy-avy): Add a warning for M-x, (continued)
- [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
- [elpa] externals/ivy-hydra 5f1d9ce 179/395: counsel.el (counsel--grep-smart-case-flag): Extract, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 73c9773 180/395: Fix ripgrep pcre2 feature detection, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 640b83d 182/395: counsel.el (counsel-rg-base-command): Fix missing space, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra d5225a1 187/395: swiper.el (swiper--isearch-unwind): Extract, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 93be68a 183/395: swiper.el (swiper-isearch-format-function): Fix for ivy-resume, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 25b6321 208/395: Fix recent counsel-recentf-candidates thinko, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 47ec37b 203/395: ivy.el: Fix some string predicates,
Basil L. Contovounesios <=
- [elpa] externals/ivy-hydra 1883499 217/395: ivy.el (ivy-auto-shrink-minibuffer-alist): Extend from ivy-auto-shrink-minibuffer, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra c5517fc 228/395: ivy.el: Trim grep line numbers for "M-o w" and "M-o i", Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra f2852fc 207/395: Clean up compatibility code, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 1d25cdd 209/395: Revert ".dir-locals.el: Simplify outline-regexp", Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra dc60eac 201/395: ivy.el (ivy-read-action-by-key): Fix keys to quit action selection, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 251c219 193/395: Enable setting the display function with ivy-configure, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra ee2a537 204/395: * counsel.el (counsel-mark--get-evil-candidates): Fix typo, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra eeb14b1 213/395: ivy-test.el (ivy-read-history): Add a test, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 1bf5b98 234/395: ivy.el: Fix next-error randomly jumping to previous match, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra bd9945b 243/395: Fix recent regression in ivy--preselect-index, Basil L. Contovounesios, 2021/02/25