From: Richard M. Stallman Date: Sun, 21 Jul 2002 20:24:38 +0000 (+0000) Subject: (ucs-quail-activate): Cope if buffer-file-coding-system is nil. X-Git-Tag: ttn-vms-21-2-B4~13936 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=5b5b46b84153560bf0ae3335fde28c6a1dc8e247;p=emacs.git (ucs-quail-activate): Cope if buffer-file-coding-system is nil. --- diff --git a/lisp/international/ucs-tables.el b/lisp/international/ucs-tables.el index e59e7b3872a..99307ae60ea 100644 --- a/lisp/international/ucs-tables.el +++ b/lisp/international/ucs-tables.el @@ -2474,10 +2474,12 @@ Interactively, prompts for a hex string giving the code." (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)))))