[slime-cvs] CVS slime
heller
heller at common-lisp.net
Sun Aug 17 23:01:07 UTC 2008
Update of /project/slime/cvsroot/slime
In directory clnet:/tmp/cvs-serv21383
Modified Files:
ChangeLog slime.el swank.lisp
Log Message:
* slime.el (slime-inspector-show-source): New command.
(slime-inspector-mode-map): Bind it to ".".
(sldb-highlight-sexp): Use slime-flash-region rather than a
permanent overlay.
--- /project/slime/cvsroot/slime/ChangeLog 2008/08/17 23:00:55 1.1462
+++ /project/slime/cvsroot/slime/ChangeLog 2008/08/17 23:01:02 1.1463
@@ -1,13 +1,19 @@
2008-08-17 Helmut Eller <heller at common-lisp.net>
+ * slime.el (slime-inspector-show-source): New command.
+ (slime-inspector-mode-map): Bind it to ".".
+ (sldb-highlight-sexp): Use slime-flash-region rather than a
+ permanent overlay.
+
+ * swank.lisp (find-source-location-for-emacs): New function.
+
* slime.el (slime-add-local-hook): Renamed from add-local-hook.
(slime-switch-to-output-buffer): Drop the connection argument. It
was never used.
(slime-switch-to-output-buffer-search-all-frames): Deleted. Use
display-buffer-reuse-frames instead.
(slime-switch-to-output-buffer): Use pop-to-buffer to select the
- window and frame. Have to set the input-focus manually, though.
- Might be some window manager issue.
+ window and frame.
2008-08-15 Tobias C. Rittweiler <tcr at freebits.de>
--- /project/slime/cvsroot/slime/slime.el 2008/08/17 23:00:56 1.1001
+++ /project/slime/cvsroot/slime/slime.el 2008/08/17 23:01:06 1.1002
@@ -7132,10 +7132,7 @@
(sldb-delete-overlays)
(let ((start (or start (point)))
(end (or end (save-excursion (ignore-errors (forward-sexp)) (point)))))
- (push (make-overlay start (1+ start)) sldb-overlays)
- (push (make-overlay (1- end) end) sldb-overlays))
- (dolist (overlay sldb-overlays)
- (overlay-put overlay 'face 'secondary-selection)))
+ (slime-flash-region start end)))
(defun sldb-delete-overlays ()
(mapc #'delete-overlay sldb-overlays)
@@ -7867,6 +7864,13 @@
(error "No part at point"))))
(slime-eval-describe `(swank:pprint-inspector-part ,part)))
+(defun slime-inspector-show-source (part)
+ (interactive (list (or (get-text-property (point) 'slime-part-number)
+ (error "No part at point"))))
+ (slime-eval-async
+ `(swank:find-source-location-for-emacs '(:inspector ,part))
+ #'slime-show-source-location))
+
(defun slime-inspector-reinspect ()
(interactive)
(slime-eval-async `(swank:inspector-reinspect)
@@ -7940,7 +7944,8 @@
("\C-i" 'slime-inspector-next-inspectable-object)
([(shift tab)] 'slime-inspector-previous-inspectable-object) ; Emacs translates S-TAB
([backtab] 'slime-inspector-previous-inspectable-object) ; to BACKTAB on X.
- ("\M-." 'slime-edit-definition))
+ ("\M-." 'slime-edit-definition)
+ ("." 'slime-inspector-show-source))
;;;; Buffer selector
--- /project/slime/cvsroot/slime/swank.lisp 2008/08/12 12:57:09 1.569
+++ /project/slime/cvsroot/slime/swank.lisp 2008/08/17 23:01:06 1.570
@@ -2742,6 +2742,19 @@
(defslimefun find-definition-for-thing (thing)
(find-source-location thing))
+(defslimefun find-source-location-for-emacs (spec)
+ (find-source-location (value-spec-ref spec)))
+
+(defun value-spec-ref (spec)
+ (destructure-case spec
+ ((:string string package)
+ (with-buffer-syntax (package)
+ (eval (read-from-string string))))
+ ((:inspector part)
+ (inspector-nth-part part))
+ ((:sldb frame var)
+ (frame-var-value frame var))))
+
(defslimefun find-definitions-for-emacs (name)
"Return a list ((DSPEC LOCATION) ...) of definitions for NAME.
DSPEC is a string and LOCATION a source location. NAME is a string."
More information about the slime-cvs
mailing list