[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 7b86747 09/67: swiper.el (swiper--regex): Update signature
From: |
Oleh Krehel |
Subject: |
[elpa] master 7b86747 09/67: swiper.el (swiper--regex): Update signature |
Date: |
Sun, 22 Mar 2015 17:33:50 +0000 |
branch: master
commit 7b86747c4e235f33e85f7b501a4baedfdd252e1f
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>
swiper.el (swiper--regex): Update signature
---
swiper.el | 20 ++++++++++----------
1 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/swiper.el b/swiper.el
index b4935c5..ade9068 100644
--- a/swiper.el
+++ b/swiper.el
@@ -122,7 +122,7 @@
(add-hook 'helm-after-update-hook
#'swiper--reanchor)))
(match-strict . (lambda (x) (ignore-errors
- (string-match (swiper--regex) x))))
+ (string-match (swiper--regex
helm-input) x))))
(candidates . ,(swiper--candidates))
(filtered-candidate-transformer
helm-fuzzy-highlight-matches)
@@ -152,7 +152,7 @@
(defun swiper--update-input ()
"Update selection."
(with-current-buffer swiper--buffer
- (let ((re (swiper--regex))
+ (let ((re (swiper--regex helm-input))
(we (window-end nil t)))
(while swiper--overlays
(delete-overlay (pop swiper--overlays)))
@@ -212,7 +212,7 @@
(defun swiper--update-sel ()
"Update selection."
- (let* ((re (swiper--regex))
+ (let* ((re (swiper--regex helm-input))
(str (buffer-substring-no-properties
(line-beginning-position)
(line-end-position)))
@@ -252,20 +252,20 @@
(helm-next-line 1))))
(defvar swiper--subexps 1
- "Number of groups in `(swiper--regex)'.")
+ "Number of groups in `swiper--regex'.")
(defvar swiper--regex-hash
(make-hash-table :test 'equal)
"Store pre-computed regex.")
-(defun swiper--regex ()
- "Re-build regex in case it has a space."
- (let ((hashed (gethash helm-input swiper--regex-hash)))
+(defun swiper--regex (str)
+ "Re-build regex from STR in case it has a space."
+ (let ((hashed (gethash str swiper--regex-hash)))
(if hashed
(prog1 (cdr hashed)
(setq swiper--subexps (car hashed)))
- (cdr (puthash helm-input
- (let ((subs (split-string helm-input " +" t)))
+ (cdr (puthash str
+ (let ((subs (split-string str " +" t)))
(if (= (length subs) 1)
(cons
(setq swiper--subexps 0)
@@ -283,7 +283,7 @@
(goto-char (point-min))
(forward-line (1- (read x)))
(re-search-forward
- (swiper--regex) (line-end-position) t))
+ (swiper--regex helm-input) (line-end-position) t))
(provide 'swiper)
- [elpa] master updated (5aa7896 -> 302a16a), Oleh Krehel, 2015/03/22
- [elpa] master c990320 02/67: Update call to `font-lock-ensure', Oleh Krehel, 2015/03/22
- [elpa] master 7159d84 03/67: swiper.el (swiper--regex): Zero groups without space, Oleh Krehel, 2015/03/22
- [elpa] master 3a4cb1f 05/67: Add compatibility alias for `font-lock-ensure', Oleh Krehel, 2015/03/22
- [elpa] master fed3aff 04/67: README.md: Add, Oleh Krehel, 2015/03/22
- [elpa] master 16be7e1 01/67: Initial import, Oleh Krehel, 2015/03/22
- [elpa] master ff0ee94 06/67: Add dependency on emacs 24.1, Oleh Krehel, 2015/03/22
- [elpa] master 1c0b30b 07/67: add autoload cookie for lazy loading, Oleh Krehel, 2015/03/22
- [elpa] master 1099ebf 08/67: Use cl-lib macros instead of cl.el, Oleh Krehel, 2015/03/22
- [elpa] master 7b86747 09/67: swiper.el (swiper--regex): Update signature,
Oleh Krehel <=
- [elpa] master a267b34 10/67: familiar isearch key bindings while helm is active, Oleh Krehel, 2015/03/22
- [elpa] master a817342 14/67: ivy.el: Improve the highlighting in the minibuffer, Oleh Krehel, 2015/03/22
- [elpa] master 97ab66a 13/67: README.md: Update, Oleh Krehel, 2015/03/22
- [elpa] master eb829a9 16/67: Account for zero-length regex matches, Oleh Krehel, 2015/03/22
- [elpa] master 9bcf1dc 12/67: Update dependencies., Oleh Krehel, 2015/03/22
- [elpa] master 7cea819 18/67: ivy.el: Add `ivy-exit', Oleh Krehel, 2015/03/22
- [elpa] master eb1def0 17/67: Add initial-input optional argument, Oleh Krehel, 2015/03/22
- [elpa] master 2f5cc11 15/67: swiper.el: Use `with-selected-window' instead of `with-current-buffer', Oleh Krehel, 2015/03/22
- [elpa] master 02065be 19/67: swiper.el: Restore original point on canceling, Oleh Krehel, 2015/03/22
- [elpa] master 6a874a4 11/67: Add `ivy' back end, Oleh Krehel, 2015/03/22