[slime-cvs] CVS slime
alendvai
alendvai at common-lisp.net
Sun Dec 24 13:40:05 UTC 2006
Update of /project/slime/cvsroot/slime
In directory clnet:/tmp/cvs-serv6724
Modified Files:
swank.lisp
Log Message:
Change the order to [set value] [make unbound]
--- /project/slime/cvsroot/slime/swank.lisp 2006/12/24 13:38:36 1.441
+++ /project/slime/cvsroot/slime/swank.lisp 2006/12/24 13:40:05 1.442
@@ -4446,24 +4446,28 @@
(defgeneric inspect-slot-for-emacs (class object slot)
(:method (class object slot)
- (let ((slot-name (swank-mop:slot-definition-name slot)))
- `(,@(if (swank-mop:slot-boundp-using-class class object slot)
- `((:value ,(swank-mop:slot-value-using-class class object slot))
- " " (:action "[make unbound]"
- ,(lambda () (swank-mop:slot-makunbound-using-class class object slot))))
- '("#<unbound>"))
- " " (:action "[set value]"
- ,(lambda () (with-simple-restart
- (abort "Abort setting slot ~S" slot-name)
- (let ((value-string (eval-in-emacs
- `(condition-case c
- (slime-read-object
- ,(format nil "Set slot ~S to (evaluated) : " slot-name))
- (quit nil)))))
- (when (and value-string
- (not (string= value-string "")))
- (setf (swank-mop:slot-value-using-class class object slot)
- (eval (read-from-string value-string))))))))))))
+ (let ((slot-name (swank-mop:slot-definition-name slot))
+ (boundp (swank-mop:slot-boundp-using-class class object slot)))
+ `(,@(if boundp
+ `((:value ,(swank-mop:slot-value-using-class class object slot)))
+ `("#<unbound>"))
+ " "
+ (:action "[set value]"
+ ,(lambda () (with-simple-restart
+ (abort "Abort setting slot ~S" slot-name)
+ (let ((value-string (eval-in-emacs
+ `(condition-case c
+ (slime-read-object
+ ,(format nil "Set slot ~S to (evaluated) : " slot-name))
+ (quit nil)))))
+ (when (and value-string
+ (not (string= value-string "")))
+ (setf (swank-mop:slot-value-using-class class object slot)
+ (eval (read-from-string value-string))))))))
+ " "
+ ,@(when boundp
+ `(" " (:action "[make unbound]"
+ ,(lambda () (swank-mop:slot-makunbound-using-class class object slot)))))))))
(defgeneric all-slots-for-inspector (object inspector)
(:method ((object standard-object) inspector)
More information about the slime-cvs
mailing list