Commit 87ad8a11 authored by Stefan Monnier's avatar Stefan Monnier

* lisp/progmodes/opascal.el: Allow inline `var` decl in `for` (bug#36348)

(opascal-enclosing-indent-of): Ignore decls "neutered" by delimiter.
parent d0eeb62c
Pipeline #2519 passed with stage
in 61 minutes and 28 seconds
......@@ -1177,8 +1177,11 @@ routine.")
(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)))
......
{ -*- 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;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment