Project

General

Profile

Bug #660

Emacs UI: endfunc does not indent the line

Added by John Abbott over 9 years ago. Updated about 4 years ago.

Status:
New
Priority:
Low
Assignee:
-
Category:
EmacsUI
Target version:
Start date:
22 Jan 2015
Due date:
% Done:

0%

Estimated time:
Spent time:

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 about 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 about 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...

Also available in: Atom PDF