]> git.eshelyaron.com Git - emacs.git/commitdiff
Don't have C-x = bug out in a "C" locale with non-ASCII chars
authorStefan Monnier <monnier@iro.umontreal.ca>
Wed, 30 Sep 2020 03:43:07 +0000 (05:43 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Wed, 30 Sep 2020 03:43:07 +0000 (05:43 +0200)
* 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

index 6bc41961eba543be9b10f4059bac9f96bc6294b5..fef22c2fa6f648585992799c1345c97e1d56319c 100644 (file)
@@ -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))