aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/international/mule-cmds.el
diff options
context:
space:
mode:
authorEli Zaretskii <[email protected]>2002-02-08 12:01:14 +0000
committerEli Zaretskii <[email protected]>2002-02-08 12:01:14 +0000
commit45610c983765e9b1d2dcff846b8a97096f751800 (patch)
treeab562b5870856e75db087723082369160053dc0c /lisp/international/mule-cmds.el
parenta32a48572a1d8460f3ffccb25ddf50091ace22ba (diff)
(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.
Diffstat (limited to 'lisp/international/mule-cmds.el')
-rw-r--r--lisp/international/mule-cmds.el25
1 files changed, 16 insertions, 9 deletions
diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el
index ef4e708cc9..918076672b 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)