diff options
| author | Richard M. Stallman | 1998-10-21 03:47:41 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1998-10-21 03:47:41 +0000 |
| commit | b946fbad3930f39d8afd3ab0f2dbe5927cf9b6ea (patch) | |
| tree | a7006de8643207d36ee20715381402dd6a977917 | |
| parent | bbdf24fae2374931508d56e6aed14e1800db7e8e (diff) | |
| download | emacs-b946fbad3930f39d8afd3ab0f2dbe5927cf9b6ea.tar.gz emacs-b946fbad3930f39d8afd3ab0f2dbe5927cf9b6ea.zip | |
(sh-font-lock-keywords): Don't crash for an unrecognized shell.
| -rw-r--r-- | lisp/progmodes/sh-script.el | 11 |
1 files 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." | |||
| 794 | "Function to get simple fontification based on `sh-font-lock-keywords'. | 794 | "Function to get simple fontification based on `sh-font-lock-keywords'. |
| 795 | This adds rules for comments and assignments." | 795 | This adds rules for comments and assignments." |
| 796 | (sh-feature sh-font-lock-keywords | 796 | (sh-feature sh-font-lock-keywords |
| 797 | (lambda (list) | 797 | (when (stringp (sh-feature sh-assignment-regexp)) |
| 798 | `((,(sh-feature sh-assignment-regexp) | 798 | (lambda (list) |
| 799 | 1 font-lock-variable-name-face) | 799 | `((,(sh-feature sh-assignment-regexp) |
| 800 | ,@keywords | 800 | 1 font-lock-variable-name-face) |
| 801 | ,@list)))) | 801 | ,@keywords |
| 802 | ,@list))))) | ||
| 802 | 803 | ||
| 803 | (defun sh-font-lock-keywords-1 (&optional builtins) | 804 | (defun sh-font-lock-keywords-1 (&optional builtins) |
| 804 | "Function to get better fontification including keywords." | 805 | "Function to get better fontification including keywords." |