summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2017-06-22 09:47:48 -0400
committerStefan Monnier <monnier@iro.umontreal.ca>2017-06-22 09:47:48 -0400
commit0ee2e853abfe2c6ed1f4fd105c0a52fd93b271fb (patch)
tree9cfb34045e21be47b9f1936e6845a78f935483b1
parent386a3da920482b8cb3e962fb944d135c8a770e26 (diff)
downloademacs-0ee2e853abfe2c6ed1f4fd105c0a52fd93b271fb.tar.gz
* lisp/descr-text.el (describe-char): Avoid string-*-multibyte
Avoid string-to-multibyte and string-as-unibyte. Don't make *Help* unibyte just because the char was in a unibyte buffer.
-rw-r--r--lisp/descr-text.el14
1 files changed, 7 insertions, 7 deletions
diff --git a/lisp/descr-text.el b/lisp/descr-text.el
index 6a6a8ea4479..6f36bbed680 100644
--- a/lisp/descr-text.el
+++ b/lisp/descr-text.el
@@ -413,12 +413,11 @@ relevant to POS."
(multibyte-p enable-multibyte-characters)
(overlays (mapcar (lambda (o) (overlay-properties o))
(overlays-at pos)))
- (char-description (if (not multibyte-p)
+ (char-description (if (< char 128)
(single-key-description char)
- (if (< char 128)
- (single-key-description char)
- (string-to-multibyte
- (char-to-string char)))))
+ (string (if (not multibyte-p)
+ (decode-char 'eight-bit char)
+ char))))
(text-props-desc
(let ((tmp-buf (generate-new-buffer " *text-props*")))
(unwind-protect
@@ -635,7 +634,9 @@ relevant to POS."
("buffer code"
,(if multibyte-p
(encoded-string-description
- (string-as-unibyte (char-to-string char)) nil)
+ (encode-coding-string (char-to-string char)
+ 'emacs-internal)
+ nil)
(format "#x%02X" char)))
("file code"
,@(if multibyte-p
@@ -704,7 +705,6 @@ relevant to POS."
(called-interactively-p 'interactive))
(with-help-window (help-buffer)
(with-current-buffer standard-output
- (set-buffer-multibyte multibyte-p)
(let ((formatter (format "%%%ds:" max-width)))
(dolist (elt item-list)
(when (cadr elt)