Bug #660
Emacs UI: endfunc does not indent the line
Description
When I use C-c C-e
to add the relevant end-keyword it usually automatically indents the line; the indenting does not occur when the keyword is func...endfunc
.
History
#1 Updated by Anna Maria Bigatti over 9 years ago
It works fine for me (and my cocoa5.el is cvs'ed).
Maybe you should check you are not including an older cocoa5.el?
#2 Updated by John Abbott over 4 years ago
I confirm that the bug is still there.
Here is a test case:
define anna(x) return func(y) ImportByValue x; return x+y [C-c C-e]
It is important that the line containing func
is wrongly indented before typing the key sequence C-c C-e
The indentation does not change.
#3 Updated by John Abbott over 4 years ago
The important point is that (automatic) indentation works only if the start-keyword is the first text on a line.
This can be seen from the defn of cocoa5-autoindent-lines-re
(around line 300 in cocoa5.el
).
I have also verified it by testing with input like this:
define john(x) x:= -x; if x < 0 then return x [C-c C-e]
Since
if
is not the first word on the line, no auto-indent occurs...