From: Richard M. Stallman Date: Mon, 23 Sep 2002 00:20:26 +0000 (+0000) Subject: (select-safe-coding-system): Cope if default-coding-system gives nil X-Git-Tag: ttn-vms-21-2-B4~13087 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d775b378ef01921aca715271d06f26a1d3a754c8;p=emacs.git (select-safe-coding-system): Cope if default-coding-system gives nil which was then used in `min'. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0f71c5c6d2d..0b4a17dc047 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2002-09-22 Richard M. Stallman + + * international/mule-cmds.el (select-safe-coding-system): Cope if + default-coding-system gives nil which was then used in `min'. + + * mail/sendmail.el (sendmail-send-it): If user's buffer + is unibyte, make tembuf unibyte. + 2002-09-22 Kai Gro,b_(Bjohann * net/tramp.el: Version 2.0.22 released. diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el index 4eaf6184a91..1f657700fc8 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*"