From: Katsumi Yamaoka Date: Mon, 31 Aug 2015 23:41:00 +0000 (+0000) Subject: tls.el: Compilation fix X-Git-Url: http://cgit.sxemacs.org/?p=gnus;a=commitdiff_plain;h=80adb645d1b56d7f2c28700a174052b5758ea015 tls.el: Compilation fix * tls.el (tls-format-message): Alias to format-message, or format if not available. (open-tls-stream): Use it. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 17d81a246..137dd3472 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2015-08-31 Katsumi Yamaoka + + * tls.el (tls-format-message): + Alias to format-message, or format if not available. + (open-tls-stream): Use it. + 2015-08-31 Paul Eggert * gnus-agent.el (gnus-agent-possibly-synchronize-flags-server): diff --git a/lisp/tls.el b/lisp/tls.el index 122691627..a068675ba 100644 --- a/lisp/tls.el +++ b/lisp/tls.el @@ -174,6 +174,11 @@ Used by `tls-certificate-information'." :type 'string :group 'tls) +(if (fboundp 'format-message) + (defalias 'tls-format-message 'format-message) + ;; for Emacs < 25, and XEmacs, don't worry about quote translation. + (defalias 'tls-format-message 'format)) + (defun tls-certificate-information (der) "Parse X.509 certificate in DER format into an assoc list." (let ((certificate (concat "-----BEGIN CERTIFICATE-----\n" @@ -275,8 +280,8 @@ Fourth arg PORT is an integer specifying a port to connect to." (message "The certificate presented by `%s' is \ NOT trusted." host)) (not (yes-or-no-p - (format-message "The certificate presented by `%s' is \ -NOT trusted. Accept anyway? " host))))) + (tls-format-message "\ +The certificate presented by `%s' is NOT trusted. Accept anyway? " host))))) (and tls-hostmismatch (save-excursion (goto-char (point-min))