summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ymh-emacs/ymh-common.el26
1 files changed, 19 insertions, 7 deletions
diff --git a/ymh-emacs/ymh-common.el b/ymh-emacs/ymh-common.el
index 09ebe08..8f36973 100644
--- a/ymh-emacs/ymh-common.el
+++ b/ymh-emacs/ymh-common.el
@@ -17,13 +17,25 @@
(defun ymh/reset-coq-windows ()
"Resets the Goal and Response windows."
(interactive)
- (other-frame 1)
- (delete-other-windows)
- (split-window-below)
- (switch-to-buffer "*goals*")
- (other-window 1)
- (switch-to-buffer "*response*")
- (other-frame 1))
+ (let ((frame-n (length (frame-list))))
+ (cond
+ ((eq frame-n 2)
+ (other-frame 1)
+ (delete-other-windows)
+ (split-window-below)
+ (switch-to-buffer "*goals*")
+ (other-window 1)
+ (switch-to-buffer "*response*")
+ (other-frame 1))
+ (t
+ (delete-other-windows)
+ (split-window-right)
+ (other-window 1)
+ (switch-to-buffer "*goals*")
+ (split-window-below)
+ (other-window 1)
+ (switch-to-buffer "*response*")
+ (other-window 1)))))
(defun ymh/pass (query)
"Return the password as a string from QUERY."