Re: emacs 20 and Scheme mode (let bug)

Mark Galassi (rosalia@cygnus.com)
Sun, 23 Nov 1997 10:36:59 -0700

> Mark Galassi <rosalia@cygnus.com> writes:
>> That, together with better-looking font-lock-mode make
>> emacs-20.2 very attractive for Scheme use.

Marius> I agree, but there is a bug with indenting the "let" form
Marius> of Scheme. I already reported this and here is the patch
Marius> against it:

There is a problem with this patch: I finally installed it today
because I was irritated enough at (let ...) indentation. There is a
')' too many (see below). I'm sure Richard knows about already, but
I'll pass it to him just in case.

***************
*** 378,388 ****
;; (scheme-indent-specform 2 state indent-point)
;; (scheme-indent-specform 1 state indent-point)))

! (defun scheme-let-indent (state indent-point)
(skip-chars-forward " \t")
(if (looking-at "[-a-zA-Z0-9+*/?!@$%^&_:~]")
! (lisp-indent-specform 2 state indent-point (current-column))
! (lisp-indent-specform 1 state indent-point (current-column))))
*** HERE IS THE MISTAKE *** ----> ^^^^
*** there should only be ))) closing parentheses ***

;; (put 'begin 'scheme-indent-function 0), say, causes begin to be indented
;; like defun if the first form is placed on the next line, otherwise
--- 378,388 ----
;; (scheme-indent-specform 2 state indent-point)
;; (scheme-indent-specform 1 state indent-point)))

! (defun scheme-let-indent (state indent-point normal-indent)
(skip-chars-forward " \t")
(if (looking-at "[-a-zA-Z0-9+*/?!@$%^&_:~]")
! (lisp-indent-specform 2 state indent-point normal-indent)
! (lisp-indent-specform 1 state indent-point normal-indent))))

;; (put 'begin 'scheme-indent-function 0), say, causes begin to be indented
;; like defun if the first form is placed on the next line, otherwise