[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
intern-function-name
- To: commonloops.pa@Xerox.COM
- Subject: intern-function-name
- From: Kim A. Barrett <IIM@ECLA.USC.EDU>
- Date: Tue, 28 Jun 88 15:46:11 PDT
- Cc: iim@ECLA.USC.EDU
- Redistributed: commonloops.pa
I more or less agree with Gregor about what the definition of
intern-function-name should be. The problem with the current definition is
that it doesn't go quite far enough in including package qualifiers in the
names, and isn't necessarily very consistent about what package the symbol is
interned into. Back before I had fixed the couple of known places in our
system which required that function names be symbols, I was using the following
definition of intern-function-name.
kab
(defvar *intern-function-name-package*
(make-package "Package for PCL::INTERN-FUNCTION-NAME -- Hands off"
:use ())) ;don't use anybody, even LISP
(defun intern-function-name (name)
(etypecase name
(symbol name)
(list
(let ((*package* *intern-function-name-package*))
(intern (write-to-string name
:escape t ;to include package specifiers
:level nil ;avoid cuttoff of long or
:length nil ; deeply nested names
;; the rest of these are specified to ensure
;; consistency from one call to the next,
;; making this function insensitive to current
;; bindings of the corresponding printer vars
:radix nil
:base 10
:circle nil
:pretty nil
:case :upcase
:gensym t
:array t ;for completeness, why not
))))))
-------