diff options
| author | Eli Zaretskii | 2015-11-27 09:54:27 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2015-11-27 09:54:27 +0200 |
| commit | a41cb8c4d3af3f7e542a7bdf79858385a3274d4d (patch) | |
| tree | bcbc27249a0735fa5e2f3f2a58e5325f6dc61d71 | |
| parent | af40b7689a768f8a4b931d9c655c9c8bdba9393e (diff) | |
| download | emacs-a41cb8c4d3af3f7e542a7bdf79858385a3274d4d.tar.gz emacs-a41cb8c4d3af3f7e542a7bdf79858385a3274d4d.zip | |
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)
| -rw-r--r-- | 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 0e156c50dde..0e063b07e72 100644 --- a/lisp/character-fold.el +++ b/lisp/character-fold.el | |||
| @@ -117,9 +117,14 @@ regexp) and other characters are `regexp-quote'd." | |||
| 117 | (let* ((spaces 0) | 117 | (let* ((spaces 0) |
| 118 | (chars (mapcar #'identity string)) | 118 | (chars (mapcar #'identity string)) |
| 119 | (out chars)) | 119 | (out chars)) |
| 120 | ;; When the user types a space, we want to match the table entry, | 120 | ;; When the user types a space, we want to match the table entry |
| 121 | ;; but we also want the ?\s to be visible to `search-spaces-regexp'. | 121 | ;; for ?\s, which is generally a regexp like "[ ...]". However, |
| 122 | ;; See commit message for a longer description. | 122 | ;; the `search-spaces-regexp' variable doesn't "see" spaces inside |
| 123 | ;; these regexp constructs, so we need to use "\\( \\|[ ...]\\)" | ||
| 124 | ;; instead (to manually expose a space). Furthermore, the lax | ||
| 125 | ;; search engine acts on a bunch of spaces, not on individual | ||
| 126 | ;; spaces, so if the string contains sequential spaces like " ", we | ||
| 127 | ;; need to keep them grouped together like this: "\\( \\|[ ...][ ...]\\)". | ||
| 123 | (while chars | 128 | (while chars |
| 124 | (let ((c (car chars))) | 129 | (let ((c (car chars))) |
| 125 | (setcar chars | 130 | (setcar chars |