Ticket #885 (closed defect: fixed)

Opened 3 years ago

Last modified 2 years ago

22.1.3.5 conformance

Reported by: pjb@… Owned by:
Priority: normal Milestone:
Component: ANSI CL Compliance Version: trunk
Keywords: Cc:

Description

As per 22.1.3.5, 

    (write (quote (john (quote s) weight)) :pretty nil :readably nil)

should print

    (JOHN (QUOTE S) WEIGHT)

but instead it prints:

    (JOHN 'S WEIGHT)

[and similarly for :readtably t].


========================================================================
Implementation: Clozure Common Lisp Version 1.7-dev-r14788M-trunk  (LinuxX8664) on x86_64

Reading of: "(write (quote (john (quote s) weight)) :pretty nil :readably nil)"
signaled no error

Evaluation of: (WRITE '(JOHN 'S WEIGHT) :PRETTY NIL :READABLY NIL)
signaled no error
wrote nothing on *ERROR-OUTPUT*
wrote the following *STANDARD-OUTPUT* (lines excluded):
------------------------------------------------------------------------
(JOHN 'S WEIGHT)
------------------------------------------------------------------------
returned the following value:
--> (JOHN 'S WEIGHT)

========================================================================

Change History

comment:1 Changed 3 years ago by rme

This is due to a CCL extension. If CCL:*PRINT-ABBREVIATE-QUOTE* is non-nil (which it is by default), a list whose first element is QUOTE or FUNCTION will be printed specially.

comment:2 Changed 3 years ago by gb

See also ticket:886.

The more I think about it, the more I believe that in

(with-standard-io-syntax
  (write ...))

the call to WRITE shouldn't be affected by implementation-dependent extensions; that's at least a large part of the whole point of WITH-STANDARD-IO-SYNTAX.

comment:3 Changed 2 years ago by rme

  • Status changed from new to closed
  • Resolution set to fixed

An implementation is permitted to have additional printer control variables. (See 22.1.1.1 and the glossary entry for "printer control variable".)

The fix for ticket:866 makes WITH-STANDARD-IO-SYNTAX use only standard syntax, and not any of CCL's implementation-specific printer control variables. That seems to be the answer for the issue you point out in this ticket.

Note: See TracTickets for help on using tickets.