[slime-cvs] CVS update: slime/slime.el
Helmut Eller
heller at common-lisp.net
Wed Jan 12 16:54:47 UTC 2005
Update of /project/slime/cvsroot/slime
In directory common-lisp.net:/tmp/cvs-serv2375
Modified Files:
slime.el
Log Message:
(slime-inspector-operate-on-click): New command for inspecting the
value value at the clicked-at position or invoking an inspector
action.
(slime-inspector-mode-map): Bind it to mouse-2.
(slime-inspector-insert-ispec): Add mouse-face properties for
clickable values and action buttons.
Date: Wed Jan 12 17:54:43 2005
Author: heller
Index: slime/slime.el
diff -u slime/slime.el:1.444 slime/slime.el:1.445
--- slime/slime.el:1.444 Mon Jan 10 20:32:00 2005
+++ slime/slime.el Wed Jan 12 17:54:41 2005
@@ -6826,10 +6826,12 @@
(destructure-case ispec
((:value string id)
(slime-insert-propertized (list 'slime-part-number id
+ 'mouse-face 'highlight
'face 'slime-inspector-value-face)
string))
((:action string id)
(slime-insert-propertized (list 'slime-action-number id
+ 'mouse-face 'highlight
'face 'slime-inspector-action-face)
string)))))
@@ -6849,6 +6851,18 @@
(lambda (parts)
(slime-open-inspector parts point))))))))
+(defun slime-inspector-operate-on-click (event)
+ "Inspect the value at the clicked-at position or invoke an action."
+ (interactive "@e")
+ (let ((point (posn-point (event-end event))))
+ (cond ((and point
+ (or (get-text-property point 'slime-part-number)
+ (get-text-property point 'slime-action-number)))
+ (goto-char point)
+ (slime-inspector-operate-on-point))
+ (t
+ (error "No clickable part here")))))
+
(defun slime-inspector-copy-down (number)
"Evaluate the slot at point via the REPL (to set `*')."
(interactive (list (or (get-text-property (point) 'slime-part-number)
@@ -6945,6 +6959,7 @@
([return] 'slime-inspector-operate-on-point)
([(meta return)] 'slime-inspector-copy-down)
("\C-m" 'slime-inspector-operate-on-point)
+ ([mouse-2] 'slime-inspector-operate-on-click)
("l" 'slime-inspector-pop)
("n" 'slime-inspector-next)
(" " 'slime-inspector-next)
More information about the slime-cvs
mailing list