(cond
((null form) "NIL")
((symbolp form)
- (multiple-value-bind (found-symbol status)
- (find-symbol (symbol-name form))
- (if (eq found-symbol form)
- (escape-token (symbol-name form) (not (eq *package* *js-package*)))
- (let ((package (symbol-package form))
- (name (symbol-name form)))
- (concat (cond
- ((null package) "#")
- ((eq package (find-package "KEYWORD")) "")
- (t (escape-token (package-name package))))
- ":"
- (if (or (null package) (eq :external (second (multiple-value-list (find-symbol name package)))))
- "" ":")
- (escape-token name package))))))
+ (let ((name (symbol-name form))
+ (package (symbol-package form)))
+ (if (eq package *package*)
+ (escape-token (symbol-name form) (not (eq package *js-package*)))
+ (concat (cond
+ ((null package) "#")
+ ((eq package (find-package "KEYWORD")) "")
+ (t (escape-token (package-name package) t)))
+ ":"
+ (if (or (null package)
+ (multiple-value-bind (_ status)
+ (find-symbol name package)
+ (eq status :external)))
+ "" ":")
+ (escape-token name (not (eq (symbol-package form) *js-package*)))))))
((integerp form) (integer-to-string form))
((floatp form) (float-to-string form))
((characterp form)