File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -254,12 +254,19 @@ negative ARG. Handles bird style literate Haskell too."
254
254
(defun haskell-indentation-newline-and-indent ()
255
255
" Insert newline and indent."
256
256
(interactive )
257
- (delete-horizontal-space )
258
- (newline )
259
- (unless (haskell-indentation-bird-outside-code-p)
257
+ ; ; On RET (or C-j), we:
258
+ ; ; - just jump to the next line if literate haskell, but outside code
259
+ (if (haskell-indentation-bird-outside-code-p)
260
+ (progn
261
+ (delete-horizontal-space )
262
+ (newline ))
260
263
(catch 'parse-error
264
+ ; ; - save the current column
261
265
(let* ((ci (haskell-indentation-current-indentation))
262
266
(indentations (haskell-indentation-find-indentations-safe)))
267
+ ; ; - jump to the next line and reindent to at the least same level
268
+ (delete-horizontal-space )
269
+ (newline )
263
270
(when (haskell-indentation-bird-p)
264
271
(insert " > " ))
265
272
(haskell-indentation-reindent-to
You can’t perform that action at this time.
0 commit comments