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 @@ -940,20 +940,22 @@ the current buffer."
940
940
; ; ,
941
941
(defun haskell-indentation-separated (parser separator &optional stmt-separator )
942
942
(catch 'return
943
+ (unless (listp separator)
944
+ (setq separator (list separator)))
945
+ (unless (listp stmt-separator)
946
+ (setq stmt-separator (list stmt-separator)))
943
947
(while t
944
948
(funcall parser)
945
- (cond ((if (listp separator)
946
- (member current-token separator)
947
- (equal current-token separator))
949
+ (cond ((member current-token separator)
948
950
(haskell-indentation-at-separator))
949
951
950
- ((equal current-token stmt-separator)
952
+ ((member current-token stmt-separator)
951
953
(setq starter-indent (current-column ))
952
954
(haskell-indentation-at-separator))
953
955
954
956
((eq current-token 'end-tokens )
955
- (cond ((or (equal following-token separator)
956
- (equal following-token stmt-separator))
957
+ (cond ((or (member following-token separator)
958
+ (member following-token stmt-separator))
957
959
; ; set an indentation before a separator,
958
960
; ; for example:
959
961
; ; [ 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