[slime-cvs] CVS slime
CVS User sboukarev
sboukarev at common-lisp.net
Thu Dec 27 20:22:35 UTC 2012
Update of /project/slime/cvsroot/slime
In directory tiger.common-lisp.net:/tmp/cvs-serv1490
Modified Files:
ChangeLog swank.lisp
Log Message:
* swank.lisp (find-definitions-find-symbol-or-package): Rename
from `find-definitions-find-symbol'. Packages are not named by
symbols and an uninterned string can refer to a package. In case
it finds a package, return a new uninterned symbol.
--- /project/slime/cvsroot/slime/ChangeLog 2012/12/17 11:33:47 1.2377
+++ /project/slime/cvsroot/slime/ChangeLog 2012/12/27 20:22:35 1.2378
@@ -1,3 +1,10 @@
+2012-12-27 Stas Boukarev <stassats at gmail.com>
+
+ * swank.lisp (find-definitions-find-symbol-or-package): Rename
+ from `find-definitions-find-symbol'. Packages are not named by
+ symbols and an uninterned string can refer to a package. In case
+ it finds a package, return a new uninterned symbol.
+
2012-12-17 Stas Boukarev <stassats at gmail.com>
* swank-ecl.lisp (swank-mop): MOP works well now on ECL, import
--- /project/slime/cvsroot/slime/swank.lisp 2012/12/17 11:14:48 1.800
+++ /project/slime/cvsroot/slime/swank.lisp 2012/12/27 20:22:35 1.801
@@ -2927,17 +2927,22 @@
((:sldb frame var)
(frame-var-value frame var))))
-(defvar *find-definitions-right-trim* ",:.")
-(defvar *find-definitions-left-trim* "#:")
+(defvar *find-definitions-right-trim* ",:.>")
+(defvar *find-definitions-left-trim* "#:<")
-(defun find-definitions-find-symbol (name)
+(defun find-definitions-find-symbol-or-package (name)
(flet ((do-find (name)
- (multiple-value-bind (symbol found)
+ (multiple-value-bind (symbol found name)
(with-buffer-syntax ()
(parse-symbol name))
- (when found
- (return-from find-definitions-find-symbol
- (values symbol found))))))
+ (cond (found
+ (return-from find-definitions-find-symbol-or-package
+ (values symbol found)))
+ ;; Packages are not named by symbols, so
+ ;; not-interned symbols can refer to packages
+ ((find-package name)
+ (return-from find-definitions-find-symbol-or-package
+ (values (make-symbol name) t)))))))
(do-find name)
(do-find (string-right-trim *find-definitions-right-trim* name))
(do-find (string-left-trim *find-definitions-left-trim* name))
@@ -2949,7 +2954,7 @@
"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 (symbol found)
- (find-definitions-find-symbol name)
+ (find-definitions-find-symbol-or-package name)
(when found
(mapcar #'xref>elisp (find-definitions symbol)))))
More information about the slime-cvs
mailing list