Update of /project/climacs/cvsroot/climacs In directory clnet:/tmp/cvs-serv31170
Modified Files: climacs-lisp-syntax.lisp core.lisp packages.lisp Log Message: Added `switch-or-move-to-view' function.
--- /project/climacs/cvsroot/climacs/climacs-lisp-syntax.lisp 2008/01/15 10:43:40 1.11 +++ /project/climacs/cvsroot/climacs/climacs-lisp-syntax.lisp 2008/01/18 07:44:56 1.12 @@ -262,7 +262,7 @@ all)) (expansion-string (with-output-to-string (s) (pprint expansion s)))) - (let ((view (climacs-core:switch-to-view (current-window) "*Macroexpansion*"))) + (let ((view (climacs-core:switch-or-move-to-view (current-window) "*Macroexpansion*"))) (set-syntax view "Lisp")) (let ((header-string (one-line-ify (subseq string 0 (min 40 (length string)))))) --- /project/climacs/cvsroot/climacs/core.lisp 2008/01/04 11:14:08 1.22 +++ /project/climacs/cvsroot/climacs/core.lisp 2008/01/18 07:44:56 1.23 @@ -71,6 +71,15 @@ (pane-frame pane) 'textual-drei-syntax-view :name name)))))
+(defun switch-or-move-to-view (pane view) + "Switch `pane' to show `view'. If `view' is already on display +in some other pane, switch that pane to be the active one." + (handler-bind ((view-already-displayed + #'(lambda (c) + (declare (ignore c)) + (invoke-restart 'switch-to-pane)))) + (switch-to-view pane view))) + (defun views-having-buffer (climacs buffer) "Return a list of the buffer-views of `climacs' showing `buffer'." --- /project/climacs/cvsroot/climacs/packages.lisp 2008/01/18 07:16:25 1.132 +++ /project/climacs/cvsroot/climacs/packages.lisp 2008/01/18 07:44:57 1.133 @@ -98,7 +98,7 @@ #:no-upper-p #:case-relevant-test
- #:switch-to-view + #:switch-to-view #:switch-or-move-to-view #:make-new-buffer #:make-new-named-buffer #:erase-buffer