Whever I do a M-. on a method, up pops an XREF window. Nice. But there's a bit of a problem. It's in slime-mode. Slime-mode stomps on XREF's keys. Not nice.
And this is a bit odd, because I was looking at the hook for XREF, and it disables slime-mode. But, since forever, I've had a lisp-mode hook that enables slime-mode, and I guess it gets run after the XREF hook. I think I read somewhere in the slime docs that you're supposed to set up your lisp-mode hook this way. So is this a bug, or do I need a different configuration?
Chris Capel
Chris Capel wrote:
Whever I do a M-. on a method, up pops an XREF window. Nice. But there's a bit of a problem. It's in slime-mode. Slime-mode stomps on XREF's keys. Not nice.
And this is a bit odd, because I was looking at the hook for XREF, and it disables slime-mode. But, since forever, I've had a lisp-mode hook that enables slime-mode, and I guess it gets run after the XREF hook. I think I read somewhere in the slime docs that you're supposed to set up your lisp-mode hook this way. So is this a bug, or do I need a different configuration?
I solved my problem this way, since help didn't appear to be forthcoming. I still don't know whether this is a bug or not.
My lisp-mode-hook now reads:
(lambda () (unless (string= mode-name "xref") (slime-mode) (unless (slime-connected-p) (save-selected-window (slime))))))
Chris Capel pdf23ds@gmail.com writes:
And this is a bit odd, because I was looking at the hook for XREF, and it disables slime-mode. But, since forever, I've had a lisp-mode hook that enables slime-mode, and I guess it gets run after the XREF hook. I think I read somewhere in the slime docs that you're supposed to set up your lisp-mode hook this way. So is this a bug, or do I need a different configuration?
It's a bug which only occurs in Emacs 21. The define-derived-mode is a bit smarter than in Emacs 20 and magically runs mode-hooks at the end of the body. I fixed it by disabling the mode-hook altogether. We it don't need the hook for the xref stuff.
Helmut.