diff options
| author | Richard M. Stallman | 1998-10-20 18:50:13 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1998-10-20 18:50:13 +0000 |
| commit | 547745f5b307956de4e3d1f49697a189afa0122b (patch) | |
| tree | 70d5382c73f945472f1edcef3b8bb7921a6492a2 | |
| parent | 1554c03bdd0d5a3b98c9d9b9f00451edeeb6ef49 (diff) | |
| download | emacs-547745f5b307956de4e3d1f49697a189afa0122b.tar.gz emacs-547745f5b307956de4e3d1f49697a189afa0122b.zip | |
(sh-mode): Handle .spec and .mspec files.
(sh-font-lock-keywords): Handle rpm and rpm2.
(sh-ancestor-alist): Handle rpm.
| -rw-r--r-- | lisp/progmodes/sh-script.el | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index 472eb53951b..eec351c5cc4 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el | |||
| @@ -80,7 +80,8 @@ | |||
| 80 | (tcsh . csh) | 80 | (tcsh . csh) |
| 81 | (wksh . ksh88) | 81 | (wksh . ksh88) |
| 82 | (wsh . sh) | 82 | (wsh . sh) |
| 83 | (zsh . ksh88)) | 83 | (zsh . ksh88) |
| 84 | (rpm . sh)) | ||
| 84 | "*Alist showing the direct ancestor of various shells. | 85 | "*Alist showing the direct ancestor of various shells. |
| 85 | This is the basis for `sh-feature'. See also `sh-alias-alist'. | 86 | This is the basis for `sh-feature'. See also `sh-alias-alist'. |
| 86 | By default we have the following three hierarchies: | 87 | By default we have the following three hierarchies: |
| @@ -634,7 +635,11 @@ See `sh-feature'.") | |||
| 634 | (shell eval sh-append executable-font-lock-keywords | 635 | (shell eval sh-append executable-font-lock-keywords |
| 635 | '("\\\\[^A-Za-z0-9]" 0 font-lock-string-face) | 636 | '("\\\\[^A-Za-z0-9]" 0 font-lock-string-face) |
| 636 | '("\\${?\\([A-Za-z_][A-Za-z0-9_]*\\|[0-9]+\\|[$*_]\\)" 1 | 637 | '("\\${?\\([A-Za-z_][A-Za-z0-9_]*\\|[0-9]+\\|[$*_]\\)" 1 |
| 637 | font-lock-variable-name-face))) | 638 | font-lock-variable-name-face)) |
| 639 | (rpm eval sh-append rpm2 | ||
| 640 | '("%{?\\(\\sw+\\)" 1 font-lock-keyword-face)) | ||
| 641 | (rpm2 eval sh-append shell | ||
| 642 | '("^\\(\\sw+\\):" 1 font-lock-variable-name-face))) | ||
| 638 | "Default expressions to highlight in Shell Script modes. See `sh-feature'.") | 643 | "Default expressions to highlight in Shell Script modes. See `sh-feature'.") |
| 639 | 644 | ||
| 640 | (defvar sh-font-lock-keywords-1 | 645 | (defvar sh-font-lock-keywords-1 |
| @@ -768,8 +773,10 @@ with your script for an edit-interpret-debug cycle." | |||
| 768 | (let ((interpreter | 773 | (let ((interpreter |
| 769 | (save-excursion | 774 | (save-excursion |
| 770 | (goto-char (point-min)) | 775 | (goto-char (point-min)) |
| 771 | (if (looking-at "#![ \t]?\\([^ \t\n]*/bin/env[ \t]\\)?\\([^ \t\n]+\\)") | 776 | (cond ((looking-at "#![ \t]?\\([^ \t\n]*/bin/env[ \t]\\)?\\([^ \t\n]+\\)") |
| 772 | (match-string 2))))) | 777 | (match-string 2)) |
| 778 | ((string-match "\\.m?spec$" buffer-file-name) | ||
| 779 | "rpm"))))) | ||
| 773 | (if interpreter | 780 | (if interpreter |
| 774 | (sh-set-shell interpreter nil nil) | 781 | (sh-set-shell interpreter nil nil) |
| 775 | (progn | 782 | (progn |