Skip to content

Instantly share code, notes, and snippets.

@southly
Created May 13, 2010 14:49
Show Gist options
  • Save southly/399899 to your computer and use it in GitHub Desktop.
Save southly/399899 to your computer and use it in GitHub Desktop.
diff --git a/site-lisp/scala-mode.l b/site-lisp/scala-mode.l
index 956519b..a48879a 100644
--- a/site-lisp/scala-mode.l
+++ b/site-lisp/scala-mode.l
@@ -75,11 +75,12 @@
*scala-mode-syntax-table*
*scala-mode-indent-step*))
-(defun string-join (strs delim)
- (let ((r nil))
- (dolist (i strs (apply #'concat (rest (nreverse r))))
- (push delim r)
- (push i r))))
+(eval-when (:compile-toplevel :load-toplevel :execute)
+ (defun string-join (strs delim)
+ (let ((r nil))
+ (dolist (i strs (apply #'concat (rest (nreverse r))))
+ (push delim r)
+ (push i r)))))
(defconstant *scala-expr-start-re*
(string-join (append (mapcar #'(lambda (i) (concat "\\<" i "\\>")) '("if" "else" "for" "do" "yield"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment