/[slime]/slime/swank.lisp
ViewVC logotype

Diff of /slime/swank.lisp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.667 by heller, Sat Oct 31 08:54:46 2009 UTC revision 1.668 by trittweiler, Sat Oct 31 20:47:13 2009 UTC
# Line 2048  considered to represent a symbol interna Line 2048  considered to represent a symbol interna
2048                   (char-downcase char)                   (char-downcase char)
2049                   (char-upcase char)))))                   (char-upcase char)))))
2050    
2051    
2052    (defun find-symbol-with-status (symbol-name status &optional (package *package*))
2053      (multiple-value-bind (symbol flag) (find-symbol symbol-name package)
2054        (if (and flag (eq flag status))
2055            (values symbol flag)
2056            (values nil nil))))
2057    
2058  (defun parse-symbol (string &optional (package *package*))  (defun parse-symbol (string &optional (package *package*))
2059    "Find the symbol named STRING.    "Find the symbol named STRING.
2060  Return the symbol and a flag indicating whether the symbols was found."  Return the symbol and a flag indicating whether the symbols was found."
2061    (multiple-value-bind (sname pname) (tokenize-symbol-thoroughly string)    (multiple-value-bind (sname pname internalp)
2062          (tokenize-symbol-thoroughly string)
2063      (let ((package (cond ((string= pname "") keyword-package)      (let ((package (cond ((string= pname "") keyword-package)
2064                           (pname              (find-package pname))                           (pname              (find-package pname))
2065                           (t                  package))))                           (t                  package))))
2066        (if package        (if package
2067            (multiple-value-bind (symbol flag) (find-symbol sname package)            (multiple-value-bind (symbol flag)
2068                  (if internalp
2069                      (find-symbol sname package)
2070                      (find-symbol-with-status sname ':external package))
2071              (values symbol flag sname package))              (values symbol flag sname package))
2072            (values nil nil nil nil)))))            (values nil nil nil nil)))))
2073    

Legend:
Removed from v.1.667  
changed lines
  Added in v.1.668

  ViewVC Help
Powered by ViewVC 1.1.5