emacs-devel
[Top][All Lists]
Advanced

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

Re: pp-eval-expression broken


From: Randal L. Schwartz
Subject: Re: pp-eval-expression broken
Date: 05 Jan 2007 10:58:32 -0800
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4

>>>>> "Drew" == Drew Adams <address@hidden> writes:

Drew> Perhaps I shouldn't have been so strong about the request, and no doubt
Drew> there is a good reason for this change. But I'd still like to know what 
the
Drew> reason is.

Drew> It seems odd to me that the command would treat its arg differently, 
evaling
Drew> it if interactive and not evaling it otherwise. The function is
Drew> named -eval-, but it doesn't always eval.

Drew> And, as I said, this will break any existing Lisp calls to the function.
Drew> Those have been fixed in vanilla Emacs (22), but outside libraries will 
need
Drew> to adjust, especially if they try to work with multiple Emacs versions.

When I wrote pp-eval-expression, it was because I hated getting the output of
eval-expression all on one line.  I modelled it as closely as I could on the
current eval-expression, lifting the code directly, just adding my little hook
to push the output into a temp buffer, inserting return at the right places
(that was the tricky part), then letting the standard indenting stuff handle
the pretty-ing part.

I'm not addicted to the goal that it completely mimic eval-expression.
However, I'm curious about the motivation about this discontinuity. If it's to
permit a non-evalled expression be pretty-printed, that's actually quite cool,
and wouldn't make sense to be back-ported to eval-expression.

However, perhaps the motivation can be made clearer in the docstring?

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<address@hidden> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!





reply via email to

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