This repository has been archived by the owner on Jan 23, 2018. It is now read-only.
forked from jochu/swank-clojure
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move swank payloads to lein-swank plugin.
- Loading branch information
1 parent
1dd73d6
commit 634b76e
Showing
7 changed files
with
10,982 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,4 @@ multi-lib/ | |
pom.xml | ||
.lein-failures | ||
.lein-deps-sum | ||
/lein-swank/.lein-plugins/checksum |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
["swank/payload/slime.el" | ||
"swank/payload/slime-repl.el" | ||
"swank/payload/slime-frame-colors.el" | ||
"swank/payload/slime-eldoc.el"] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
;;; slime-compile-presave.el --- Refuse to save non-compiling Slime buffers | ||
|
||
;; Copyright © 2011 Phil Hagelberg | ||
;; | ||
;; Authors: Phil Hagelberg <technomancy@gmail.com> | ||
;; URL: http://github.com/technomancy/swank-clojure | ||
;; Version: 1.0.0 | ||
;; Keywords: languages, lisp | ||
|
||
;; This file is not part of GNU Emacs. | ||
|
||
;;; Code: | ||
|
||
(defvar slime-compile-presave? nil | ||
"Refuse to save slime-enabled buffers if they don't compile.") | ||
|
||
;;;###autoload | ||
(defun slime-compile-presave-toggle () | ||
(interactive) | ||
(message "slime-compile-presave %s." | ||
(if (setq slime-compile-presave? (not slime-compile-presave?)) | ||
"enabled" "disabled"))) | ||
|
||
;;;###autoload | ||
(defun slime-compile-presave-enable () | ||
(make-local-variable 'before-save-hook) | ||
(add-hook 'before-save-hook (defun slime-compile-presave () | ||
(when slime-compile-presave? | ||
(slime-eval `(swank:eval-and-grab-output | ||
,(buffer-substring-no-properties | ||
(point-min) (point-max)))))))) | ||
|
||
;;;###autoload | ||
(add-hook 'slime-mode-hook 'slime-compile-presave-enable) | ||
|
||
(provide 'slime-compile-presave) | ||
;;; slime-compile-presave.el ends here |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
(require 'eldoc) | ||
(defun clojure-slime-eldoc-message () | ||
(when (and (featurep 'slime) | ||
(slime-background-activities-enabled-p)) | ||
(slime-echo-arglist) ; async, return nil for now | ||
nil)) | ||
|
||
(defun clojure-localize-documentation-function () | ||
(set (make-local-variable 'eldoc-documentation-function) | ||
'clojure-slime-eldoc-message)) | ||
|
||
(add-hook 'slime-mode-hook 'clojure-localize-documentation-function) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
(require 'ansi-color) | ||
|
||
(defadvice sldb-insert-frame (around colorize-clj-trace (frame &optional face)) | ||
(progn | ||
(ad-set-arg 0 (list (sldb-frame.number frame) | ||
(ansi-color-apply (sldb-frame.string frame)) | ||
(sldb-frame.plist frame))) | ||
ad-do-it | ||
(save-excursion | ||
(forward-line -1) | ||
(skip-chars-forward "0-9 :") | ||
(let ((beg-line (point))) | ||
(end-of-line) | ||
(remove-text-properties beg-line (point) '(face nil)))))) | ||
|
||
(ad-activate #'sldb-insert-frame) | ||
|
||
(provide 'slime-frame-colors) |
Oops, something went wrong.