[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] scratch/isearch-character-group-folding 07392ee 3/4: (isea
From: |
Artur Malabarba |
Subject: |
[Emacs-diffs] scratch/isearch-character-group-folding 07392ee 3/4: (isearch-search-fun-default): Implement group folding in isearch. |
Date: |
Tue, 27 Jan 2015 16:13:26 +0000 |
branch: scratch/isearch-character-group-folding
commit 07392ee003a54334f98a59bbb62ffe0d96187be8
Author: Artur Malabarba <address@hidden>
Commit: Artur Malabarba <address@hidden>
(isearch-search-fun-default): Implement group folding in isearch.
Use `isearch-fold-groups', `isearch-groups-alist', and
`isearch--replace-groups-in-string'.
---
lisp/isearch.el | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/lisp/isearch.el b/lisp/isearch.el
index b6bd876..accfb72 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -2621,6 +2621,13 @@ Other characters are `regexp-quote'd."
're-search-backward-lax-whitespace))
(isearch-regexp
(if isearch-forward 're-search-forward 're-search-backward))
+ ;; `isearch-regexp' is essentially a superset of
+ ;; `isearch-fold-groups'. So fold-groups comes after it.
+ (isearch-fold-groups
+ (lambda (string &optional bound noerror count)
+ (funcall (if isearch-forward #'re-search-forward #'re-search-backward)
+ (isearch--replace-groups-in-string string)
+ bound noerror count)))
((and isearch-lax-whitespace search-whitespace-regexp)
(if isearch-forward
'search-forward-lax-whitespace