OCaml Forge
Bugs
Search the entire project
This project's trackers
This project's tasks
This project's releases
This project's news
Project
People
Advanced search
Log In
New Account
Home
My Page
Projects
Code Snippets
Emacs OCaml Tuareg mode
Summary
Activity
Tracker
Lists
Tasks
News
SCM
Files
Detail: [#1006] record 'with' indentation
Bugs: Browse
|
Download .csv
|
Monitor
[#1006] record 'with' indentation
Date:
2011-07-05 19:17
Priority:
3
State:
Open
Submitted by:
Sean McLaughlin (
seanmcl
)
Assigned to:
Sean McLaughlin (seanmcl)
Hardware:
None
Product:
None
Operating System:
None
Component:
None
Version:
None
Severity:
None
Resolution:
None
URL:
Summary:
record 'with' indentation
Detailed description
Hey, I've noticed what I think is less than optimal behavior with
regards to indentation of records. In particular, I like to write
records with semicolons on the left, e.g.:
let record =
{ x = 3
; y = ()
; z = "foo"
}
in
...
which tuareg indents just fine. However, if I instead try to use a with
statement, it looks more like this:
let record =
{ record with
x = 3
; y = 5
; z = "foo"
}
in
Followup
Message
Date: 2011-12-08 20:09
Sender:
Christophe Troestler
New indentation code is present under SVN which corrects this. Please test with
(setq tuareg-use-smie t)
in your ~/.emacs
Note that such an expression should not occur at the toplevel (it will be badly indented if you try) but
let () =
let record =
{ record with
x = 3
; y = 5
; z = "foo"
}
in
zzz
indents fine.
Attached Files:
Changes:
No Changes Have Been Made to This Item