diff options
| author | Miles Bader | 2006-08-16 14:08:49 +0000 |
|---|---|---|
| committer | Miles Bader | 2006-08-16 14:08:49 +0000 |
| commit | de20e0ccdb039a2ac27e5bbd3e06ab70c4e7bb65 (patch) | |
| tree | 80243ce02b52cbf7945c614bd213dd63142b861a /lisp/progmodes/sh-script.el | |
| parent | 7a5c2a42040b12b037940a067aee6ac6fde01680 (diff) | |
| parent | 5ebdc2990a95cc38b21f772eea4de3ceee149e54 (diff) | |
| download | emacs-de20e0ccdb039a2ac27e5bbd3e06ab70c4e7bb65.tar.gz emacs-de20e0ccdb039a2ac27e5bbd3e06ab70c4e7bb65.zip | |
Merge from emacs--devo--0
Patches applied:
* emacs--devo--0 (patch 382-398)
- Update from CVS
- Update from erc--emacs--22
- Fix ERC bug introduced in last patch
- Merge from gnus--rel--5.10
* gnus--rel--5.10 (patch 123-125)
- Update from CVS
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-101
Diffstat (limited to 'lisp/progmodes/sh-script.el')
| -rw-r--r-- | lisp/progmodes/sh-script.el | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index f748bb4b040..a08f999f089 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el | |||
| @@ -986,7 +986,9 @@ subshells can nest." | |||
| 986 | ;; FIXME: This can (and often does) match multiple lines, yet it makes no | 986 | ;; FIXME: This can (and often does) match multiple lines, yet it makes no |
| 987 | ;; effort to handle multiline cases correctly, so it ends up being | 987 | ;; effort to handle multiline cases correctly, so it ends up being |
| 988 | ;; rather flakey. | 988 | ;; rather flakey. |
| 989 | (when (re-search-forward "\"\\(?:\\(?:.\\|\n\\)*?[^\\]\\(?:\\\\\\\\\\)*\\)??\\(\\$(\\|`\\)" limit t) | 989 | (when (and (re-search-forward "\"\\(?:\\(?:.\\|\n\\)*?[^\\]\\(?:\\\\\\\\\\)*\\)??\\(\\$(\\|`\\)" limit t) |
| 990 | ;; Make sure the " we matched is an opening quote. | ||
| 991 | (eq ?\" (nth 3 (syntax-ppss)))) | ||
| 990 | ;; bingo we have a $( or a ` inside a "" | 992 | ;; bingo we have a $( or a ` inside a "" |
| 991 | (let ((char (char-after (point))) | 993 | (let ((char (char-after (point))) |
| 992 | (continue t) | 994 | (continue t) |
| @@ -1081,9 +1083,6 @@ This is used to flag quote characters in subshell constructs inside strings | |||
| 1081 | ("\\(\\\\\\)'" 1 ,sh-st-punc) | 1083 | ("\\(\\\\\\)'" 1 ,sh-st-punc) |
| 1082 | ;; Make sure $@ and @? are correctly recognized as sexps. | 1084 | ;; Make sure $@ and @? are correctly recognized as sexps. |
| 1083 | ("\\$\\([?@]\\)" 1 ,sh-st-symbol) | 1085 | ("\\$\\([?@]\\)" 1 ,sh-st-symbol) |
| 1084 | ;; highlight (possibly nested) subshells inside "" quoted regions correctly. | ||
| 1085 | (sh-quoted-subshell | ||
| 1086 | (1 (sh-apply-quoted-subshell) t t)) | ||
| 1087 | ;; Find HEREDOC starters and add a corresponding rule for the ender. | 1086 | ;; Find HEREDOC starters and add a corresponding rule for the ender. |
| 1088 | (sh-font-lock-here-doc | 1087 | (sh-font-lock-here-doc |
| 1089 | (2 (sh-font-lock-open-heredoc | 1088 | (2 (sh-font-lock-open-heredoc |
| @@ -1093,7 +1092,11 @@ This is used to flag quote characters in subshell constructs inside strings | |||
| 1093 | (and (match-beginning 3) (/= (match-beginning 3) (match-end 3)))) | 1092 | (and (match-beginning 3) (/= (match-beginning 3) (match-end 3)))) |
| 1094 | nil t)) | 1093 | nil t)) |
| 1095 | ;; Distinguish the special close-paren in `case'. | 1094 | ;; Distinguish the special close-paren in `case'. |
| 1096 | (")" 0 (sh-font-lock-paren (match-beginning 0))))) | 1095 | (")" 0 (sh-font-lock-paren (match-beginning 0))) |
| 1096 | ;; highlight (possibly nested) subshells inside "" quoted regions correctly. | ||
| 1097 | ;; This should be at the very end because it uses syntax-ppss. | ||
| 1098 | (sh-quoted-subshell | ||
| 1099 | (1 (sh-apply-quoted-subshell) t t)))) | ||
| 1097 | 1100 | ||
| 1098 | (defun sh-font-lock-syntactic-face-function (state) | 1101 | (defun sh-font-lock-syntactic-face-function (state) |
| 1099 | (let ((q (nth 3 state))) | 1102 | (let ((q (nth 3 state))) |