[slime-cvs] CVS slime

CVS User heller heller at common-lisp.net
Fri Feb 4 14:26:45 UTC 2011


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

Modified Files:
	ChangeLog swank.lisp 
Log Message:
Be careful with interning.

* swank.lisp (find-definitions-for-emacs): Use parse-symbol.

--- /project/slime/cvsroot/slime/ChangeLog	2011/02/04 14:26:36	1.2175
+++ /project/slime/cvsroot/slime/ChangeLog	2011/02/04 14:26:45	1.2176
@@ -1,5 +1,11 @@
 2011-02-04  Helmut Eller  <heller at common-lisp.net>
 
+	Be careful with interning.
+
+	* swank.lisp (find-definitions-for-emacs): Use parse-symbol.
+
+2011-02-04  Helmut Eller  <heller at common-lisp.net>
+
 	Don't double encode results for eval-in-emacs.
 
 	* slime.el (slime-check-eval-in-emacs-result): New.
--- /project/slime/cvsroot/slime/swank.lisp	2011/02/04 14:26:36	1.739
+++ /project/slime/cvsroot/slime/swank.lisp	2011/02/04 14:26:45	1.740
@@ -2035,7 +2035,8 @@
                  (char-upcase char)))))
 
 
-(defun find-symbol-with-status (symbol-name status &optional (package *package*))
+(defun find-symbol-with-status (symbol-name status 
+                                &optional (package *package*))
   (multiple-value-bind (symbol flag) (find-symbol symbol-name package)
     (if (and flag (eq flag status))
         (values symbol flag)
@@ -3306,9 +3307,10 @@
 (defslimefun find-definitions-for-emacs (name)
   "Return a list ((DSPEC LOCATION) ...) of definitions for NAME.
 DSPEC is a string and LOCATION a source location. NAME is a string."
-  (multiple-value-bind (sexp error) (ignore-errors (from-string name))
-    (unless error
-      (mapcar #'xref>elisp (find-definitions sexp)))))
+  (multiple-value-bind (symbol found) (with-buffer-syntax () 
+                                        (parse-symbol name))
+    (when found
+      (mapcar #'xref>elisp (find-definitions symbol)))))
 
 ;;; Generic function so contribs can extend it.
 (defgeneric xref-doit (type thing)





More information about the slime-cvs mailing list