(opascal-enclosing-indent-of): Ignore decls "neutered" by delimiter.
(throw 'done (opascal-stmt-line-indent-of
(or last-token token) opascal-indent-level)))
- ;; We indent relative to an enclosing declaration section.
- ((opascal-is token-kind opascal-decl-sections)
+ ;; We indent relative to an enclosing declaration section,
+ ;; unless this is within the a delimited expression
+ ;; (bug#36348).
+ ((and (not expr-delimited)
+ (opascal-is token-kind opascal-decl-sections))
(throw 'done (opascal-indent-of (if last-token last-token token)
opascal-indent-level)))
--- /dev/null
+{ -*- opascal -*- }
+
+procedure Toto ();
+begin
+ for i := 0 to 1 do
+ Write (str.Chars[i]);
+
+ // bug#36348
+ for var i := 0 to 1 do
+ Write (str.Chars[i]);
+
+end;