+2002-02-08 Eli Zaretskii <eliz@is.elta.co.il>
+
+ * 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 <rost@math.ohio-state.edu>
* ffap.el (ffap-newsgroup-p): Test for non-nil symbol-value of htb.
(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.
(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
(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)