File tree 1 file changed +5
-4
lines changed
1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 86
86
(defconst idris-ipkg-font-lock-defaults
87
87
`(, idris-ipkg-keywords ))
88
88
89
+ (defconst idris-ipkg-sourcedir-re
90
+ " ^sourcedir\\ s-*=\\ s-*\" ?\\ ([a-zA-Z/0-9]+\\ )\" ?" )
91
+ ; ; "^\\ s-*sourcedir\\ s-*=\\ s-*\\ (\\ sw+\\ )"
89
92
90
93
; ;; Completion
91
94
142
145
(goto-char (point-min ))
143
146
(when (and (file-exists-p src-dir)
144
147
(file-directory-p src-dir)
145
- (re-search-forward " ^sourcedir \\ s-*= \\ s-* \\ ([a-zA-Z/0-9]+ \\ ) " nil t ))
148
+ (re-search-forward idris-ipkg-sourcedir-re nil t ))
146
149
(let ((start (match-beginning 1 ))
147
150
(end (match-end 1 ))
148
151
(map (make-sparse-keymap )))
@@ -304,9 +307,7 @@ arguments."
304
307
(save-excursion
305
308
(goto-char (point-min ))
306
309
(let ((found
307
- (re-search-forward " ^\\ s-*sourcedir\\ s-*=\\ s-*\\ (\\ sw+\\ )"
308
- nil
309
- t )))
310
+ (re-search-forward idris-ipkg-sourcedir-re nil t )))
310
311
(if found
311
312
(let ((subdir (buffer-substring-no-properties (match-beginning 1 ) (match-end 1 ))))
312
313
(concat (file-name-directory basename) subdir))
You can’t perform that action at this time.
0 commit comments