diff options
| author | Stefan Monnier | 2007-07-16 16:01:04 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2007-07-16 16:01:04 +0000 |
| commit | e58914d089a2918f052e1a87c761199aa24945ac (patch) | |
| tree | 2e0aa29e6faed8a894ed45dfa65da83d44f0afff | |
| parent | 1499cfbada1d9e6c0f23bc24649e23cd66fa4c78 (diff) | |
| download | emacs-e58914d089a2918f052e1a87c761199aa24945ac.tar.gz emacs-e58914d089a2918f052e1a87c761199aa24945ac.zip | |
(sh-font-lock-quoted-subshell): Skip over the
whole $( rather than just the $. Rename from sh-quoted-subshell.
(sh-font-lock-syntactic-keywords): Adjust call accordingly.
| -rw-r--r-- | lisp/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/progmodes/sh-script.el | 7 |
2 files changed, 10 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c2a6b6525a2..973e5eeaee5 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2007-07-16 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * progmodes/sh-script.el (sh-font-lock-quoted-subshell): Skip over the | ||
| 4 | whole $( rather than just the $. Rename from sh-quoted-subshell. | ||
| 5 | (sh-font-lock-syntactic-keywords): Adjust call accordingly. | ||
| 6 | |||
| 1 | 2007-07-16 Thien-Thi Nguyen <ttn@gnuvola.org> | 7 | 2007-07-16 Thien-Thi Nguyen <ttn@gnuvola.org> |
| 2 | 8 | ||
| 3 | * emacs-lisp/lisp-mode.el (calculate-lisp-indent): In the | 9 | * emacs-lisp/lisp-mode.el (calculate-lisp-indent): In the |
diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index 4eea5e4925d..8a8d23db169 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el | |||
| @@ -986,7 +986,7 @@ Point is at the beginning of the next line." | |||
| 986 | ;; This looks silly, but it's because `sh-here-doc-re' keeps changing. | 986 | ;; This looks silly, but it's because `sh-here-doc-re' keeps changing. |
| 987 | (re-search-forward sh-here-doc-re limit t)) | 987 | (re-search-forward sh-here-doc-re limit t)) |
| 988 | 988 | ||
| 989 | (defun sh-quoted-subshell (limit) | 989 | (defun sh-font-lock-quoted-subshell (limit) |
| 990 | "Search for a subshell embedded in a string. | 990 | "Search for a subshell embedded in a string. |
| 991 | Find all the unescaped \" characters within said subshell, remembering that | 991 | Find all the unescaped \" characters within said subshell, remembering that |
| 992 | subshells can nest." | 992 | subshells can nest." |
| @@ -1018,6 +1018,7 @@ subshells can nest." | |||
| 1018 | (t (push state states) (setq state 'backquote)))) | 1018 | (t (push state states) (setq state 'backquote)))) |
| 1019 | (?\$ (if (not (eq (char-after (1+ (point))) ?\()) | 1019 | (?\$ (if (not (eq (char-after (1+ (point))) ?\()) |
| 1020 | nil | 1020 | nil |
| 1021 | (forward-char 1) | ||
| 1021 | (case state | 1022 | (case state |
| 1022 | (t (push state states) (setq state 'code))))) | 1023 | (t (push state states) (setq state 'code))))) |
| 1023 | (?\( (case state | 1024 | (?\( (case state |
| @@ -1026,7 +1027,7 @@ subshells can nest." | |||
| 1026 | (?\) (case state | 1027 | (?\) (case state |
| 1027 | (double-quote nil) | 1028 | (double-quote nil) |
| 1028 | (t (setq state (pop states))))) | 1029 | (t (setq state (pop states))))) |
| 1029 | (t (error "Internal error in sh-quoted-subshell"))) | 1030 | (t (error "Internal error in sh-font-lock-quoted-subshell"))) |
| 1030 | (forward-char 1))) | 1031 | (forward-char 1))) |
| 1031 | t)) | 1032 | t)) |
| 1032 | 1033 | ||
| @@ -1111,7 +1112,7 @@ subshells can nest." | |||
| 1111 | (")" 0 (sh-font-lock-paren (match-beginning 0))) | 1112 | (")" 0 (sh-font-lock-paren (match-beginning 0))) |
| 1112 | ;; highlight (possibly nested) subshells inside "" quoted regions correctly. | 1113 | ;; highlight (possibly nested) subshells inside "" quoted regions correctly. |
| 1113 | ;; This should be at the very end because it uses syntax-ppss. | 1114 | ;; This should be at the very end because it uses syntax-ppss. |
| 1114 | (sh-quoted-subshell))) | 1115 | (sh-font-lock-quoted-subshell))) |
| 1115 | 1116 | ||
| 1116 | (defun sh-font-lock-syntactic-face-function (state) | 1117 | (defun sh-font-lock-syntactic-face-function (state) |
| 1117 | (let ((q (nth 3 state))) | 1118 | (let ((q (nth 3 state))) |