Hi there,
I've recently updated my slime, and find that slime-reindent-defun in a lisp-mode file buffer is no longer working: it tries to call slime-repl-at-prompt-start-p, which tries to compare a number and the value of slime-repl-input-start-mark, which is nil.
This patch fixes the symptoms, but it looks a bit wrong to me. Maybe somebody who knows more about the constraints involved can come up with a better fix.
Index: slime.el =================================================================== RCS file: /project/slime/cvsroot/slime/slime.el,v retrieving revision 1.794 diff -u -r1.794 slime.el --- slime.el 28 Jun 2007 12:27:51 -0000 1.794 +++ slime.el 16 Jul 2007 12:43:02 -0000 @@ -10047,7 +10047,8 @@ (fill-paragraph nil) (let ((start (progn (unless (or (and (zerop (current-column)) (eq ?( (char-after))) - (slime-repl-at-prompt-start-p)) + (and slime-repl-input-start-mark + (slime-repl-at-prompt-start-p))) (slime-beginning-of-defun)) (point))) (end (ignore-errors (slime-end-of-defun) (point))))
Cheers,
On Monday 16 July 2007 14:43, Andreas Fuchs wrote:
Hi there,
I've recently updated my slime, and find that slime-reindent-defun in a lisp-mode file buffer is no longer working: it tries to call slime-repl-at-prompt-start-p, which tries to compare a number and the value of slime-repl-input-start-mark, which is nil.
This patch fixes the symptoms, but it looks a bit wrong to me. Maybe somebody who knows more about the constraints involved can come up with a better fix.
Also, see my patch 10 days ago which is almost identical. It has one more condition cargo-culted from somewhere.
Andreas Fuchs asf@boinkor.net writes:
I've recently updated my slime, and find that slime-reindent-defun in a lisp-mode file buffer is no longer working: [...]
This patch fixes the symptoms, but it looks a bit wrong to me.
It's okish. I've applied it. (Also with the additional typo fixed as reported by Gábor Melis.) Thanks, guys!
-T.