Synch with Oort Gnus.
authoryamaoka <yamaoka>
Wed, 20 Mar 2002 11:25:41 +0000 (11:25 +0000)
committeryamaoka <yamaoka>
Wed, 20 Mar 2002 11:25:41 +0000 (11:25 +0000)
lisp/ChangeLog
lisp/gnus-sum.el

index 701627e..ff192b2 100644 (file)
@@ -1,3 +1,8 @@
+2002-03-20  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * gnus-sum.el (gnus-summary-make-menu-bar): Use intern'ed function
+       symbols for "View as different encoding" submenu.
+
 2002-03-19  Simon Josefsson  <jas@extundo.com>
 
        * gnus-sum.el (gnus-summary-make-menu-bar): Add "View as different
index 36d4305..c3331e3 100644 (file)
@@ -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]