Changeset 12233


Ignore:
Timestamp:
Jun 8, 2009, 8:15:59 AM (10 years ago)
Author:
gb
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/cocoa-ide/hemlock/src/macros.lisp

    r8428 r12233  
    8686    `(let ((*current-buffer* ,buffer))
    8787       (hemlock-ext:invoke-modifying-buffer-storage *current-buffer* #'(lambda () ,@body)))))
     88
     89;; If we've done a (cocoa-specific) "beginEditing" on a buffer, finish that (to allow
     90;; layout, etc.)  Call thunk, and maybe restore the editing state after.
     91(defmacro allowing-buffer-display ((buffer) &body body)
     92  `(hemlock-ext::invoke-allowing-buffer-display ,buffer (lambda () ,@body)))
    8893
    8994
     
    478483
    479484(defmacro with-output-to-listener (&body body)
    480   `(let* ((*saved-standard-output* (or *saved-standard-output*
    481                                        (cons *standard-output* *error-output*)))
    482           (*standard-output* (hemlock-ext:top-listener-output-stream))
    483           (*error-output* *standard-output*))
     485  `(let* ((*saved-standard-output* (or *saved-standard-output* *standard-output*))
     486          (*standard-output* (hemlock-ext:top-listener-output-stream)))   
    484487     ,@body))
    485488
    486489(defmacro with-standard-standard-output (&body body)
    487   `(let* ((*standard-output* (or (car *saved-standard-output*) *standard-output*))
    488           (*error-output* (or (cdr *saved-standard-output*) *error-output*)))
     490  `(let* ((*standard-output* (or *saved-standard-output* *standard-output*)))
    489491     ,@body))
    490492
Note: See TracChangeset for help on using the changeset viewer.