[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 6308f0738d: Fix Flymake diagnostics reporting in non-UTF-8 locale
From: |
Eli Zaretskii |
Subject: |
master 6308f0738d: Fix Flymake diagnostics reporting in non-UTF-8 locales |
Date: |
Thu, 19 May 2022 04:02:44 -0400 (EDT) |
branch: master
commit 6308f0738d3b1c1e0add5cab87bf02097fb1a8d1
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>
Fix Flymake diagnostics reporting in non-UTF-8 locales
* lisp/progmodes/elisp-mode.el (elisp-flymake-byte-compile)
(elisp-flymake--batch-compile-for-flymake): Bind I/O encoding to
UTF-8, instead of relying on the locale's defaults. This is
needed because ELisp files use UTF-8 by default, but Flymake
doesn't know about that, since it isn't specific to ELisp.
---
lisp/progmodes/elisp-mode.el | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el
index 1ae1cf7eb6..37fd4fdb3c 100644
--- a/lisp/progmodes/elisp-mode.el
+++ b/lisp/progmodes/elisp-mode.el
@@ -2088,7 +2088,9 @@ current buffer state and calls REPORT-FN when done."
(when (process-live-p elisp-flymake--byte-compile-process)
(kill-process elisp-flymake--byte-compile-process)))
(let ((temp-file (make-temp-file "elisp-flymake-byte-compile"))
- (source-buffer (current-buffer)))
+ (source-buffer (current-buffer))
+ (coding-system-for-write 'utf-8-unix)
+ (coding-system-for-read 'utf-8))
(save-restriction
(widen)
(write-region (point-min) (point-max) temp-file nil 'nomessage))
@@ -2138,6 +2140,8 @@ Runs in a batch-mode Emacs. Interactively use variable
(interactive (list buffer-file-name))
(let* ((file (or file
(car command-line-args-left)))
+ (coding-system-for-read 'utf-8-unix)
+ (coding-system-for-write 'utf-8)
(byte-compile-log-buffer
(generate-new-buffer " *dummy-byte-compile-log-buffer*"))
(byte-compile-dest-file-function #'ignore)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 6308f0738d: Fix Flymake diagnostics reporting in non-UTF-8 locales,
Eli Zaretskii <=