summaryrefslogtreecommitdiff
path: root/src/print.c
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1999-10-09 22:58:37 +0000
committerRichard M. Stallman <rms@gnu.org>1999-10-09 22:58:37 +0000
commit73fb36f17c1ca1a9c58ad936398f37515635fcf1 (patch)
treeb93a007ce2ce32b76ffebd1e2b303d7d3c058bc7 /src/print.c
parent85177c862b21fd10dabf288559a56558be5c6ba5 (diff)
downloademacs-73fb36f17c1ca1a9c58ad936398f37515635fcf1.tar.gz
emacs-73fb36f17c1ca1a9c58ad936398f37515635fcf1.tar.bz2
emacs-73fb36f17c1ca1a9c58ad936398f37515635fcf1.zip
(print): When removing objects from Vprint_number_table,
only scan the newly added objects. (print_preprocess): If OBJ is a gensym, and print-continuous-numbering, unconditionally force it to stay in the table.
Diffstat (limited to 'src/print.c')
-rw-r--r--src/print.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/print.c b/src/print.c
index d6c85717f01..dc28ed0ce11 100644
--- a/src/print.c
+++ b/src/print.c
@@ -1069,12 +1069,13 @@ print (obj, printcharfun, escapeflag)
/* Construct Vprint_number_table for print-gensym and print-circle. */
if (!NILP (Vprint_gensym) || !NILP (Vprint_circle))
{
- int i, index = 0;
+ int i, start, index;
/* Construct Vprint_number_table. */
+ start = index = print_number_index;
print_preprocess (obj);
/* Remove unnecessary objects, which appear only once in OBJ;
that is, whose status is Qnil. */
- for (i = 0; i < print_number_index; i++)
+ for (i = start; i < print_number_index; i++)
if (!NILP (PRINT_NUMBER_STATUS (Vprint_number_table, i)))
{
PRINT_NUMBER_OBJECT (Vprint_number_table, index)
@@ -1138,6 +1139,12 @@ print_preprocess (obj)
}
}
PRINT_NUMBER_OBJECT (Vprint_number_table, print_number_index) = obj;
+ /* If Vprint_continuous_numbering is non-nil and OBJ is a gensym,
+ always print the gensym with a number. This is a special for
+ the lisp function byte-compile-output-docform. */
+ if (! NILP (Vprint_continuous_numbering) && SYMBOLP (obj)
+ && NILP (XSYMBOL (obj)->obarray))
+ PRINT_NUMBER_STATUS (Vprint_number_table, print_number_index) = Qt;
print_number_index++;
switch (XGCTYPE (obj))