emacs-devel
[Top][All Lists]
Advanced

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

Re: pp-eval-expression enhancements


From: Richard Stallman
Subject: Re: pp-eval-expression enhancements
Date: Wed, 25 Jul 2007 11:02:45 -0400

Would someone please install this in the trunk, then ack?

From: "Drew Adams" <address@hidden>
To: <address@hidden>
Date: Tue, 24 Jul 2007 10:18:30 -0700
MIME-Version: 1.0
Content-Type: text/plain;
        charset="ISO-8859-15"
In-Reply-To: <address@hidden>
Cc: address@hidden
Subject: RE: pp-eval-expression enhancements

> Can you please send the two changes that I'd like to install,
> with change log?  Then we can install them.

Below.

What about also replacing the binding of `M-:' so that it invokes
`pp-eval-expression'? What is the downside to that? If it's for the prefix
arg of `eval-expression', we could add the prefix arg to
`pp-eval-expression' also. If it's for `eval-expression-debug-on-error',
then `pp-eval-expression' could be made aware of that also.

It seems to me that for interactive use (`M-:') `pp-eval-expression' is more
useful than `eval-expression'.

--------8<-----------------
Change log:

2007-07-24  Drew Adams  <address@hidden>

      * pp.el: pp-eval-expression: Added progress message. Made buffer
writable.

--------8<-----------------
*** pp-CVS-2007-07-10.el        Tue Jul 10 15:37:26 2007
--- pp-CVS-patched-2007-07-24.el        Tue Jul 24 09:58:02 2007
***************
*** 103,108 ****
--- 103,109 ----
    (interactive
     (list (read-from-minibuffer "Eval: " nil read-expression-map t
                                 'read-expression-history)))
+   (message "Evaluating...")
    (setq values (cons (eval expression) values))
    (let* ((old-show-function temp-buffer-show-function)
         ;; Use this function to display the buffer.
***************
*** 126,138 ****
                         (progn
                           (select-window window)
                           (run-hooks 'temp-buffer-show-hook))
!                      (select-window old-selected)))
!                (message "%s" (buffer-substring (point-min) (point)))
!                ))))))
      (with-output-to-temp-buffer "*Pp Eval Output*"
        (pp (car values))
        (with-current-buffer standard-output
        (emacs-lisp-mode)
        (set (make-local-variable 'font-lock-verbose) nil)))))

  ;;;###autoload
--- 127,140 ----
                         (progn
                           (select-window window)
                           (run-hooks 'temp-buffer-show-hook))
!                       (select-window old-selected)
!                       (message "Evaluating...done.  See buffer *Pp Eval
Output*.")))
!                 (message "%s" (buffer-substring (point-min)
(point)))))))))
      (with-output-to-temp-buffer "*Pp Eval Output*"
        (pp (car values))
        (with-current-buffer standard-output
        (emacs-lisp-mode)
+         (setq buffer-read-only nil)
        (set (make-local-variable 'font-lock-verbose) nil)))))

  ;;;###autoload




_______________________________________________
Emacs-devel mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/emacs-devel





reply via email to

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