Mercurial > emacs
changeset 22302:fb2d8c0920c6
(coding-system-mnemonic): Don't crash if arg is nil.
author | Karl Heuer <kwzh@gnu.org> |
---|---|
date | Mon, 01 Jun 1998 03:01:30 +0000 |
parents | 80bfa3fcb7fb |
children | d6cc394c34b4 |
files | lisp/international/mule.el |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/international/mule.el Mon Jun 01 02:59:23 1998 +0000 +++ b/lisp/international/mule.el Mon Jun 01 03:01:30 1998 +0000 @@ -364,10 +364,10 @@ (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."