[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/relint 762f3f8 3/5: Work around rx bug in Emacs 26
From: |
Mattias Engdegård |
Subject: |
[elpa] externals/relint 762f3f8 3/5: Work around rx bug in Emacs 26 |
Date: |
Sun, 10 May 2020 10:37:57 -0400 (EDT) |
branch: externals/relint
commit 762f3f8bd946c68ced3d5b6dc60dccf30ce0732e
Author: Mattias Engdegård <address@hidden>
Commit: Mattias Engdegård <address@hidden>
Work around rx bug in Emacs 26
Raw chars in string arguments to (any ...) forms weren't handled
correctly; use pairs with raw char values instead.
Found by Paul Pogonyshev (bug#9).
---
relint.el | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/relint.el b/relint.el
index b946bf4..c90bcce 100644
--- a/relint.el
+++ b/relint.el
@@ -283,7 +283,8 @@ or nil if no position could be determined."
(defun relint--escape-string (str escape-printable)
(replace-regexp-in-string
- (rx (any cntrl "\177-\377" ?\\ ?\"))
+ ;; Use pair notation for raw chars; "\200-\377" is buggy in Emacs 26.
+ (rx (any cntrl ?\177 (#x3fff80 . #x3fffff) ?\\ ?\"))
(lambda (s)
(let ((c (logand (string-to-char s) #xff)))
(or (cdr (assq c '((?\b . "\\b")