[slime-cvs] CVS slime/contrib
CVS User nsiivola
nsiivola at common-lisp.net
Thu Dec 8 13:54:19 UTC 2011
Update of /project/slime/cvsroot/slime/contrib
In directory tiger.common-lisp.net:/tmp/cvs-serv17857/contrib
Modified Files:
ChangeLog slime-cl-indent-test.txt slime-cl-indent.el
Log Message:
slime-indentation: fix local function lambda-list indentation
--- /project/slime/cvsroot/slime/contrib/ChangeLog 2011/12/08 13:40:55 1.524
+++ /project/slime/cvsroot/slime/contrib/ChangeLog 2011/12/08 13:54:19 1.525
@@ -1,5 +1,16 @@
2011-12-08 Nikodemus Siivola <nikodemus at random-state.net>
+ * slime-cl-indent.el (lisp-indent-maximum-backtracking)
+ ("basic"): Increase default backtracking level to 6, so that at
+ least mildly nested macrolet-lambda lists can be identified as
+ such.
+
+ * slime-cl-indent.el (common-lisp-init-standard-indentation): Fix
+ FLET indentation spec, which caused local function lambda-lists to
+ be indented as part of the body.
+
+ * slime-cl-indent-test.txt (tests 72-76): New tests.
+
* slime-cl-indent.el (common-lisp-init-standard-indentation): New function,
wraps initialization of the common-lisp-indent-function properties.
--- /project/slime/cvsroot/slime/contrib/slime-cl-indent-test.txt 2011/12/03 15:38:19 1.16
+++ /project/slime/cvsroot/slime/contrib/slime-cl-indent-test.txt 2011/12/08 13:54:19 1.17
@@ -763,3 +763,67 @@
(loop :repeat 100 ;; This too
;; is a beginning
#:do (foo)))
+
+;;; Test: 72
+;;
+;; lisp-lambda-list-keyword-parameter-alignment: nil
+;; lisp-lambda-list-keyword-alignment: nil
+
+(flet ((foo (foo &optional opt1
+ opt2
+ &rest rest)
+ (list foo opt1 opt2
+ rest)))
+ ...)
+
+;;; Test: 73
+;;
+;; lisp-lambda-list-keyword-parameter-alignment: t
+;; lisp-lambda-list-keyword-alignment: nil
+
+(flet ((foo (foo &optional opt1
+ opt2
+ &rest rest)
+ (list foo opt1 opt2
+ rest)))
+ ...)
+
+;;; Test: 74
+;;
+;; lisp-lambda-list-keyword-parameter-alignment: nil
+;; lisp-lambda-list-keyword-alignment: t
+
+(flet ((foo (foo &optional opt1
+ opt2
+ &rest rest)
+ (list foo opt1 opt2
+ rest)))
+ ...)
+
+;;; Test: 75
+;;
+;; lisp-lambda-list-keyword-parameter-alignment: t
+;; lisp-lambda-list-keyword-alignment: t
+
+(flet ((foo (foo &optional opt1
+ opt2
+ &rest rest)
+ (list foo opt1 opt2
+ rest)))
+ ...)
+
+;;; Test: 76
+;;
+;; lisp-lambda-list-keyword-parameter-alignment: t
+;; lisp-lambda-list-keyword-alignment: t
+
+(macrolet ((foo
+ (foo (&optional xopt1
+ xopt2
+ &rest xrest)
+ &optional opt1
+ opt2
+ &rest rest)
+ (list foo opt1 opt2
+ rest)))
+ ...)
--- /project/slime/cvsroot/slime/contrib/slime-cl-indent.el 2011/12/08 13:40:55 1.60
+++ /project/slime/cvsroot/slime/contrib/slime-cl-indent.el 2011/12/08 13:54:19 1.61
@@ -37,10 +37,10 @@
"Indentation in Lisp."
:group 'lisp)
-(defcustom lisp-indent-maximum-backtracking 3
+(defcustom lisp-indent-maximum-backtracking 6
"Maximum depth to backtrack out from a sublist for structured indentation.
If this variable is 0, no backtracking will occur and forms such as `flet'
-may not be correctly indented."
+may not be correctly indented if this value is less than 4."
:type 'integer
:group 'lisp-indent)
@@ -419,7 +419,7 @@
customizations. It also adjusts comment indentation from default.
All other predefined modes inherit from basic."
(:variables
- (lisp-indent-maximum-backtracking 3)
+ (lisp-indent-maximum-backtracking 6)
(lisp-tag-indentation 1)
(lisp-tag-body-indentation 3)
(lisp-backquote-indentation t)
@@ -1544,7 +1544,7 @@
(dolist ((&whole 4 2 1) &body))
(dotimes (as dolist))
(eval-when 1)
- (flet ((&whole 4 &rest (&whole 1 &lambda &body)) &body))
+ (flet ((&whole 4 &rest (&whole 1 4 &lambda &body)) &body))
(labels (as flet))
(macrolet (as flet))
(generic-flet (as flet))
More information about the slime-cvs
mailing list