Mercurial > emacs
changeset 24417:8a8615132482
(select-safe-coding-system): Be sure
to show a buffer being decoded.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Sat, 27 Feb 1999 04:28:31 +0000 |
parents | 3d446442b6a0 |
children | 882205f5e5b9 |
files | lisp/international/mule-cmds.el |
diffstat | 1 files changed, 8 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/international/mule-cmds.el Sat Feb 27 02:14:10 1999 +0000 +++ b/lisp/international/mule-cmds.el Sat Feb 27 04:28:31 1999 +0000 @@ -482,7 +482,7 @@ (and default-coding-system (coding-system-get default-coding-system 'safe-charsets)))) - overlays) + show-position overlays) (save-excursion ;; Highlight characters that default-coding-system can't encode. (when (integerp from) @@ -492,8 +492,8 @@ (re-search-forward "[^\000-\177]" to t)) (setq found (assq (char-charset (preceding-char)) non-safe-chars)))) - (beginning-of-line) - (set-window-start (selected-window) (point)) + (forward-line -1) + (setq show-position (point)) (save-excursion (while (and (< (length overlays) 256) (re-search-forward "[^\000-\177]" to t)) @@ -507,7 +507,11 @@ ;; At last, ask a user to select a proper coding system. (unwind-protect (save-window-excursion - ;; 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*" (save-excursion (set-buffer standard-output)