From: yamaoka Date: Sun, 16 Jan 2005 22:20:30 +0000 (+0000) Subject: Synch to No Gnus 200501161857. X-Git-Tag: t-gnus-6_17_4-quimby-~591 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=d9e0570049ac5c717939592103683890a264b1b7;p=elisp%2Fgnus.git- Synch to No Gnus 200501161857. --- diff --git a/GNUS-NEWS b/GNUS-NEWS index 41677ff..caa6de6 100644 --- a/GNUS-NEWS +++ b/GNUS-NEWS @@ -48,7 +48,8 @@ ANSI sequences are used in some Chinese hierarchies for highlighting articles (`gnus-article-treat-ansi-sequences'). ** International host names (IDNA) can now be decoded inside article -bodies using `W i' (`gnus-summary-idna-message'). +bodies using `W i' (`gnus-summary-idna-message'). This require that +GNU Libidn (`http://www.gnu.org/software/libidn/') has been installed. ** Gnus includes an Emacs Lisp SASL library. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ce0c29d..891bdc0 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,10 @@ 2005-01-16 Simon Josefsson + * gnus-sum.el (gnus-summary-idna-message): Fail gracefully if + idn/idna.el isn't available. + (gnus-summary-idna-message): Doc fix. Suggested by Michael Cook + . + * hashcash.el: Remove non-FSF copyright header. * hashcash.el (hashcash-extra-generate-parameters): New variable. diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el index 4607132..152ed3a 100644 --- a/lisp/gnus-sum.el +++ b/lisp/gnus-sum.el @@ -9078,18 +9078,27 @@ forward." "Decode IDNA encoded domain names in the current articles. IDNA encoded domain names looks like `xn--bar'. If a string remain unencoded after running this function, it is likely an -invalid IDNA string (`xn--bar' is invalid)." +invalid IDNA string (`xn--bar' is invalid). + +You must have GNU Libidn (`http://www.gnu.org/software/libidn/') +installed for this command to work." (interactive "P") - (gnus-summary-select-article) - (let ((mail-header-separator "")) - (gnus-eval-in-buffer-window gnus-article-buffer - (save-restriction - (widen) - (let ((start (window-start)) - buffer-read-only) - (while (re-search-forward "\\(xn--[-0-9a-z]+\\)" nil t) - (replace-match (idna-to-unicode (match-string 1)))) - (set-window-start (get-buffer-window (current-buffer)) start)))))) + (if (not (and (condition-case nil (require 'idna) + (file-error)) + (mm-coding-system-p 'utf-8) + (executable-find idna-program))) + (gnus-message + 5 "GNU Libidn not installed properly (`idn' or `idna.el' missing)") + (gnus-summary-select-article) + (let ((mail-header-separator "")) + (gnus-eval-in-buffer-window gnus-article-buffer + (save-restriction + (widen) + (let ((start (window-start)) + buffer-read-only) + (while (re-search-forward "\\(xn--[-0-9a-z]+\\)" nil t) + (replace-match (idna-to-unicode (match-string 1)))) + (set-window-start (get-buffer-window (current-buffer)) start))))))) (autoload 'unmorse-region "morse" "Convert morse coded text in region to ordinary ASCII text." diff --git a/texi/ChangeLog b/texi/ChangeLog index 0cb175c..eb0384a 100644 --- a/texi/ChangeLog +++ b/texi/ChangeLog @@ -1,3 +1,10 @@ +2005-01-16 Simon Josefsson + + * gnus.texi (Article Washing): Add libidn URL. Suggested by + Michael Cook . + + * gnus-news.texi: Ditto. + 2005-01-16 Xavier Maillard (tiny change) * gnus-faq.texi ([4.1]): Typo. diff --git a/texi/gnus-ja.texi b/texi/gnus-ja.texi index 6cd5da9..737a496 100644 --- a/texi/gnus-ja.texi +++ b/texi/gnus-ja.texi @@ -8157,7 +8157,9 @@ gnus が記事を表示する既定のやり方を変えたいとき 現在の記事にある IDNA エンコードされたドメイン名をデコードします。 IDNA エンコードされたドメイン名は @samp{xn--bar} のように見えます。これ を実行した後で文字列がデコードされないままだったら、おそらくそれは不正 -な IDNA 文字列でしょう (@samp{xn--bar} は不正です)。 +な IDNA 文字列でしょう (@samp{xn--bar} は不正です)。このコマンドを動かす +ために、GNU Libidn (@url{http://www.gnu.org/software/libidn/}) をインス +トールしていなければなりません。 @item W t @item t diff --git a/texi/gnus-news.texi b/texi/gnus-news.texi index 21f90df..c33aebf 100644 --- a/texi/gnus-news.texi +++ b/texi/gnus-news.texi @@ -62,7 +62,8 @@ highlighting articles (@code{gnus-article-treat-ansi-sequences}). @item International host names (@acronym{IDNA}) can now be decoded inside article bodies using @kbd{W i} -(@code{gnus-summary-idna-message}). +(@code{gnus-summary-idna-message}). This require that GNU Libidn +(@url{http://www.gnu.org/software/libidn/}) has been installed. @item Gnus includes an Emacs Lisp @acronym{SASL} library. diff --git a/texi/gnus.texi b/texi/gnus.texi index eac652c..d306eaf 100644 --- a/texi/gnus.texi +++ b/texi/gnus.texi @@ -8464,7 +8464,9 @@ Morse decode the article buffer (@code{gnus-summary-morse-message}). Decode IDNA encoded domain names in the current articles. IDNA encoded domain names looks like @samp{xn--bar}. If a string remain unencoded after running invoking this, it is likely an invalid IDNA -string (@samp{xn--bar} is invalid). +string (@samp{xn--bar} is invalid). You must have GNU Libidn +(@url{http://www.gnu.org/software/libidn/}) installed for this command +to work. @item W t @item t