[slime-cvs] CVS slime/contrib
CVS User sboukarev
sboukarev at common-lisp.net
Wed Aug 5 17:15:35 UTC 2009
Update of /project/slime/cvsroot/slime/contrib
In directory cl-net:/tmp/cvs-serv3603/contrib
Modified Files:
ChangeLog swank-fancy-inspector.lisp
Log Message:
* swank-fancy-inspector.lisp (emacs-inspect): add buttons for removing
compiler-macros and unbinding variables.
--- /project/slime/cvsroot/slime/contrib/ChangeLog 2009/07/22 11:25:28 1.229
+++ /project/slime/cvsroot/slime/contrib/ChangeLog 2009/08/05 17:15:35 1.230
@@ -1,3 +1,8 @@
+2009-08-05 Stas Boukarev <stassats at gmail.com>
+
+ * swank-fancy-inspector.lisp (emacs-inspect): add buttons for removing
+ compiler-macros and unbinding variables.
+
2009-07-22 Stas Boukarev <stassats at gmail.com>
* swank-fuzzy.lisp (fuzzy-convert-matching-for-emacs): format
--- /project/slime/cvsroot/slime/contrib/swank-fancy-inspector.lisp 2009/05/14 18:13:21 1.21
+++ /project/slime/cvsroot/slime/contrib/swank-fancy-inspector.lisp 2009/08/05 17:15:35 1.22
@@ -16,10 +16,16 @@
;;
;; Value
(cond ((boundp symbol)
- (label-value-line (if (constantp symbol)
- "It is a constant of value"
- "It is a global variable bound to")
- (symbol-value symbol)))
+ (append
+ (label-value-line (if (constantp symbol)
+ "It is a constant of value"
+ "It is a global variable bound to")
+ (symbol-value symbol) :newline nil)
+ ;; unbinding constants might be not a good idea, but
+ ;; implementations usually provide a restart.
+ `(" " (:action "[unbind it]"
+ ,(lambda () (makunbound symbol))))
+ '((:newline))))
(t '("It is unbound." (:newline))))
(docstring-ispec "Documentation" symbol 'variable)
(multiple-value-bind (expansion definedp) (macroexpand symbol)
@@ -34,14 +40,20 @@
(:value ,(macro-function symbol)))
`("It is a function: "
(:value ,(symbol-function symbol))))
- `(" " (:action "[make funbound]"
+ `(" " (:action "[unbind it]"
,(lambda () (fmakunbound symbol))))
`((:newline)))
`("It has no function value." (:newline)))
(docstring-ispec "Function Documentation" symbol 'function)
- (if (compiler-macro-function symbol)
- (label-value-line "It also names the compiler macro"
- (compiler-macro-function symbol)))
+ (when (compiler-macro-function symbol)
+
+ (append
+ (label-value-line "It also names the compiler macro"
+ (compiler-macro-function symbol) :newline nil)
+ `(" " (:action "[remove it]"
+ ,(lambda ()
+ (setf (compiler-macro-function symbol) nil)))
+ (:newline))))
(docstring-ispec "Compiler Macro Documentation"
symbol 'compiler-macro)
;;
More information about the slime-cvs
mailing list