From: Katsumi Yamaoka Date: Tue, 1 Sep 2015 22:59:53 +0000 (+0000) Subject: Use defalias at the top level X-Git-Tag: emacs-25.0.90~1228^2~5 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=fea1e883c49687324e627f81841a80cdb25c41f5;p=emacs.git Use defalias at the top level * lisp/gnus/gnus-util.el (gnus-format-message): * lisp/net/tls.el (tls-format-message): Use defalias at the top level so as to make eval-and-compile unnecessary. Thanks to Stefan Monnier. --- diff --git a/lisp/gnus/gnus-util.el b/lisp/gnus/gnus-util.el index 54cf099e078..215eac88aef 100644 --- a/lisp/gnus/gnus-util.el +++ b/lisp/gnus/gnus-util.el @@ -1974,10 +1974,10 @@ to case differences." (string-equal (downcase str1) (downcase prefix)) (string-equal str1 prefix)))))) -(if (fboundp 'format-message) - (defalias 'gnus-format-message 'format-message) - ;; for Emacs < 25, and XEmacs, don't worry about quote translation. - (defalias 'gnus-format-message 'format)) +(defalias 'gnus-format-message + (if (fboundp 'format-message) 'format-message + ;; for Emacs < 25, and XEmacs, don't worry about quote translation. + 'format)) ;; Simple check: can be a macro but this way, although slow, it's really clear. ;; We don't use `bound-and-true-p' because it's not in XEmacs. diff --git a/lisp/net/tls.el b/lisp/net/tls.el index 46891be38e6..544aec5cfda 100644 --- a/lisp/net/tls.el +++ b/lisp/net/tls.el @@ -174,11 +174,10 @@ Used by `tls-certificate-information'." :type 'string :group 'tls) -(eval-and-compile - (if (fboundp 'format-message) - (defalias 'tls-format-message 'format-message) +(defalias 'tls-format-message + (if (fboundp 'format-message) 'format-message ;; for Emacs < 25, and XEmacs, don't worry about quote translation. - (defalias 'tls-format-message 'format))) + 'format)) (defun tls-certificate-information (der) "Parse X.509 certificate in DER format into an assoc list."