From e7b348b08ac5cea01141ece6b06f95c6d0b8c292 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Wed, 10 Aug 2022 15:31:59 +0300 Subject: [PATCH] Fix 'describe-char' in "C" locale * lisp/descr-text.el (describe-char): Avoid assertions if 'buffer-file-coding-system' is nil. (Bug#57066) --- lisp/descr-text.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/descr-text.el b/lisp/descr-text.el index 16971aa6611..7fad031add6 100644 --- a/lisp/descr-text.el +++ b/lisp/descr-text.el @@ -655,7 +655,9 @@ The character information includes: ("file code" ,@(if multibyte-p (let* ((coding buffer-file-coding-system) - (encoded (encode-coding-char char coding charset))) + (encoded + (and coding + (encode-coding-char char coding charset)))) (if encoded (list (encoded-string-description encoded coding) (format "(encoded by coding system %S)" -- 2.39.2