- (if colonp
- (format-print-named-character (next-arg) stream)
- (if atsignp
- (prin1 (next-arg) stream)
- (write-char (next-arg) stream)))))
+ (let ((arg (next-arg)))
+ (unless (typep arg 'character)
+ (error 'format-error
+ :complaint "~s is not of type CHARACTER."
+ :args (list arg)))
+ (cond (colonp
+ (format-print-named-character arg stream))
+ (atsignp
+ (prin1 arg stream))
+ (t
+ (write-char arg stream))))))