[slime-cvs] CVS slime

CVS User trittweiler trittweiler at common-lisp.net
Tue Apr 21 13:01:16 UTC 2009


Update of /project/slime/cvsroot/slime
In directory cl-net:/tmp/cvs-serv4943

Modified Files:
	slime.el ChangeLog 
Log Message:
	* slime.el (slime-handle-indentation-update): Revert change from
	2009-03-09; that was a thinko.
	([test] indentation): Some basic test case for correct indentation.


--- /project/slime/cvsroot/slime/slime.el	2009/04/03 20:43:11	1.1152
+++ /project/slime/cvsroot/slime/slime.el	2009/04/21 13:01:16	1.1153
@@ -6737,11 +6737,11 @@
   (dolist (info alist)
     (let ((symbol (intern (car info)))
           (indent (cdr info)))
-      (put symbol 'slime-indent indent)
       ;; Does the symbol have an indentation value that we set?
       (when (equal (get symbol 'common-lisp-indent-function)
                    (get symbol 'slime-indent))
-        (put symbol 'common-lisp-indent-function indent))
+        (put symbol 'common-lisp-indent-function indent)
+        (put symbol 'slime-indent indent))
       (run-hook-with-args 'slime-indentation-update-hooks symbol indent))))
 
 
@@ -7853,6 +7853,44 @@
                          (downcase (buffer-string)))))
     (setq slime-buffer-package ":cl-user"))
 
+(def-slime-test indentation (buffer-content point-markers)
+        "Check indentation update to work correctly."
+    '(("
+\(in-package :swank)
+
+\(defmacro with-lolipop (&body body)
+  `(progn , at body))
+
+\(defmacro lolipop (&body body)
+  `(progn , at body))
+
+\(with-lolipop
+  1
+  2
+  42)
+
+\(lolipop
+  1
+  2
+  23)
+"
+       ("23" "42")))
+  (with-temp-buffer
+    (lisp-mode)
+    (slime-mode 1)
+    (insert buffer-content)
+    (slime-compile-region (point-min) (point-max))
+    (slime-sync-to-top-level 3)
+    (slime-update-indentation)
+    (slime-sync-to-top-level 3)
+    (dolist (marker point-markers)
+      (search-backward marker)
+      (beginning-of-defun)
+      (indent-sexp))
+    (slime-test-expect "Correct buffer content"
+                       buffer-content
+                       (substring-no-properties (buffer-string)))))
+
 (def-slime-test break
     (times exp)
     "Test whether BREAK invokes SLDB."
--- /project/slime/cvsroot/slime/ChangeLog	2009/04/03 21:14:11	1.1726
+++ /project/slime/cvsroot/slime/ChangeLog	2009/04/21 13:01:16	1.1727
@@ -1,3 +1,9 @@
+2009-04-21  Tobias C. Rittweiler  <tcr at freebits.de>
+
+	* slime.el (slime-handle-indentation-update): Revert change from
+	2009-03-09; that was a thinko.
+	([test] indentation): Some basic test case for correct indentation.
+
 2009-04-03  Tobias C. Rittweiler  <tcr at freebits.de>
 
 	* swank-sbcl.lisp (swank-compile-file): Return T for the FAILURE-P





More information about the slime-cvs mailing list