[slime-cvs] CVS slime/contrib
CVS User sboukarev
sboukarev at common-lisp.net
Thu Aug 27 15:46:01 UTC 2009
Update of /project/slime/cvsroot/slime/contrib
In directory cl-net:/tmp/cvs-serv11761/contrib
Modified Files:
ChangeLog slime-c-p-c.el
Log Message:
* slime-c-p-c.el (slime-contextual-completions): Detect characters properly.
(slime-completions-for-character): Append #\ to the character names.
This fixes character completion, reported by Nick Levine.
--- /project/slime/cvsroot/slime/contrib/ChangeLog 2009/08/21 17:16:43 1.236
+++ /project/slime/cvsroot/slime/contrib/ChangeLog 2009/08/27 15:46:01 1.237
@@ -1,3 +1,9 @@
+2009-08-27 Stas Boukarev <stassats at gmail.com>
+
+ * slime-c-p-c.el (slime-contextual-completions): Detect characters properly.
+ (slime-completions-for-character): Append #\ to the character names.
+ This fixes character completion, reported by Nick Levine.
+
2009-08-21 Helmut Eller <heller at common-lisp.net>
* inferior-slime.el (inferior-slime-show-transcript)
--- /project/slime/cvsroot/slime/contrib/slime-c-p-c.el 2009/02/27 17:37:14 1.10
+++ /project/slime/cvsroot/slime/contrib/slime-c-p-c.el 2009/08/27 15:46:01 1.11
@@ -127,8 +127,8 @@
;; If no matching keyword was found, do regular symbol
;; completion.
))))
- ((and (> beg 2)
- (string= (buffer-substring-no-properties (- beg 2) beg) "#\\"))
+ ((and (>= (length token) 2)
+ (string= (dbgmsg (subseq token 0 2)) "#\\"))
;; Character name completion
(return-from slime-contextual-completions
(slime-completions-for-character token))))
@@ -145,7 +145,12 @@
',arg-indices)))
(defun slime-completions-for-character (prefix)
- (slime-eval `(swank:completions-for-character ,prefix)))
+ (flet ((append-char-syntax (string) (concat "#\\" string)))
+ (let ((result (slime-eval `(swank:completions-for-character
+ ,(subseq prefix 2)))))
+ (when (car result)
+ (list (mapcar 'append-char-syntax (car result))
+ (append-char-syntax (cadr result)))))))
;;; Complete form
More information about the slime-cvs
mailing list