Project

General

Profile

Bug #468

Emacs UI: indentation is wrong after ?keyword

Added by John Abbott about 10 years ago. Updated about 10 years ago.

Status:
New
Priority:
Low
Assignee:
-
Category:
EmacsUI
Target version:
Start date:
12 Mar 2014
Due date:
% Done:

0%

Estimated time:
Spent time:

Description

I have identified one case where indentation in a cocoa5 file goes wrong.
I have checked that C-c C-e is confused too.

The file contained the line

? Foreach

after that line indentation was wrong (as though the code were inside a Foreach block :-))

Modify the emacs UI code so that keywords are ignored when appearing after a ? (the same way they are ignored in strings and comments)

History

#1 Updated by John Abbott about 10 years ago

Recall that ? simply has to be the first non-space character in a command (and not the first non-space character on a line). So I believe we can treat ? in much the same way as -- (rest of line comment)

I have given this low priority because I think it is typically quite rare for a cocoa5 file to contain ?keyword as a line (except in a teaching context). Anyway, it would be nice to sort this out sooner or later.

#2 Updated by John Abbott about 10 years ago

I guess the relevant fn is cocoa5-calculate-indent on line cocoa5.el:716

AARRGHHH it's almost 100 lines long

#3 Updated by John Abbott about 10 years ago

I felt better before looking at this code...
Giving up!

#4 Updated by Anna Maria Bigatti about 10 years ago

  • Target version set to CoCoA-5.1.0 Easter14

#5 Updated by John Abbott about 10 years ago

  • Target version changed from CoCoA-5.1.0 Easter14 to CoCoA-5.?.?

Also available in: Atom PDF