No need to recreate this closure every time.

This commit is contained in:
jgarcia 2008-02-07 20:43:42 +00:00
parent bc39c7189f
commit 4c69b75089

View file

@ -1135,6 +1135,9 @@
(pprint-dispatch-table-cons-entries orig))
new))
(defun default-pprint-dispatch (stream object)
(write-ugly-object object stream))
(defun pprint-dispatch (object &optional (table *print-pprint-dispatch*))
(declare (type (or pprint-dispatch-table null) table))
(let* ((table (or table *initial-pprint-dispatch*))
@ -1151,9 +1154,7 @@
(return entry)))))
(if entry
(values (pprint-dispatch-entry-function entry) t)
(values #'(lambda (stream object)
(write-ugly-object object stream))
nil))))
(values #'default-pprint-dispatch nil))))
(defun set-pprint-dispatch (type function &optional
(priority 0) (table *print-pprint-dispatch*))