]> git.eshelyaron.com Git - emacs.git/commitdiff
(sh-font-lock-keywords): Don't crash for an unrecognized shell.
authorRichard M. Stallman <rms@gnu.org>
Wed, 21 Oct 1998 03:47:41 +0000 (03:47 +0000)
committerRichard M. Stallman <rms@gnu.org>
Wed, 21 Oct 1998 03:47:41 +0000 (03:47 +0000)
lisp/progmodes/sh-script.el

index eec351c5cc49f8493a43c3511fa461d8d520d3a0..53e9d6ab151cf8f7c5ad1229b373487fef93f263 100644 (file)
@@ -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."