[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 593c262 6/7: Merge from origin/emacs-27
From: |
Glenn Morris |
Subject: |
master 593c262 6/7: Merge from origin/emacs-27 |
Date: |
Mon, 23 Nov 2020 12:42:44 -0500 (EST) |
branch: master
commit 593c262124ecf213da1f24fcf46c8cca8fea2fd8
Merge: 3401251 3ceee39
Author: Glenn Morris <rgm@gnu.org>
Commit: Glenn Morris <rgm@gnu.org>
Merge from origin/emacs-27
3ceee39819 Fix Bug#44481
---
lisp/net/tramp-sh.el | 2 +-
lisp/net/tramp.el | 14 ++++++++++----
2 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index d2265ed..2851110 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -4979,7 +4979,7 @@ connection if a previous connection has died for some
reason."
(setenv "PS1" tramp-initial-end-of-output)
(unless (stringp tramp-encoding-shell)
(tramp-error vec 'file-error "`tramp-encoding-shell' not set"))
- (let* ((current-host (system-name))
+ (let* ((current-host tramp-system-name)
(target-alist (tramp-compute-multi-hops vec))
;; We will apply `tramp-ssh-controlmaster-options'
;; only for the first hop.
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index d40f9a5..6ae79be 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -175,6 +175,12 @@ See the variable `tramp-encoding-shell' for more
information."
:version "24.1"
:type '(choice (const nil) string))
+;; Since Emacs 26.1, `system-name' can return `nil' at build time if
+;; Emacs is compiled with "--no-build-details". We do expect it to be
+;; a string. (Bug#44481)
+(defconst tramp-system-name (or (system-name) "")
+ "The system name Tramp is running locally.")
+
(defvar tramp-methods nil
"Alist of methods for remote files.
This is a list of entries of the form (NAME PARAM1 PARAM2 ...).
@@ -417,7 +423,7 @@ empty string for the method name."
(choice :tag " Host regexp" regexp sexp)
(choice :tag " User name" string (const nil)))))
-(defcustom tramp-default-host (system-name)
+(defcustom tramp-default-host tramp-system-name
"Default host to use for transferring files.
Useful for su and sudo methods mostly."
:type 'string)
@@ -472,8 +478,8 @@ interpreted as a regular expression which always matches."
(defcustom tramp-restricted-shell-hosts-alist
(when (memq system-type '(windows-nt))
(list (format "\\`\\(%s\\|%s\\)\\'"
- (regexp-quote (downcase (system-name)))
- (regexp-quote (upcase (system-name))))))
+ (regexp-quote (downcase tramp-system-name))
+ (regexp-quote (upcase tramp-system-name)))))
"List of hosts, which run a restricted shell.
This is a list of regular expressions, which denote hosts running
a restricted shell like \"rbash\". Those hosts can be used as
@@ -486,7 +492,7 @@ host runs a restricted shell, it shall be added to this
list, too."
(concat
"\\`"
(regexp-opt
- (list "localhost" "localhost6" (system-name) "127.0.0.1" "::1") t)
+ (list "localhost" "localhost6" tramp-system-name "127.0.0.1" "::1") t)
"\\'")
"Host names which are regarded as local host.
If the local host runs a chrooted environment, set this to nil."
- master updated (c3edaa5 -> a19b29d), Glenn Morris, 2020/11/23
- master a228b9d 2/7: Merge from origin/emacs-27, Glenn Morris, 2020/11/23
- master f583cae 1/7: ; Merge from origin/emacs-27, Glenn Morris, 2020/11/23
- master be17ee7 4/7: Merge from origin/emacs-27, Glenn Morris, 2020/11/23
- master 593c262 6/7: Merge from origin/emacs-27,
Glenn Morris <=
- master a8c513b 3/7: ; Merge from origin/emacs-27, Glenn Morris, 2020/11/23
- master a19b29d 7/7: ; Merge from origin/emacs-27, Glenn Morris, 2020/11/23
- master 3401251 5/7: ; Merge from origin/emacs-27, Glenn Morris, 2020/11/23