diff options
| author | Eli Zaretskii | 2002-02-08 12:01:14 +0000 |
|---|---|---|
| committer | Eli Zaretskii | 2002-02-08 12:01:14 +0000 |
| commit | 45610c983765e9b1d2dcff846b8a97096f751800 (patch) | |
| tree | ab562b5870856e75db087723082369160053dc0c | |
| parent | a32a48572a1d8460f3ffccb25ddf50091ace22ba (diff) | |
| download | emacs-45610c983765e9b1d2dcff846b8a97096f751800.tar.gz emacs-45610c983765e9b1d2dcff846b8a97096f751800.zip | |
(select-safe-coding-system): State the buffer's name in the message
popped in the *Warning* buffer, and make sure the offending buffer
is displayed.
| -rw-r--r-- | lisp/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/international/mule-cmds.el | 25 |
2 files changed, 22 insertions, 9 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0d0d3e33f59..7b1df5ce627 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2002-02-08 Eli Zaretskii <eliz@is.elta.co.il> | ||
| 2 | |||
| 3 | * international/mule-cmds.el (select-safe-coding-system): State | ||
| 4 | the buffer's name in the message popped in the *Warning* buffer, | ||
| 5 | and make sure the offending buffer is displayed. | ||
| 6 | |||
| 1 | 2002-02-07 Markus Rost <rost@math.ohio-state.edu> | 7 | 2002-02-07 Markus Rost <rost@math.ohio-state.edu> |
| 2 | 8 | ||
| 3 | * ffap.el (ffap-newsgroup-p): Test for non-nil symbol-value of htb. | 9 | * ffap.el (ffap-newsgroup-p): Test for non-nil symbol-value of htb. |
diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el index ef4e708cc9f..918076672b8 100644 --- a/lisp/international/mule-cmds.el +++ b/lisp/international/mule-cmds.el | |||
| @@ -599,6 +599,7 @@ and TO is ignored." | |||
| 599 | 599 | ||
| 600 | (let ((codings (find-coding-systems-region from to)) | 600 | (let ((codings (find-coding-systems-region from to)) |
| 601 | (coding-system nil) | 601 | (coding-system nil) |
| 602 | (bufname (buffer-name)) | ||
| 602 | (l default-coding-system)) | 603 | (l default-coding-system)) |
| 603 | (if (eq (car codings) 'undecided) | 604 | (if (eq (car codings) 'undecided) |
| 604 | ;; Any coding system is ok. | 605 | ;; Any coding system is ok. |
| @@ -625,6 +626,9 @@ and TO is ignored." | |||
| 625 | (setcar l mime-charset)) | 626 | (setcar l mime-charset)) |
| 626 | (setq l (cdr l)))) | 627 | (setq l (cdr l)))) |
| 627 | 628 | ||
| 629 | ;; Make sure the offending buffer is displayed. | ||
| 630 | (or (stringp from) | ||
| 631 | (pop-to-buffer bufname)) | ||
| 628 | ;; Then ask users to select one form CODINGS. | 632 | ;; Then ask users to select one form CODINGS. |
| 629 | (unwind-protect | 633 | (unwind-protect |
| 630 | (save-window-excursion | 634 | (save-window-excursion |
| @@ -632,15 +636,18 @@ and TO is ignored." | |||
| 632 | (save-excursion | 636 | (save-excursion |
| 633 | (set-buffer standard-output) | 637 | (set-buffer standard-output) |
| 634 | (if (not default-coding-system) | 638 | (if (not default-coding-system) |
| 635 | (insert "No default coding systems to try.") | 639 | (insert "No default coding systems to try for " |
| 636 | (insert "These default coding systems were tried") | 640 | (if (stringp from) |
| 637 | (if (stringp from) | 641 | (format "string \"%s\"." from) |
| 638 | (insert " to encode \"" | 642 | (format "buffer `%s'." bufname))) |
| 639 | (if (> (length from) 10) | 643 | (insert |
| 640 | (substring from 0 10) | 644 | "These default coding systems were tried to encode" |
| 641 | from) | 645 | (if (stringp from) |
| 642 | "...\"")) | 646 | (concat " \"" (if (> (length from) 10) |
| 643 | (insert ":\n") | 647 | (concat (substring from 0 10) "...\"") |
| 648 | (concat from "\""))) | ||
| 649 | (format " text\nin the buffer `%s'" bufname)) | ||
| 650 | ":\n") | ||
| 644 | (let ((pos (point)) | 651 | (let ((pos (point)) |
| 645 | (fill-prefix " ")) | 652 | (fill-prefix " ")) |
| 646 | (mapcar (function (lambda (x) | 653 | (mapcar (function (lambda (x) |