diff options
| author | Michael Albinus | 2020-10-01 12:16:59 +0200 |
|---|---|---|
| committer | Michael Albinus | 2020-10-01 12:16:59 +0200 |
| commit | 8fbaca7d417e35a89e5c47c67d87d2a8bd4b8a1f (patch) | |
| tree | c13274e855cfbef44b9c93ad44e30691cfdbb156 | |
| parent | 90e5549f027f01c16f6f34e55c33d8a549fb32e7 (diff) | |
| download | emacs-8fbaca7d417e35a89e5c47c67d87d2a8bd4b8a1f.tar.gz emacs-8fbaca7d417e35a89e5c47c67d87d2a8bd4b8a1f.zip | |
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.
| -rw-r--r-- | lisp/net/tramp-compat.el | 8 |
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 @@ | |||
| 44 | ;; `temporary-file-directory' as function is introduced with Emacs 26.1. | 44 | ;; `temporary-file-directory' as function is introduced with Emacs 26.1. |
| 45 | (declare-function tramp-handle-temporary-file-directory "tramp") | 45 | (declare-function tramp-handle-temporary-file-directory "tramp") |
| 46 | 46 | ||
| 47 | (defconst tramp-compat-emacs-compiled-version (eval-when-compile emacs-version) | ||
| 48 | "The Emacs version used for compilation.") | ||
| 49 | |||
| 50 | (unless (= emacs-major-version | ||
| 51 | (car (version-to-list tramp-compat-emacs-compiled-version))) | ||
| 52 | (warn "Tramp has been compiled with Emacs %s, this is Emacs %s" | ||
| 53 | tramp-compat-emacs-compiled-version emacs-version)) | ||
| 54 | |||
| 47 | ;; For not existing functions, obsolete functions, or functions with a | 55 | ;; For not existing functions, obsolete functions, or functions with a |
| 48 | ;; changed argument list, there are compiler warnings. We want to | 56 | ;; changed argument list, there are compiler warnings. We want to |
| 49 | ;; avoid them in cases we know what we do. | 57 | ;; avoid them in cases we know what we do. |