diff options
| -rw-r--r-- | generic/proof-compat.el | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/generic/proof-compat.el b/generic/proof-compat.el index ca765d80..b5dfa466 100644 --- a/generic/proof-compat.el +++ b/generic/proof-compat.el @@ -213,6 +213,16 @@ lines than are actually needed in the case where some error may be present." ;;; GNU Emacs compatibility with XEmacs ;;; +(unless (fboundp 'save-selected-frame) +(defmacro save-selected-frame (&rest body) + "Execute forms in BODY, then restore the selected frame. +The value returned is the value of the last form in BODY." + (let ((old-frame (gensym "ssf"))) + `(let ((,old-frame (selected-frame))) + (unwind-protect + (progn ,@body) + (select-frame ,old-frame)))))) + ;; Chars (borrowed from x-symbol-emacs.el compatability file) (unless (fboundp 'characterp) (defalias 'characterp 'integerp)) |
