Commit 3a723c3a authored by Stefan Monnier's avatar Stefan Monnier
Browse files

(sh-quoted-subshell): Further fix last change.

parent bde07895
2006-07-20 Stefan Monnier <monnier@iro.umontreal.ca>
* progmodes/sh-script.el (sh-quoted-subshell): Further fix last change.
2006-07-20 Jay Belanger <belanger@truman.edu>
 
* calc.el (calc-previous-alg-entry): Remove variable.
......@@ -35,14 +39,14 @@
 
2006-07-20 Alan Mackenzie <acm@muc.de>
 
* progmodes/cc-langs.el (c-emacs-variable-inits): new variable.
(c-lang-setvar): new macro.
* progmodes/cc-langs.el (c-emacs-variable-inits): New variable.
(c-lang-setvar): New macro.
(c-make-init-lang-vars-fun): Use the initialization forms in
c-emacs-variable-inits in addition to those in c-lang-variable-inits.
(comment-start, comment-end, comment-start-skip): Change these from
c-lang-defvar's to c-lang-setvar's.
 
* progmodes/cc-mode.el (c-make-emacs-variables-local): new macro,
* progmodes/cc-mode.el (c-make-emacs-variables-local): New macro,
which calls make-local-variable on the elements of
c-emacs-variable-inits.
(c-init-language-vars-for): Call this new macro.
......
......@@ -980,12 +980,13 @@ Point is at the beginning of the next line."
(re-search-forward sh-here-doc-re limit t))
(defun sh-quoted-subshell (limit)
"Search for a subshell embedded in a string. Find all the unescaped
\" characters within said subshell, remembering that subshells can nest."
"Search for a subshell embedded in a string.
Find all the unescaped \" characters within said subshell, remembering that
subshells can nest."
;; FIXME: This can (and often does) match multiple lines, yet it makes no
;; effort to handle multiline cases correctly, so it ends up being
;; rather flakey.
(if (re-search-forward "\"\\(?:\\(?:.\\|\n\\)*?[^\\]\\(\\\\\\\\\\)*\\)??\\(\\$(\\|`\\)" limit t)
(when (re-search-forward "\"\\(?:\\(?:.\\|\n\\)*?[^\\]\\(?:\\\\\\\\\\)*\\)??\\(\\$(\\|`\\)" limit t)
;; bingo we have a $( or a ` inside a ""
(let ((char (char-after (point)))
(continue t)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment