Mercurial > emacs
diff lisp/international/ucs-tables.el @ 46598:6262acd6c7ac
(ucs-quail-activate): Cope if buffer-file-coding-system is nil.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sun, 21 Jul 2002 20:24:38 +0000 |
parents | a7f933a7b003 |
children | 18dd2c15c04c |
line wrap: on
line diff
--- a/lisp/international/ucs-tables.el Sun Jul 21 20:23:32 2002 +0000 +++ b/lisp/international/ucs-tables.el Sun Jul 21 20:24:38 2002 +0000 @@ -2474,10 +2474,12 @@ (defun ucs-quail-activate () "Set up an appropriate `translation-table-for-input' for current buffer. Intended to be added to `quail-activate-hook'." - (let ((cs (coding-system-base buffer-file-coding-system))) + (let ((cs (and buffer-file-coding-system + (coding-system-base buffer-file-coding-system)))) (if (eq cs 'undecided) - (setq cs (coding-system-base default-buffer-file-coding-system))) - (if (coding-system-get cs 'translation-table-for-input) + (setq cs (and default-buffer-file-coding-system + (coding-system-base default-buffer-file-coding-system)))) + (if (and cs (coding-system-get cs 'translation-table-for-input)) (set (make-variable-buffer-local 'translation-table-for-input) (coding-system-get cs 'translation-table-for-input)))))