56
56
:group 'haskell
57
57
:type 'string )
58
58
59
+ (defcustom haskell-hasktags-arguments '(" -e" " -x" )
60
+ " Additional arguments for `hasktags' executable.
61
+ By default these are:
62
+
63
+ -e - generate ETAGS file
64
+ -x - generate additional information in CTAGS file."
65
+ :group 'haskell
66
+ :type '(list string))
67
+
59
68
(defconst haskell-cabal-general-fields
60
69
; ; Extracted with (haskell-cabal-extract-fields-from-doc "general-fields")
61
70
'(" name" " version" " cabal-version" " license" " license-file" " copyright"
@@ -1122,13 +1131,12 @@ buffer not visiting a file returns nil."
1122
1131
1123
1132
(defun haskell-cabal--compose-hasktags-command (dir )
1124
1133
" Prepare command to execute `hasktags` command in DIR folder.
1125
- By default following parameters are passed to Hasktags
1126
- executable:
1127
- -e - generate ETAGS file
1128
- -x - generate additional information in CTAGS file.
1129
1134
1130
- This function takes into account user's operation system: in case
1131
- of Windows it generates simple command, relying on Hasktags
1135
+ To customise the command executed, see `haskell-hasktags-path'
1136
+ and `haskell-hasktags-arguments' .
1137
+
1138
+ This function takes into account the user's operating system: in case
1139
+ of Windows it generates a simple command, relying on Hasktags
1132
1140
itself to find source files:
1133
1141
1134
1142
hasktags --output=DIR\T AGS -x -e DIR
@@ -1138,9 +1146,10 @@ recursively avoiding visiting unnecessary heavy directories like
1138
1146
.git, .svn, _darcs and build directories created by
1139
1147
cabal-install, stack, etc and passes list of found files to Hasktags."
1140
1148
(if (eq system-type 'windows-nt )
1141
- (format " %s --output=%s -x -e %s "
1149
+ (format " %s --output=%s %s %s "
1142
1150
haskell-hasktags-path
1143
1151
(shell-quote-argument (expand-file-name " TAGS" dir))
1152
+ (mapconcat #'identity haskell-hasktags-arguments " " )
1144
1153
(shell-quote-argument dir))
1145
1154
(format " cd %s && %s | %s "
1146
1155
(shell-quote-argument dir)
@@ -1161,7 +1170,9 @@ cabal-install, stack, etc and passes list of found files to Hasktags."
1161
1170
" -name '#*' "
1162
1171
" -or -name '.*' "
1163
1172
" \\ ) -print0" )
1164
- (format " xargs -0 %s -e -x " (shell-quote-argument haskell-hasktags-path)))))
1173
+ (format " xargs -0 %s %s "
1174
+ (shell-quote-argument haskell-hasktags-path)
1175
+ (mapconcat #'identity haskell-hasktags-arguments " " )))))
1165
1176
1166
1177
(provide 'haskell-cabal )
1167
1178
; ;; haskell-cabal.el ends here
0 commit comments