From 469ad2e6fd21c732c0603a9fc5bab6dbab0c7bde Mon Sep 17 00:00:00 2001 From: yamaoka Date: Wed, 20 Mar 2002 11:25:41 +0000 Subject: [PATCH] Synch with Oort Gnus. --- lisp/ChangeLog | 5 +++++ lisp/gnus-sum.el | 43 ++++++++++++++++++++----------------------- 2 files changed, 25 insertions(+), 23 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 701627e..ff192b2 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2002-03-20 Katsumi Yamaoka + + * gnus-sum.el (gnus-summary-make-menu-bar): Use intern'ed function + symbols for "View as different encoding" submenu. + 2002-03-19 Simon Josefsson * gnus-sum.el (gnus-summary-make-menu-bar): Add "View as different diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el index 36d4305..c3331e3 100644 --- a/lisp/gnus-sum.el +++ b/lisp/gnus-sum.el @@ -1978,29 +1978,26 @@ increase the score of each group you read." ["Show picons in mail headers" gnus-treat-mail-picon t] ["Show picons in news headers" gnus-treat-newsgroups-picon t] ("View as different encoding" - ,@(let (out) - (if (fboundp 'coding-system-list) - (mapcar (lambda (el) - (let ((cs (symbol-name el))) - (unless (or (string-match "dos$" cs) - (string-match "mac$" cs) - (string-match "unix$" cs)) - (push el out)))) - (coding-system-list)) - ;;(setq out (mapcar 'car mm-mime-mule-charset-alist)) - ) - (setq out (sort out (lambda (a b) - (string< (symbol-name a) - (symbol-name b))))) - (mapcar (lambda (cs) - `[,(symbol-name cs) - (lambda () - (interactive) - (let ((gnus-summary-show-article-charset-alist - '((1 . ,cs)))) - (gnus-summary-show-article 1))) - t]) - out)))) + ,@(mapcar + (lambda (cs) + ;; Since easymenu under FSF Emacs doesn't allow lambda + ;; forms for menu commands, we should provide intern'ed + ;; function symbols. + (let ((command (intern (format "\ +gnus-summary-show-article-from-menu-as-charset-%s" cs)))) + (fset command + `(lambda () + (interactive) + (let ((gnus-summary-show-article-charset-alist + '((1 . ,cs)))) + (gnus-summary-show-article 1)))) + `[,(symbol-name cs) ,command t])) + (sort (if (fboundp 'coding-system-list) + (coding-system-list) + (mapcar 'car mm-mime-mule-charset-alist)) + (lambda (a b) + (string< (symbol-name a) + (symbol-name b))))))) ("Washing" ("Remove Blanks" ["Leading" gnus-article-strip-leading-blank-lines t] -- 1.7.10.4