From: Karl Heuer Date: Mon, 1 Jun 1998 03:01:30 +0000 (+0000) Subject: (coding-system-mnemonic): Don't crash if arg is nil. X-Git-Tag: emacs-20.3~775 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6e2c88407b6bde37780d0a6943dcba7758cb72b7;p=emacs.git (coding-system-mnemonic): Don't crash if arg is nil. --- diff --git a/lisp/international/mule.el b/lisp/international/mule.el index 438839479ba..b085b90b70f 100644 --- a/lisp/international/mule.el +++ b/lisp/international/mule.el @@ -364,10 +364,10 @@ of CODING-SYSTEM. See the function `make-coding-system' for more detail." (defun coding-system-mnemonic (coding-system) "Return the mnemonic character of CODING-SYSTEM. -A mnemonic character of a coding system is used in mode line -to indicate the coding system." - (or (aref (coding-system-spec coding-system) coding-spec-mnemonic-idx) - ?-)) +The mnemonic character of a coding system is used in mode line +to indicate the coding system. If the arg is nil, return ?-." + (let ((spec (coding-system-spec coding-system))) + (if spec (aref spec coding-spec-mnemonic-idx) ?-))) (defun coding-system-doc-string (coding-system) "Return the documentation string for CODING-SYSTEM."