diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2010-06-12 00:14:27 +0200 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2010-06-12 00:14:27 +0200 |
commit | 25ed49cddef2977a6620b3f7ec8a2a8a972ef3f2 (patch) | |
tree | c7a7901082ac8a0ca3acd2e827ff48c52ae632d7 /elisp/geiser-popup.el | |
parent | 1d50e765c1b8aad497973d55a7543c746e348e8f (diff) | |
download | geiser-chez-25ed49cddef2977a6620b3f7ec8a2a8a972ef3f2.tar.gz geiser-chez-25ed49cddef2977a6620b3f7ec8a2a8a972ef3f2.tar.bz2 |
Fix for popups: don't deactivate view-mode on exit.
Diffstat (limited to 'elisp/geiser-popup.el')
-rw-r--r-- | elisp/geiser-popup.el | 10 |
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))) |