From: Richard M. Stallman Date: Wed, 21 Oct 1998 03:47:41 +0000 (+0000) Subject: (sh-font-lock-keywords): Don't crash for an unrecognized shell. X-Git-Tag: emacs-20.4~1438 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b946fbad3930f39d8afd3ab0f2dbe5927cf9b6ea;p=emacs.git (sh-font-lock-keywords): Don't crash for an unrecognized shell. --- diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index eec351c5cc4..53e9d6ab151 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el @@ -794,11 +794,12 @@ with your script for an edit-interpret-debug cycle." "Function to get simple fontification based on `sh-font-lock-keywords'. This adds rules for comments and assignments." (sh-feature sh-font-lock-keywords - (lambda (list) - `((,(sh-feature sh-assignment-regexp) - 1 font-lock-variable-name-face) - ,@keywords - ,@list)))) + (when (stringp (sh-feature sh-assignment-regexp)) + (lambda (list) + `((,(sh-feature sh-assignment-regexp) + 1 font-lock-variable-name-face) + ,@keywords + ,@list))))) (defun sh-font-lock-keywords-1 (&optional builtins) "Function to get better fontification including keywords."