branch: externals/idlwave
commit 20dcf5b49605c89310ab94100e227777d7027a24
Author: JD Smith <jdtsm...@gmail.com>
Commit: JD Smith <jdtsm...@gmail.com>

    Look for pro/fun only for indent in MAIN-level routine.
---
 idlwave.el | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/idlwave.el b/idlwave.el
index ae4d0c0816..ebd8dbe949 100644
--- a/idlwave.el
+++ b/idlwave.el
@@ -1286,7 +1286,9 @@ only by whitespace.")
   "Regular expression to find the beginning of a block. The case does
 not matter. The search skips matches in comments.")
 
-(defconst idlwave-begin-unit-reg "^\\s-*\\(pro\\|function\\)\\>\\|\\`"
+(defconst idlwave-profun-reg "^\\s-*\\(pro\\|function\\)\\>")
+
+(defconst idlwave-begin-unit-reg (concat idlwave-profun-reg "\\|\\`")
   "Regular expression to find the beginning of a unit. The case does
 not matter.")
 
@@ -2960,7 +2962,7 @@ Inserts spaces before markers at point."
                      (setq beg-prev-pos (point)))
                    0)
                   ;; Main block
-                  ((idlwave-look-at idlwave-begin-unit-reg t)
+                  ((idlwave-look-at idlwave-profun-reg t)
                    (+ (idlwave-current-statement-indent)
                       idlwave-main-block-indent))
                   ;; Begin block

Reply via email to