* mm-view.el (mm-w3m-local-map-property): Make it work with older
authorTSUCHIYA Masatoshi <tsuchiya@namazu.org>
Wed, 30 Oct 2002 07:54:59 +0000 (07:54 +0000)
committerTSUCHIYA Masatoshi <tsuchiya@namazu.org>
Wed, 30 Oct 2002 07:54:59 +0000 (07:54 +0000)
versions of emacs-w3m than 1.3.3.

lisp/ChangeLog
lisp/mm-view.el

index c7056aa..938df4e 100644 (file)
@@ -1,5 +1,8 @@
 2002-10-30  TSUCHIYA Masatoshi  <tsuchiya@namazu.org>
 
+       * mm-view.el (mm-w3m-local-map-property): Make it work with older
+       versions of emacs-w3m than 1.3.3.
+
        * lpath.el: Bind w3m-minor-mode-map.
 
        * mm-view.el (mm-w3m-mode-command-alist)
index f08fdab..90a7358 100644 (file)
@@ -216,15 +216,16 @@ commands to this map, add them to `w3m-minor-mode-map' instead of this
 map.")))
 
 (defun mm-w3m-local-map-property ()
-  (if (or (featurep 'xemacs)
-         (>= emacs-major-version 21))
-      (list 'keymap w3m-minor-mode-map)
-    (list 'local-map
-         (or mm-w3m-mode-map
-             (progn
-               (setq mm-w3m-mode-map (copy-keymap w3m-minor-mode-map))
-               (set-keymap-parent mm-w3m-mode-map gnus-article-mode-map)
-               mm-w3m-mode-map)))))
+  (when (and (boundp 'w3m-minor-mode-map) w3m-minor-mode-map)
+    (if (or (featurep 'xemacs)
+           (>= emacs-major-version 21))
+       (list 'keymap w3m-minor-mode-map)
+      (list 'local-map
+           (or mm-w3m-mode-map
+               (progn
+                 (setq mm-w3m-mode-map (copy-keymap w3m-minor-mode-map))
+                 (set-keymap-parent mm-w3m-mode-map gnus-article-mode-map)
+                 mm-w3m-mode-map))))))
 
 (defun mm-inline-text-html-render-with-w3m (handle)
   "Render a text/html part using emacs-w3m."