changeset 23511:8b4cdcbaf071

(sh-font-lock-keywords): Don't crash for an unrecognized shell.
author Richard M. Stallman <rms@gnu.org>
date Wed, 21 Oct 1998 03:47:41 +0000
parents 104ab9156299
children 1cd5555e67a9
files lisp/progmodes/sh-script.el
diffstat 1 files changed, 6 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- 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."