From 76f18b38989e13136c191d40ef5c497161947394 Mon Sep 17 00:00:00 2001 From: Andrea Corallo Date: Fri, 8 Jul 2022 10:27:45 +0200 Subject: [PATCH] Mark async worker tmp file as utf-8 (bug#48029) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * lisp/emacs-lisp/comp.el (comp-final): Mark async worker tmp file as utf-8. * test/src/comp-tests.el (48029-1): New test. * test/src/comp-resources/comp-test-funcs.el (comp-test-48029-nonascii-žžž-f): New function. --- lisp/emacs-lisp/comp.el | 2 +- test/src/comp-resources/comp-test-funcs.el | 2 ++ test/src/comp-tests.el | 5 +++++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el index 73285e0f24..9555bc8bd1 100644 --- a/lisp/emacs-lisp/comp.el +++ b/lisp/emacs-lisp/comp.el @@ -3693,7 +3693,7 @@ comp-final (file-name-base output) "-") nil ".el"))) (with-temp-file temp-file - (insert ";; -*-coding: nil; -*-\n") + (insert ";; -*-coding: utf-8; -*-\n") (mapc (lambda (e) (insert (prin1-to-string e))) expr)) diff --git a/test/src/comp-resources/comp-test-funcs.el b/test/src/comp-resources/comp-test-funcs.el index 0a60f4d6cc..9092f040c8 100644 --- a/test/src/comp-resources/comp-test-funcs.el +++ b/test/src/comp-resources/comp-test-funcs.el @@ -515,6 +515,8 @@ comp-test-47868-3-f (defun comp-test-47868-4-f () #(" " 0 1 (face font-lock-keyword-face))) +(defun comp-test-48029-nonascii-žžž-f (arg) + (when arg t)) ;;;;;;;;;;;;;;;;;;;; diff --git a/test/src/comp-tests.el b/test/src/comp-tests.el index e7b534d00e..c7e81298d2 100644 --- a/test/src/comp-tests.el +++ b/test/src/comp-tests.el @@ -532,6 +532,11 @@ comp-test-47868-1 (should (eq (comp-test-47868-1-f) (comp-test-47868-3-f))) (should (eq (comp-test-47868-2-f) (comp-test-47868-4-f)))) +(comp-deftest 48029-1 () + "" + (should (subr-native-elisp-p + (symbol-function 'comp-test-48029-nonascii-žžž-f)))) + ;;;;;;;;;;;;;;;;;;;;; ;; Tromey's tests. ;; -- 2.25.1