summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lisp/net/tramp-compat.el8
1 files changed, 8 insertions, 0 deletions
diff --git a/lisp/net/tramp-compat.el b/lisp/net/tramp-compat.el
index 3f25afedb99..b7a7cc4f003 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.