aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/character-fold.el14
1 files changed, 6 insertions, 8 deletions
diff --git a/lisp/character-fold.el b/lisp/character-fold.el
index bf5ae59f41a..6bbb3ec87e4 100644
--- a/lisp/character-fold.el
+++ b/lisp/character-fold.el
@@ -94,8 +94,7 @@ some).")
94 ;; Add some manual entries. 94 ;; Add some manual entries.
95 (dolist (it '((?\" """ "“" "”" "”" "„" "⹂" "〞" "‟" "‟" "❞" "❝" "❠" "“" "„" "〝" "〟" "🙷" "🙶" "🙸" "«" "»") 95 (dolist (it '((?\" """ "“" "”" "”" "„" "⹂" "〞" "‟" "‟" "❞" "❝" "❠" "“" "„" "〝" "〟" "🙷" "🙶" "🙸" "«" "»")
96 (?' "❟" "❛" "❜" "‘" "’" "‚" "‛" "‚" "󠀢" "❮" "❯" "‹" "›") 96 (?' "❟" "❛" "❜" "‘" "’" "‚" "‛" "‚" "󠀢" "❮" "❯" "‹" "›")
97 (?` "❛" "‘" "‛" "󠀢" "❮" "‹") 97 (?` "❛" "‘" "‛" "󠀢" "❮" "‹")))
98 (?\s "\t" "\r" "\n")))
99 (let ((idx (car it)) 98 (let ((idx (car it))
100 (chars (cdr it))) 99 (chars (cdr it)))
101 (aset equiv idx (append chars (aref equiv idx))))) 100 (aset equiv idx (append chars (aref equiv idx)))))
@@ -121,12 +120,11 @@ If LAX is non-nil, any single whitespace character is allowed to
121match any number of times." 120match any number of times."
122 (if character-fold-search 121 (if character-fold-search
123 (apply #'concat 122 (apply #'concat
124 (mapcar (lambda (c) (let ((out (or (aref character-fold-table c) 123 (mapcar (lambda (c) (if (and lax (memq c '(?\s ?\t ?\r ?\n)))
125 (regexp-quote (string c))))) 124 "[ \t\n\r\xa0\x2002\x2d\x200a\x202f\x205f\x3000]+"
126 (if (and lax (memq c '(?\s ?\t ?\r ?\n ))) 125 (or (aref character-fold-table c)
127 (concat out "+") 126 (regexp-quote (string c)))))
128 out))) 127 string))
129 string))
130 (regexp-quote string))) 128 (regexp-quote string)))
131 129
132;;; character-fold.el ends here 130;;; character-fold.el ends here