diff options
author | Juri Linkov <juri@linkov.net> | 2020-09-07 21:33:13 +0300 |
---|---|---|
committer | Juri Linkov <juri@linkov.net> | 2020-09-07 21:33:13 +0300 |
commit | 0ebe2678002ffb82a25311c56cbc4b8ba3bd5fa1 (patch) | |
tree | b41076fba593943fb0f9f2bd30cc0c046fa38654 /lisp/char-fold.el | |
parent | 5312e56d43c82ab5e1c3fe407e24bdf1014e4313 (diff) | |
download | emacs-0ebe2678002ffb82a25311c56cbc4b8ba3bd5fa1.tar.gz |
* lisp/char-fold.el (char-fold-to-regexp): Handle lax-whitespace (bug#38539)
Diffstat (limited to 'lisp/char-fold.el')
-rw-r--r-- | lisp/char-fold.el | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lisp/char-fold.el b/lisp/char-fold.el index 5a3c20c7832..34561a2efe6 100644 --- a/lisp/char-fold.el +++ b/lisp/char-fold.el @@ -324,6 +324,13 @@ from which to start." (while (< i end) (pcase (aref string i) (?\s (setq spaces (1+ spaces))) + ((pred (lambda (c) (and char-fold-symmetric + (if isearch-regexp + isearch-regexp-lax-whitespace + isearch-lax-whitespace) + (stringp search-whitespace-regexp) + (string-match-p search-whitespace-regexp (char-to-string c))))) + (setq spaces (1+ spaces))) (c (when (> spaces 0) (push (char-fold--make-space-string spaces) out) (setq spaces 0)) |