changeset 85444:a3364ed63fcd

(doc-view-mode-map): Use remapping. Don't rebind C-v, M-v to their default value. Don't bind mouse-4 and mouse-5: it's mwheel.el's job.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Fri, 19 Oct 2007 16:03:09 +0000
parents 13cb05eb9f29
children 3bc55977b5f8
files lisp/ChangeLog lisp/doc-view.el
diffstat 2 files changed, 12 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Fri Oct 19 15:59:13 2007 +0000
+++ b/lisp/ChangeLog	Fri Oct 19 16:03:09 2007 +0000
@@ -1,5 +1,9 @@
 2007-10-19  Stefan Monnier  <monnier@iro.umontreal.ca>
 
+	* doc-view.el (doc-view-mode-map): Use remapping.
+	Don't rebind C-v, M-v to their default value.
+	Don't bind mouse-4 and mouse-5: it's mwheel.el's job.
+
 	* smerge-mode.el: Add word-granularity refinement.
 	(smerge-refine-forward-function, smerge-refine-ignore-whitespace)
 	(smerge-refine-weight-hack): New vars.
--- a/lisp/doc-view.el	Fri Oct 19 15:59:13 2007 +0000
+++ b/lisp/doc-view.el	Fri Oct 19 16:03:09 2007 +0000
@@ -212,8 +212,10 @@
     ;; Navigation in the document
     (define-key map (kbd "n")         'doc-view-next-page)
     (define-key map (kbd "p")         'doc-view-previous-page)
-    (define-key map (kbd "<next>")    'doc-view-next-page)
-    (define-key map (kbd "<prior>")   'doc-view-previous-page)
+    (define-key map (kbd "<next>")    'forward-page)
+    (define-key map (kbd "<prior>")   'backward-page)
+    (define-key map [remap forward-page]  'doc-view-next-page)
+    (define-key map [remap backward-page] 'doc-view-previous-page)
     (define-key map (kbd "SPC")       'doc-view-scroll-up-or-next-page)
     (define-key map (kbd "DEL")       'doc-view-scroll-down-or-previous-page)
     (define-key map (kbd "M-<")       'doc-view-first-page)
@@ -232,18 +234,10 @@
     (define-key map (kbd "C-S-n")     'doc-view-search-next-match)
     (define-key map (kbd "C-S-p")     'doc-view-search-previous-match)
     ;; Scrolling
-    (define-key map (kbd "<right>")   'image-forward-hscroll)
-    (define-key map (kbd "<left>")    'image-backward-hscroll)
-    (define-key map (kbd "<down>")    'image-next-line)
-    (define-key map (kbd "<up>")      'image-previous-line)
-    (define-key map (kbd "C-f")       'image-forward-hscroll)
-    (define-key map (kbd "C-b")       'image-backward-hscroll)
-    (define-key map (kbd "C-n")       'image-next-line)
-    (define-key map (kbd "C-p")       'image-previous-line)
-    (define-key map (kbd "C-v")       'scroll-up)
-    (define-key map (kbd "<mouse-4>") 'mwheel-scroll)
-    (define-key map (kbd "<mouse-5>") 'mwheel-scroll)
-    (define-key map (kbd "M-v")       'scroll-down)
+    (define-key map [remap forward-char]  'image-forward-hscroll)
+    (define-key map [remap backward-char] 'image-backward-hscroll)
+    (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