[slime-cvs] CVS slime
CVS User trittweiler
trittweiler at common-lisp.net
Fri May 8 17:56:06 UTC 2009
Update of /project/slime/cvsroot/slime
In directory cl-net:/tmp/cvs-serv13009
Modified Files:
swank.lisp ChangeLog
Log Message:
* swank.lisp (read-from-minibuffer-in-emacs): New.
([struct] istate): Add METADATA-PLIST slot.
(ensure-istate-metadata): New. To attach arbitrary metadata to an
inspector page.
(inspect-object): Adapted so methods on EMACS-INSPECT can look at
*ISTATE*.
--- /project/slime/cvsroot/slime/swank.lisp 2009/03/27 20:49:49 1.640
+++ /project/slime/cvsroot/slime/swank.lisp 2009/05/08 17:56:06 1.641
@@ -1868,6 +1868,13 @@
((:ok value) value)
((:abort) (abort))))))))
+;;; FIXME: This should not use EVAL-IN-EMACS but get its own events.
+(defun read-from-minibuffer-in-emacs (prompt &optional initial-value)
+ (eval-in-emacs
+ `(condition-case c
+ (slime-read-from-minibuffer ,prompt ,initial-value)
+ (quit nil))))
+
(defvar *swank-wire-protocol-version* nil
"The version of the swank/slime communication protocol.")
@@ -3212,6 +3219,7 @@
(verbose *inspector-verbose*)
(parts (make-array 10 :adjustable t :fill-pointer 0))
(actions (make-array 10 :adjustable t :fill-pointer 0))
+ metadata-plist
content
next previous)
@@ -3228,15 +3236,22 @@
(reset-inspector)
(inspect-object (eval (read-from-string string))))))
+(defun ensure-istate-metadata (o indicator default)
+ (with-struct (istate. object metadata-plist) *istate*
+ (assert (eq object o))
+ (let ((data (getf metadata-plist indicator default)))
+ (setf (getf metadata-plist indicator) data)
+ data)))
+
(defun inspect-object (o)
- (let ((previous *istate*)
- (content (emacs-inspect/printer-bindings o)))
- (unless (find o *inspector-history*)
- (vector-push-extend o *inspector-history*))
- (setq *istate* (make-inspector-state :object o :previous previous
- :content content))
- (if previous (setf (istate.next previous) *istate*))
- (istate>elisp *istate*)))
+ ;; Set *ISTATE* first so EMACS-INSPECT can possibly look at it.
+ (setq *istate* (make-inspector-state :object o :previous *istate*))
+ (setf (istate.content *istate*) (emacs-inspect/printer-bindings o))
+ (unless (find o *inspector-history*)
+ (vector-push-extend o *inspector-history*))
+ (let ((previous (istate.previous *istate*)))
+ (if previous (setf (istate.next previous) *istate*)))
+ (istate>elisp *istate*))
(defun emacs-inspect/printer-bindings (object)
(let ((*print-lines* 1) (*print-right-margin* 75)
--- /project/slime/cvsroot/slime/ChangeLog 2009/05/08 16:14:10 1.1736
+++ /project/slime/cvsroot/slime/ChangeLog 2009/05/08 17:56:06 1.1737
@@ -1,5 +1,14 @@
2009-05-08 Tobias C. Rittweiler <tcr at freebits.de>
+ * swank.lisp (read-from-minibuffer-in-emacs): New.
+ ([struct] istate): Add METADATA-PLIST slot.
+ (ensure-istate-metadata): New. To attach arbitrary metadata to an
+ inspector page.
+ (inspect-object): Adapted so methods on EMACS-INSPECT can look at
+ *ISTATE*.
+
+2009-05-08 Tobias C. Rittweiler <tcr at freebits.de>
+
#+#.foo confused the recent fontification changes. Fix that.
* slime.el (slime-search-suppressed-forms-internal): New. Split
More information about the slime-cvs
mailing list