599 |
|
|
600 |
(let ((codings (find-coding-systems-region from to)) |
(let ((codings (find-coding-systems-region from to)) |
601 |
(coding-system nil) |
(coding-system nil) |
602 |
|
(bufname (buffer-name)) |
603 |
(l default-coding-system)) |
(l default-coding-system)) |
604 |
(if (eq (car codings) 'undecided) |
(if (eq (car codings) 'undecided) |
605 |
;; Any coding system is ok. |
;; Any coding system is ok. |
626 |
(setcar l mime-charset)) |
(setcar l mime-charset)) |
627 |
(setq l (cdr l)))) |
(setq l (cdr l)))) |
628 |
|
|
629 |
|
;; Make sure the offending buffer is displayed. |
630 |
|
(or (stringp from) |
631 |
|
(pop-to-buffer bufname)) |
632 |
;; Then ask users to select one form CODINGS. |
;; Then ask users to select one form CODINGS. |
633 |
(unwind-protect |
(unwind-protect |
634 |
(save-window-excursion |
(save-window-excursion |
636 |
(save-excursion |
(save-excursion |
637 |
(set-buffer standard-output) |
(set-buffer standard-output) |
638 |
(if (not default-coding-system) |
(if (not default-coding-system) |
639 |
(insert "No default coding systems to try.") |
(insert "No default coding systems to try for " |
640 |
(insert "These default coding systems were tried") |
(if (stringp from) |
641 |
(if (stringp from) |
(format "string \"%s\"." from) |
642 |
(insert " to encode \"" |
(format "buffer `%s'." bufname))) |
643 |
(if (> (length from) 10) |
(insert |
644 |
(substring from 0 10) |
"These default coding systems were tried to encode" |
645 |
from) |
(if (stringp from) |
646 |
"...\"")) |
(concat " \"" (if (> (length from) 10) |
647 |
(insert ":\n") |
(concat (substring from 0 10) "...\"") |
648 |
|
(concat from "\""))) |
649 |
|
(format " text\nin the buffer `%s'" bufname)) |
650 |
|
":\n") |
651 |
(let ((pos (point)) |
(let ((pos (point)) |
652 |
(fill-prefix " ")) |
(fill-prefix " ")) |
653 |
(mapcar (function (lambda (x) |
(mapcar (function (lambda (x) |