File tree 2 files changed +8
-7
lines changed
2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -925,20 +925,22 @@ the current buffer."
925
925
; ; ,
926
926
(defun haskell-indentation-separated (parser separator &optional stmt-separator )
927
927
(catch 'return
928
+ (unless (listp separator)
929
+ (setq separator (list separator)))
930
+ (unless (listp stmt-separator)
931
+ (setq stmt-separator (list stmt-separator)))
928
932
(while t
929
933
(funcall parser)
930
- (cond ((if (listp separator)
931
- (member current-token separator)
932
- (equal current-token separator))
934
+ (cond ((member current-token separator)
933
935
(haskell-indentation-at-separator))
934
936
935
- ((equal current-token stmt-separator)
937
+ ((member current-token stmt-separator)
936
938
(setq starter-indent (current-column ))
937
939
(haskell-indentation-at-separator))
938
940
939
941
((eq current-token 'end-tokens )
940
- (cond ((or (equal following-token separator)
941
- (equal following-token stmt-separator))
942
+ (cond ((or (member following-token separator)
943
+ (member following-token stmt-separator))
942
944
; ; set an indentation before a separator,
943
945
; ; for example:
944
946
; ; [ 1 or [ 1 | a
Original file line number Diff line number Diff line change @@ -77,7 +77,6 @@ Example of lines:
77
77
78
78
(ert-deftest haskell-indentation-check-4 ()
79
79
" Import statememnt symbol list 2"
80
- :expected-result :failed
81
80
(haskell-indentation-check
82
81
" import Control.Concurrent"
83
82
" ( forkIO"
You can’t perform that action at this time.
0 commit comments