changeset 81909:bf55b9b62e57

(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.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Mon, 16 Jul 2007 16:01:04 +0000
parents 51950d0d44d8
children fbf992fc2463
files lisp/ChangeLog lisp/progmodes/sh-script.el
diffstat 2 files changed, 10 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Mon Jul 16 14:59:10 2007 +0000
+++ b/lisp/ChangeLog	Mon Jul 16 16:01:04 2007 +0000
@@ -1,3 +1,9 @@
+2007-07-16  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* progmodes/sh-script.el (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.
+
 2007-07-16  Thien-Thi Nguyen  <ttn@gnuvola.org>
 
 	* emacs-lisp/lisp-mode.el (calculate-lisp-indent): In the
--- a/lisp/progmodes/sh-script.el	Mon Jul 16 14:59:10 2007 +0000
+++ b/lisp/progmodes/sh-script.el	Mon Jul 16 16:01:04 2007 +0000
@@ -986,7 +986,7 @@
   ;; This looks silly, but it's because `sh-here-doc-re' keeps changing.
   (re-search-forward sh-here-doc-re limit t))
 
-(defun sh-quoted-subshell (limit)
+(defun sh-font-lock-quoted-subshell (limit)
   "Search for a subshell embedded in a string.
 Find all the unescaped \" characters within said subshell, remembering that
 subshells can nest."
@@ -1018,6 +1018,7 @@
                  (t (push state states) (setq state 'backquote))))
           (?\$ (if (not (eq (char-after (1+ (point))) ?\())
                    nil
+                 (forward-char 1)
                  (case state
                    (t (push state states) (setq state 'code)))))
           (?\( (case state
@@ -1026,7 +1027,7 @@
           (?\) (case state
                  (double-quote nil)
                  (t (setq state (pop states)))))
-          (t (error "Internal error in sh-quoted-subshell")))
+          (t (error "Internal error in sh-font-lock-quoted-subshell")))
         (forward-char 1)))
     t))
             
@@ -1111,7 +1112,7 @@
     (")" 0 (sh-font-lock-paren (match-beginning 0)))
     ;; highlight (possibly nested) subshells inside "" quoted regions correctly.
     ;; This should be at the very end because it uses syntax-ppss.
-    (sh-quoted-subshell)))
+    (sh-font-lock-quoted-subshell)))
 
 (defun sh-font-lock-syntactic-face-function (state)
   (let ((q (nth 3 state)))