aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2007-07-16 16:01:04 +0000
committerStefan Monnier2007-07-16 16:01:04 +0000
commite58914d089a2918f052e1a87c761199aa24945ac (patch)
tree2e0aa29e6faed8a894ed45dfa65da83d44f0afff
parent1499cfbada1d9e6c0f23bc24649e23cd66fa4c78 (diff)
downloademacs-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/ChangeLog6
-rw-r--r--lisp/progmodes/sh-script.el7
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 @@
12007-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
12007-07-16 Thien-Thi Nguyen <ttn@gnuvola.org> 72007-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.
991Find all the unescaped \" characters within said subshell, remembering that 991Find all the unescaped \" characters within said subshell, remembering that
992subshells can nest." 992subshells 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)))