Created
April 2, 2017 17:08
-
-
Save ExpHP/50e6ac9957b1406f9cdc2aefc84d533f to your computer and use it in GitHub Desktop.
save-excursion: wrong number of arguments
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
| save-excursion: Wrong number of arguments: (1 . 1), 0 | |
| ^ the number of arguments is... A DOTTED PAIR!? | |
| am I reading this right!? O_o |
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 dotspacemacs//haskell-toggle-qualified () | |
| "toggle the qualified-ness of a single import in haskell" | |
| ;; TODO: sensible behavior when multiple lines are marked | |
| (interactive) | |
| (save-excursion | |
| (move-beginning-of-line) | |
| (let ((from-qual "^import[:space:]+qualified[:space]+") | |
| (from-unqual "^import[:space:]+") | |
| (to-qual "import qualified ") | |
| (to-unqual "import ")) | |
| ;; (if it isn't an import line, don't do anything at all) | |
| (if (looking-at-p "import") | |
| (if (looking-at-p from-qual) | |
| (evil-ex-substitute "." "." from-qual to-unqual) | |
| (evil-ex-substitute "." "." from-unqual to-qual)))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment