diff options
| author | David Aspinall | 2004-04-18 10:34:40 +0000 |
|---|---|---|
| committer | David Aspinall | 2004-04-18 10:34:40 +0000 |
| commit | a06e69d37061ae9bde69c6d1aa6c8f932bd12236 (patch) | |
| tree | 2063d8f0ff2d7f63f98dddcd3f6de6086cf880b8 /generic | |
| parent | 7520e9addbee01ee94d587f2f2c2be969356f0bc (diff) | |
Add save-selected-frame for GNU Emacs
Diffstat (limited to 'generic')
| -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)) |
