[slime-cvs] CVS slime/contrib

CVS User nsiivola nsiivola at common-lisp.net
Thu Jun 9 20:47:46 UTC 2011


Update of /project/slime/cvsroot/slime/contrib
In directory common-lisp.net:/tmp/cvs-serv20453/contrib

Modified Files:
	ChangeLog slime-cl-indent.el 
Log Message:
slime-indentation: bugfix in fallback method

--- /project/slime/cvsroot/slime/contrib/ChangeLog	2011/06/09 16:58:08	1.469
+++ /project/slime/cvsroot/slime/contrib/ChangeLog	2011/06/09 20:47:46	1.470
@@ -2,6 +2,9 @@
 
 	* slime-cl-indent.el (lisp-lambda-list-keyword-parameter-alignment):
 	fix docstring: key1 and key3 were aligned in source, but not in *Help*.
+	(common-lisp-delete-style): Missing function, needed by tests.
+	(common-lisp-indent-function-1, run-lisp-indent-tests): Fix fallback
+	to handle case of first function argument on its own line.
 
 	Support for per-package derived indentation.
 
--- /project/slime/cvsroot/slime/contrib/slime-cl-indent.el	2011/06/09 16:58:09	1.32
+++ /project/slime/cvsroot/slime/contrib/slime-cl-indent.el	2011/06/09 20:47:46	1.33
@@ -237,6 +237,9 @@
 ;;; Common Lisp indentation style specifications.
 (defvar common-lisp-styles (make-hash-table :test 'equal))
 
+(defun common-lisp-delete-style (stylename)
+  (remhash stylename common-lisp-styles))
+
 (defun common-lisp-add-style (stylename base variables indentation hooks documentation)
   (let* ((style (or (gethash stylename common-lisp-styles)
                     (let ((new (list (intern stylename)             ; name
@@ -826,11 +829,15 @@
           ;; but would align the Z with Y.
           (ignore-errors
             (save-excursion
-              (goto-char containing-sexp)
-              (down-list)
-              (forward-sexp 2)
-              (backward-sexp)
-              (current-column)))))))
+              (goto-char indent-point)
+              (back-to-indentation)
+              (let ((p (point)))
+                (goto-char containing-sexp)
+                (down-list)
+                (forward-sexp 2)
+                (backward-sexp)
+                (unless (= p (point))
+                  (current-column)))))))))
 
 
 (defun common-lisp-indent-call-method (function method path state indent-point
@@ -1771,7 +1778,10 @@
      (foo fii
           (or x
               y) t
-          bar)")))
+          bar)"
+       "
+      (foo
+       (bar))")))
 
 
 





More information about the slime-cvs mailing list