From: Eli Zaretskii Date: Fri, 8 Feb 2002 12:01:14 +0000 (+0000) Subject: (select-safe-coding-system): State the buffer's name in the message X-Git-Tag: ttn-vms-21-2-B4~16780 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=45610c983765e9b1d2dcff846b8a97096f751800;p=emacs.git (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. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0d0d3e33f59..7b1df5ce627 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2002-02-08 Eli Zaretskii + + * international/mule-cmds.el (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. + 2002-02-07 Markus Rost * 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." (let ((codings (find-coding-systems-region from to)) (coding-system nil) + (bufname (buffer-name)) (l default-coding-system)) (if (eq (car codings) 'undecided) ;; Any coding system is ok. @@ -625,6 +626,9 @@ and TO is ignored." (setcar l mime-charset)) (setq l (cdr l)))) + ;; Make sure the offending buffer is displayed. + (or (stringp from) + (pop-to-buffer bufname)) ;; Then ask users to select one form CODINGS. (unwind-protect (save-window-excursion @@ -632,15 +636,18 @@ and TO is ignored." (save-excursion (set-buffer standard-output) (if (not default-coding-system) - (insert "No default coding systems to try.") - (insert "These default coding systems were tried") - (if (stringp from) - (insert " to encode \"" - (if (> (length from) 10) - (substring from 0 10) - from) - "...\"")) - (insert ":\n") + (insert "No default coding systems to try for " + (if (stringp from) + (format "string \"%s\"." from) + (format "buffer `%s'." bufname))) + (insert + "These default coding systems were tried to encode" + (if (stringp from) + (concat " \"" (if (> (length from) 10) + (concat (substring from 0 10) "...\"") + (concat from "\""))) + (format " text\nin the buffer `%s'" bufname)) + ":\n") (let ((pos (point)) (fill-prefix " ")) (mapcar (function (lambda (x)