emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master fea1e88: Use defalias at the top level


From: Katsumi Yamaoka
Subject: [Emacs-diffs] master fea1e88: Use defalias at the top level
Date: Tue, 01 Sep 2015 23:00:14 +0000

branch: master
commit fea1e883c49687324e627f81841a80cdb25c41f5
Author: Katsumi Yamaoka <address@hidden>
Commit: Katsumi Yamaoka <address@hidden>

    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.
---
 lisp/gnus/gnus-util.el |    8 ++++----
 lisp/net/tls.el        |    7 +++----
 2 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/lisp/gnus/gnus-util.el b/lisp/gnus/gnus-util.el
index 54cf099..215eac8 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 46891be..544aec5 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."



reply via email to

[Prev in Thread] Current Thread [Next in Thread]