aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2012-07-17 04:38:12 -0400
committerStefan Monnier2012-07-17 04:38:12 -0400
commitefc26dbecd1b548d6f44267ce13b56dbad8ab783 (patch)
tree856fe3b0b08897bccacdaab5b1a0f30e7177c1a1
parentf5695c9afd17315a5f771091044ffc19ad8b7b2b (diff)
downloademacs-efc26dbecd1b548d6f44267ce13b56dbad8ab783.tar.gz
emacs-efc26dbecd1b548d6f44267ce13b56dbad8ab783.zip
* 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
-rw-r--r--lisp/ChangeLog3
-rw-r--r--lisp/emacs-lisp/trace.el2
-rw-r--r--lisp/progmodes/sh-script.el2
-rw-r--r--test/ChangeLog2
-rwxr-xr-xtest/indent/shell.sh8
5 files changed, 15 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 412b1eb16d6..2516d775243 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,8 @@
12012-07-17 Stefan Monnier <monnier@iro.umontreal.ca> 12012-07-17 Stefan Monnier <monnier@iro.umontreal.ca>
2 2
3 * progmodes/sh-script.el (sh-syntax-propertize-function): Mark "${#VAR"
4 as not-a-comment (bug#11946).
5
3 * emacs-lisp/macroexp.el (macroexp-let2): Use more informative names 6 * emacs-lisp/macroexp.el (macroexp-let2): Use more informative names
4 for uninterned vars. 7 for uninterned vars.
5 8
diff --git a/lisp/emacs-lisp/trace.el b/lisp/emacs-lisp/trace.el
index fd66c9364f2..c6fff7aa443 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
285activated only if the advice of FUNCTION is currently active. If FUNCTION 285activated only if the advice of FUNCTION is currently active. If FUNCTION
286was not traced this is a noop." 286was not traced this is a noop."
287 (interactive 287 (interactive
288 (list (ad-read-advised-function "Untrace function: " 'trace-is-traced))) 288 (list (ad-read-advised-function "Untrace function" 'trace-is-traced)))
289 (when (trace-is-traced function) 289 (when (trace-is-traced function)
290 (ad-remove-advice function 'around trace-advice-name) 290 (ad-remove-advice function 'around trace-advice-name)
291 (ad-update function))) 291 (ad-update function)))
diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el
index f42f661d86c..034cfa4b394 100644
--- a/lisp/progmodes/sh-script.el
+++ b/lisp/progmodes/sh-script.el
@@ -1087,7 +1087,7 @@ subshells can nest."
1087 ;; metacharacters. The list of special chars is taken from 1087 ;; metacharacters. The list of special chars is taken from
1088 ;; the single-unix spec of the shell command language (under 1088 ;; the single-unix spec of the shell command language (under
1089 ;; `quoting') but with `$' removed. 1089 ;; `quoting') but with `$' removed.
1090 ("[^|&;<>()`\\\"' \t\n]\\(#+\\)" (1 "_")) 1090 ("\\(?:[^|&;<>()`\\\"' \t\n]\\|\\${\\)\\(#+\\)" (1 "_"))
1091 ;; In a '...' the backslash is not escaping. 1091 ;; In a '...' the backslash is not escaping.
1092 ("\\(\\\\\\)'" (1 (sh-font-lock-backslash-quote))) 1092 ("\\(\\\\\\)'" (1 (sh-font-lock-backslash-quote)))
1093 ;; Make sure $@ and $? are correctly recognized as sexps. 1093 ;; Make sure $@ and $? are correctly recognized as sexps.
diff --git a/test/ChangeLog b/test/ChangeLog
index ce7e2f02284..f82a395e548 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,5 +1,7 @@
12012-07-17 Stefan Monnier <monnier@iro.umontreal.ca> 12012-07-17 Stefan Monnier <monnier@iro.umontreal.ca>
2 2
3 * indent/shell.sh: Add test case for ${#VAR}.
4
3 * indent/latex-mode.tex: New file. 5 * indent/latex-mode.tex: New file.
4 6
52012-07-11 Stefan Monnier <monnier@iro.umontreal.ca> 72012-07-11 Stefan Monnier <monnier@iro.umontreal.ca>
diff --git a/test/indent/shell.sh b/test/indent/shell.sh
index 26a01dc3bda..957fe74fdee 100755
--- a/test/indent/shell.sh
+++ b/test/indent/shell.sh
@@ -1,9 +1,17 @@
1#!/bin/sh 1#!/bin/sh
2# -*- eval: (bug-reference-mode 1) -*-
2 3
3setlock -n /tmp/getmail.lock && echo getmail isn\'t running 4setlock -n /tmp/getmail.lock && echo getmail isn\'t running
4 5
5# adsgsdg 6# adsgsdg
6 7
8declare -a VERSION
9for i in $(ls "$PREFIX/sbin") ; do
10 echo -e $N')' $i
11 VERSION[${#VERSION[*]}]=$i #bug#11946.
12 N=$(($N + 1))
13done
14
7foo () { 15foo () {
8 16
9 bar () { 17 bar () {