Fork me on GitHub
#cursive
<
2018-06-23
>
kennytilton19:06:34

Can we add commands to the Cursive editor?

`(defun mouse-insert-sexp-at-point (start-event)
  "Insert the sexp under the mouse cursor at point.
This command  must be bound to a mouse event."
  (interactive "*e")
  (let ((posn (event-start start-event)))
    (let ((sexp-at-mouse-pos
           (with-selected-window (posn-window posn)
             (save-excursion
               (goto-char (posn-point posn))
               (thing-at-point 'sexp)))))
      (if sexp-at-mouse-pos
          (insert sexp-at-mouse-pos)
        (error "Mouse not at a sexp")))))
`

kennytilton19:06:38

A conversation on ProLisp broke out about long lost commands. If anyone is curious, copy some clojure into the free AllegroCL for Windows and give it a whirl. I think the commands are there by default. If not ping me and I will figure it out.

kennytilton20:06:31

Untested by myself.