]> code.delx.au - gnu-emacs/commitdiff
Use defalias at the top level
authorKatsumi Yamaoka <yamaoka@jpl.org>
Tue, 1 Sep 2015 22:59:53 +0000 (22:59 +0000)
committerKatsumi Yamaoka <yamaoka@jpl.org>
Tue, 1 Sep 2015 22:59:53 +0000 (22:59 +0000)
* 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.

lisp/gnus/gnus-util.el
lisp/net/tls.el

index 54cf099e0781473954f9c45de71af70c874a990e..215eac88aef131ce326ae9f93fbab7c610a2b351 100644 (file)
@@ -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.
index 46891be38e6f42dcdac1d41c1c6d6474ce62ab77..544aec5cfda934212c5b7f5b4c95053708a92db5 100644 (file)
@@ -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."