[slime-cvs] CVS slime

CVS User sboukarev sboukarev at common-lisp.net
Mon Sep 20 16:09:13 UTC 2010


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

Modified Files:
	ChangeLog swank-cmucl.lisp 
Log Message:
* swank-cmucl.lisp (character-completion-set): Implement. Requires
recent versions of CMUCL.
Patch by Raymond Toy.


--- /project/slime/cvsroot/slime/ChangeLog	2010/09/18 09:34:05	1.2141
+++ /project/slime/cvsroot/slime/ChangeLog	2010/09/20 16:09:13	1.2142
@@ -1,3 +1,9 @@
+2010-09-20  Stas Boukarev  <stassats at gmail.com>
+
+	* swank-cmucl.lisp (character-completion-set): Implement. Requires
+	recent versions of CMUCL.
+	Patch by Raymond Toy.
+
 2010-09-18  Tobias C. Rittweiler <tcr at freebits.de>
 
 	* swank-backend.lisp (valid-function-name-p): New interface.
--- /project/slime/cvsroot/slime/swank-cmucl.lisp	2010/09/02 17:21:09	1.230
+++ /project/slime/cvsroot/slime/swank-cmucl.lisp	2010/09/20 16:09:13	1.231
@@ -2556,3 +2556,23 @@
       (call-program args :output t)
       (delete-file infile)
       outfile)))
+
+#+#.(swank-backend:with-symbol 'unicode-complete 'lisp)
+(defun match-semi-standard (prefix matchp)
+  ;; Handle the CMUCL's short character names.
+  (loop for name in lisp::char-name-alist
+     when (funcall matchp prefix (car name))
+     collect (car name)))
+
+#+#.(swank-backend:with-symbol 'unicode-complete 'lisp)
+(defimplementation character-completion-set (prefix matchp)
+  (let ((names (lisp::unicode-complete prefix)))
+    ;; Match prefix against semistandard names.  If there's a match,
+    ;; add it to our list of matches.
+    (let ((semi-standard (match-semi-standard prefix matchp)))
+      (when semi-standard
+        (setf names (append semi-standard names))))
+    (setf names (mapcar #'string-capitalize names))
+    (loop for n in names
+       when (funcall matchp prefix n)
+       collect n)))





More information about the slime-cvs mailing list