# HG changeset patch # User Richard M. Stallman # Date 908941661 0 # Node ID 8b4cdcbaf071a3ced1ea385e40021a6be8364c53 # Parent 104ab91562991cc7a76e760ac8dc7feae6fc6fce (sh-font-lock-keywords): Don't crash for an unrecognized shell. diff -r 104ab9156299 -r 8b4cdcbaf071 lisp/progmodes/sh-script.el --- a/lisp/progmodes/sh-script.el Tue Oct 20 22:34:50 1998 +0000 +++ b/lisp/progmodes/sh-script.el Wed Oct 21 03:47:41 1998 +0000 @@ -794,11 +794,12 @@ "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."