branch: elpa/flycheck
commit 596fa68e3cb583dc8052e0441c323f9c26ef677b
Author: Bozhidar Batsov <[email protected]>
Commit: Bozhidar Batsov <[email protected]>

    Force C locale for checker processes
    
    Set LC_ALL=C in the process environment when spawning checker
    subprocesses to ensure English output.  Without this, non-English
    locales cause checkers like gcc to output translated error/warning
    keywords that don't match flycheck's regex patterns.
    
    Fixes #1859
---
 flycheck.el | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/flycheck.el b/flycheck.el
index 997577cd18..286ee47bbd 100644
--- a/flycheck.el
+++ b/flycheck.el
@@ -6345,7 +6345,10 @@ and rely on Emacs' own buffering and chunking."
                ;; more efficient and more robust than PTYs, which Emacs uses by
                ;; default, and since we don't need any job control features, we
                ;; can easily use pipes.
-               (process-connection-type nil))
+               (process-connection-type nil)
+               ;; Force English messages from checker processes so that
+               ;; error patterns can match reliably.
+               (process-environment (cons "LC_ALL=C" process-environment)))
           ;; We do not associate the process with any buffer, by
           ;; passing nil for the BUFFER argument of `start-process'.
           ;; Instead, we just remember the buffer being checked in a

Reply via email to