* WL-MK (make-wl-news): Don't add wl-news-lang setting into
authoryoichi <yoichi>
Sat, 21 Dec 2002 14:53:04 +0000 (14:53 +0000)
committeryoichi <yoichi>
Sat, 21 Dec 2002 14:53:04 +0000 (14:53 +0000)
wl-news.el here.
* wl/wl-news.el.in (wl-news-lang): Set default value according to
current-language-environment.
(wl-news-append-news): Do nothing when news-list is nil.

ChangeLog
WL-MK
wl/ChangeLog
wl/wl-news.el.in

index 53ec942..e30f1f0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2002-12-21  Yoichi NAKAYAMA  <yoichi@eken.phys.nagoya-u.ac.jp>
+
+       * WL-MK (make-wl-news): Don't add wl-news-lang setting into
+       wl-news.el here.
+
 2002-12-20  Kenichi OKADA  <okada@opaopa.org>
 
        * WL-MK (make-wl-news): Fix coding system.
diff --git a/WL-MK b/WL-MK
index 6467e1a..40ec8a8 100644 (file)
--- a/WL-MK
+++ b/WL-MK
            (unless (re-search-forward "^;;; -\\*- news-list -\\*-" nil t)
              (error "Invalid wl-news.el.in"))
            (forward-line 2)
-           (insert "(defvar wl-news-lang '")
-           (prin1 wl-news-lang (current-buffer))
-           (insert ")\n")
            (insert "(defconst wl-news-news-alist\n  '")
            (prin1 (wl-news-parse-news wl-news-lang) (current-buffer))
            (insert ")\n")
index 5f177e7..6dd7a6f 100644 (file)
@@ -1,3 +1,9 @@
+2002-12-21  Yoichi NAKAYAMA  <yoichi@eken.phys.nagoya-u.ac.jp>
+
+       * wl-news.el.in (wl-news-lang): Set default value according to
+       current-language-environment.
+       (wl-news-append-news): Do nothing when news-list is nil.
+
 2002-12-21  Kenichi OKADA  <okada@opaopa.org>
 
        * wl-news.el.in (wl-news-mode-map): Add new keybind.
index ea67451..9872ee9 100644 (file)
 (defvar wl-news-version-file-name "previous-version")
 (defvar wl-news-default-previous-version '(2 0 0))
 
+(defvar wl-news-lang
+  (if (and (boundp 'current-language-environment)
+          (string-equal "Japanese"
+                        (symbol-value 'current-language-environment)))
+      '("ja" "en") '("en" "ja")))
+
 (defun wl-news-check ()
   (let* ((updated (not (wl-news-already-current-p))))
     (if updated
   (require 'wl-mime)
   (let ((news-list (cdr (assoc lang wl-news-news-alist)))
        ret)
-    (if no-mime-tag
-       (insert "--------------\n")
-      (mime-edit-insert-tag "text" "plain" "" ""))
-    (while (< 0
-             (product-version-compare
-              (car (car news-list))
-              previous-version))
-      (setq ret t)
-      (insert (cdr (car news-list)) "\n\n")
-      (setq news-list (cdr news-list)))
+    (when news-list
+      (if no-mime-tag
+         (insert "--------------\n")
+       (mime-edit-insert-tag "text" "plain" "" ""))
+      (while (< 0
+               (product-version-compare
+                (car (car news-list))
+                previous-version))
+       (setq ret t)
+       (insert (cdr (car news-list)) "\n\n")
+       (setq news-list (cdr news-list))))
     ret))
 
 (defun wl-news-check-news (version news-lang)