(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]
(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.
(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)
"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."
(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
',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
',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