[Openmcl-devel] Contrib: restore some old fred behavior

Ron Garret ron at flownet.com
Mon Feb 8 00:20:07 PST 2010


On Feb 7, 2010, at 7:19 PM, Raffael Cavallaro wrote:

> 
> On Feb 7, 2010, at 9:00 PM, Ron Garret wrote:
> 
>> The following code changes the way Hemlock listeners handle copying prior input so that it works more like FRED used to.
> 
> Nice! Thanks much for this.

My pleasure.  And now for my next trick:

(in-package :hemlock)

;;; Fix EVAL-REGION to make the result visible
(defcommand "Editor Execute Expression" (p)
  "Executes the current region in the editor Lisp."
  (declare (ignore p))
  (let* ((region (current-form-region))
         (form (region-to-string region))
         (buf (gui::hemlock-buffer (#/topListener gui::hemlock-listener-document))))
    (if buf
      (let ((HI::*CURRENT-BUFFER* buf))
        (move-mark (current-point) (region-end (buffer-region buf)))))
    (format (HEMLOCK-EXT:TOP-LISTENER-OUTPUT-STREAM) "~A~&" form)
    (eval-region region)))

:-)

rg




More information about the Openmcl-devel mailing list