From: Stefan Monnier Date: Tue, 17 Jul 2012 08:38:12 +0000 (-0400) Subject: * lisp/progmodes/sh-script.el (sh-syntax-propertize-function): Mark "${#VAR" X-Git-Url: http://git.hcoop.net/bpt/emacs.git/commitdiff_plain/efc26dbecd1b548d6f44267ce13b56dbad8ab783 * lisp/progmodes/sh-script.el (sh-syntax-propertize-function): Mark "${#VAR" as not-a-comment. * test/indent/shell.sh: Add test case for ${#VAR}. Fixes: debbugs:11946 --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 412b1eb16d..2516d77524 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2012-07-17 Stefan Monnier + * progmodes/sh-script.el (sh-syntax-propertize-function): Mark "${#VAR" + as not-a-comment (bug#11946). + * emacs-lisp/macroexp.el (macroexp-let2): Use more informative names for uninterned vars. diff --git a/lisp/emacs-lisp/trace.el b/lisp/emacs-lisp/trace.el index fd66c9364f..c6fff7aa44 100644 --- a/lisp/emacs-lisp/trace.el +++ b/lisp/emacs-lisp/trace.el @@ -285,7 +285,7 @@ Activation is performed with `ad-update', hence remaining advice will get activated only if the advice of FUNCTION is currently active. If FUNCTION was not traced this is a noop." (interactive - (list (ad-read-advised-function "Untrace function: " 'trace-is-traced))) + (list (ad-read-advised-function "Untrace function" 'trace-is-traced))) (when (trace-is-traced function) (ad-remove-advice function 'around trace-advice-name) (ad-update function))) diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index f42f661d86..034cfa4b39 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el @@ -1087,7 +1087,7 @@ subshells can nest." ;; metacharacters. The list of special chars is taken from ;; the single-unix spec of the shell command language (under ;; `quoting') but with `$' removed. - ("[^|&;<>()`\\\"' \t\n]\\(#+\\)" (1 "_")) + ("\\(?:[^|&;<>()`\\\"' \t\n]\\|\\${\\)\\(#+\\)" (1 "_")) ;; In a '...' the backslash is not escaping. ("\\(\\\\\\)'" (1 (sh-font-lock-backslash-quote))) ;; Make sure $@ and $? are correctly recognized as sexps. diff --git a/test/ChangeLog b/test/ChangeLog index ce7e2f0228..f82a395e54 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,5 +1,7 @@ 2012-07-17 Stefan Monnier + * indent/shell.sh: Add test case for ${#VAR}. + * indent/latex-mode.tex: New file. 2012-07-11 Stefan Monnier diff --git a/test/indent/shell.sh b/test/indent/shell.sh index 26a01dc3bd..957fe74fde 100755 --- a/test/indent/shell.sh +++ b/test/indent/shell.sh @@ -1,9 +1,17 @@ #!/bin/sh +# -*- eval: (bug-reference-mode 1) -*- setlock -n /tmp/getmail.lock && echo getmail isn\'t running # adsgsdg +declare -a VERSION +for i in $(ls "$PREFIX/sbin") ; do + echo -e $N')' $i + VERSION[${#VERSION[*]}]=$i #bug#11946. + N=$(($N + 1)) +done + foo () { bar () {