bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#135: generate autoloads versus eval-expression-print-level (patch)


From: Lars Magne Ingebrigtsen
Subject: bug#135: generate autoloads versus eval-expression-print-level (patch)
Date: Sun, 10 Jul 2011 14:48:02 +0200
User-agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.50 (gnu/linux)

Stefan Monnier <monnier@IRO.UMontreal.CA> writes:

> The OP considers it a bug because he wants the
> (print-level eval-expression-print-level) binding to only apply during
> printing but not during evaluation.  I can understand
> this interpretation.

Yes, it sounds reasonable.  But, as you said, somewhat tricky to fix,
since it basically calls the C-level `eval-region', which both evals and
prints the form, if I read the code correctly.

No, wait.  fixing this could be done without too much work, I think.
We could extend PRINTFLAG to `eval-region' (which is currently a
boolean) to be a closure to do the actual printing, for instance.

Basically

(eval-region 2 56 (lambda (form)
                    (let ((print-level eval-expression-print-level))
                          ... etc)
                       (prin1 form)))

That should be backwards-compatible, slightly generally useful, and
should allow us to fix this.

Does this sound OK?

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]