summaryrefslogtreecommitdiff
path: root/lisp/format.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>2002-06-21 09:53:47 +0000
committerRichard M. Stallman <rms@gnu.org>2002-06-21 09:53:47 +0000
commit8a2f1176c437e6787bde6dd19822c38109a9c226 (patch)
treed01b3a81c9d237153e6ddc8cf129106e4dc4d8e5 /lisp/format.el
parent5cfe1cece18547a3a7548450a5f06287f531dfbd (diff)
downloademacs-8a2f1176c437e6787bde6dd19822c38109a9c226.tar.gz
(format-annotate-function): Copy multibyte flag
and selective-display into the new temp buffer.
Diffstat (limited to 'lisp/format.el')
-rw-r--r--lisp/format.el7
1 files changed, 6 insertions, 1 deletions
diff --git a/lisp/format.el b/lisp/format.el
index ad7a22bba91..715374bb50f 100644
--- a/lisp/format.el
+++ b/lisp/format.el
@@ -221,7 +221,12 @@ For most purposes, consider using `format-encode-region' instead."
(if modify
;; To-function wants to modify region. Copy to safe place.
(let ((copy-buf (get-buffer-create (format " *Format Temp %d*"
- format-count))))
+ format-count)))
+ (sel-disp selective-display)
+ (multibyte enable-multibyte-characters))
+ (with-current-buffer copy-buf
+ (setq selective-display sel-disp)
+ (set-buffer-multibyte multibyte))
(copy-to-buffer copy-buf from to)
(set-buffer copy-buf)
(format-insert-annotations write-region-annotations-so-far from)