home *** CD-ROM | disk | FTP | other *** search
- (in-package :ccl)
-
- ;; focus-view-patch.lisp
- ;; call-with-focused-view becomes a generic function at
- ;; Mike Engber's suggestion.
-
- (let ((*warn-if-redefine* nil)
- (*warn-if-redefine-kernel* nil))
-
- (without-interrupts
-
- (unless (typep #'call-with-focused-view 'generic-function)
- (fmakunbound 'call-with-focused-view))
-
- (defmethod call-with-focused-view (view function &optional font-view)
- (let* ((old-view *current-view*)
- (old-font-view *current-font-view*)
- wptr ff ms)
- (if (and (eq view old-view) (eq font-view old-font-view))
- (funcall function view)
- (unwind-protect
- (progn
- (when (and view (null old-font-view) font-view (setq wptr (wptr view))
- )
- (multiple-value-setq (ff ms) (wptr-font-codes wptr)))
- (focus-view view font-view)
- (funcall function view))
- (when wptr
- (set-wptr-font-codes wptr ff ms))
- (focus-view old-view old-font-view)))))
- ))
-