]> git.eshelyaron.com Git - emacs.git/commitdiff
(gnus-mime-button-map): Don't inherit from
authorDave Love <fx@gnu.org>
Tue, 21 Nov 2000 17:54:40 +0000 (17:54 +0000)
committerDave Love <fx@gnu.org>
Tue, 21 Nov 2000 17:54:40 +0000 (17:54 +0000)
gnus-article-mode-map.
(gnus-mime-button-menu): Use mouse-set-point.
(gnus-insert-mime-button, gnus-mime-display-alternative)
(gnus-mime-display-alternative): Don't use local-map property.

lisp/gnus/ChangeLog
lisp/gnus/gnus-art.el

index 33893a8c36391f9291cad0ff3d2d2510d2e4f26f..7db0784c120fcdd69b90aa04a8c4dcd5591c5fa7 100644 (file)
@@ -1,3 +1,11 @@
+2000-11-21  Dave Love  <fx@gnu.org>
+
+       * gnus-art.el (gnus-mime-button-map): Don't inherit from
+       gnus-article-mode-map.
+       (gnus-mime-button-menu): Use mouse-set-point.
+       (gnus-insert-mime-button, gnus-mime-display-alternative) 
+       (gnus-mime-display-alternative): Don't use local-map property.
+
 2000-11-17  Katsumi Yamaoka  <yamaoka@jpl.org>
 
        * nntp.el (nntp-open-telnet): Wait for the telnet prompt before
index 272d01b850988960657cb660c7cbb6b6fc5d9b1b..517a16d745a3bfdbe933cac9e858a6fb56b7c5bf 100644 (file)
@@ -2664,6 +2664,7 @@ If variable `gnus-use-long-file-name' is non-nil, it is
 
     (easy-menu-define
      gnus-article-treatment-menu gnus-article-mode-map ""
+     ;; Fixme: this should use :active (and maybe :visible).
      '("Treatment"
        ["Hide headers" gnus-article-hide-headers t]
        ["Hide signature" gnus-article-hide-signature t]
@@ -2683,6 +2684,9 @@ If variable `gnus-use-long-file-name' is non-nil, it is
 
     (gnus-run-hooks 'gnus-article-menu-hook)))
 
+;; Fixme: do something for the Emacs tool bar in Article mode a la
+;; Summary.
+
 (defun gnus-article-mode ()
   "Major mode for displaying an article.
 
@@ -2949,7 +2953,8 @@ If ALL-HEADERS is non-nil, no headers are hidden."
 
 (defvar gnus-mime-button-map
   (let ((map (make-sparse-keymap)))
-    (set-keymap-parent map gnus-article-mode-map)
+    ;; Not for Emacs 21: fixme better.
+    ;; (set-keymap-parent map gnus-article-mode-map)
     (define-key map gnus-mouse-2 'gnus-article-push-button)
     (define-key map gnus-down-mouse-3 'gnus-mime-button-menu)
     (dolist (c gnus-mime-button-commands)
@@ -2960,17 +2965,15 @@ If ALL-HEADERS is non-nil, no headers are hidden."
   "Construct a context-sensitive menu of MIME commands."
   (interactive "e")
   (save-excursion
-    (let ((pos (event-start event)))
-      (set-buffer (window-buffer (posn-window pos)))
-      (goto-char (posn-point pos))
-      (gnus-article-check-buffer)
-      (let ((response (x-popup-menu
-                      t `("MIME Part"
-                          ("" ,@(mapcar (lambda (c)
-                                          (cons (caddr c) (car c)))
-                                        gnus-mime-button-commands))))))
-       (if response
-           (call-interactively response))))))
+    (mouse-set-point event)
+    (gnus-article-check-buffer)
+    (let ((response (x-popup-menu
+                    t `("MIME Part"
+                        ("" ,@(mapcar (lambda (c)
+                                        (cons (caddr c) (car c)))
+                                      gnus-mime-button-commands))))))
+      (if response
+         (call-interactively response)))))
 
 (defun gnus-mime-view-all-parts (&optional handles)
   "View all the MIME parts."
@@ -3288,12 +3291,13 @@ In no internal viewer is available, use an external viewer."
     (setq b (point))
     (gnus-eval-format
      gnus-mime-button-line-format gnus-mime-button-line-format-alist
-     `(local-map ,gnus-mime-button-map
-                keymap ,gnus-mime-button-map
-                gnus-callback gnus-mm-display-part
-                gnus-part ,gnus-tmp-id
-                article-type annotation
-                gnus-data ,handle))
+     `(keymap ,gnus-mime-button-map
+       ;; Not for Emacs 21: fixme better.
+       ;; local-map ,gnus-mime-button-map
+       gnus-callback gnus-mm-display-part
+       gnus-part ,gnus-tmp-id
+       article-type annotation
+       gnus-data ,handle))
     (setq e (point))
     (widget-convert-button
      'link b e
@@ -3521,7 +3525,8 @@ In no internal viewer is available, use an external viewer."
                       ',gnus-article-mime-handle-alist))
               (gnus-mime-display-alternative
                ',ihandles ',not-pref ',begend ,id))
-            local-map ,gnus-mime-button-map
+            ;; Not for Emacs 21: fixme better.
+            ;; local-map ,gnus-mime-button-map
             ,gnus-mouse-face-prop ,gnus-article-mouse-face
             face ,gnus-article-button-face
             keymap ,gnus-mime-button-map
@@ -3546,7 +3551,8 @@ In no internal viewer is available, use an external viewer."
                         ',gnus-article-mime-handle-alist))
                 (gnus-mime-display-alternative
                  ',ihandles ',handle ',begend ,id))
-              local-map ,gnus-mime-button-map
+              ;; Not for Emacs 21: fixme better.
+              ;; local-map ,gnus-mime-button-map
               ,gnus-mouse-face-prop ,gnus-article-mouse-face
               face ,gnus-article-button-face
               keymap ,gnus-mime-button-map