Mercurial > emacs
changeset 47580:eb43274136af
(select-safe-coding-system): Cope if default-coding-system gives nil
which was then used in `min'.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Mon, 23 Sep 2002 00:20:15 +0000 |
parents | d5e1e2adcb67 |
children | a92deaf38682 |
files | lisp/international/mule-cmds.el |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/international/mule-cmds.el Mon Sep 23 00:17:51 2002 +0000 +++ b/lisp/international/mule-cmds.el Mon Sep 23 00:20:15 2002 +0000 @@ -723,9 +723,10 @@ (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*"