Raymond Toy pushed to branch issue-234-make-ascii-format-builtin at cmucl / cmucl
Commits:
-
8ff9f737
by Raymond Toy at 2023-07-06T16:38:53-07:00
1 changed file:
Changes:
... | ... | @@ -461,18 +461,18 @@ |
461 | 461 | (format t "~&~A~%"
|
462 | 462 | (intl:gettext (or (ef-documentation ef) "")))))))))
|
463 | 463 | |
464 | +(defconstant +builtin-external-formats+ '(:utf-8 :iso8859-1 :ascii)
|
|
465 | + "List of external formats that are builtin so that they don't need to
|
|
466 | + be loaded on first use.")
|
|
467 | + |
|
464 | 468 | (defun %find-external-format (name)
|
465 | 469 | ;; avoid loading files, etc., early in the boot sequence
|
466 | - (when (or (eq name :iso8859-1)
|
|
467 | - (and (eq name :default) (eq *default-external-format* :iso8859-1)))
|
|
468 | - (return-from %find-external-format
|
|
469 | - (gethash :iso8859-1 *external-formats*)))
|
|
470 | - (when (eq name :utf-8)
|
|
471 | - (return-from %find-external-format
|
|
472 | - (gethash :utf-8 *external-formats*)))
|
|
473 | - (when (eq name :ascii)
|
|
470 | + (when (and (eq name :default)
|
|
471 | + (eq *default-external-format* :iso8859-1))
|
|
472 | + (setf name :iso8859-1))
|
|
473 | + (when (member name +builtin-external-formats+ :test 'eq)
|
|
474 | 474 | (return-from %find-external-format
|
475 | - (gethash :ascii *external-formats*)))
|
|
475 | + (gethash name *external-formats*)))
|
|
476 | 476 | |
477 | 477 | (when (zerop (hash-table-count *external-format-aliases*))
|
478 | 478 | (setf (gethash :latin1 *external-format-aliases*) :iso8859-1)
|