You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can do a PR for this; just not sure if it should go into haskell-cabal.el or haskell-mode.el:
(defun haskell-guess-license ()
"Guess the license of this project.
If there is no valid .cabal file to get the license field from,
return nil."
(interactive)
(when buffer-file-name
(let ((cabal-file (haskell-cabal-find-file (file-name-directory buffer-file-name))))
(when (and cabal-file (file-readable-p cabal-file))
(with-temp-buffer
(insert-file-contents cabal-file)
(haskell-cabal-get-setting "license"))))))
One possible change would be to optionally provide the file to act on rather than making it strictly necessary to use it interactively.
The text was updated successfully, but these errors were encountered:
I can do a PR for this; just not sure if it should go into haskell-cabal.el or haskell-mode.el:
One possible change would be to optionally provide the file to act on rather than making it strictly necessary to use it interactively.
The text was updated successfully, but these errors were encountered: