Last active
August 29, 2015 13:57
-
-
Save stew/9351484 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
| (defun build-package-name (pn d) | |
| (if (null d) | |
| pn | |
| (let ((c (car d))) | |
| (if (equal c "scala") | |
| pn | |
| (build-package-name (concat c "." pn) (cdr d)))))) | |
| (defun scala-package-name-from-buffer () | |
| (let ((l (reverse (split-string (buffer-file-name) "/")))) | |
| (build-package-name (cadr l) (cddr l)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment