diff options
| author | Kenichi Handa | 1999-02-27 04:28:31 +0000 |
|---|---|---|
| committer | Kenichi Handa | 1999-02-27 04:28:31 +0000 |
| commit | fcdc4d6764666148f9e6e4fcf37c8fac5d709be4 (patch) | |
| tree | 672d28ca973fb114cc9164caf7e083c02df2f230 | |
| parent | 1b3172daa013cd022e4602125f380822509d90cc (diff) | |
| download | emacs-fcdc4d6764666148f9e6e4fcf37c8fac5d709be4.tar.gz emacs-fcdc4d6764666148f9e6e4fcf37c8fac5d709be4.zip | |
(select-safe-coding-system): Be sure
to show a buffer being decoded.
| -rw-r--r-- | lisp/international/mule-cmds.el | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el index 5362e581586..1cc43e8b640 100644 --- a/lisp/international/mule-cmds.el +++ b/lisp/international/mule-cmds.el | |||
| @@ -482,7 +482,7 @@ and TO is ignored." | |||
| 482 | (and default-coding-system | 482 | (and default-coding-system |
| 483 | (coding-system-get default-coding-system | 483 | (coding-system-get default-coding-system |
| 484 | 'safe-charsets)))) | 484 | 'safe-charsets)))) |
| 485 | overlays) | 485 | show-position overlays) |
| 486 | (save-excursion | 486 | (save-excursion |
| 487 | ;; Highlight characters that default-coding-system can't encode. | 487 | ;; Highlight characters that default-coding-system can't encode. |
| 488 | (when (integerp from) | 488 | (when (integerp from) |
| @@ -492,8 +492,8 @@ and TO is ignored." | |||
| 492 | (re-search-forward "[^\000-\177]" to t)) | 492 | (re-search-forward "[^\000-\177]" to t)) |
| 493 | (setq found (assq (char-charset (preceding-char)) | 493 | (setq found (assq (char-charset (preceding-char)) |
| 494 | non-safe-chars)))) | 494 | non-safe-chars)))) |
| 495 | (beginning-of-line) | 495 | (forward-line -1) |
| 496 | (set-window-start (selected-window) (point)) | 496 | (setq show-position (point)) |
| 497 | (save-excursion | 497 | (save-excursion |
| 498 | (while (and (< (length overlays) 256) | 498 | (while (and (< (length overlays) 256) |
| 499 | (re-search-forward "[^\000-\177]" to t)) | 499 | (re-search-forward "[^\000-\177]" to t)) |
| @@ -507,7 +507,11 @@ and TO is ignored." | |||
| 507 | ;; At last, ask a user to select a proper coding system. | 507 | ;; At last, ask a user to select a proper coding system. |
| 508 | (unwind-protect | 508 | (unwind-protect |
| 509 | (save-window-excursion | 509 | (save-window-excursion |
| 510 | ;; At first, show a helpful message. | 510 | (when show-position |
| 511 | ;; At first, be sure to show the current buffer. | ||
| 512 | (set-window-buffer (selected-window) (current-buffer)) | ||
| 513 | (set-window-start (selected-window) show-position)) | ||
| 514 | ;; Then, show a helpful message. | ||
| 511 | (with-output-to-temp-buffer "*Warning*" | 515 | (with-output-to-temp-buffer "*Warning*" |
| 512 | (save-excursion | 516 | (save-excursion |
| 513 | (set-buffer standard-output) | 517 | (set-buffer standard-output) |