emacs-diffs
[Top][All Lists]
Advanced

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

emacs-27 8fbaca7: Check Emacs version used for Tramp compilation


From: Michael Albinus
Subject: emacs-27 8fbaca7: Check Emacs version used for Tramp compilation
Date: Thu, 1 Oct 2020 06:17:07 -0400 (EDT)

branch: emacs-27
commit 8fbaca7d417e35a89e5c47c67d87d2a8bd4b8a1f
Author: Michael Albinus <michael.albinus@gmx.de>
Commit: Michael Albinus <michael.albinus@gmx.de>

    Check Emacs version used for Tramp compilation
    
    * lisp/net/tramp-compat.el (tramp-compat-emacs-compiled-version):
    New defconst.  Raise a warning, when it is not equal to the Emacs
    version.
---
 lisp/net/tramp-compat.el | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/lisp/net/tramp-compat.el b/lisp/net/tramp-compat.el
index 3f25afe..b7a7cc4 100644
--- a/lisp/net/tramp-compat.el
+++ b/lisp/net/tramp-compat.el
@@ -44,6 +44,14 @@
 ;; `temporary-file-directory' as function is introduced with Emacs 26.1.
 (declare-function tramp-handle-temporary-file-directory "tramp")
 
+(defconst tramp-compat-emacs-compiled-version (eval-when-compile emacs-version)
+  "The Emacs version used for compilation.")
+
+(unless (= emacs-major-version
+          (car (version-to-list tramp-compat-emacs-compiled-version)))
+  (warn "Tramp has been compiled with Emacs %s, this is Emacs %s"
+       tramp-compat-emacs-compiled-version emacs-version))
+
 ;; For not existing functions, obsolete functions, or functions with a
 ;; changed argument list, there are compiler warnings.  We want to
 ;; avoid them in cases we know what we do.



reply via email to

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