@@ -210,7 +210,7 @@ negative ARG. Handles bird style literate Haskell too."
210
210
(catch 'parse-error
211
211
; ; - save the current column
212
212
(let* ((ci (haskell-indentation-current-indentation))
213
- (indentations (haskell-indentation-find-indentations-safe )))
213
+ (indentations (haskell-indentation-find-indentations)))
214
214
; ; - jump to the next line and reindent to at the least same level
215
215
(delete-horizontal-space )
216
216
(newline )
@@ -261,20 +261,18 @@ indentation points to the right, we switch going to the left."
261
261
(unless (save-excursion
262
262
(beginning-of-line )
263
263
(nth 8 (syntax-ppss )))
264
- ; ; parse error is intentionally not catched here, it may come from
265
- ; ; `haskell-indentation-find-indentations-safe ' , but escapes the scope
264
+ ; ; parse error is intentionally not cought here, it may come from
265
+ ; ; `haskell-indentation-find-indentations' , but escapes the scope
266
266
; ; and aborts the opertaion before any moving happens
267
267
(let* ((cc (current-column ))
268
268
(ci (haskell-indentation-current-indentation))
269
269
(inds (save-excursion
270
270
(move-to-column ci)
271
- (haskell-indentation-find-indentations-safe )))
271
+ (haskell-indentation-find-indentations)))
272
272
(valid (memq ci inds))
273
273
(cursor-in-whitespace (< cc ci)))
274
- ; ; can't happen right now, because of -safe, but we may want to have
275
- ; ; this in the future
276
- ; ; (when (null inds)
277
- ; ; (error "returned indentations empty, but no parse error"))
274
+ (when (null inds)
275
+ (error " returned indentations empty, but no parse error " ))
278
276
(if (and valid cursor-in-whitespace)
279
277
(move-to-column ci)
280
278
(haskell-indentation-reindent-to
@@ -349,7 +347,7 @@ indentation points to the right, we switch going to the left."
349
347
(ci (haskell-indentation-current-indentation))
350
348
(inds (save-excursion
351
349
(move-to-column ci)
352
- (haskell-indentation-find-indentations-safe )))
350
+ (haskell-indentation-find-indentations)))
353
351
(cursor-in-whitespace (< cc ci))
354
352
(pi (haskell-indentation-previous-indentation ci inds)))
355
353
(if (null pi)
@@ -485,11 +483,6 @@ indentation points to the right, we switch going to the left."
485
483
(t
486
484
(haskell-indentation-parse-to-indentations)))))
487
485
488
- ; ; XXX: this is a hack, the parser shouldn't return nil without parse-error
489
- (defun haskell-indentation-find-indentations-safe ()
490
- (or (haskell-indentation-find-indentations)
491
- (haskell-indentation-first-indentation)))
492
-
493
486
(defconst haskell-indentation-unicode-tokens
494
487
'((" →" . " ->" ) ; ; #x2192 RIGHTWARDS ARROW
495
488
(" ∷" . " ::" ) ; ; #x2237 PROPORTION
0 commit comments