Commit fcdc4d67 authored by Kenichi Handa's avatar Kenichi Handa
Browse files

(select-safe-coding-system): Be sure

to show a buffer being decoded.
parent 1b3172da
......@@ -482,7 +482,7 @@ and TO is ignored."
(and default-coding-system
(coding-system-get default-coding-system
show-position overlays)
;; Highlight characters that default-coding-system can't encode.
(when (integerp from)
......@@ -492,8 +492,8 @@ and TO is ignored."
(re-search-forward "[^\000-\177]" to t))
(setq found (assq (char-charset (preceding-char))
(set-window-start (selected-window) (point))
(forward-line -1)
(setq show-position (point))
(while (and (< (length overlays) 256)
(re-search-forward "[^\000-\177]" to t))
......@@ -507,7 +507,11 @@ and TO is ignored."
;; At last, ask a user to select a proper coding system.
;; At first, show a helpful message.
(when show-position
;; At first, be sure to show the current buffer.
(set-window-buffer (selected-window) (current-buffer))
(set-window-start (selected-window) show-position))
;; Then, show a helpful message.
(with-output-to-temp-buffer "*Warning*"
(set-buffer standard-output)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment