[slime-cvs] CVS slime/contrib
CVS User nsiivola
nsiivola at common-lisp.net
Sun May 15 19:36:57 UTC 2011
Update of /project/slime/cvsroot/slime/contrib
In directory common-lisp.net:/tmp/cvs-serv5828/contrib
Modified Files:
ChangeLog slime-cl-indent.el
Log Message:
slime-indentation: nicer newline-and-indent interaction with loop indentation
(For non-subclause aware loop indentation.)
--- /project/slime/cvsroot/slime/contrib/ChangeLog 2011/05/15 18:07:56 1.452
+++ /project/slime/cvsroot/slime/contrib/ChangeLog 2011/05/15 19:36:56 1.453
@@ -2,6 +2,8 @@
* slime-cl-indent.el (common-lisp-indent-function-1): Better #+
support.
+ (common-lisp-loop-part-indentation): Make newline-and-indent work better
+ with non-subclause-aware loop indentation.
2011-05-15 Didier Verna <didier at xemacs.org>
--- /project/slime/cvsroot/slime/contrib/slime-cl-indent.el 2011/05/15 18:07:56 1.18
+++ /project/slime/cvsroot/slime/contrib/slime-cl-indent.el 2011/05/15 19:36:56 1.19
@@ -164,7 +164,7 @@
(beginning-of-line)
(cond ((eq 'simple type)
(+ loop-indentation lisp-simple-loop-indentation))
- ((looking-at "^\\s-*\\(:?\\sw+\\|;\\)")
+ ((looking-at "^\\s-*\\(:?\\sw+\\|;\\|)\\|\n\\)")
(list (+ loop-indentation 6) loop-start))
(t
(list (+ loop-indentation 9) loop-start)))))
@@ -1028,7 +1028,7 @@
(while (not (eobp))
(forward-line 1)
(ignore-errors (delete-char 1) (setf mess t))))
- (if (not mess)
+ (if (or (not mess) (equal (buffer-string) test))
(error "Couldn't mess up indentation?")))
(indent-sexp)
(if (equal (buffer-string) test)
@@ -1184,7 +1184,17 @@
(sdf))"
"
(list foo #+foo (foo)
- #-foo (no-foo))")))
+ #-foo (no-foo))"
+ (((lisp-loop-indent-subclauses t))
+ "
+ (loop for x in foo1
+ for y in quux1
+ )")
+ (((lisp-loop-indent-subclauses nil))
+ "
+ (loop for x in foo
+ for y in quux
+ )"))))
More information about the slime-cvs
mailing list