Created
December 21, 2009 15:05
-
-
Save hchbaw/260981 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
From b1dd9672cf42c1fe6da995cdc57783f1301a391d Mon Sep 17 00:00:00 2001 | |
From: Takeshi Banse <[email protected]> | |
Date: Wed, 6 Jan 2010 00:46:48 +0900 | |
Subject: Adapted to new code. | |
--- | |
CL バージョンがいたれりつくせりすぎます!ということをとっても実感できます>< | |
src/swank/commands/contrib/swank_arglists.clj | 12 ++++++++++++ | |
1 files changed, 12 insertions(+), 0 deletions(-) | |
diff --git a/src/swank/commands/contrib/swank_arglists.clj b/src/swank/commands/contrib/swank_arglists.clj | |
index 12ce5e7..6b3c4fd 100644 | |
--- a/src/swank/commands/contrib/swank_arglists.clj | |
+++ b/src/swank/commands/contrib/swank_arglists.clj | |
@@ -24,3 +24,15 @@ (defslimefn variable-desc-for-echo-area [variable-name] | |
(str variable-name " => " (var-get var))))) | |
(catch Exception e nil)) | |
""))) | |
+ | |
+(def +cursor-marker+ :swank/+cursor+) | |
+(defslimefn autodoc [form & _options] | |
+ (letfn [(step [[x & xs :as form]] | |
+ (cond (empty? form) nil | |
+ (seq? x) (or (step x) (step xs)) | |
+ :else (let [z (last xs)] | |
+ (if (= +cursor-marker+ z) | |
+ x | |
+ (or (and (seq? z) (step z)) x)))))] | |
+ (or (and form ((slime-fn 'operator-arglist) (step form) *current-package*)) | |
+ :not-available))) | |
-- | |
1.7.0.rc1.33.g07cf0f | |
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
;; Clojure 用に slime-cursor-marker を設定しちゃいます、同時に、 | |
;; CL 用 (sbcl) に swank::+cursor-marker+ を上書きしちゃいます。 | |
(setq slime-lisp-implementations | |
`((sbcl ("sbcl") :init-function my-swank-cl-init) | |
(clojure ,(swank-clojure-cmd) :init swank-clojure-init))) | |
(eval-after-load 'slime-autodoc | |
'(progn | |
(setq slime-cursor-marker :swank/+cursor+))) | |
(eval-after-load 'slime | |
'(progn | |
(defun my-swank-cl-init () | |
;; たまに上書きされちゃう >_< | |
(slime-eval-async | |
`(swank:interactive-eval | |
,(format "(defparameter +cursor-marker+ %s)" slime-cursor-marker)) | |
'identity | |
"SWANK")))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment