emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r109117: * lisp/progmodes/sh-script.e


From: Stefan Monnier
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r109117: * lisp/progmodes/sh-script.el (sh-syntax-propertize-function): Mark "${#VAR"
Date: Tue, 17 Jul 2012 04:38:12 -0400
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 109117
fixes bug: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11946
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Tue 2012-07-17 04:38:12 -0400
message:
  * lisp/progmodes/sh-script.el (sh-syntax-propertize-function): Mark "${#VAR"
  as not-a-comment.
  * test/indent/shell.sh: Add test case for ${#VAR}.
modified:
  lisp/ChangeLog
  lisp/emacs-lisp/trace.el
  lisp/progmodes/sh-script.el
  test/ChangeLog
  test/indent/shell.sh
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2012-07-17 08:15:06 +0000
+++ b/lisp/ChangeLog    2012-07-17 08:38:12 +0000
@@ -1,5 +1,8 @@
 2012-07-17  Stefan Monnier  <address@hidden>
 
+       * 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.
 

=== modified file 'lisp/emacs-lisp/trace.el'
--- a/lisp/emacs-lisp/trace.el  2012-01-19 07:21:25 +0000
+++ b/lisp/emacs-lisp/trace.el  2012-07-17 08:38:12 +0000
@@ -285,7 +285,7 @@
 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)))

=== modified file 'lisp/progmodes/sh-script.el'
--- a/lisp/progmodes/sh-script.el       2012-07-10 11:51:54 +0000
+++ b/lisp/progmodes/sh-script.el       2012-07-17 08:38:12 +0000
@@ -1087,7 +1087,7 @@
     ;; 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.

=== modified file 'test/ChangeLog'
--- a/test/ChangeLog    2012-07-17 08:11:31 +0000
+++ b/test/ChangeLog    2012-07-17 08:38:12 +0000
@@ -1,5 +1,7 @@
 2012-07-17  Stefan Monnier  <address@hidden>
 
+       * indent/shell.sh: Add test case for ${#VAR}.
+
        * indent/latex-mode.tex: New file.
 
 2012-07-11  Stefan Monnier  <address@hidden>

=== modified file 'test/indent/shell.sh'
--- a/test/indent/shell.sh      2012-04-28 20:04:34 +0000
+++ b/test/indent/shell.sh      2012-07-17 08:38:12 +0000
@@ -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 () {


reply via email to

[Prev in Thread] Current Thread [Next in Thread]