summaryrefslogtreecommitdiff
path: root/elisp
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2010-06-12 00:14:27 +0200
committerJose Antonio Ortega Ruiz <jao@gnu.org>2010-06-12 00:14:27 +0200
commitc88a63d982ec7303cab32b2074f81a4d69400db3 (patch)
tree82748ad0130439896fb21cbeb37e6e126aaf60ae /elisp
parente43609d191fc720f242799f9d1fa05bc95397747 (diff)
downloadgeiser-c88a63d982ec7303cab32b2074f81a4d69400db3.tar.gz
geiser-c88a63d982ec7303cab32b2074f81a4d69400db3.tar.bz2
Fix for popups: don't deactivate view-mode on exit.
Diffstat (limited to 'elisp')
-rw-r--r--elisp/geiser-popup.el10
1 files changed, 9 insertions, 1 deletions
diff --git a/elisp/geiser-popup.el b/elisp/geiser-popup.el
index 0d358d2..0d7d234 100644
--- a/elisp/geiser-popup.el
+++ b/elisp/geiser-popup.el
@@ -16,6 +16,14 @@
(defvar geiser-popup--registry nil)
+(defun geiser-popup--setup-view-mode ()
+ (view-mode-enable)
+ (set (make-local-variable 'view-no-disable-on-exit) t)
+ (setq view-exit-action
+ (lambda (buffer)
+ (with-current-buffer buffer
+ (bury-buffer)))))
+
(defmacro geiser-popup--define (base name mode)
(let ((get-buff (intern (format "geiser-%s--buffer" base)))
(pop-buff (intern (format "geiser-%s--pop-to-buffer" base)))
@@ -28,7 +36,7 @@
(or (get-buffer ,name)
(with-current-buffer (get-buffer-create ,name)
(,mode)
- (view-mode-enable)
+ (geiser-popup--setup-view-mode)
(current-buffer))))
(defun ,pop-buff (&optional ,method)
(let ((,buffer (,get-buff)))