From 4d3a83e405de4844bedea89699492b85edcac7fe Mon Sep 17 00:00:00 2001 From: czkmt Date: Mon, 22 Mar 1999 18:18:47 +0000 Subject: [PATCH] * 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. --- ChangeLog | 7 +++++++ lisp/gnus-offline.el | 43 +++++++++++++++++++++++++++++-------------- 2 files changed, 36 insertions(+), 14 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4bd6cfe..4235015 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +1999-03-22 Tsukamoto Tetsuo + + * 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 * lisp/gnus.el: Semi-gnus 6.10.10 is released. diff --git a/lisp/gnus-offline.el b/lisp/gnus-offline.el index 87764ea..0346ce8 100644 --- a/lisp/gnus-offline.el +++ b/lisp/gnus-offline.el @@ -1,5 +1,5 @@ ;;; 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 @@ -822,12 +822,12 @@ If value is nil , dialup line is disconnected status.") ;; 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 () @@ -917,16 +917,31 @@ If value is nil , dialup line is disconnected status.") ;; ;; 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)))) ;; -- 1.7.10.4