branch: externals/auctex
commit 2152678c29cfa1949281a5a87e90a5cb905e6fe8
Author: Ikumi Keita <[email protected]>
Commit: Ikumi Keita <[email protected]>
Change regexp for clarity
* preview.el.in (preview--decode-^^ab): Change regexp "[\x00-\xFF]+" to
"[^[:multibyte:]]+" for clarity that it matches raw 8-bit bytes.
---
preview.el.in | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/preview.el.in b/preview.el.in
index 91b3467..5d777dd 100644
--- a/preview.el.in
+++ b/preview.el.in
@@ -2654,11 +2654,14 @@ Return a new string."
;; Raw 8-bit characters can arise if the latex outputs multibyte
;; characters with partial ^^-quoting.
(let ((result ""))
- (while (string-match "[\x00-\xFF]+" string)
- ;; Strings between "\x80" and "\xFF" represent raw 8-bit, not
- ;; unicode characters between U+0080 and U+00FF. The latter
- ;; are represented by "\u0080" and so on in literal string.
- ;; See Info node `(elisp)Non-ASCII Characters in Strings'.
+ ;; Here we want to collect all the ASCII and raw 8-bit bytes,
+ ;; excluding proper multibyte characters. The regexp
+ ;; [^[:multibyte:]]+ serves for that purpose. The alternative
+ ;; [\x00-\xFF]+ does the job as well at least for emacs 24-26, so
+ ;; use it instead if the former becomes invalid in future.
+ ;; N.B. [[:unibyte:]]+ doesn't match raw 8-bit bytes, contrary to
+ ;; naive expectation.
+ (while (string-match "[^[:multibyte:]]+" string)
(setq result
(concat result
(substring string 0 (match-beginning 0))
_______________________________________________
auctex-diffs mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/auctex-diffs