[Openmcl-cvs-notifications] r12233 - /trunk/source/cocoa-ide/hemlock/src/macros.lisp

gb at clozure.com gb at clozure.com
Mon Jun 8 04:15:59 EDT 2009


Author: gb
Date: Mon Jun  8 04:15:59 2009
New Revision: 12233

Log:
ALLOWING-BUFFER-DISPLAY: finish Hemlock editing when invoking GUI
functions that may cause redisplay.

Don't bind *STANDARD-OUTPUT* in WITH-OUTPUT-TO-LISTENER.  Should
probably use WITH-OUTPUT-TO-LISTENER more locally, e.g. to print
macroepansion.

Modified:
    trunk/source/cocoa-ide/hemlock/src/macros.lisp

Modified: trunk/source/cocoa-ide/hemlock/src/macros.lisp
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/source/cocoa-ide/hemlock/src/macros.lisp (original)
+++ trunk/source/cocoa-ide/hemlock/src/macros.lisp Mon Jun  8 04:15:59 2009
@@ -84,6 +84,11 @@
     `(hemlock-ext:invoke-modifying-buffer-storage *current-buffer* #'(lamb=
da () , at body))
     `(let ((*current-buffer* ,buffer))
        (hemlock-ext:invoke-modifying-buffer-storage *current-buffer* #'(la=
mbda () , at body)))))
+
+;; If we've done a (cocoa-specific) "beginEditing" on a buffer, finish tha=
t (to allow
+;; layout, etc.)  Call thunk, and maybe restore the editing state after.
+(defmacro allowing-buffer-display ((buffer) &body body)
+  `(hemlock-ext::invoke-allowing-buffer-display ,buffer (lambda () , at body)=
))
 =

 =

 ;;;; A couple funs to hack strings to symbols.
@@ -468,15 +473,12 @@
 (defvar *saved-standard-output* nil)
 =

 (defmacro with-output-to-listener (&body body)
-  `(let* ((*saved-standard-output* (or *saved-standard-output*
-				       (cons *standard-output* *error-output*)))
-	  (*standard-output* (hemlock-ext:top-listener-output-stream))
-	  (*error-output* *standard-output*))
+  `(let* ((*saved-standard-output* (or *saved-standard-output* *standard-o=
utput*))
+	  (*standard-output* (hemlock-ext:top-listener-output-stream)))	  =

      , at body))
 =

 (defmacro with-standard-standard-output (&body body)
-  `(let* ((*standard-output* (or (car *saved-standard-output*) *standard-o=
utput*))
-	  (*error-output* (or (cdr *saved-standard-output*) *error-output*)))
+  `(let* ((*standard-output* (or *saved-standard-output* *standard-output*=
)))
      , at body))
 =

 =




More information about the Openmcl-cvs-notifications mailing list