Release Tramp 2.3.1
* doc/misc/trampver.texi: * lisp/net/trampver.el: Change version to "2.3.1". * lisp/net/tramp.el (tramp-eshell-directory-change): Add it to `eshell-mode-hook' but `eshell-first-time-mode-hook'. * lisp/net/tramp-compat.el (tramp-compat-file-name-quoted-p) (tramp-compat-file-name-quote) (tramp-compat-file-name-unquote): Embed them in `eval-and-compile'.
This commit is contained in:
parent
a02ca7a231
commit
aebe6592db
4 changed files with 30 additions and 29 deletions
|
@ -8,7 +8,7 @@
|
|||
@c In the Tramp GIT, the version number is auto-frobbed from
|
||||
@c configure.ac, so you should edit that file and run
|
||||
@c "autoconf && ./configure" to change the version number.
|
||||
@set trampver 2.3.1-pre
|
||||
@set trampver 2.3.1
|
||||
|
||||
@c Other flags from configuration
|
||||
@set instprefix /usr/local
|
||||
|
|
|
@ -349,34 +349,35 @@ This is a string of ten letters or dashes as in ls -l."
|
|||
|
||||
;; `file-name-quoted-p', `file-name-quote' and `file-name-unquote' are
|
||||
;; introduced in Emacs 26.
|
||||
(if (fboundp 'file-name-quoted-p)
|
||||
(defalias 'tramp-compat-file-name-quoted-p 'file-name-quoted-p)
|
||||
(defsubst tramp-compat-file-name-quoted-p (name)
|
||||
"Whether NAME is quoted with prefix \"/:\".
|
||||
(eval-and-compile
|
||||
(if (fboundp 'file-name-quoted-p)
|
||||
(defalias 'tramp-compat-file-name-quoted-p 'file-name-quoted-p)
|
||||
(defsubst tramp-compat-file-name-quoted-p (name)
|
||||
"Whether NAME is quoted with prefix \"/:\".
|
||||
If NAME is a remote file name, check the local part of NAME."
|
||||
(string-match "^/:" (or (file-remote-p name 'localname) name))))
|
||||
(string-match "^/:" (or (file-remote-p name 'localname) name))))
|
||||
|
||||
(if (fboundp 'file-name-quote)
|
||||
(defalias 'tramp-compat-file-name-quote 'file-name-quote)
|
||||
(defsubst tramp-compat-file-name-quote (name)
|
||||
"Add the quotation prefix \"/:\" to file NAME.
|
||||
(if (fboundp 'file-name-quote)
|
||||
(defalias 'tramp-compat-file-name-quote 'file-name-quote)
|
||||
(defsubst tramp-compat-file-name-quote (name)
|
||||
"Add the quotation prefix \"/:\" to file NAME.
|
||||
If NAME is a remote file name, the local part of NAME is quoted."
|
||||
(concat
|
||||
(file-remote-p name) "/:" (or (file-remote-p name 'localname) name))))
|
||||
(concat
|
||||
(file-remote-p name) "/:" (or (file-remote-p name 'localname) name))))
|
||||
|
||||
(if (fboundp 'file-name-unquote)
|
||||
(defalias 'tramp-compat-file-name-unquote 'file-name-unquote)
|
||||
(defsubst tramp-compat-file-name-unquote (name)
|
||||
"Remove quotation prefix \"/:\" from file NAME.
|
||||
(if (fboundp 'file-name-unquote)
|
||||
(defalias 'tramp-compat-file-name-unquote 'file-name-unquote)
|
||||
(defsubst tramp-compat-file-name-unquote (name)
|
||||
"Remove quotation prefix \"/:\" from file NAME.
|
||||
If NAME is a remote file name, the local part of NAME is unquoted."
|
||||
(save-match-data
|
||||
(let ((localname (or (file-remote-p name 'localname) name)))
|
||||
(when (tramp-compat-file-name-quoted-p localname)
|
||||
(setq
|
||||
localname
|
||||
(replace-match
|
||||
(if (= (length localname) 2) "/" "") nil t localname)))
|
||||
(concat (file-remote-p name) localname)))))
|
||||
(save-match-data
|
||||
(let ((localname (or (file-remote-p name 'localname) name)))
|
||||
(when (tramp-compat-file-name-quoted-p localname)
|
||||
(setq
|
||||
localname
|
||||
(replace-match
|
||||
(if (= (length localname) 2) "/" "") nil t localname)))
|
||||
(concat (file-remote-p name) localname))))))
|
||||
|
||||
(provide 'tramp-compat)
|
||||
|
||||
|
|
|
@ -4345,13 +4345,13 @@ Only works for Bourne-like shells."
|
|||
|
||||
(eval-after-load "esh-util"
|
||||
'(progn
|
||||
(add-hook 'eshell-first-time-mode-hook
|
||||
(add-hook 'eshell-mode-hook
|
||||
'tramp-eshell-directory-change)
|
||||
(add-hook 'eshell-directory-change-hook
|
||||
'tramp-eshell-directory-change)
|
||||
(add-hook 'tramp-unload-hook
|
||||
(lambda ()
|
||||
(remove-hook 'eshell-first-time-mode-hook
|
||||
(remove-hook 'eshell-mode-hook
|
||||
'tramp-eshell-directory-change)
|
||||
(remove-hook 'eshell-directory-change-hook
|
||||
'tramp-eshell-directory-change)))))
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
;; Author: Kai Großjohann <kai.grossjohann@gmx.net>
|
||||
;; Keywords: comm, processes
|
||||
;; Package: tramp
|
||||
;; Version: 2.3.1-pre
|
||||
;; Version: 2.3.1
|
||||
|
||||
;; This file is part of GNU Emacs.
|
||||
|
||||
|
@ -32,7 +32,7 @@
|
|||
;; should be changed only there.
|
||||
|
||||
;;;###tramp-autoload
|
||||
(defconst tramp-version "2.3.1-pre"
|
||||
(defconst tramp-version "2.3.1"
|
||||
"This version of Tramp.")
|
||||
|
||||
;;;###tramp-autoload
|
||||
|
@ -54,7 +54,7 @@
|
|||
;; Check for Emacs version.
|
||||
(let ((x (if (>= emacs-major-version 23)
|
||||
"ok"
|
||||
(format "Tramp 2.3.1-pre is not fit for %s"
|
||||
(format "Tramp 2.3.1 is not fit for %s"
|
||||
(when (string-match "^.*$" (emacs-version))
|
||||
(match-string 0 (emacs-version)))))))
|
||||
(unless (string-match "\\`ok\\'" x) (error "%s" x)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue