[slime-devel] Re: More SLIME wish items
luke at bluetail.com
Wed Oct 29 06:24:57 UTC 2003
Raymond Toy <rtoy at earthlink.net> writes:
> James Bielman wrote:
> > On 25 Oct 2003, rtoy at earthlink.net wrote:
> > I'll leave it up to others on whether to add this binding to sldb
> > proper but this elisp in .emacs seems to do the trick if I understand
> > correctly:
> > (defun my-slime-hook ()
> > (define-key sldb-mode-map "\C-d" 'sldb-abort))
> > (add-hook 'slime-mode-hook 'my-slime-hook)
> > This command is normally bound to 'a' in the debugger.
> Although the above doesn't really work for me, I can live with using
> 'a' in the debugger, which, embarassingly, I didn't know about.
Actually, James's comments and code refer to our graphical
debugger. Unfortunately you don't get to use that for evaluation in
*inferior-lisp*, at least at the moment.
Have you tried it? e.g. "C-c : (/ 1 0) RET" in a lisp-mode
buffer. There's a little glitch under XEmacs currently where you need
to press RET on the '--more--' line to get the rest of the backtrace -
in GNU you only have to move the point there.
You could use this code for more-or-less what you want in inf-lisp:
(defun inferior-slime-delete-char (arg)
"Delete ARG characters, or invoke ABORT restart if at end of buffer."
(if (not (eobp))
(call-interactively 'delete-char (list arg))
(message "Invoking ABORT restart.")
(comint-send-string (get-buffer-process (current-buffer))
(define-key inferior-slime-mode-map "\C-d" 'inferior-slime-delete-char)
Trouble is that then ^D will evaluate "ABORT" if you're not already in
the debugger. ILISP handles this better somehow.
I'm not committing this change, it's a "customer special" :-). That
command uses CMUCL's debugger listener syntax, and probably doesn't
work for other Lisps. If we start adding fancy portable listener-based
interactions, we'd be taking a step away from our socket-based style
and towards ILISP. I prefer to only reinvent one wheel at a time :-)
What we really want is for you to use our fancy graphical debugger
instead. It might be practical to make that usable in *inferior-lisp*,
but I think the way forward is to write our own listener in Elisp that
talks to Lisp through the socket. We should still support
*inferior-lisp* as well as we reasonably can, and perhaps do a few
more hacks to keep things usable before writing our listener :-)
More information about the slime-devel