summaryrefslogtreecommitdiff
path: root/emacs/guile-c.el
diff options
context:
space:
mode:
Diffstat (limited to 'emacs/guile-c.el')
-rw-r--r--emacs/guile-c.el5
1 files changed, 4 insertions, 1 deletions
diff --git a/emacs/guile-c.el b/emacs/guile-c.el
index 3c7344985..ada1dedf5 100644
--- a/emacs/guile-c.el
+++ b/emacs/guile-c.el
@@ -98,12 +98,15 @@
;;; Edit docstrings
;;;
+(defvar guile-c-window-configuration nil)
+
(defun guile-c-edit-docstring ()
(interactive)
(let* ((region (guile-c-find-docstring))
(doc (if region (buffer-substring (car region) (cdr region)))))
(if (not doc)
(error "No docstring!")
+ (setq guile-c-window-configuration (current-window-configuration))
(with-current-buffer (get-buffer-create "*Guile Docstring*")
(erase-buffer)
(insert doc)
@@ -140,7 +143,7 @@
(forward-line 1)))
(let ((doc (buffer-string)))
(kill-buffer (current-buffer))
- (delete-window (selected-window))
+ (set-window-configuration guile-c-window-configuration)
(let ((region (guile-c-find-docstring)))
(goto-char (car region))
(delete-region (car region) (cdr region)))