Created
October 16, 2017 20:52
-
-
Save jcreedcmu/d258f476cead775200196aacec71b24e to your computer and use it in GitHub Desktop.
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
| ;; if the binding at point is implicit, make it explicit, and vice-versa | |
| (defun jcreed-swap-agda-implicit () | |
| (interactive) | |
| (save-excursion | |
| (if (re-search-backward "[({]" nil t) | |
| (let ((ms (match-string 0))) | |
| (cond | |
| ((equal ms "(") | |
| (replace-match "{") | |
| (re-search-forward ")") | |
| (replace-match "}")) | |
| ((equal ms "{") | |
| (replace-match "(") | |
| (re-search-forward "}") | |
| (replace-match ")"))))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment