File tree 1 file changed +12
-4
lines changed
1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change 42
42
43
43
(defvar haskell-navigate-imports-start-point nil )
44
44
45
+ (defvar haskell-literate ) ; defined in haskell-mode.el
46
+
45
47
;;;### autoload
46
48
(defun haskell-navigate-imports (&optional return )
47
49
" Cycle the Haskell import lines or return to point (with prefix arg)."
81
83
(progn (goto-char (point-min ))
82
84
(if (haskell-navigate-imports-find-forward-line)
83
85
(haskell-navigate-imports-go-internal)
84
- (when (search-forward-regexp " ^module" nil t 1 )
85
- (search-forward " \n\n " nil t 1 ))))))))
86
+ (let ((module (if (eq haskell-literate 'bird )
87
+ " ^> ?module"
88
+ " ^module" )))
89
+ (when (search-forward-regexp module nil t 1 )
90
+ (search-forward " \n\n " nil t 1 )))))))))
86
91
87
92
(defun haskell-navigate-imports-goto-end ()
88
93
" Skip a bunch of consecutive import lines."
105
110
(defun haskell-navigate-imports-line ()
106
111
" Try to match the current line as a regexp."
107
112
(let ((line (buffer-substring-no-properties (line-beginning-position )
108
- (line-end-position ))))
109
- (if (string-match " ^import " line)
113
+ (line-end-position )))
114
+ (import (if (eq haskell-literate 'bird )
115
+ " ^> ?import "
116
+ " ^import " )))
117
+ (if (string-match import line)
110
118
line
111
119
nil )))
112
120
You can’t perform that action at this time.
0 commit comments