Permalink
Browse files

Nonlisp paredit fixes; clojure-project bugfix.

  • Loading branch information...
1 parent a46328f commit b418209c42c691bd3d340082897a50fc78443b15 @technomancy committed Jul 20, 2009
Showing with 14 additions and 10 deletions.
  1. +7 −0 starter-kit-defuns.el
  2. +5 −10 starter-kit-js.el
  3. +2 −0 starter-kit-lisp.el
View
@@ -195,6 +195,13 @@ Symbols matching the text at point are put first in the completion list."
(interactive)
(message (if (y-or-n-p "Do you have a test for that? ") "Good." "Bad!")))
+(defun esk-paredit-nonlisp ()
+ "Turn on paredit mode for non-lisps."
+ (set (make-local-variable 'paredit-space-for-delimiter-predicate)
+ (lambda (endp delimiter)
+ (equal (char-syntax (char-before)) ?\")))
+ (paredit-mode 1))
+
;; A monkeypatch to cause annotate to ignore whitespace
(defun vc-git-annotate-command (file buf &optional rev)
(let ((name (file-relative-name file)))
View
@@ -16,20 +16,15 @@
(add-to-list 'auto-mode-alist '("\\.js$" . espresso-mode))
(add-to-list 'auto-mode-alist '("\\.json$" . espresso-mode))
(add-hook 'espresso-mode-hook 'moz-minor-mode)
-(add-hook 'espresso-mode-hook 'turn-on-paredit)
+(add-hook 'espresso-mode-hook 'esk-paredit-nonlisp)
(add-hook 'espresso-mode-hook 'run-coding-hook)
(add-hook 'espresso-mode-hook 'idle-highlight)
(setq espresso-indent-level 2)
-(defun esk-pp-json ()
- "Pretty-print the json object following point."
- (interactive)
- (require 'json)
- (let ((json-object (save-excursion (json-read))))
- (switch-to-buffer "*json*")
- (delete-region (point-min) (point-max))
- (insert (pp json-object))
- (goto-char (point-min))))
+;; espresso's insert-and-indent doesn't play nicely with pretty-lambda
+(eval-after-load 'espresso
+ '(progn (define-key espresso-mode-map "{" 'paredit-open-brace)
+ (define-key espresso-mode-map "}" 'paredit-close-brace-and-newline)))
(provide 'starter-kit-js)
;;; starter-kit-js.el ends here
View
@@ -111,6 +111,8 @@ Kills existing SLIME session, if any."
(locate-dominating-file default-directory "pom.xml"))))
(when (get-buffer "*inferior-lisp*")
(kill-buffer "*inferior-lisp*"))
+ (defvar swank-clojure-extra-vm-args nil)
+ (defvar slime-lisp-implementations nil)
(add-to-list 'swank-clojure-extra-vm-args
(format "-Dclojure.compile.path=%s"
(expand-file-name "target/classes/" path)))

0 comments on commit b418209

Please sign in to comment.