From 54b3844ec0d9b1fd25b4f00f927853ff72ba5274 Mon Sep 17 00:00:00 2001 From: Katsumi Yamaoka Date: Thu, 27 Nov 2014 01:32:19 +0000 Subject: [PATCH] Fix XEmacs compilation --- lisp/ChangeLog | 9 +++++++++ lisp/gnus-art.el | 1 + lisp/gnus-sum.el | 1 + lisp/message.el | 18 +++++++++++------- 4 files changed, 22 insertions(+), 7 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 183df448a..85f43689a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,12 @@ +2014-11-27 Katsumi Yamaoka + + * gnus-art.el (gnus-use-idna): + * gnus-sum.el (gnus-summary-idna-message): + * message.el (message-use-idna): + Protect against nil value for idna-program. + + * message.el (message-use-idna): Load Mule-UCS for XEmacs 21.4. + 2014-11-26 John Mastro (tiny change) * auth-source.el (auth-source-macos-keychain-search-items): Return diff --git a/lisp/gnus-art.el b/lisp/gnus-art.el index 8444507a9..d75958357 100644 --- a/lisp/gnus-art.el +++ b/lisp/gnus-art.el @@ -1629,6 +1629,7 @@ It is a string, such as \"PGP\". If nil, ask user." (defcustom gnus-use-idna (and (condition-case nil (require 'idna) (file-error)) (mm-coding-system-p 'utf-8) + idna-program (executable-find idna-program)) "Whether IDNA decoding of headers is used when viewing messages. This requires GNU Libidn, and by default only enabled if it is found." diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el index 69bb10672..29f693fa9 100644 --- a/lisp/gnus-sum.el +++ b/lisp/gnus-sum.el @@ -9870,6 +9870,7 @@ installed for this command to work." (if (not (and (condition-case nil (require 'idna) (file-error)) (mm-coding-system-p 'utf-8) + (symbol-value 'idna-program) (executable-find (symbol-value 'idna-program)))) (gnus-message 5 "GNU Libidn not installed properly (`idn' or `idna.el' missing)") diff --git a/lisp/message.el b/lisp/message.el index a0ac44973..828dfdeb5 100644 --- a/lisp/message.el +++ b/lisp/message.el @@ -1800,13 +1800,17 @@ no, only reply back to the author." :type '(radio (const :format "%v " nil) (string :format "FQDN: %v"))) -(defcustom message-use-idna (and (condition-case nil (require 'idna) - (file-error)) - (mm-coding-system-p 'utf-8) - (executable-find idna-program) - (string= (idna-to-ascii "räksmörgås") - "xn--rksmrgs-5wao1o") - t) +(defcustom message-use-idna + (and (or (mm-coding-system-p 'utf-8) + (condition-case nil + (let (mucs-ignore-version-incompatibilities) + (require 'un-define)) + (error))) + (condition-case nil (require 'idna) (file-error)) + idna-program + (executable-find idna-program) + (string= (idna-to-ascii "räksmörgås") "xn--rksmrgs-5wao1o") + t) "Whether to encode non-ASCII in domain names into ASCII according to IDNA. GNU Libidn, and in particular the elisp package \"idna.el\" and the external program \"idn\", must be installed for this -- 2.25.1