changeset 95508:88781ac6a1be

* image-mode.el (image-mode-map): Suppress key map and bind `q'. * doc-view.el (doc-view-mode-map): Inherit from image-mode-map.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Tue, 03 Jun 2008 07:42:03 +0000
parents 62ef79a054ca
children cbb847740e8b
files lisp/ChangeLog lisp/doc-view.el lisp/image-mode.el
diffstat 3 files changed, 8 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Tue Jun 03 07:40:29 2008 +0000
+++ b/lisp/ChangeLog	Tue Jun 03 07:42:03 2008 +0000
@@ -1,5 +1,8 @@
 2008-06-03  Stefan Monnier  <monnier@iro.umontreal.ca>
 
+	* image-mode.el (image-mode-map): Suppress key map and bind `q'.
+	* doc-view.el (doc-view-mode-map): Inherit from image-mode-map.
+
 	* progmodes/perl-mode.el (perl-font-lock-syntactic-keywords): Try to be
 	yet a bit more clever at distinguishing / from /.
 
--- a/lisp/doc-view.el	Tue Jun 03 07:40:29 2008 +0000
+++ b/lisp/doc-view.el	Tue Jun 03 07:42:03 2008 +0000
@@ -276,7 +276,7 @@
 
 (defvar doc-view-mode-map
   (let ((map (make-sparse-keymap)))
-    (suppress-keymap map)
+    (set-keymap-parent map image-mode-map)
     ;; Navigation in the document
     (define-key map (kbd "n")         'doc-view-next-page)
     (define-key map (kbd "p")         'doc-view-previous-page)
@@ -289,13 +289,10 @@
     (define-key map (kbd "M-<")       'doc-view-first-page)
     (define-key map (kbd "M->")       'doc-view-last-page)
     (define-key map [remap goto-line] 'doc-view-goto-page)
-    (define-key map [remap scroll-up] 'image-scroll-up)
-    (define-key map [remap scroll-down] 'image-scroll-down)
     ;; Zoom in/out.
     (define-key map "+"               'doc-view-enlarge)
     (define-key map "-"               'doc-view-shrink)
-    ;; Killing/burying the buffer (and the process)
-    (define-key map (kbd "q")         'quit-window)
+    ;; Killing the buffer (and the process)
     (define-key map (kbd "k")         'doc-view-kill-proc-and-buffer)
     (define-key map (kbd "K")         'doc-view-kill-proc)
     ;; Slicing the image
@@ -306,13 +303,6 @@
     (define-key map (kbd "C-s")       'doc-view-search)
     (define-key map (kbd "<find>")    'doc-view-search)
     (define-key map (kbd "C-r")       'doc-view-search-backward)
-    ;; Scrolling
-    (define-key map [remap forward-char]  'image-forward-hscroll)
-    (define-key map [remap backward-char] 'image-backward-hscroll)
-    (define-key map [remap move-end-of-line]       'image-eol)
-    (define-key map [remap move-beginning-of-line] 'image-bol)
-    (define-key map [remap next-line]     'image-next-line)
-    (define-key map [remap previous-line] 'image-previous-line)
     ;; Show the tooltip
     (define-key map (kbd "C-t")       'doc-view-show-tooltip)
     ;; Toggle between text and image display or editing
--- a/lisp/image-mode.el	Tue Jun 03 07:40:29 2008 +0000
+++ b/lisp/image-mode.el	Tue Jun 03 07:42:03 2008 +0000
@@ -286,6 +286,9 @@
 
 (defvar image-mode-map
   (let ((map (make-sparse-keymap)))
+    (suppress-keymap map)
+    (define-key map "q"         'quit-window)
+    ;;
     (define-key map "\C-c\C-c" 'image-toggle-display)
     (define-key map [remap forward-char] 'image-forward-hscroll)
     (define-key map [remap backward-char] 'image-backward-hscroll)