Created
May 26, 2014 17:37
-
-
Save Philonous/8db4eb9fdcd8198f7045 to your computer and use it in GitHub Desktop.
haskell-qualify-import-line
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (defun haskell-qualify-import-line (&optional no-toggle) | |
| "Toggle \"qualified\" modifier of current import line" | |
| (interactive "P") | |
| (require 'haskell-align-imports) | |
| (save-excursion | |
| (beginning-of-line) | |
| (cond | |
| ((looking-at "import qualified\\([ ]?\\)[ ]*") | |
| (unless no-toggle | |
| (replace-match "import\\1") | |
| (haskell-align-imports))) | |
| ((looking-at "import\\([ ]?\\)[ ]*") | |
| (replace-match "import qualified\\1") | |
| (haskell-align-imports)) | |
| ))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment