[slime-cvs] CVS update: slime/swank.lisp

Luke Gorrie lgorrie at common-lisp.net
Fri Jul 16 21:38:49 UTC 2004


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

Modified Files:
	swank.lisp 
Log Message:
(known-to-emacs-p): Removed filtering of def* and with-*. Now handled
by Emacs.

Date: Fri Jul 16 14:38:48 2004
Author: lgorrie

Index: slime/swank.lisp
diff -u slime/swank.lisp:1.215 slime/swank.lisp:1.216
--- slime/swank.lisp:1.215	Fri Jul 16 11:12:41 2004
+++ slime/swank.lisp	Fri Jul 16 14:38:48 2004
@@ -2648,15 +2648,6 @@
     (let ((fullp (need-full-indentation-update-p *emacs-connection*)))
       (perform-indentation-update *emacs-connection* fullp))))
 
-(defun perform-indentation-update (connection force)
-  (let* ((cache (connection.indentation-cache connection))
-         (delta (update-indentation/delta-for-emacs cache force)))
-    (when force
-      (setf (connection.indentation-cache-packages connection)
-            (list-all-packages)))
-    (when delta
-      (send-to-emacs (list :indentation-update delta)))))
-
 (defun need-full-indentation-update-p (connection)
   "Return true if the whole indentation cache should be updated.
 This is a heuristic to avoid scanning all symbols all the time:
@@ -2664,6 +2655,17 @@
   (set-difference (list-all-packages)
                   (connection.indentation-cache-packages connection)))
 
+(defun perform-indentation-update (connection force)
+  "Update the indentation cache in CONNECTION and update Emacs.
+If FORCE is true then start again without considering the old cache."
+  (let ((cache (connection.indentation-cache connection)))
+    (when force (clrhash cache))
+    (let ((delta (update-indentation/delta-for-emacs cache force)))
+      (setf (connection.indentation-cache-packages connection)
+            (list-all-packages))
+      (unless (null delta)
+        (send-to-emacs (list :indentation-update delta))))))
+
 (defun update-indentation/delta-for-emacs (cache &optional force)
   "Update the cache and return the changes in a (SYMBOL . INDENT) list.
 If FORCE is true then check all symbols, otherwise only check symbols
@@ -2691,10 +2693,7 @@
 
 (defun known-to-emacs-p (symbol)
   "Return true if Emacs has special rules for indenting SYMBOL."
-  (or (cl-symbol-p symbol)
-      (let ((name (symbol-name symbol)))
-        (or (prefix-match-p "DEF" name)
-            (prefix-match-p "WITH-" name)))))
+  (cl-symbol-p symbol))
 
 (defun symbol-indentation (symbol)
   "Return a form describing the indentation of SYMBOL.





More information about the slime-cvs mailing list