Addition.
authoryamaoka <yamaoka>
Wed, 22 Feb 2006 10:01:25 +0000 (10:01 +0000)
committeryamaoka <yamaoka>
Wed, 22 Feb 2006 10:01:25 +0000 (10:01 +0000)
README
README.ja

diff --git a/README b/README
index cff329c..cd9ae73 100644 (file)
--- a/README
+++ b/README
@@ -19,6 +19,29 @@ specify the PATH environment variable if it is needed.  For example:
 
 % ./configure --with-emacs=emacs-21.4 --infodir=/usr/local/info
 
+If you prefer to read those Japanese Info manuals when typing `C-cC-i'
+in Gnus buffers or typing `M-x message-info' in message buffers, you
+can add the following advice to the ~/.gnus.el file:
+
+(defadvice Info-goto-node (around prefer-japanese-edition activate)
+  "Prefer Japanese edition of Gnus Info manuals."
+  (if (and (not (eq major-mode 'Info-mode))
+          (string-match "\\`(\\(emacs-mime\\|gnus-coding\
+\\|gnus-faq\\|gnus\\|gnus-news\\|message\\|pgg\\|sasl\\|sieve\\))"
+                        (ad-get-arg 0)))
+      (let ((orig (ad-get-arg 0)))
+       (ad-set-arg 0 (concat (substring (ad-get-arg 0)
+                                        0 (1- (match-end 0)))
+                             "-ja"
+                             (substring (ad-get-arg 0)
+                                        (1- (match-end 0)))))
+       (condition-case nil
+           ad-do-it
+         (error
+          (ad-set-arg 0 orig)
+          ad-do-it)))
+    ad-do-it))
+
 Gnus version
 ============
 This package corresponds to the version of Gnus released from the Gnus
index ccb2dd7..79fa601 100644 (file)
--- a/README.ja
+++ b/README.ja
@@ -16,6 +16,29 @@ Gnus \e$B$N\e(B Info \e$B%^%K%e%"%k$NA4Lu$G$9!#\e(BNo Gnus v0.4 \e$B$KBP1~$7$^$9!#\e(B
 
 % ./configure --with-emacs=emacs-21.4 --infodir=/usr/local/info
 
+Gnus \e$B$N%P%C%U%!!<$G\e(B `C-c C-i' \e$B$r%?%$%W$9$k$+\e(B message \e$B%P%C%U%!!<$G\e(B
+`M-x message-info' \e$B$r%?%$%W$7$?$H$-$KF|K\8lHG$N\e(B Info \e$B%^%K%e%"%k$rFI$_\e(B
+\e$B$?$$$J$i$P!"\e(B~/.gnus.el \e$B%U%!%$%k$K0J2<$N\e(B advice \e$B$r2C$($k$3$H$,$G$-$^$9\e(B:
+
+(defadvice Info-goto-node (around prefer-japanese-edition activate)
+  "\e$BF|K\8lHG$N\e(B Gnus \e$B%^%K%e%"%k$rM%@h$9$k!#\e(B"
+  (if (and (not (eq major-mode 'Info-mode))
+          (string-match "\\`(\\(emacs-mime\\|gnus-coding\
+\\|gnus-faq\\|gnus\\|gnus-news\\|message\\|pgg\\|sasl\\|sieve\\))"
+                        (ad-get-arg 0)))
+      (let ((orig (ad-get-arg 0)))
+       (ad-set-arg 0 (concat (substring (ad-get-arg 0)
+                                        0 (1- (match-end 0)))
+                             "-ja"
+                             (substring (ad-get-arg 0)
+                                        (1- (match-end 0)))))
+       (condition-case nil
+           ad-do-it
+         (error
+          (ad-set-arg 0 orig)
+          ad-do-it)))
+    ad-do-it))
+
 Gnus \e$B$NHG\e(B
 =========
 Emacs \e$B$K4^$^$l$F$$$k$b$N$G$O$J$/!"\e(BGnus \e$B%?%o!<$+$i%j%j!<%9$5$l$kHG$KBP\e(B