From: Stefan Monnier Date: Thu, 17 Oct 2013 03:56:51 +0000 (-0400) Subject: * lisp/progmodes/sh-script.el (sh-find-prev-matching): Disable SMIE's X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~1238 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=85527ff309fc9ac5fbda80b119f021719902cc7c;p=emacs.git * lisp/progmodes/sh-script.el (sh-find-prev-matching): Disable SMIE's forward-sexp-function while we redo its job. Fixes: debbugs:15613 --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 542a9108d32..bbff921661d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2013-10-17 Stefan Monnier + + * progmodes/sh-script.el (sh-find-prev-matching): Disable SMIE's + forward-sexp-function while we redo its job (bug#15613). + 2013-10-17 Jay Belanger * calc/calc-comb.el (math-prime-test): Don't assume large integers are diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index ec73a06955c..f834d7f3217 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el @@ -3097,6 +3097,7 @@ This takes into account that there may be nested open..close pairings. OPEN and CLOSE are regexps denoting the tokens to be matched. Optional parameter DEPTH (usually 1) says how many to look for." (let ((parse-sexp-ignore-comments t) + (forward-sexp-function nil) prev) (setq depth (or depth 1)) (save-excursion diff --git a/test/indent/shell.sh b/test/indent/shell.sh index 790656501d1..e402398b996 100755 --- a/test/indent/shell.sh +++ b/test/indent/shell.sh @@ -5,6 +5,12 @@ setlock -n /tmp/getmail.lock && echo getmail isn\'t running # adsgsdg +if foo; then + if bar; then + toto + fi +fi # bug#15613 + case $X in foo) do_something