[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
feature/native-comp 72c1a41: Have native compiler always preserve multib
From: |
Andrea Corallo |
Subject: |
feature/native-comp 72c1a41: Have native compiler always preserve multibyte strings (bug#45342) |
Date: |
Sun, 20 Dec 2020 15:22:22 -0500 (EST) |
branch: feature/native-comp
commit 72c1a41573a96a39482a001bfeb3230c471a5681
Author: Andrea Corallo <akrl@sdf.org>
Commit: Andrea Corallo <akrl@sdf.org>
Have native compiler always preserve multibyte strings (bug#45342)
* lisp/emacs-lisp/comp.el (comp-final): Escape multibyte string
when offloading compilation to child process.
* test/src/comp-test-funcs.el (comp-test-45342-f): New function
* test/src/comp-tests.el (bug-45342): New test
---
lisp/emacs-lisp/comp.el | 1 +
test/src/comp-test-funcs.el | 5 +++++
test/src/comp-tests.el | 5 +++++
3 files changed, 11 insertions(+)
diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el
index 2cff362..c6f192d 100644
--- a/lisp/emacs-lisp/comp.el
+++ b/lisp/emacs-lisp/comp.el
@@ -2863,6 +2863,7 @@ Prepare every function for final compilation and drive
the C back-end."
(print-quoted t)
(print-gensym t)
(print-circle t)
+ (print-escape-multibyte t)
(expr `(progn
(require 'comp)
(setf comp-verbose ,comp-verbose
diff --git a/test/src/comp-test-funcs.el b/test/src/comp-test-funcs.el
index 5fa427b..5fc032b 100644
--- a/test/src/comp-test-funcs.el
+++ b/test/src/comp-test-funcs.el
@@ -390,6 +390,11 @@
(setq dir (directory-file-name (file-name-directory dir))))
(nreverse dirlist)))
+(defun comp-test-45342-f (n)
+ (pcase n
+ (1 " ➊") (2 " ➋") (3 " ➌") (4 " ➍") (5 " ➎") (6 " ➏")
+ (7 " ➐") (8 " ➑") (9 " ➒") (10 " ➓") (_ "")))
+
;;;;;;;;;;;;;;;;;;;;
;; Tromey's tests ;;
diff --git a/test/src/comp-tests.el b/test/src/comp-tests.el
index e73fc65..68201de 100644
--- a/test/src/comp-tests.el
+++ b/test/src/comp-tests.el
@@ -396,6 +396,11 @@
https://lists.gnu.org/archive/html/bug-gnu-emacs/2020-03/msg00914.html."
"<https://lists.gnu.org/archive/html/bug-gnu-emacs/2020-11/msg02357.html>"
(comp-test-44968-f "/tmp/test/foo" "/tmp"))
+(comp-deftest bug-45342 ()
+ "Preserve multibyte immediate strings.
+<https://lists.gnu.org/archive/html/bug-gnu-emacs/2020-12/msg01771.html>"
+ (should (string= " ➊" (comp-test-45342-f 1))))
+
(defvar comp-test-primitive-advice)
(comp-deftest primitive-advice ()
"Test effectiveness of primitive advicing."
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- feature/native-comp 72c1a41: Have native compiler always preserve multibyte strings (bug#45342),
Andrea Corallo <=