]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/char-fold.el (char-fold-to-regexp): Handle lax-whitespace (bug#38539)
authorJuri Linkov <juri@linkov.net>
Mon, 7 Sep 2020 18:33:13 +0000 (21:33 +0300)
committerJuri Linkov <juri@linkov.net>
Mon, 7 Sep 2020 18:33:13 +0000 (21:33 +0300)
lisp/char-fold.el

index 5a3c20c7832cc2528bb8d846106adb04bd44d61c..34561a2efe62b00e27be26a5efce89527888f1dc 100644 (file)
@@ -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))