@@ -200,19 +200,19 @@ negative ARG. Handles bird style literate Haskell too."
200
200
(if (haskell-indentation-bird-outside-code-p)
201
201
(progn
202
202
(delete-horizontal-space )
203
- (newline ))
204
- ( catch 'parse-error
205
- ; ; - save the current column
206
- ( let* ((ci (haskell-indentation-current-indentation) )
207
- (indentations (haskell-indentation-find-indentations )))
208
- ; ; - jump to the next line and reindent to at the least same level
209
- (delete-horizontal-space )
210
- (newline )
211
- (when (haskell-indentation-bird-p)
212
- (insert " > " ))
213
- (haskell-indentation-reindent-to
214
- (haskell-indentation-next-indentation (- ci 1 ) indentations 'nofail )
215
- 'move ) ))))
203
+ (newline ))
204
+ ; ; - save the current column
205
+ ( let* ((ci (haskell-indentation- current-indentation))
206
+ (indentations ( or (haskell-indentation-find-indentations )
207
+ '( 0 ) )))
208
+ ; ; - jump to the next line and reindent to at the least same level
209
+ (delete-horizontal-space )
210
+ (newline )
211
+ (when (haskell-indentation-bird-p)
212
+ (insert " > " ))
213
+ (haskell-indentation-reindent-to
214
+ (haskell-indentation-next-indentation (- ci 1 ) indentations 'nofail )
215
+ 'move ))))
216
216
217
217
(defun haskell-indentation-next-indentation (col indentations &optional nofail )
218
218
" Find the leftmost indentation which is greater than COL.
@@ -262,11 +262,11 @@ indentation points to the right, we switch going to the left."
262
262
(ci (haskell-indentation-current-indentation))
263
263
(inds (save-excursion
264
264
(move-to-column ci)
265
- (haskell-indentation-find-indentations)))
265
+ (or (haskell-indentation-find-indentations)
266
+ '(0 ))))
266
267
(valid (memq ci inds))
267
268
(cursor-in-whitespace (< cc ci)))
268
- (when (null inds)
269
- (error " returned indentations empty, but no parse error " ))
269
+
270
270
(if (and valid cursor-in-whitespace)
271
271
(move-to-column ci)
272
272
(haskell-indentation-reindent-to
@@ -341,7 +341,8 @@ indentation points to the right, we switch going to the left."
341
341
(ci (haskell-indentation-current-indentation))
342
342
(inds (save-excursion
343
343
(move-to-column ci)
344
- (haskell-indentation-find-indentations)))
344
+ (or (haskell-indentation-find-indentations)
345
+ '(0 ))))
345
346
(cursor-in-whitespace (< cc ci))
346
347
(pi (haskell-indentation-previous-indentation ci inds)))
347
348
(if (null pi)
0 commit comments