diff options
| author | Katsumi Yamaoka | 2015-04-14 03:35:02 +0000 |
|---|---|---|
| committer | Katsumi Yamaoka | 2015-04-14 03:35:02 +0000 |
| commit | d4b44a07a75666177f8684876c7337c0b91a95da (patch) | |
| tree | 8b23c3a500258118cd3addf0ddc2028d8098326a | |
| parent | b16cdc2782ba4fbc019c8c6d1749f6eff16f6fce (diff) | |
| download | emacs-d4b44a07a75666177f8684876c7337c0b91a95da.tar.gz emacs-d4b44a07a75666177f8684876c7337c0b91a95da.zip | |
[Gnus] Catch the invalid-operation that idna.el will issue
* lisp/gnus/gnus-art.el (gnus-use-idna):
* lisp/gnus/gnus-sum.el (gnus-summary-idna-message):
* lisp/gnus/message.el (message-use-idna):
Catch the invalid-operation that idna.el will issue.
| -rw-r--r-- | lisp/gnus/gnus-art.el | 7 | ||||
| -rw-r--r-- | lisp/gnus/gnus-sum.el | 8 | ||||
| -rw-r--r-- | lisp/gnus/message.el | 5 |
3 files changed, 14 insertions, 6 deletions
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index b238d65c207..14f9adca85d 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el | |||
| @@ -1627,8 +1627,11 @@ It is a string, such as \"PGP\". If nil, ask user." | |||
| 1627 | 1627 | ||
| 1628 | (defvar idna-program) | 1628 | (defvar idna-program) |
| 1629 | 1629 | ||
| 1630 | (defcustom gnus-use-idna (and (condition-case nil (require 'idna) (file-error)) | 1630 | (defcustom gnus-use-idna (and (mm-coding-system-p 'utf-8) |
| 1631 | (mm-coding-system-p 'utf-8) | 1631 | (condition-case nil |
| 1632 | (require 'idna) | ||
| 1633 | (file-error) | ||
| 1634 | (invalid-operation)) | ||
| 1632 | idna-program | 1635 | idna-program |
| 1633 | (executable-find idna-program)) | 1636 | (executable-find idna-program)) |
| 1634 | "Whether IDNA decoding of headers is used when viewing messages. | 1637 | "Whether IDNA decoding of headers is used when viewing messages. |
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index 73a0d4b1039..1d8ad8e6acb 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el | |||
| @@ -9870,9 +9870,11 @@ invalid IDNA string (`xn--bar' is invalid). | |||
| 9870 | You must have GNU Libidn (URL `http://www.gnu.org/software/libidn/') | 9870 | You must have GNU Libidn (URL `http://www.gnu.org/software/libidn/') |
| 9871 | installed for this command to work." | 9871 | installed for this command to work." |
| 9872 | (interactive "P") | 9872 | (interactive "P") |
| 9873 | (if (not (and (condition-case nil (require 'idna) | 9873 | (if (not (and (mm-coding-system-p 'utf-8) |
| 9874 | (file-error)) | 9874 | (condition-case nil |
| 9875 | (mm-coding-system-p 'utf-8) | 9875 | (require 'idna) |
| 9876 | (file-error) | ||
| 9877 | (invalid-operation)) | ||
| 9876 | (symbol-value 'idna-program) | 9878 | (symbol-value 'idna-program) |
| 9877 | (executable-find (symbol-value 'idna-program)))) | 9879 | (executable-find (symbol-value 'idna-program)))) |
| 9878 | (gnus-message | 9880 | (gnus-message |
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index 3dc29088d84..1371e700281 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el | |||
| @@ -1763,7 +1763,10 @@ no, only reply back to the author." | |||
| 1763 | (let (mucs-ignore-version-incompatibilities) | 1763 | (let (mucs-ignore-version-incompatibilities) |
| 1764 | (require 'un-define)) | 1764 | (require 'un-define)) |
| 1765 | (error))) | 1765 | (error))) |
| 1766 | (condition-case nil (require 'idna) (file-error)) | 1766 | (condition-case nil |
| 1767 | (require 'idna) | ||
| 1768 | (file-error) | ||
| 1769 | (invalid-operation)) | ||
| 1767 | idna-program | 1770 | idna-program |
| 1768 | (executable-find idna-program) | 1771 | (executable-find idna-program) |
| 1769 | (string= (idna-to-ascii "räksmörgås") "xn--rksmrgs-5wao1o") | 1772 | (string= (idna-to-ascii "räksmörgås") "xn--rksmrgs-5wao1o") |