branch: externals/relint
commit 762f3f8bd946c68ced3d5b6dc60dccf30ce0732e
Author: Mattias Engdegård <matti...@acm.org>
Commit: Mattias Engdegård <matti...@acm.org>

    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")

Reply via email to