From 6c0f1c26d296132e37b2508a00efc73f3df95b0c Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Wed, 30 Sep 2020 05:43:07 +0200 Subject: [PATCH] Don't have C-x = bug out in a "C" locale with non-ASCII chars * lisp/simple.el (what-cursor-position): Ensure that we always have a coding system here, even if the locale is "C" (bug#40702). --- lisp/simple.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lisp/simple.el b/lisp/simple.el index 6bc41961eba..fef22c2fa6f 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -1533,7 +1533,11 @@ in *Help* buffer. See also the command `describe-char'." encoded encoding-msg display-prop under-display) (if (or (not coding) (eq (coding-system-type coding) t)) - (setq coding (default-value 'buffer-file-coding-system))) + (setq coding (or (default-value 'buffer-file-coding-system) + ;; A nil value of `buffer-file-coding-system' + ;; means "no conversion" which means each byte + ;; is a char and vice versa. + 'binary))) (if (eq (char-charset char) 'eight-bit) (setq encoding-msg (format "(%d, #o%o, #x%x%s, raw-byte)" char char char char-name-fmt)) -- 2.39.5