* 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.
(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.
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
(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")