[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs-25 a41cb8c: Improve commentary in character-fold.el
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] emacs-25 a41cb8c: Improve commentary in character-fold.el |
Date: |
Fri, 27 Nov 2015 07:55:31 +0000 |
branch: emacs-25
commit a41cb8c4d3af3f7e542a7bdf79858385a3274d4d
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>
Improve commentary in character-fold.el
* lisp/character-fold.el (character-fold-to-regexp): Move detailed
description from commit log message to comments. (Bug#22019)
---
lisp/character-fold.el | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/lisp/character-fold.el b/lisp/character-fold.el
index 0e156c5..0e063b0 100644
--- a/lisp/character-fold.el
+++ b/lisp/character-fold.el
@@ -117,9 +117,14 @@ regexp) and other characters are `regexp-quote'd."
(let* ((spaces 0)
(chars (mapcar #'identity string))
(out chars))
- ;; When the user types a space, we want to match the table entry,
- ;; but we also want the ?\s to be visible to `search-spaces-regexp'.
- ;; See commit message for a longer description.
+ ;; When the user types a space, we want to match the table entry
+ ;; for ?\s, which is generally a regexp like "[ ...]". However,
+ ;; the `search-spaces-regexp' variable doesn't "see" spaces inside
+ ;; these regexp constructs, so we need to use "\\( \\|[ ...]\\)"
+ ;; instead (to manually expose a space). Furthermore, the lax
+ ;; search engine acts on a bunch of spaces, not on individual
+ ;; spaces, so if the string contains sequential spaces like " ", we
+ ;; need to keep them grouped together like this: "\\( \\|[ ...][ ...]\\)".
(while chars
(let ((c (car chars)))
(setcar chars
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs-25 a41cb8c: Improve commentary in character-fold.el,
Eli Zaretskii <=