]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/progmodes/sh-script.el (sh-syntax-propertize-function): Mark "${#VAR"
authorStefan Monnier <monnier@iro.umontreal.ca>
Tue, 17 Jul 2012 08:38:12 +0000 (04:38 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Tue, 17 Jul 2012 08:38:12 +0000 (04:38 -0400)
as not-a-comment.
* test/indent/shell.sh: Add test case for ${#VAR}.

Fixes: debbugs:11946
lisp/ChangeLog
lisp/emacs-lisp/trace.el
lisp/progmodes/sh-script.el
test/ChangeLog
test/indent/shell.sh

index 412b1eb16d6553f64a9093d58a449c2eb010413e..2516d77524364cda3c3bc862eae088ecbfbb7d97 100644 (file)
@@ -1,5 +1,8 @@
 2012-07-17  Stefan Monnier  <monnier@iro.umontreal.ca>
 
+       * 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.
 
index fd66c9364f27e796e930fdd0cc1d505284046b1f..c6fff7aa4430139958b575fd907a219683a05736 100644 (file)
@@ -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)))
index f42f661d86cb66d3829e5754976866221ebdad3e..034cfa4b394b56d8dce5181fdd6131ca447852d4 100644 (file)
@@ -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.
index ce7e2f022845b19b9c99dc2a06f2f0497990da44..f82a395e548a3f9b66e1efbf7b08e562f30cefb4 100644 (file)
@@ -1,5 +1,7 @@
 2012-07-17  Stefan Monnier  <monnier@iro.umontreal.ca>
 
+       * indent/shell.sh: Add test case for ${#VAR}.
+
        * indent/latex-mode.tex: New file.
 
 2012-07-11  Stefan Monnier  <monnier@iro.umontreal.ca>
index 26a01dc3bda39f90876449a2b8a8be50ac52a136..957fe74fdeed82f890c7de6da669857636e47d86 100755 (executable)
@@ -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 () {