[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.
This commit is contained in:
parent
b16cdc2782
commit
d4b44a07a7
3 changed files with 14 additions and 6 deletions
|
@ -1627,8 +1627,11 @@ It is a string, such as \"PGP\". If nil, ask user."
|
|||
|
||||
(defvar idna-program)
|
||||
|
||||
(defcustom gnus-use-idna (and (condition-case nil (require 'idna) (file-error))
|
||||
(mm-coding-system-p 'utf-8)
|
||||
(defcustom gnus-use-idna (and (mm-coding-system-p 'utf-8)
|
||||
(condition-case nil
|
||||
(require 'idna)
|
||||
(file-error)
|
||||
(invalid-operation))
|
||||
idna-program
|
||||
(executable-find idna-program))
|
||||
"Whether IDNA decoding of headers is used when viewing messages.
|
||||
|
|
|
@ -9870,9 +9870,11 @@ invalid IDNA string (`xn--bar' is invalid).
|
|||
You must have GNU Libidn (URL `http://www.gnu.org/software/libidn/')
|
||||
installed for this command to work."
|
||||
(interactive "P")
|
||||
(if (not (and (condition-case nil (require 'idna)
|
||||
(file-error))
|
||||
(mm-coding-system-p 'utf-8)
|
||||
(if (not (and (mm-coding-system-p 'utf-8)
|
||||
(condition-case nil
|
||||
(require 'idna)
|
||||
(file-error)
|
||||
(invalid-operation))
|
||||
(symbol-value 'idna-program)
|
||||
(executable-find (symbol-value 'idna-program))))
|
||||
(gnus-message
|
||||
|
|
|
@ -1763,7 +1763,10 @@ no, only reply back to the author."
|
|||
(let (mucs-ignore-version-incompatibilities)
|
||||
(require 'un-define))
|
||||
(error)))
|
||||
(condition-case nil (require 'idna) (file-error))
|
||||
(condition-case nil
|
||||
(require 'idna)
|
||||
(file-error)
|
||||
(invalid-operation))
|
||||
idna-program
|
||||
(executable-find idna-program)
|
||||
(string= (idna-to-ascii "räksmörgås") "xn--rksmrgs-5wao1o")
|
||||
|
|
Loading…
Add table
Reference in a new issue