]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix 'describe-char' in "C" locale
authorEli Zaretskii <eliz@gnu.org>
Wed, 10 Aug 2022 12:31:59 +0000 (15:31 +0300)
committerEli Zaretskii <eliz@gnu.org>
Wed, 10 Aug 2022 12:31:59 +0000 (15:31 +0300)
* lisp/descr-text.el (describe-char): Avoid assertions if
'buffer-file-coding-system' is nil.  (Bug#57066)

lisp/descr-text.el

index 16971aa66117c1779445832d3a6a69611a7a8f56..7fad031add65ba91b63179eb88e9ec2928a110ce 100644 (file)
@@ -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)"