Helmut Eller replied:
This wasn't our change; it's a change in CVS Emacs. According to ChangeLogs, the LOOP indentation code in CVS Emacs was changed in March 2002 by Gerd Moellmann. It seems that the intention was that loops should be indented as:
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.
I much prefer the EMACS indentation.
I prefer this style too. I have
(setq lisp-simple-loop-indentation 1) (setq lisp-loop-keyword-indentation 6) (setq lisp-loop-forms-indentation 6)
in my .emacs. With this settings most code gets indented as before.
I added the above to my emacs/slime initialization but there are still some problems. For example:
;;; new 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)))
;;; 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)))