[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master faa2a99 7/8: Merge from origin/emacs-28
From: |
Glenn Morris |
Subject: |
master faa2a99 7/8: Merge from origin/emacs-28 |
Date: |
Fri, 29 Oct 2021 12:20:17 -0400 (EDT) |
branch: master
commit faa2a990c980bfdedbc76520083f1228806f3df2
Merge: 65e71d9 52e7049
Author: Glenn Morris <rgm@gnu.org>
Commit: Glenn Morris <rgm@gnu.org>
Merge from origin/emacs-28
52e7049b58 * lisp/loadup.el: Unbreak build.
91e7df281e Move lisp/shorthands.el to lisp/emacs-lisp/shorthands.el
00103154e0 Some Tramp changes, mainly in tramp-tests.el
---
doc/misc/tramp.texi | 6 ++++
lisp/{ => emacs-lisp}/shorthands.el | 0
lisp/loadup.el | 2 +-
lisp/net/tramp-gvfs.el | 6 +++-
lisp/net/tramp.el | 3 ++
test/lisp/net/tramp-tests.el | 56 +++++++++++++++++++------------------
6 files changed, 44 insertions(+), 29 deletions(-)
diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi
index 4e95b12..a17a8d6 100644
--- a/doc/misc/tramp.texi
+++ b/doc/misc/tramp.texi
@@ -5329,6 +5329,12 @@ handlers.
@node External packages
@section Integrating with external Lisp packages
+
+In general, it is not recommended to use @value{tramp} functions and
+variables not described in this manual. They might change their
+signature and/or semantics without any announcement.
+
+
@subsection File name completion
@vindex non-essential
diff --git a/lisp/shorthands.el b/lisp/emacs-lisp/shorthands.el
similarity index 100%
rename from lisp/shorthands.el
rename to lisp/emacs-lisp/shorthands.el
diff --git a/lisp/loadup.el b/lisp/loadup.el
index 3a55d2c..e8ecb67 100644
--- a/lisp/loadup.el
+++ b/lisp/loadup.el
@@ -354,7 +354,7 @@
(load "electric")
(load "paren")
-(load "shorthands")
+(load "emacs-lisp/shorthands")
(load "emacs-lisp/eldoc")
(load "cus-start") ;Late to reduce customize-rogue (needs loaddefs.el anyway)
diff --git a/lisp/net/tramp-gvfs.el b/lisp/net/tramp-gvfs.el
index ebe57a8..7e22639 100644
--- a/lisp/net/tramp-gvfs.el
+++ b/lisp/net/tramp-gvfs.el
@@ -1866,7 +1866,11 @@ Their full names are
\"org.gtk.vfs.MountTracker.mounted\" and
port (tramp-file-name-port v)))))
(when (member method tramp-gvfs-methods)
(with-parsed-tramp-file-name
- (tramp-make-tramp-file-name method user domain host port "") nil
+ ;; This must be changed when we throw the old signature
+ ;; away in Emacs 27.1 and higher.
+ (with-no-warnings
+ (tramp-make-tramp-file-name method user domain host port ""))
+ nil
(tramp-message
v 6 "%s %s"
signal-name (tramp-gvfs-stringify-dbus-message mount-info))
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 372e0a2..b152584 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -1758,6 +1758,9 @@ the form (METHOD USER DOMAIN HOST PORT LOCALNAME
&optional HOP)."
tramp-postfix-host-format
localname)))
+(set-advertised-calling-convention
+ #'tramp-make-tramp-file-name '(vec &optional localname hop) "27.1")
+
(defun tramp-make-tramp-hop-name (vec)
"Construct a Tramp hop name from VEC."
(replace-regexp-in-string
diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el
index d50111d..47ef46f 100644
--- a/test/lisp/net/tramp-tests.el
+++ b/test/lisp/net/tramp-tests.el
@@ -3385,17 +3385,16 @@ This tests also `access-file', `file-readable-p',
(tramp-get-remote-gid tramp-test-vec 'integer)))
(delete-file tmp-name1))
- (when (and (tramp--test-supports-set-file-modes-p)
- ;; A file is always accessible for user "root".
- (not (zerop (tramp-compat-file-attribute-user-id
- (file-attributes
- tramp-test-temporary-file-directory)))))
+ (when (tramp--test-supports-set-file-modes-p)
(write-region "foo" nil tmp-name1)
- (set-file-modes tmp-name1 0)
- (should-error
- (access-file tmp-name1 "error")
- :type 'file-error)
- (set-file-modes tmp-name1 #o777)
+ ;; A file is always accessible for user "root".
+ (when (not (zerop (tramp-compat-file-attribute-user-id
+ (file-attributes tmp-name1))))
+ (set-file-modes tmp-name1 0)
+ (should-error
+ (access-file tmp-name1 "error")
+ :type 'file-error)
+ (set-file-modes tmp-name1 #o777))
(delete-file tmp-name1))
(should-error
(access-file tmp-name1 "error")
@@ -4443,8 +4442,7 @@ This tests also `make-symbolic-link', `file-truename' and
`add-name-to-file'."
"Check `process-file'."
:tags '(:expensive-test)
(skip-unless (tramp--test-enabled))
- (skip-unless (or (tramp--test-adb-p) (tramp--test-sh-p)
(tramp--test-sshfs-p)))
- (skip-unless (not (tramp--test-crypt-p)))
+ (skip-unless (tramp--test-supports-processes-p))
(dolist (quoted (if (tramp--test-expensive-test) '(nil t) '(nil)))
(let* ((tmp-name (tramp--test-make-temp-name nil quoted))
@@ -4524,8 +4522,7 @@ This tests also `make-symbolic-link', `file-truename' and
`add-name-to-file'."
"Check `start-file-process'."
:tags '(:expensive-test)
(skip-unless (tramp--test-enabled))
- (skip-unless (or (tramp--test-adb-p) (tramp--test-sh-p)
(tramp--test-sshfs-p)))
- (skip-unless (not (tramp--test-crypt-p)))
+ (skip-unless (tramp--test-supports-processes-p))
(dolist (quoted (if (tramp--test-expensive-test) '(nil t) '(nil)))
(let ((default-directory tramp-test-temporary-file-directory)
@@ -4704,8 +4701,7 @@ If UNSTABLE is non-nil, the test is tagged as
`:unstable'."
"Check `make-process'."
:tags '(:expensive-test)
(skip-unless (tramp--test-enabled))
- (skip-unless (or (tramp--test-adb-p) (tramp--test-sh-p)
(tramp--test-sshfs-p)))
- (skip-unless (not (tramp--test-crypt-p)))
+ (skip-unless (tramp--test-supports-processes-p))
;; `make-process' supports file name handlers since Emacs 27.
(skip-unless (tramp--test-emacs27-p))
@@ -5008,11 +5004,11 @@ INPUT, if non-nil, is a string sent to the process."
"Check `shell-command'."
:tags '(:expensive-test)
(skip-unless (tramp--test-enabled))
+ (skip-unless (tramp--test-supports-processes-p))
;; Prior Emacs 27, `shell-file-name' was hard coded as "/bin/sh" for
;; remote processes in Emacs. That doesn't work for tramp-adb.el.
- (skip-unless (or (and (tramp--test-adb-p) (tramp--test-emacs27-p))
- (tramp--test-sh-p) (tramp--test-sshfs-p)))
- (skip-unless (not (tramp--test-crypt-p)))
+ (when (tramp--test-adb-p)
+ (skip-unless (tramp--test-emacs27-p)))
(dolist (quoted (if (tramp--test-expensive-test) '(nil t) '(nil)))
(let ((tmp-name (tramp--test-make-temp-name nil quoted))
@@ -5110,8 +5106,7 @@ INPUT, if non-nil, is a string sent to the process."
:tags '(:expensive-test :unstable)
(skip-unless (tramp--test-enabled))
(skip-unless nil)
- (skip-unless (or (tramp--test-adb-p) (tramp--test-sh-p)
(tramp--test-sshfs-p)))
- (skip-unless (not (tramp--test-crypt-p)))
+ (skip-unless (tramp--test-supports-processes-p))
;; Prior Emacs 27, `shell-command-dont-erase-buffer' wasn't working properly.
(skip-unless (tramp--test-emacs27-p))
@@ -5432,11 +5427,11 @@ Use direct async.")
"Check that connection-local `explicit-shell-file-name' is set."
:tags '(:expensive-test)
(skip-unless (tramp--test-enabled))
+ (skip-unless (tramp--test-supports-processes-p))
;; Prior Emacs 27, `shell-file-name' was hard coded as "/bin/sh" for
;; remote processes in Emacs. That doesn't work for tramp-adb.el.
- (skip-unless (or (and (tramp--test-adb-p) (tramp--test-emacs27-p))
- (tramp--test-sh-p) (tramp--test-sshfs-p)))
- (skip-unless (not (tramp--test-crypt-p)))
+ (when (tramp--test-adb-p)
+ (skip-unless (tramp--test-emacs27-p)))
;; Since Emacs 26.1.
(skip-unless (and (fboundp 'connection-local-set-profile-variables)
(fboundp 'connection-local-set-profiles)))
@@ -5491,6 +5486,7 @@ Use direct async.")
(ert-deftest tramp-test35-exec-path ()
"Check `exec-path' and `executable-find'."
(skip-unless (tramp--test-enabled))
+ (skip-unless (tramp--test-supports-processes-p))
(skip-unless (tramp--test-supports-set-file-modes-p))
;; Since Emacs 27.1.
(skip-unless (fboundp 'exec-path))
@@ -6270,6 +6266,11 @@ This requires restrictions of file name syntax."
This requires restrictions of file name syntax."
(tramp-smb-file-name-p tramp-test-temporary-file-directory))
+(defun tramp--test-supports-processes-p ()
+ "Return whether the method under test supports external processes."
+ (and (or (tramp--test-adb-p) (tramp--test-sh-p) (tramp--test-sshfs-p))
+ (not (tramp--test-crypt-p))))
+
(defun tramp--test-supports-set-file-modes-p ()
"Return whether the method under test supports setting file modes."
;; "smb" does not unless the SMB server supports "posix" extensions.
@@ -6801,13 +6802,14 @@ process sentinels. They shall not disturb each other."
:tags (if (getenv "EMACS_EMBA_CI")
'(:expensive-test :unstable) '(:expensive-test))
(skip-unless (tramp--test-enabled))
+ (skip-unless (tramp--test-supports-processes-p))
;; Prior Emacs 27, `shell-file-name' was hard coded as "/bin/sh" for
;; remote processes in Emacs. That doesn't work for tramp-adb.el.
- (skip-unless (or (and (tramp--test-adb-p) (tramp--test-emacs27-p))
- (tramp--test-sh-p)))
- (skip-unless (not (tramp--test-crypt-p)))
+ (when (tramp--test-adb-p)
+ (skip-unless (tramp--test-emacs27-p)))
(skip-unless (not (tramp--test-docker-p)))
(skip-unless (not (tramp--test-telnet-p)))
+ (skip-unless (not (tramp--test-sshfs-p)))
(skip-unless (not (tramp--test-windows-nt-p)))
(with-timeout
- master updated (288e8bb -> 4dd8b2c), Glenn Morris, 2021/10/29
- master 502a00b 1/8: Merge from origin/emacs-28, Glenn Morris, 2021/10/29
- master af22a0a 3/8: Merge from origin/emacs-28, Glenn Morris, 2021/10/29
- master 4dd8b2c 8/8: ; Merge from origin/emacs-28, Glenn Morris, 2021/10/29
- master 65e71d9 6/8: ; Merge from origin/emacs-28, Glenn Morris, 2021/10/29
- master 1216743 5/8: Merge from origin/emacs-28, Glenn Morris, 2021/10/29
- master 18b455f 2/8: ; Merge from origin/emacs-28, Glenn Morris, 2021/10/29
- master 3808498 4/8: ; Merge from origin/emacs-28, Glenn Morris, 2021/10/29
- master faa2a99 7/8: Merge from origin/emacs-28,
Glenn Morris <=