branch: elpa/flycheck
commit 88f68a3c9088afe5a97b92d93bbca48d0c030081
Author: Bozhidar Batsov <[email protected]>
Commit: Bozhidar Batsov <[email protected]>
[Fix #2177] Avoid \N{} escapes that break Emacs 32 native compilation
Emacs 32 signals invalid-read-syntax on \N{...} named character
escapes during async native compilation, so spell out the bidi
isolation characters with plain \u escapes instead.
---
CHANGES.rst | 2 ++
flycheck.el | 6 ++++--
test/specs/test-overlays.el | 2 +-
3 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/CHANGES.rst b/CHANGES.rst
index 56213312cc..6688fffcae 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -1,6 +1,8 @@
``master`` (unreleased)
=======================
+- [#2177]: Avoid ``\N{...}`` character escapes, which break native
+ compilation on Emacs 32.
- Add ``asciidoc-mode`` support to the ``asciidoctor`` and ``textlint``
checkers, alongside the existing ``adoc-mode``.
- Add ``neocaml-opam-mode`` support to the ``opam`` checker.
diff --git a/flycheck.el b/flycheck.el
index 0282687b98..7771fa3fe8 100644
--- a/flycheck.el
+++ b/flycheck.el
@@ -3900,8 +3900,10 @@ beginning position)."
(concat (and other-file-p (format "In %S:\n" (file-relative-name fname)))
(and include-snippet
(when-let* ((snippet (flycheck-error-format-snippet err)))
- (format-message "`\N{FIRST STRONG ISOLATE}%s\N{POP
DIRECTIONAL ISOLATE}': "
- snippet)))
+ ;; \u2068 (FIRST STRONG ISOLATE) and \u2069 (POP
+ ;; DIRECTIONAL ISOLATE); the equivalent \N{...} escapes
+ ;; break native compilation on Emacs 32 (#2177)
+ (format-message "`\u2068%s\u2069': " snippet)))
(or (flycheck-error-message err)
(format "Unknown %S" (flycheck-error-level err)))
(and id (format " [%s]" id)))))
diff --git a/test/specs/test-overlays.el b/test/specs/test-overlays.el
index 446df94b1c..8109268d56 100644
--- a/test/specs/test-overlays.el
+++ b/test/specs/test-overlays.el
@@ -239,6 +239,6 @@
(let ((text-quoting-style 'grave))
(expect (help-at-pt-string)
:to-equal
- "`\N{FIRST STRONG ISOLATE}int main() {}\N{POP DIRECTIONAL
ISOLATE}': info\n`\N{FIRST STRONG ISOLATE}main\N{POP DIRECTIONAL ISOLATE}':
warning\n`\N{FIRST STRONG ISOLATE}main()\N{POP DIRECTIONAL ISOLATE}':
error"))))))
+ "`\u2068int main() {}\u2069': info\n`\u2068main\u2069':
warning\n`\u2068main()\u2069': error"))))))
;;; test-overlays.el ends here