There are two very useful features in SLIME: slime-copy-or-inspect-presentation-at-mouseand slime-presentation-menu. But they must be called with an event argument. In order to generate even I would need a lot of logistics (calculating the area occupied by the printed representation of the object that the mouse points to, the rows and columns are something that I really do not want to do because, of course, there is something in Emacs- something that already computes all of this.
So, is there an easy way to generate a "fake" mouse event? Because using the mouse for only two things in the editor, which otherwise does not require a mouse, feels ... well, not very smart. :)
EDIT
Here is what I tried:
(define-key lisp-mode-map (kbd "C-x ?")
#'(lambda ()
(interactive)
(message "called")
(slime-copy-or-inspect-presentation-at-mouse
`(mouse-2 ;; button
(,(selected-window) ;; window
,(point) ;; position
(0 . 0) ;; window-relative pixel
0 ;; timestamp
nil ;; object
,(point) ;; text position
(,(current-column) . ;; column
,(line-number-at-pos (point))) ;; line
nil ;; image
(0 . 0) ;; object-relative pixel
(1 . 1))))))
(define-key lisp-mode-map (kbd "C-x SPC")
#'(lambda ()
(interactive)
(message "called")
(slime-presentation-menu
`(mouse-3 ;; button
(,(selected-window) ;; window
,(point) ;; position
(0 . 0) ;; window-relative pixel
0 ;; timestamp
nil ;; object
,(point) ;; text position
(,(current-column) . ;; column
,(line-number-at-pos (point))) ;; line
nil ;; image
(0 . 0) ;; object-relative pixel
(1 . 1))))))
, , slime-presentation-menu , , - , "" , .: (
EDIT2
, - x-popup-menu, , ... arrrrrgh.
user797257