[slime-devel] cl-indent lossage

Helmut Eller e9626484 at stud3.tuwien.ac.at
Fri Oct 29 20:24:31 UTC 2004


Lynn Quam <quam at ai.sri.com> writes:

> Thanks for the info.  Yes, indeed the file date for cl-indent.el 
> /usr/share/emacs/21.2/lisp/emacs-lisp is Aug 15 2001.  That
> explains why I haven't seen the change.  I find it curious that
> Emacs 21.2 in the RedHat 9 distribution that I am running does not
> contain the March 2002 Gerd Moellman version of cl-indent.el.

CVS Emacs and the Emacs 21.X series are different branches.  I think
only bug fixes are backported.  New features only appear in the CVS
version.

> ;;; old cl-indent
> (loop with (lines package-decl property-list)
>       for line-num from 1
>       for line = (read-line in-stream  nil nil)
>       while line
>       when (search "(in-package" line :test #'char-equal)
> 	do (setq package-decl (read-from-string line)
> 		 package-decl-line line-num
> 		 *package* (eval package-decl))
>       else when (search "(FILE-PROPERTY-LIST" line :test #'char-equal)
> 	     do (file-position in-stream file-pos)
> 		(setq property-list (read in-stream))
>       else collect line into lines
> 	    
>       when (and (>= (length line) 2) (string-equal line "|#" :end1 2))
> 	do (setq comment-lines lines)
>       finally (return (values lines  package-decl property-list))) 

Hmm.. are you sure the indentation here wasn't manually tuned or
written with some other indentation package?

With Emacs 21.3 (non-CVS version) I get the same "bad" indentation as
with the CVS version and my custom settings.

I also don't see any code in the 21.3 cl-indent that would be able to
recognize "else" clauses and the like.  If your version can actually
do that, please post it.

[It should also be noted that a suboptimal LOOP indentation function
is actually a feature because it stops people from writing monster
loops as the one above.]

Helmut.




More information about the slime-devel mailing list