From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: pp-eval-expression broken Date: Fri, 05 Jan 2007 21:55:15 -0500 Message-ID: References: Reply-To: rms@gnu.org NNTP-Posting-Host: lo.gmane.org Content-Type: text/plain; charset=ISO-8859-15 X-Trace: sea.gmane.org 1168052422 2182 80.91.229.12 (6 Jan 2007 03:00:22 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 6 Jan 2007 03:00:22 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jan 06 04:00:21 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1H31n5-0000R9-Ch for ged-emacs-devel@m.gmane.org; Sat, 06 Jan 2007 04:00:15 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H31n4-0001Jr-RB for ged-emacs-devel@m.gmane.org; Fri, 05 Jan 2007 22:00:14 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H31ie-0007J7-WF for emacs-devel@gnu.org; Fri, 05 Jan 2007 21:55:41 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H31ie-0007Is-G5 for emacs-devel@gnu.org; Fri, 05 Jan 2007 21:55:40 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H31ie-0007Ik-Ab for emacs-devel@gnu.org; Fri, 05 Jan 2007 21:55:40 -0500 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.52) id 1H31id-00060V-TY for emacs-devel@gnu.org; Fri, 05 Jan 2007 21:55:39 -0500 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.60) (envelope-from ) id 1H31iF-0000Oo-IH; Fri, 05 Jan 2007 21:55:15 -0500 Original-To: "Drew Adams" In-reply-to: X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:64857 Archived-At: The reason for the change in pp-eval-expression is so that it will use read-expression-map and read-expression-history. There is no clean way to make (interactive "x") use them. If this change causes trouble, we could create a new command with the new meaning of pp-eval-expression, and document that for users; then we could put pp-eval-expression back the old way, just for Lisp callers. *** pp.el 03 Nov 2006 09:45:00 -0500 1.30 --- pp.el 05 Jan 2007 18:29:41 -0500 *************** *** 97,107 **** (princ (pp-to-string object) (or stream standard-output))) ;;;###autoload ! (defun pp-eval-expression (expval) ! "Evaluate an expression, then pretty-print value EXPVAL into a new buffer. ! If pretty-printed EXPVAL fits on one line, display it in the echo ! area instead. Also add EXPVAL to the front of the list ! in the variable `values'. Non-interactively, the argument is the value, EXPVAL, not the expression to evaluate." --- 97,107 ---- (princ (pp-to-string object) (or stream standard-output))) ;;;###autoload ! (defun pp-eval (expval) ! "Pretty-print the value of an expression into a new buffer. ! If it fits on one line, display it in the echo area instead. ! Also add the value, EXPVAL, to the front of the list in the ! variable `values'. Non-interactively, the argument is the value, EXPVAL, not the expression to evaluate." *************** *** 139,144 **** --- 139,152 ---- (set (make-local-variable 'font-lock-verbose) nil))))) ;;;###autoload + (defun pp-eval-expression (expression) + "Evaluate EXPRESSION and pretty-print its value. + This function exists for compatibility with callers in Lisp code. + For interactive use, `pp-eval' should be more convenient." + (interactive "xPp-eval-expression: ") + (pp-eval (eval expression))) + + ;;;###autoload (defun pp-eval-last-sexp (arg) "Run `pp-eval-expression' on sexp before point (which see). With argument, pretty-print output into current buffer.