Here is support for character name completion for cmucl. The attached file can be placed at the end of swank-cmucl.lisp. This code will go into the next snapshot of cmucl, so the bulk of the code is conditionalized on lisp::unicode-complete not existing.
Because the name space is so large, completion is done kind of incrementally. (If full completion were done, think of how many completions there would be for #\CJK!) The name is completed upto the next "piece". As you type more, more pieces are added. The completions might look a little weird, but they (usually) expand to the correct value eventually. (This is an artifact of how cmucl stores the character names and the desire to do this incrementally.)
There's at least one bug: #\ne shows NE as a completion, but that's not a valid name. But the completion also shows the valid continuations.
I hope this is useful to someone.
Ray
On 9/16/10 11:58 PM, Raymond Toy wrote:
Here is support for character name completion for cmucl. The attached file can be placed at the end of swank-cmucl.lisp. This code will go
Oops. I got the conditionalization backwards. It should say:
#+(and unicode #.(cl:if (cl:find-symbol "UNICODE-COMPLETE" "LISP") '(or) '(and)))
Sorry about that.
Ray
On 9/17/10 12:05 AM, Raymond Toy wrote:
On 9/16/10 11:58 PM, Raymond Toy wrote:
Here is support for character name completion for cmucl. The attached file can be placed at the end of swank-cmucl.lisp. This code will go
Couple more small changes. To be consistent with the character names that cmucl recognizes, use the following replacement for match-semi-standard:
(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)))
(I suppose a better name could be used since it's not semi-standard anymore.)
Finally, in unicode-complete, near the end, there are two extraneous formats about cjk that should be removed.
Thanks,
Ray