From b946fbad3930f39d8afd3ab0f2dbe5927cf9b6ea Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Wed, 21 Oct 1998 03:47:41 +0000 Subject: [PATCH] (sh-font-lock-keywords): Don't crash for an unrecognized shell. --- lisp/progmodes/sh-script.el | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) 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." -- 2.39.2