Merge branch 'master' into comment-cache
[emacs.git] / lisp / net / trampver.el
blob9bf9102cc775747b80a14edc94f011975d7e65b6
1 ;;; trampver.el --- Transparent Remote Access, Multiple Protocol
2 ;;; lisp/trampver.el. Generated from trampver.el.in by configure.
4 ;; Copyright (C) 2003-2017 Free Software Foundation, Inc.
6 ;; Author: Kai Großjohann <kai.grossjohann@gmx.net>
7 ;; Keywords: comm, processes
8 ;; Package: tramp
9 ;; Version: 2.3.1
11 ;; This file is part of GNU Emacs.
13 ;; GNU Emacs is free software: you can redistribute it and/or modify
14 ;; it under the terms of the GNU General Public License as published by
15 ;; the Free Software Foundation, either version 3 of the License, or
16 ;; (at your option) any later version.
18 ;; GNU Emacs is distributed in the hope that it will be useful,
19 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
20 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 ;; GNU General Public License for more details.
23 ;; You should have received a copy of the GNU General Public License
24 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
26 ;;; Code:
28 ;; In the Tramp GIT repository, the version number and the bug report
29 ;; address are auto-frobbed from configure.ac, so you should edit that
30 ;; file and run "autoconf && ./configure" to change them. Emacs
31 ;; version check is defined in macro AC_EMACS_INFO of aclocal.m4;
32 ;; should be changed only there.
34 ;;;###tramp-autoload
35 (defconst tramp-version "2.3.1"
36 "This version of Tramp.")
38 ;;;###tramp-autoload
39 (defconst tramp-bug-report-address "tramp-devel@gnu.org"
40 "Email address to send bug reports to.")
42 (defun tramp-repository-get-version ()
43 "Try to return as a string the repository revision of the Tramp sources."
44 (let ((dir (locate-dominating-file (locate-library "tramp") ".git")))
45 (when dir
46 (with-temp-buffer
47 (let ((default-directory (file-name-as-directory dir)))
48 (and (zerop
49 (ignore-errors
50 (call-process "git" nil '(t nil) nil "rev-parse" "HEAD")))
51 (not (zerop (buffer-size)))
52 (replace-regexp-in-string "\n" "" (buffer-string))))))))
54 ;; Check for Emacs version.
55 (let ((x (if (>= emacs-major-version 23)
56 "ok"
57 (format "Tramp 2.3.1 is not fit for %s"
58 (when (string-match "^.*$" (emacs-version))
59 (match-string 0 (emacs-version)))))))
60 (unless (string-match "\\`ok\\'" x) (error "%s" x)))
62 (add-hook 'tramp-unload-hook
63 (lambda ()
64 (unload-feature 'trampver 'force)))
66 (provide 'trampver)
68 ;;; trampver.el ends here
70 ;; Local Variables:
71 ;; mode: Emacs-Lisp
72 ;; coding: utf-8
73 ;; End: