+1999-03-22 Tsukamoto Tetsuo <czkmt@remus.dti.ne.jp>
+
+ * lisp/gnus-offline.el (gnus-offline-popup-menu): Modify so that
+ the title of a popup menu is displayed under Emacs 19.34.
+ (gnus-offline-define-menu-and-key): Rewrite the function to change
+ the behavior of "Get new news" button, under XEmacs.
+
1999-03-09 Katsumi Yamaoka <yamaoka@jpl.org>
* lisp/gnus.el: Semi-gnus 6.10.10 is released.
;;; gnus-offline.el --- To process mail & news at offline environment.
-;;; $Id: gnus-offline.el,v 1.1.4.8 1999-02-01 11:02:11 yamaoka Exp $
+;;; $Id: gnus-offline.el,v 1.1.4.9 1999-03-22 18:18:47 czkmt Exp $
;;; Copyright (C) 1998 Tatsuya Ichikawa
;;; Yukihiro Ito
;; Overwrite the toolbar spec for gnus-group-mode.
(add-hook 'gnus-startup-hook
(lambda ()
- (let ((i 0) (stat t) but)
- (while (and stat (setq but (nth i gnus-group-toolbar)))
- (and (equal 'gnus-group-get-new-news (aref but 1))
- (aset but 1 'gnus-offline-gnus-get-new-news)
- (setq stat nil))
- (setq i (1+ i))))))))
+ (catch 'tag
+ (mapcar (lambda (but)
+ (when (eq 'gnus-group-get-new-news (aref but 1))
+ (aset but 1 'gnus-offline-gnus-get-new-news)
+ (throw 'tag nil)))
+ gnus-group-toolbar))))))
;;
;;
(defun gnus-offline-define-menu-on-miee ()
;;
;; Popup menu within the group buffer (under Emacs).
;;
+(defvar gnus-offline-popup-menu nil)
(defun gnus-offline-popup-menu (event)
"Popup menu for Gnus offline."
(interactive "e")
- (let* ((menu (if (boundp 'miee-popup-menu)
- (or (assoc 'keymap
- (assoc 'Miee (assoc 'menu-bar global-map)))
- miee-popup-menu)
- gnus-offline-menu-on-agent))
- (pop (x-popup-menu t menu))
- (func (and pop (lookup-key menu (apply 'vector pop)))))
+ (unless gnus-offline-popup-menu
+ (setq gnus-offline-popup-menu
+ (or (featurep 'xemacs)
+ (let ((menu
+ (if (boundp 'miee-popup-menu)
+ (or (assoc 'keymap
+ (assoc 'Miee (assoc 'menu-bar global-map)))
+ miee-popup-menu)
+ gnus-offline-menu-on-agent)))
+ (if (string< emacs-version "20")
+ (append (list 'keymap
+ (if (boundp 'miee-popup-menu)
+ '(nil "Miee")
+ '(nil "Offline"))
+ '(nil "")
+ '(nil ""))
+ (cdr menu))
+ menu)))))
+ (let* ((pop (x-popup-menu t gnus-offline-popup-menu))
+ (func (and pop (lookup-key gnus-offline-popup-menu
+ (apply 'vector pop)))))
(and pop func (funcall func))))
\f
;;