Created
July 27, 2015 20:26
-
-
Save sgrove/68f336f3c29c413d7cbe to your computer and use it in GitHub Desktop.
align-cljlet support for case and alt!
This file contains 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
diff --git a/elpa/align-cljlet-0.3/align-cljlet.el b/elpa/align-cljlet-0.3/align-cljlet.el | |
index 072d19a..e105dc1 100644 | |
--- a/elpa/align-cljlet-0.3/align-cljlet.el | |
+++ b/elpa/align-cljlet-0.3/align-cljlet.el | |
@@ -98,6 +98,8 @@ | |
(string-match " *cond" name) | |
(string-match " *condp" name) | |
(string-match " *defroutes" name) | |
+ (string-match " *case" name) | |
+ (string-match " *alt" name) | |
))) | |
(if (looking-at "{") | |
t)))) | |
@@ -280,10 +282,20 @@ positioned on the defroute form." | |
(down-list 1) | |
(forward-sexp 4) | |
(backward-sexp)) | |
+ (if (looking-at "( *case\\b") | |
+ (progn | |
+ (down-list 1) | |
+ (forward-sexp 3) | |
+ (backward-sexp)) | |
+ (if (looking-at "( *alt!") | |
+ (progn | |
+ (down-list 1) | |
+ (forward-sexp 2) | |
+ (backward-sexp)) | |
(if (not (looking-at "{")) | |
;; move to start of [ | |
(down-list 2) | |
- (down-list 1))))) | |
+ (down-list 1))))))) | |
(defun acl-align-form () | |
"Determine what type of form we are currently positioned at and align it" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment