[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/auctex 2152678 04/67: Change regexp for clarity
From: |
Tassilo Horn |
Subject: |
[elpa] externals/auctex 2152678 04/67: Change regexp for clarity |
Date: |
Fri, 8 Feb 2019 11:40:28 -0500 (EST) |
branch: externals/auctex
commit 2152678c29cfa1949281a5a87e90a5cb905e6fe8
Author: Ikumi Keita <address@hidden>
Commit: Ikumi Keita <address@hidden>
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))
- [elpa] externals/auctex updated (eca4ffe -> f34ce5a), Tassilo Horn, 2019/02/08
- [elpa] externals/auctex 2152678 04/67: Change regexp for clarity,
Tassilo Horn <=
- [elpa] externals/auctex 1ea64ff 01/67: Extract caption for RefTeX's label context, Tassilo Horn, 2019/02/08
- [elpa] externals/auctex 0970844 02/67: Deal with partial ^^-quoting in preview-latex, Tassilo Horn, 2019/02/08
- [elpa] externals/auctex 3694373 05/67: Deal with space in path of MikTeX gs executable (Bug#32251), Tassilo Horn, 2019/02/08
- [elpa] externals/auctex 10047fb 07/67: * style/fancyvrb.el (LaTeX-fancyvrb-key-val-options): Add vspace key., Tassilo Horn, 2019/02/08
- [elpa] externals/auctex c8a8d47 08/67: Don't block emacs during viewing document, Tassilo Horn, 2019/02/08
- [elpa] externals/auctex f213b1b 10/67: Set `TeX-command-buffer' always (bug#33377), Tassilo Horn, 2019/02/08
- [elpa] externals/auctex 06226ea 09/67: Adjust preview-latex in case sub file isn't in master directory, Tassilo Horn, 2019/02/08
- [elpa] externals/auctex d8c6f94 06/67: Improve style/fancyvrb.el, Tassilo Horn, 2019/02/08
- [elpa] externals/auctex 7ede3be 03/67: Make style hooks associated with class options valid again, Tassilo Horn, 2019/02/08
- [elpa] externals/auctex dad0c60 11/67: Surround both \langle and \rangle with math delimiter, Tassilo Horn, 2019/02/08