[slime-cvs] CVS slime/contrib
CVS User nsiivola
nsiivola at common-lisp.net
Fri Jun 10 15:19:31 UTC 2011
Update of /project/slime/cvsroot/slime/contrib
In directory common-lisp.net:/tmp/cvs-serv32098/contrib
Modified Files:
ChangeLog slime-cl-indent-test.txt slime-cl-indent.el
Log Message:
slime-indentation: another bug in the fallback method
Handle (foo (
bar quux
zor))
and similar.
--- /project/slime/cvsroot/slime/contrib/ChangeLog 2011/06/10 14:18:39 1.471
+++ /project/slime/cvsroot/slime/contrib/ChangeLog 2011/06/10 15:19:31 1.472
@@ -1,5 +1,15 @@
2011-06-10 Nikodemus Siivola <nikodemus at random-state.net>
+ slime-indentation: More adjustment to the fallback method.
+
+ * slime-cl-indent.el (common-lisp-indent-function-1): handle
+ case of empty or comment line following the opening paren
+ of the containing expression.
+
+ * slime-cl-indent-test.txt: new test case.
+
+ slime-indentation: Test refactoring.
+
* slime-cl-indent.el (common-lisp-indent-test): replaces
test-lisp-indent.
(common-lisp-run-indentation-tests): replaces
--- /project/slime/cvsroot/slime/contrib/slime-cl-indent-test.txt 2011/06/10 14:18:39 1.1
+++ /project/slime/cvsroot/slime/contrib/slime-cl-indent-test.txt 2011/06/10 15:19:31 1.2
@@ -346,3 +346,18 @@
(foo
(bar))
+
+;;; Test: 32
+;;
+;; comment-indent-function: (lambda () nil)
+;; comment-column: nil
+
+(unknown (;; KLUDGE: comment-indent hackery to get
+ ;; the comment right. Otherwise we get a
+ ;; space before the first ;.
+ bar quux
+ zot)
+ (#|fii|#
+ zot)
+ (
+ quux))
--- /project/slime/cvsroot/slime/contrib/slime-cl-indent.el 2011/06/10 14:18:39 1.34
+++ /project/slime/cvsroot/slime/contrib/slime-cl-indent.el 2011/06/10 15:19:31 1.35
@@ -834,10 +834,14 @@
(let ((p (point)))
(goto-char containing-sexp)
(down-list)
- (forward-sexp 2)
- (backward-sexp)
- (unless (= p (point))
- (current-column)))))))))
+ (let ((one (current-column)))
+ (skip-chars-forward " \t")
+ (if (or (eolp) (looking-at ";"))
+ one
+ (forward-sexp 2)
+ (backward-sexp)
+ (unless (= p (point))
+ (current-column)))))))))))
(defun common-lisp-indent-call-method (function method path state indent-point
@@ -1492,7 +1496,6 @@
(with-temp-buffer
(lisp-mode)
(setq indent-tabs-mode nil)
- (common-lisp-set-style "common-lisp-indent-test")
(dolist (bind bindings)
(set (make-local-variable (car bind)) (cdr bind)))
(insert test)
More information about the slime-cvs
mailing list