[slime-cvs] CVS slime/contrib
CVS User sboukarev
sboukarev at common-lisp.net
Fri Dec 11 03:05:24 UTC 2009
Update of /project/slime/cvsroot/slime/contrib
In directory cl-net:/tmp/cvs-serv31294/contrib
Modified Files:
ChangeLog slime-asdf.el swank-asdf.lisp
Log Message:
* contrib/swank-asdf.lisp (find-operation): New function for
finding asdf operations independent of readtable
case sensitivity (read Allegro Modern Mode).
(operate-on-system): Accept symbols instead of strings for
operation-name, and use the above function.
* contrib/slime-asdf.el: Replace strings with operation names
for `slime-oos' with symbols.
--- /project/slime/cvsroot/slime/contrib/ChangeLog 2009/12/10 23:26:07 1.297
+++ /project/slime/cvsroot/slime/contrib/ChangeLog 2009/12/11 03:05:24 1.298
@@ -1,3 +1,14 @@
+2009-12-11 Stas Boukarev <stassats at gmail.com>
+
+ * swank-asdf.lisp (find-operation): New function for
+ finding asdf operations independent of readtable
+ case sensitivity (read Allegro Modern Mode).
+ (operate-on-system): Accept symbols instead of strings for
+ operation-name, and use the above function.
+
+ * slime-asdf.el: Replace strings with operation names
+ for `slime-oos' with symbols.
+
2009-12-11 Tobias C. Rittweiler <tcr at freebits.de>
* swank-arglists.lisp (*swank-debug-arglists*): Removed.
--- /project/slime/cvsroot/slime/contrib/slime-asdf.el 2009/12/03 12:46:12 1.19
+++ /project/slime/cvsroot/slime/contrib/slime-asdf.el 2009/12/11 03:05:24 1.20
@@ -76,7 +76,7 @@
operation (if keyword-args (format " %S" keyword-args) "")
system)
(slime-repl-shortcut-eval-async
- `(swank:operate-on-system-for-emacs ,system ,operation , at keyword-args)
+ `(swank:operate-on-system-for-emacs ,system ',operation , at keyword-args)
#'slime-compilation-finished))
@@ -88,7 +88,7 @@
Default system name is taken from first file matching *.asd in current
buffer's working directory"
(interactive (list (slime-read-system-name)))
- (slime-oos system "LOAD-OP"))
+ (slime-oos system 'load-op))
(defun slime-open-system (name &optional load)
"Open all files in an ASDF system."
@@ -172,38 +172,38 @@
(defslime-repl-shortcut slime-repl-load/force-system ("force-load-system")
(:handler (lambda ()
(interactive)
- (slime-oos (slime-read-system-name) "LOAD-OP" :force t)))
+ (slime-oos (slime-read-system-name) 'load-op :force t)))
(:one-liner "Recompile and load an ASDF system."))
(defslime-repl-shortcut slime-repl-load-system ("load-system")
(:handler (lambda ()
(interactive)
- (slime-oos (slime-read-system-name) "LOAD-OP")))
+ (slime-oos (slime-read-system-name) 'load-op)))
(:one-liner "Compile (as needed) and load an ASDF system."))
(defslime-repl-shortcut slime-repl-test/force-system ("force-test-system")
(:handler (lambda ()
(interactive)
- (slime-oos (slime-read-system-name) "TEST-OP" :force t)))
+ (slime-oos (slime-read-system-name) 'test-op :force t)))
(:one-liner "Compile (as needed) and force test an ASDF system."))
(defslime-repl-shortcut slime-repl-test-system ("test-system")
(:handler (lambda ()
(interactive)
- (slime-oos (slime-read-system-name) "TEST-OP")))
+ (slime-oos (slime-read-system-name) 'test-op)))
(:one-liner "Compile (as needed) and test an ASDF system."))
(defslime-repl-shortcut slime-repl-compile-system ("compile-system")
(:handler (lambda ()
(interactive)
- (slime-oos (slime-read-system-name) "COMPILE-OP")))
+ (slime-oos (slime-read-system-name) 'compile-op)))
(:one-liner "Compile (but not load) an ASDF system."))
(defslime-repl-shortcut slime-repl-compile/force-system
("force-compile-system")
(:handler (lambda ()
(interactive)
- (slime-oos (slime-read-system-name) "COMPILE-OP" :force t)))
+ (slime-oos (slime-read-system-name) 'compile-op :force t)))
(:one-liner "Recompile (but not load) an ASDF system."))
(defslime-repl-shortcut slime-repl-open-system ("open-system")
--- /project/slime/cvsroot/slime/contrib/swank-asdf.lisp 2009/12/01 08:52:20 1.17
+++ /project/slime/cvsroot/slime/contrib/swank-asdf.lisp 2009/12/11 03:05:24 1.18
@@ -13,25 +13,25 @@
(eval-when (:compile-toplevel :load-toplevel :execute)
(require :asdf))
+(defun find-operation (operation)
+ (or (find-symbol (symbol-name operation) :asdf)
+ (error "Couldn't find ASDF operation ~S" operation)))
+
(defslimefun operate-on-system-for-emacs (system-name operation &rest keywords)
"Compile and load SYSTEM using ASDF.
Record compiler notes signalled as `compiler-condition's."
- (collect-notes
- (lambda ()
- (apply #'operate-on-system system-name operation keywords))))
+ (collect-notes
+ (lambda ()
+ (apply #'operate-on-system system-name operation keywords))))
(defun operate-on-system (system-name operation-name &rest keyword-args)
"Perform OPERATION-NAME on SYSTEM-NAME using ASDF.
The KEYWORD-ARGS are passed on to the operation.
Example:
-\(operate-on-system \"SWANK\" \"COMPILE-OP\" :force t)"
- (handler-case
+\(operate-on-system \"swank\" 'compile-op :force t)"
+ (handler-case
(with-compilation-hooks ()
- (let ((operation (find-symbol operation-name :asdf)))
- (when (null operation)
- (error "Couldn't find ASDF operation ~S" operation-name))
- (apply #'asdf:operate operation system-name keyword-args)
- t))
+ (apply #'asdf:operate (find-operation operation-name) system-name keyword-args))
(asdf:compile-error () nil)))
(defun asdf-central-registry ()
More information about the slime-cvs
mailing list