Permalink
Browse files

intern symbols unless they are known to reference an existing symbol

  • Loading branch information...
1 parent fa37783 commit 9cb3c4186a079a38fab1a1dd865716dbe180bb2f @hanshuebner committed Dec 18, 2010
Showing with 4 additions and 3 deletions.
  1. +4 −3 src/data/encoding.lisp
View
@@ -362,16 +362,17 @@
(pushnew symbol symbols)))))
(defun find-symbol-interactively (package-name symbol-name usage)
- (let ((keyword (string-equal package-name "KEYWORD")))
+ (let ((intern (or (string-equal package-name "KEYWORD")
+ (null usage))))
(restart-case
(multiple-value-bind (symbol status)
- (funcall (if keyword
+ (funcall (if intern
#'intern
#'find-symbol)
symbol-name
(or (find-package package-name)
(error "package ~A for symbol ~A~@[ naming ~A~] not found" package-name symbol-name usage)))
- (if (or keyword status)
+ (if (or intern status)
symbol
(error "symbol ~A~@[ naming ~A~] not found in package ~A" symbol-name usage package-name)))
(use-other-symbol (new-symbol)

0 comments on commit 9cb3c41

Please sign in to comment.