aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2017-06-22 09:47:48 -0400
committerStefan Monnier2017-06-22 09:47:48 -0400
commit0ee2e853abfe2c6ed1f4fd105c0a52fd93b271fb (patch)
tree9cfb34045e21be47b9f1936e6845a78f935483b1
parent386a3da920482b8cb3e962fb944d135c8a770e26 (diff)
downloademacs-0ee2e853abfe2c6ed1f4fd105c0a52fd93b271fb.tar.gz
emacs-0ee2e853abfe2c6ed1f4fd105c0a52fd93b271fb.zip
* 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."
413 (multibyte-p enable-multibyte-characters) 413 (multibyte-p enable-multibyte-characters)
414 (overlays (mapcar (lambda (o) (overlay-properties o)) 414 (overlays (mapcar (lambda (o) (overlay-properties o))
415 (overlays-at pos))) 415 (overlays-at pos)))
416 (char-description (if (not multibyte-p) 416 (char-description (if (< char 128)
417 (single-key-description char) 417 (single-key-description char)
418 (if (< char 128) 418 (string (if (not multibyte-p)
419 (single-key-description char) 419 (decode-char 'eight-bit char)
420 (string-to-multibyte 420 char))))
421 (char-to-string char)))))
422 (text-props-desc 421 (text-props-desc
423 (let ((tmp-buf (generate-new-buffer " *text-props*"))) 422 (let ((tmp-buf (generate-new-buffer " *text-props*")))
424 (unwind-protect 423 (unwind-protect
@@ -635,7 +634,9 @@ relevant to POS."
635 ("buffer code" 634 ("buffer code"
636 ,(if multibyte-p 635 ,(if multibyte-p
637 (encoded-string-description 636 (encoded-string-description
638 (string-as-unibyte (char-to-string char)) nil) 637 (encode-coding-string (char-to-string char)
638 'emacs-internal)
639 nil)
639 (format "#x%02X" char))) 640 (format "#x%02X" char)))
640 ("file code" 641 ("file code"
641 ,@(if multibyte-p 642 ,@(if multibyte-p
@@ -704,7 +705,6 @@ relevant to POS."
704 (called-interactively-p 'interactive)) 705 (called-interactively-p 'interactive))
705 (with-help-window (help-buffer) 706 (with-help-window (help-buffer)
706 (with-current-buffer standard-output 707 (with-current-buffer standard-output
707 (set-buffer-multibyte multibyte-p)
708 (let ((formatter (format "%%%ds:" max-width))) 708 (let ((formatter (format "%%%ds:" max-width)))
709 (dolist (elt item-list) 709 (dolist (elt item-list)
710 (when (cadr elt) 710 (when (cadr elt)