aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/international/mule-cmds.el
diff options
context:
space:
mode:
authorRichard M. Stallman <[email protected]>2002-09-23 00:20:26 +0000
committerRichard M. Stallman <[email protected]>2002-09-23 00:20:26 +0000
commitd775b378ef01921aca715271d06f26a1d3a754c8 (patch)
treebdbe1f66229d4aae351d8afac4cdda9c5393b6ef /lisp/international/mule-cmds.el
parentc86237b26e214f8fc651298e8fe405cde658aeb0 (diff)
(select-safe-coding-system): Cope if default-coding-system gives nil
which was then used in `min'.
Diffstat (limited to 'lisp/international/mule-cmds.el')
-rw-r--r--lisp/international/mule-cmds.el5
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el
index 4eaf6184a9..1f657700fc 100644
--- a/lisp/international/mule-cmds.el
+++ b/lisp/international/mule-cmds.el
@@ -723,9 +723,10 @@ and TO is ignored."
(let ((window-configuration (current-window-configuration)))
(save-excursion
;; Make sure the offending buffer is displayed.
- (when (and default-coding-system (not (stringp from)))
+ (when (and (consp default-coding-system) (not (stringp from)))
(pop-to-buffer bufname)
- (goto-char (apply 'min (mapcar #'(lambda (x) (car (cadr x)))
+ ;; The `or' is because sometimes (car (cadr x)) is nil.
+ (goto-char (apply 'min (mapcar #'(lambda (x) (or (car (cadr x)) (point-max)))
default-coding-system))))
;; Then ask users to select one from CODINGS.
(with-output-to-temp-buffer "*Warning*"