From 7f926db64f6b068ebd606995ac563052d7852416 Mon Sep 17 00:00:00 2001 From: yamaoka Date: Mon, 24 Feb 2003 03:02:28 +0000 Subject: [PATCH] Synch to Oort Gnus. --- lisp/ChangeLog | 8 ++++++++ lisp/gnus-art.el | 20 ++++++++++++++++++-- lisp/gnus-registry.el | 7 +++++++ 3 files changed, 33 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7f8bc0b..c1c86d4 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2003-02-24 Katsumi Yamaoka + + * gnus-art.el (popup-menu): Compiler macro for Emacs 20. + (gnus-article-refer-article): Use gnus-point-at-(b|e)ol instead of + point-at-(b|e)ol which aren't available in Emacs 20. + + * gnus-registry.el (puthash): Alias to cl-puthash for Emacs 20. + 2002-02-23 Kevin Greiner * gnus-start.el (gnus-activate-group): Re-enabled the catch error diff --git a/lisp/gnus-art.el b/lisp/gnus-art.el index bd7499a..ec2b44a 100644 --- a/lisp/gnus-art.el +++ b/lisp/gnus-art.el @@ -4104,6 +4104,22 @@ General format specifiers can also be used. See Info node ,@(mapcar (lambda (c) (vector (caddr c) (car c) :enable t)) gnus-mime-button-commands))) +(eval-when-compile + (define-compiler-macro popup-menu (&whole form + menu &optional position prefix) + (if (and (fboundp 'popup-menu) + (not (memq 'popup-menu (assoc "lmenu" load-history)))) + form + ;; Gnus is probably running under Emacs 20. + `(let* ((menu (cdr ,menu)) + (response (x-popup-menu + t (list (car menu) + (cons "" (mapcar (lambda (c) + (cons (caddr c) (car c))) + (cdr menu))))))) + (if response + (call-interactively (nth 3 (assq response menu)))))))) + (defun gnus-mime-button-menu (event prefix) "Construct a context-sensitive menu of MIME commands." (interactive "e\nP") @@ -5153,9 +5169,9 @@ not have a face in `gnus-article-boring-faces'." "Read article specified by message-id around point." (interactive) (save-excursion - (re-search-backward ""))) (set-buffer gnus-summary-buffer) (gnus-summary-refer-article msg-id))) diff --git a/lisp/gnus-registry.el b/lisp/gnus-registry.el index 7aab355..6c11631 100644 --- a/lisp/gnus-registry.el +++ b/lisp/gnus-registry.el @@ -45,6 +45,13 @@ ;; (maphash (lambda (key value) (message "key: %s value: %s" key value)) gnus-registry-hashtb) ;; (clrhash gnus-registry-hashtb) +;; Function(s) missing in Emacs 20 +(when (memq nil (mapcar 'fboundp '(puthash))) + (require 'cl) + (unless (fboundp 'puthash) + ;; alias puthash is missing from Emacs 20 cl-extra.el + (defalias 'puthash 'cl-puthash))) + (defun gnus-register-action (action data-header from &optional to method) (let* ((id (mail-header-id data-header)) (hash-entry (gethash id gnus-registry-hashtb))) -- 1.7.10.4