[slime-cvs] CVS update: slime/swank.lisp
Luke Gorrie
lgorrie at common-lisp.net
Wed Oct 6 08:59:03 UTC 2004
Update of /project/slime/cvsroot/slime
In directory common-lisp.net:/tmp/cvs-serv16841
Modified Files:
swank.lisp
Log Message:
(update-indentation/delta-for-emacs): Configure Emacs indentation
settings not just for the symbol name but for all package-qualified
forms of it as well.
Date: Wed Oct 6 10:59:02 2004
Author: lgorrie
Index: slime/swank.lisp
diff -u slime/swank.lisp:1.246 slime/swank.lisp:1.247
--- slime/swank.lisp:1.246 Tue Oct 5 23:37:36 2004
+++ slime/swank.lisp Wed Oct 6 10:59:02 2004
@@ -3248,9 +3248,8 @@
(when indent
(unless (equal (gethash symbol cache) indent)
(setf (gethash symbol cache) indent)
- (push (cons (string-downcase (symbol-name symbol))
- indent)
- alist))))))
+ (dolist (readname (all-qualified-readnames symbol))
+ (push (cons readname indent) alist)))))))
(if force
(do-all-symbols (symbol)
(consider symbol))
@@ -3258,6 +3257,19 @@
(when (eq (symbol-package symbol) *buffer-package*)
(consider symbol)))))
alist))
+
+(defun all-qualified-readnames (symbol)
+ "Return the list of SYMBOL's readnames with each package qualifier.
+The resulting strings are always downcase (for Emacs indentation)."
+ (cons (symbol-name symbol)
+ (loop for p in (package-names (symbol-package symbol))
+ collect (format nil "~A:~A"
+ (string-downcase p)
+ (string-downcase (symbol-name symbol))))))
+
+(defun package-names (package)
+ "Return the name and all nicknames of PACKAGE in a list."
+ (cons (package-name package) (package-nicknames package)))
(defun cl-symbol-p (symbol)
"Is SYMBOL a symbol in the COMMON-LISP package?"
More information about the slime-cvs
mailing list