diff options
author | David Aspinall <da@inf.ed.ac.uk> | 1999-11-15 18:43:12 +0000 |
---|---|---|
committer | David Aspinall <da@inf.ed.ac.uk> | 1999-11-15 18:43:12 +0000 |
commit | e6f0aa50bbdfc8fea7e24d144de01450575c5055 (patch) | |
tree | c7fa2bd33e622283d832b9ba9671d5a42fd7ed48 /generic/proof.el | |
parent | 778a503ae2e7013cc405ee0a19f8613ddfe51646 (diff) |
Moved proof-switch-to-buffer here from proof-script.el
Diffstat (limited to 'generic/proof.el')
-rw-r--r-- | generic/proof.el | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/generic/proof.el b/generic/proof.el index b46ec6c2..e97d1fab 100644 --- a/generic/proof.el +++ b/generic/proof.el @@ -435,6 +435,18 @@ If proof-show-debug-messages is nil, do nothing." (proof-display-and-keep-buffer proof-response-buffer)))) +;;; A handy utility function used in the "Buffers" menu. +(defun proof-switch-to-buffer (buf &optional noselect) + "Switch to or display buffer BUF in other window unless already displayed. +If optional arg NOSELECT is true, don't switch, only display it. +No action if BUF is nil." + ;; Maybe this needs to be more sophisticated, using + ;; proof-display-and-keep-buffer ? + (and buf + (unless (eq buf (window-buffer (selected-window))) + (if noselect + (display-buffer buf t) + (switch-to-buffer-other-window buf))))) ;; ----------------------------------------------------------------- |