From 2b1cb2620aa5396922959ea571f9b30f6671d85a Mon Sep 17 00:00:00 2001 From: Hanno Perrey Date: Thu, 18 Nov 2021 19:11:55 +0100 Subject: [PATCH] fix(mu4e): do not set coding-system-for-read globally `+mu4e-lock-pid-info` had unintentional side effects: it changed `coding-system-for-read` globally. Fix: #5788 --- modules/email/mu4e/autoload/mu-lock.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/email/mu4e/autoload/mu-lock.el b/modules/email/mu4e/autoload/mu-lock.el index 2387f721f..bc79219b4 100644 --- a/modules/email/mu4e/autoload/mu-lock.el +++ b/modules/email/mu4e/autoload/mu-lock.el @@ -16,9 +16,9 @@ "Get info on the PID refered to in `+mu4e-lock-file' in the form (pid . process-attributes) If the file or process do not exist, the lock file is deleted an nil returned." (when (file-exists-p +mu4e-lock-file) - (let* ((pid (string-to-number + (let* ((coding-system-for-read 'utf-8) + (pid (string-to-number (with-temp-buffer - (setq coding-system-for-read 'utf-8) (insert-file-contents +mu4e-lock-file) (buffer-string)))) (process (process-attributes pid)))