summaryrefslogtreecommitdiff
path: root/elisp/geiser-popup.el
diff options
context:
space:
mode:
Diffstat (limited to 'elisp/geiser-popup.el')
-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 0d7d234..35be4f6 100644
--- a/elisp/geiser-popup.el
+++ b/elisp/geiser-popup.el
@@ -16,9 +16,17 @@
(defvar geiser-popup--registry nil)
+(defvar geiser-popup--overriding-map
+ (let ((map (make-sparse-keymap)))
+ (define-key map "\r" nil)
+ (define-key map "q" 'View-quit)
+ map))
+
(defun geiser-popup--setup-view-mode ()
- (view-mode-enable)
+ (view-mode t)
(set (make-local-variable 'view-no-disable-on-exit) t)
+ (set (make-local-variable 'minor-mode-overriding-map-alist)
+ (list (cons 'view-mode geiser-popup--overriding-map)))
(setq view-exit-action
(lambda (buffer)
(with-current-buffer buffer