From 6121300125cacaf29b61f0d3de199af73d43f725 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Tue, 21 Feb 2017 00:42:13 -0800 Subject: [PATCH] Eliminate references to symbol-name. --- doc/ref-manual/io.texi | 2 +- src/compiler/base/infnew.scm | 6 +-- src/compiler/machines/C/cutl.scm | 8 +-- src/compiler/machines/C/stackify.scm | 4 +- src/compiler/machines/C/stackops.scm | 2 +- .../machines/svm/assembler-compiler.scm | 6 +-- src/cref/object.scm | 2 +- src/cref/redpkg.scm | 2 +- src/edwin/abbrev.scm | 4 +- src/edwin/autold.scm | 2 +- src/edwin/calias.scm | 2 +- src/edwin/comman.scm | 17 ++++--- src/edwin/comtab.scm | 2 +- src/edwin/edtstr.scm | 2 +- src/edwin/hlpcom.scm | 4 +- src/edwin/modes.scm | 6 +-- src/edwin/modlin.scm | 2 +- src/edwin/process.scm | 2 +- src/edwin/rmail.scm | 6 +-- src/edwin/schmod.scm | 10 ++-- src/edwin/sendmail.scm | 12 ++--- src/edwin/xterm.scm | 2 +- src/ffi/cdecls.scm | 6 +-- src/ffi/generator.scm | 50 +++++++++---------- src/gdbm/gdbm.scm | 2 +- src/imail/imail-imap.scm | 8 +-- src/runtime/apropos.scm | 4 +- src/runtime/dbgutl.scm | 4 +- src/runtime/file-attributes.scm | 8 +-- src/runtime/gensym.scm | 2 +- src/runtime/html-form-codec.scm | 2 +- src/runtime/http-syntax.scm | 6 +-- src/runtime/httpio.scm | 2 +- src/runtime/infstr.scm | 2 +- src/runtime/infutl.scm | 4 +- src/runtime/parse.scm | 22 ++++---- src/runtime/record.scm | 2 +- src/runtime/rfc2822-headers.scm | 4 +- src/runtime/runtime.pkg | 10 ++-- src/runtime/sfile.scm | 6 +-- src/runtime/swank.scm | 4 +- src/runtime/symbol.scm | 11 +--- src/runtime/syntax-output.scm | 6 +-- src/runtime/uerror.scm | 2 +- src/runtime/unpars.scm | 2 +- src/runtime/url.scm | 6 +-- src/sf/subst.scm | 2 +- src/ssp/mod-lisp.scm | 8 +-- src/star-parser/shared.scm | 4 +- src/win32/ffimacro.scm | 2 +- src/xdoc/db.scm | 2 +- src/xdoc/xdoc.scm | 10 ++-- src/xml/rdf-nt.scm | 2 +- src/xml/rdf-struct.scm | 6 +-- src/xml/turtle.scm | 8 +-- src/xml/xhtml.scm | 2 +- src/xml/xml-names.scm | 10 ++-- src/xml/xml-output.scm | 12 ++--- src/xml/xml-parser.scm | 2 +- src/xml/xml-struct.scm | 6 +-- 60 files changed, 174 insertions(+), 182 deletions(-) diff --git a/doc/ref-manual/io.texi b/doc/ref-manual/io.texi index 116c28ee6..f68b14aba 100644 --- a/doc/ref-manual/io.texi +++ b/doc/ref-manual/io.texi @@ -3225,7 +3225,7 @@ Returns the @dfn{URI} of @var{xml-name}. The result always satisfies Returns the @dfn{qname} of @var{xml-name} as a string. Equivalent to @example -(symbol-name (xml-name->symbol @var{xml-name})) +(symbol->string (xml-name->symbol @var{xml-name})) @end example @end deffn diff --git a/src/compiler/base/infnew.scm b/src/compiler/base/infnew.scm index 5dd26fef3..ef9fc11a7 100644 --- a/src/compiler/base/infnew.scm +++ b/src/compiler/base/infnew.scm @@ -272,14 +272,14 @@ USA. label-bindings) (let ((map-label/fail (lambda (label) - (let ((key (symbol-name label))) + (let ((key (symbol->string label))) (let ((datum (hash-table/get labels key no-datum))) (if (eq? datum no-datum) (error "Missing label:" key)) datum)))) (map-label/false (lambda (label) - (hash-table/get labels (symbol-name label) #f)))) + (hash-table/get labels (symbol->string label) #f)))) (for-each (lambda (label) (set-dbg-label/external?! (map-label/fail label) true)) external-labels) @@ -321,7 +321,7 @@ USA. (let ((offsets (make-rb-tree = <))) (for-each (lambda (binding) (let ((offset (cdr binding)) - (name (symbol-name (car binding)))) + (name (symbol->string (car binding)))) (let ((datum (rb-tree/lookup offsets offset #f))) (if datum (set-cdr! datum (cons name (cdr datum))) diff --git a/src/compiler/machines/C/cutl.scm b/src/compiler/machines/C/cutl.scm index c5bd9b55e..75d4e54d7 100644 --- a/src/compiler/machines/C/cutl.scm +++ b/src/compiler/machines/C/cutl.scm @@ -97,7 +97,7 @@ USA. (define (c:line-item item) (cond ((string? item) item) ((char? item) (string item)) - ((symbol? item) (symbol-name item)) + ((symbol? item) (symbol->string item)) ((number? item) ;; XXX Kludgey test for negative zero, to support building ;; from versions when NUMBER->STRING failed to do that itself. @@ -387,11 +387,11 @@ USA. (let ((types (let ((types '(char short int long float double))) `(,@(map (lambda (t) - (cons t (symbol-name t))) + (cons t (symbol->string t))) types) ,@(map (lambda (t) (cons (symbol 'u t) - (string-append "unsigned " (symbol-name t)))) + (string-append "unsigned " (symbol->string t)))) types) (sobj . "SCHEME_OBJECT"))))) `(,@types @@ -412,7 +412,7 @@ USA. (define (c:var item) (cond ((string? item) item) - ((symbol? item) (symbol-name item)) + ((symbol? item) (symbol->string item)) (else (error:wrong-type-argument item "C variable" 'C:VAR)))) (define (c:array-decl type name dim items) diff --git a/src/compiler/machines/C/stackify.scm b/src/compiler/machines/C/stackify.scm index 737f0719d..85d200544 100644 --- a/src/compiler/machines/C/stackify.scm +++ b/src/compiler/machines/C/stackify.scm @@ -498,7 +498,7 @@ USA. (if (uninterned-symbol? obj) stackify-opcode/push-uninterned-symbol stackify-opcode/push-symbol) - (symbol-name obj) + (symbol->string obj) prog)) ((bit-string? obj) (build/string stackify-opcode/push-bit-string @@ -509,7 +509,7 @@ USA. (build/push-nat (bit-string-length obj) prog))) ((scode/primitive-procedure? obj) (let ((arity (primitive-procedure-arity obj)) - (name (symbol-name (primitive-procedure-name obj)))) + (name (symbol->string (primitive-procedure-name obj)))) (cond ((fix:< arity 0) (build/string stackify-opcode/push-primitive-lexpr name diff --git a/src/compiler/machines/C/stackops.scm b/src/compiler/machines/C/stackops.scm index aa8beb671..b288f8411 100644 --- a/src/compiler/machines/C/stackops.scm +++ b/src/compiler/machines/C/stackops.scm @@ -402,7 +402,7 @@ push-primitive-7 ; name in string table (for-each write-string (list "\t" - (stackify/C-quotify (symbol-name (car binding))) + (stackify/C-quotify (symbol->string (car binding))) " = 0" (if (zero? value) "" diff --git a/src/compiler/machines/svm/assembler-compiler.scm b/src/compiler/machines/svm/assembler-compiler.scm index 50f5a1f2e..38335289f 100644 --- a/src/compiler/machines/svm/assembler-compiler.scm +++ b/src/compiler/machines/svm/assembler-compiler.scm @@ -692,7 +692,7 @@ USA. coding-types)))) (define (defn-name-length defn) - (string-length (symbol-name (defn-name defn)))) + (string-length (symbol->string (defn-name defn)))) (define (wrap-scheme-output title pathname generator) (call-with-output-file pathname @@ -860,7 +860,7 @@ USA. (newline port)) (define (name->c-string name upcase?) - (name-string->c-string (symbol-name name) upcase?)) + (name-string->c-string (symbol->string name) upcase?)) (define (name-string->c-string name upcase?) (call-with-output-string @@ -868,7 +868,7 @@ USA. (write-c-name-string name upcase? port)))) (define (write-c-name name upcase? port) - (write-c-name-string (symbol-name name) upcase? port)) + (write-c-name-string (symbol->string name) upcase? port)) (define (write-c-name-string name upcase? port) (let ((e (string-length name)) diff --git a/src/cref/object.scm b/src/cref/object.scm index 8c7d18ff7..ec4832153 100644 --- a/src/cref/object.scm +++ b/src/cref/object.scm @@ -199,7 +199,7 @@ USA. (declare (integrate-operator name->string)) (define (name->string name) (if (interned-symbol? name) - (symbol-name name) + (symbol->string name) (write-to-string name))) (define-integrable (namepathname - (cond ((symbol? name) (symbol-name name)) + (cond ((symbol? name) (symbol->string name)) ((string? name) name) (else (error "Not a globals name:" name))))) (pkd (package-set-pathname filename os-type))) diff --git a/src/edwin/abbrev.scm b/src/edwin/abbrev.scm index 9e89578bd..e56690dd4 100644 --- a/src/edwin/abbrev.scm +++ b/src/edwin/abbrev.scm @@ -78,7 +78,7 @@ USA. (let ((abbrev (string-downcase (cond ((string? abbrev) abbrev) - ((symbol? abbrev) (symbol-name abbrev)) + ((symbol? abbrev) (symbol->string abbrev)) (else (error:wrong-type-argument abbrev "string" 'ABBREV-EXPANSION)))))) @@ -472,7 +472,7 @@ Mark is set after the inserted text." (lambda (name) (let ((table (get-named-abbrev-table name))) (insert-string "(" mark) - (insert-string (symbol-name name) mark) + (insert-string (symbol->string name) mark) (insert-string ")\n\n" mark) (hash-table/for-each table (lambda (abbrev entry) diff --git a/src/edwin/autold.scm b/src/edwin/autold.scm index de41536eb..c45114150 100644 --- a/src/edwin/autold.scm +++ b/src/edwin/autold.scm @@ -185,7 +185,7 @@ Second arg is prefix arg when called interactively." (list (prompt-for-alist-value "Load library" (map (lambda (library) - (cons (symbol-name (car library)) + (cons (symbol->string (car library)) (car library))) known-libraries)) (command-argument))) diff --git a/src/edwin/calias.scm b/src/edwin/calias.scm index 22da0e65d..922750fa8 100644 --- a/src/edwin/calias.scm +++ b/src/edwin/calias.scm @@ -244,7 +244,7 @@ USA. (define (special-key/name special-key) (string-append (bucky-bits->prefix (special-key/bucky-bits special-key)) - (symbol-name (special-key/symbol special-key)))) + (symbol->string (special-key/symbol special-key)))) (define (make-special-key name bits) (hook/make-special-key name bits)) diff --git a/src/edwin/comman.scm b/src/edwin/comman.scm index d6af13203..11a69d735 100644 --- a/src/edwin/comman.scm +++ b/src/edwin/comman.scm @@ -43,13 +43,13 @@ USA. (let ((desc (command-%description command))) (if (description? desc) desc - (let ((new (->doc-string (symbol-name (command-name command)) desc))) + (let ((new (->doc-string (symbol->string (command-name command)) desc))) (if new (set-command-%description! command new)) new)))) (define (command-name-string command) - (editor-name/internal->external (symbol-name (command-name command)))) + (editor-name/internal->external (symbol->string (command-name command)))) (define (editor-name/internal->external string) string) @@ -58,7 +58,7 @@ USA. string) (define (make-command name description specification procedure) - (let* ((sname (symbol-name name)) + (let* ((sname (symbol->string name)) (command (or (string-table-get editor-commands sname) (let ((command (%make-command))) @@ -74,7 +74,7 @@ USA. (make-string-table 500)) (define (name->command name #!optional if-undefined) - (or (string-table-get editor-commands (symbol-name name)) + (or (string-table-get editor-commands (symbol->string name)) (case (if (default-object? if-undefined) 'INTERN if-undefined) ((#F) #f) ((ERROR) (error "Undefined command:" name)) @@ -120,7 +120,8 @@ USA. (let ((desc (variable-%description variable))) (if (description? desc) desc - (let ((new (->doc-string (symbol-name (variable-name variable)) desc))) + (let ((new + (->doc-string (symbol->string (variable-name variable)) desc))) (if new (set-variable-%description! variable new)) new)))) @@ -129,11 +130,11 @@ USA. (define-integrable variable-default-value variable-%default-value) (define (variable-name-string variable) - (editor-name/internal->external (symbol-name (variable-name variable)))) + (editor-name/internal->external (symbol->string (variable-name variable)))) (define (make-variable name description value buffer-local? #!optional test normalization) - (let* ((sname (symbol-name name)) + (let* ((sname (symbol->string name)) (variable (or (string-table-get editor-variables sname) (let ((variable (%make-variable))) @@ -183,7 +184,7 @@ USA. (make-string-table 50)) (define (name->variable name #!optional if-undefined) - (or (string-table-get editor-variables (symbol-name name)) + (or (string-table-get editor-variables (symbol->string name)) (case (if (default-object? if-undefined) 'INTERN if-undefined) ((#F) #f) ((ERROR) (error "Undefined variable:" name)) diff --git a/src/edwin/comtab.scm b/src/edwin/comtab.scm index cdda563fa..620d5d301 100644 --- a/src/edwin/comtab.scm +++ b/src/edwin/comtab.scm @@ -126,7 +126,7 @@ USA. (define (mode-name? object) (and (symbol? object) - (string-table-get editor-modes (symbol-name object)))) + (string-table-get editor-modes (symbol->string object)))) (define (list-of-comtabs? object) (and (not (null? object)) diff --git a/src/edwin/edtstr.scm b/src/edwin/edtstr.scm index 93c7c4a32..cfed6ea23 100644 --- a/src/edwin/edtstr.scm +++ b/src/edwin/edtstr.scm @@ -127,7 +127,7 @@ USA. (not (button-down? object)))) (define (button-name button) - (symbol-name (button-symbol button))) + (symbol->string (button-symbol button))) (set-record-type-unparser-method!