aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/net
diff options
context:
space:
mode:
authorDmitry Gutov2022-08-15 02:22:59 +0300
committerDmitry Gutov2022-08-15 02:22:59 +0300
commitee3a674c7c9e39fe7ff296ce1f9830fc45520de8 (patch)
treee8ba1e7be54314f208454e80e3d31044c913f3eb /lisp/net
parentfe0e53d963899a16e0dd1bbc1ba10a6b59f7989e (diff)
parent0a8e88fd83db5398d36064a7f87cff5b57da7284 (diff)
downloademacs-scratch/font_lock_large_files.tar.gz
emacs-scratch/font_lock_large_files.zip
Merge branch 'master' into scratch/font_lock_large_filesscratch/font_lock_large_files
Diffstat (limited to 'lisp/net')
-rw-r--r--lisp/net/newst-treeview.el11
-rw-r--r--lisp/net/tramp-adb.el2
-rw-r--r--lisp/net/tramp-archive.el2
-rw-r--r--lisp/net/tramp-compat.el23
-rw-r--r--lisp/net/tramp-crypt.el2
-rw-r--r--lisp/net/tramp-gvfs.el7
-rw-r--r--lisp/net/tramp-sh.el47
7 files changed, 70 insertions, 24 deletions
diff --git a/lisp/net/newst-treeview.el b/lisp/net/newst-treeview.el
index 637f53e6550..e98767ae7c7 100644
--- a/lisp/net/newst-treeview.el
+++ b/lisp/net/newst-treeview.el
@@ -361,7 +361,8 @@ AGES is the list of ages that are to be shown."
361 (mapc (lambda (feed) 361 (mapc (lambda (feed)
362 (let ((feed-name-symbol (intern (car feed)))) 362 (let ((feed-name-symbol (intern (car feed))))
363 (mapc (lambda (item) 363 (mapc (lambda (item)
364 (when (memq (newsticker--age item) ages) 364 (when (or (memq 'all ages)
365 (memq (newsticker--age item) ages))
365 (newsticker--treeview-list-add-item 366 (newsticker--treeview-list-add-item
366 item feed-name-symbol t))) 367 item feed-name-symbol t)))
367 (newsticker--treeview-list-sort-items 368 (newsticker--treeview-list-sort-items
@@ -1218,11 +1219,11 @@ Note: does not update the layout."
1218 (newsticker--treeview-list-update t) 1219 (newsticker--treeview-list-update t)
1219 (newsticker--treeview-item-update) 1220 (newsticker--treeview-item-update)
1220 (newsticker--treeview-tree-update-tags) 1221 (newsticker--treeview-tree-update-tags)
1221 (cond (newsticker--treeview-current-feed 1222 (cond (newsticker--treeview-current-vfeed
1222 (newsticker--treeview-list-items newsticker--treeview-current-feed))
1223 (newsticker--treeview-current-vfeed
1224 (newsticker--treeview-list-items-with-age 1223 (newsticker--treeview-list-items-with-age
1225 (intern newsticker--treeview-current-vfeed)))) 1224 (intern newsticker--treeview-current-vfeed)))
1225 (newsticker--treeview-current-feed
1226 (newsticker--treeview-list-items newsticker--treeview-current-feed)))
1226 (newsticker--treeview-tree-update-highlight) 1227 (newsticker--treeview-tree-update-highlight)
1227 (newsticker--treeview-list-update-highlight) 1228 (newsticker--treeview-list-update-highlight)
1228 (let ((cur-feed (or newsticker--treeview-current-feed 1229 (let ((cur-feed (or newsticker--treeview-current-feed
diff --git a/lisp/net/tramp-adb.el b/lisp/net/tramp-adb.el
index d033667e87f..170583f608c 100644
--- a/lisp/net/tramp-adb.el
+++ b/lisp/net/tramp-adb.el
@@ -324,7 +324,7 @@ arguments to pass to the OPERATION."
324 (tramp-compat-file-name-concat localname ".")) 324 (tramp-compat-file-name-concat localname "."))
325 (tramp-shell-quote-argument 325 (tramp-shell-quote-argument
326 (tramp-compat-file-name-concat localname "..")))) 326 (tramp-compat-file-name-concat localname ".."))))
327 (replace-regexp-in-region 327 (tramp-compat-replace-regexp-in-region
328 (regexp-quote 328 (regexp-quote
329 (tramp-compat-file-name-unquote 329 (tramp-compat-file-name-unquote
330 (file-name-as-directory localname))) 330 (file-name-as-directory localname)))
diff --git a/lisp/net/tramp-archive.el b/lisp/net/tramp-archive.el
index fda1441615e..548999ca1d2 100644
--- a/lisp/net/tramp-archive.el
+++ b/lisp/net/tramp-archive.el
@@ -325,7 +325,7 @@ arguments to pass to the OPERATION."
325;; Starting with Emacs 29, `tramp-archive-file-name-handler' is 325;; Starting with Emacs 29, `tramp-archive-file-name-handler' is
326;; autoloaded. But it must still be in tramp-loaddefs.el for older 326;; autoloaded. But it must still be in tramp-loaddefs.el for older
327;; Emacsen. 327;; Emacsen.
328;;;###autoload(autoload 'tramp-archive-file-name-handler "tramp-archine") 328;;;###autoload(autoload 'tramp-archive-file-name-handler "tramp-archive")
329;;;###tramp-autoload 329;;;###tramp-autoload
330(defun tramp-archive-file-name-handler (operation &rest args) 330(defun tramp-archive-file-name-handler (operation &rest args)
331 "Invoke the file archive related OPERATION. 331 "Invoke the file archive related OPERATION.
diff --git a/lisp/net/tramp-compat.el b/lisp/net/tramp-compat.el
index b83f9f0724e..203d3ede98f 100644
--- a/lisp/net/tramp-compat.el
+++ b/lisp/net/tramp-compat.el
@@ -330,6 +330,29 @@ CONDITION can also be a list of error conditions."
330 (autoload 'netrc-parse "netrc") 330 (autoload 'netrc-parse "netrc")
331 (netrc-parse file)))) 331 (netrc-parse file))))
332 332
333;; Function `replace-regexp-in-region' is new in Emacs 28.1.
334(defalias 'tramp-compat-replace-regexp-in-region
335 (if (fboundp 'replace-regexp-in-region)
336 #'replace-regexp-in-region
337 (lambda (regexp replacement &optional start end)
338 (if start
339 (when (< start (point-min))
340 (error "Start before start of buffer"))
341 (setq start (point)))
342 (if end
343 (when (> end (point-max))
344 (error "End after end of buffer"))
345 (setq end (point-max)))
346 (save-excursion
347 (let ((matches 0)
348 (case-fold-search nil))
349 (goto-char start)
350 (while (re-search-forward regexp end t)
351 (replace-match replacement t)
352 (setq matches (1+ matches)))
353 (and (not (zerop matches))
354 matches))))))
355
333(dolist (elt (all-completions "tramp-compat-" obarray 'functionp)) 356(dolist (elt (all-completions "tramp-compat-" obarray 'functionp))
334 (put (intern elt) 'tramp-suppress-trace t)) 357 (put (intern elt) 'tramp-suppress-trace t))
335 358
diff --git a/lisp/net/tramp-crypt.el b/lisp/net/tramp-crypt.el
index 7f385292626..27b359d439b 100644
--- a/lisp/net/tramp-crypt.el
+++ b/lisp/net/tramp-crypt.el
@@ -426,7 +426,7 @@ Otherwise, return NAME."
426 (if (directory-name-p name) #'file-name-as-directory #'identity) 426 (if (directory-name-p name) #'file-name-as-directory #'identity)
427 (concat 427 (concat
428 dir 428 dir
429 (unless (string-equal localname "/") 429 (unless (string-match-p (rx (seq bos (opt "/") eos)) localname)
430 (with-tramp-file-property 430 (with-tramp-file-property
431 crypt-vec localname (concat (symbol-name op) "-file-name") 431 crypt-vec localname (concat (symbol-name op) "-file-name")
432 (unless (tramp-crypt-send-command 432 (unless (tramp-crypt-send-command
diff --git a/lisp/net/tramp-gvfs.el b/lisp/net/tramp-gvfs.el
index 0b40ff867f2..ca5e959bea5 100644
--- a/lisp/net/tramp-gvfs.el
+++ b/lisp/net/tramp-gvfs.el
@@ -1055,9 +1055,10 @@ file names."
1055 ;; code in case of direct copy/move. Apply 1055 ;; code in case of direct copy/move. Apply
1056 ;; sanity checks. 1056 ;; sanity checks.
1057 (or (not equal-remote) 1057 (or (not equal-remote)
1058 (tramp-gvfs-info newname) 1058 (and
1059 (eq op 'copy) 1059 (tramp-gvfs-info newname)
1060 (not (tramp-gvfs-info filename)))) 1060 (or (eq op 'copy)
1061 (not (tramp-gvfs-info filename))))))
1061 1062
1062 (if (or (not equal-remote) 1063 (if (or (not equal-remote)
1063 (and equal-remote 1064 (and equal-remote
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index a2b675cf885..f2e3c48235a 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -4205,14 +4205,17 @@ file exists and nonzero exit status otherwise."
4205 ;; by some sh implementations (eg, bash when called as sh) on 4205 ;; by some sh implementations (eg, bash when called as sh) on
4206 ;; startup; this way, we avoid the startup file clobbering $PS1. 4206 ;; startup; this way, we avoid the startup file clobbering $PS1.
4207 ;; $PROMPT_COMMAND is another way to set the prompt in /bin/bash, 4207 ;; $PROMPT_COMMAND is another way to set the prompt in /bin/bash,
4208 ;; it must be discarded as well. $HISTFILE is set according to 4208 ;; it must be discarded as well. Some ssh daemons (for example,
4209 ;; `tramp-histfile-override'. $TERM and $INSIDE_EMACS set here to 4209 ;; on Android devices) do not acknowledge the $PS1 setting in
4210 ;; ensure they have the correct values when the shell starts, not 4210 ;; that call, so we make a further sanity check. (Bug#57044)
4211 ;; just processes run within the shell. (Which processes include 4211 ;; $HISTFILE is set according to `tramp-histfile-override'. $TERM
4212 ;; our initial probes to ensure the remote shell is usable.) 4212 ;; and $INSIDE_EMACS set here to ensure they have the correct
4213 ;; For the time being, we assume that all shells interpret -i as 4213 ;; values when the shell starts, not just processes run within the
4214 ;; interactive shell. Must be the last argument, because (for 4214 ;; shell. (Which processes include our initial probes to ensure
4215 ;; example) bash expects long options first. 4215 ;; the remote shell is usable.) For the time being, we assume
4216 ;; that all shells interpret -i as interactive shell. Must be the
4217 ;; last argument, because (for example) bash expects long options
4218 ;; first.
4216 (tramp-send-command 4219 (tramp-send-command
4217 vec (format 4220 vec (format
4218 (concat 4221 (concat
@@ -4228,7 +4231,21 @@ file exists and nonzero exit status otherwise."
4228 "")) 4231 ""))
4229 (tramp-shell-quote-argument tramp-end-of-output) 4232 (tramp-shell-quote-argument tramp-end-of-output)
4230 shell (or (tramp-get-sh-extra-args shell) "")) 4233 shell (or (tramp-get-sh-extra-args shell) ""))
4231 t) 4234 t t)
4235
4236 ;; Sanity check.
4237 (tramp-barf-if-no-shell-prompt
4238 (tramp-get-connection-process vec) 10
4239 "Couldn't find remote shell prompt for %s" shell)
4240 (unless
4241 (tramp-check-for-regexp
4242 (tramp-get-connection-process vec) (regexp-quote tramp-end-of-output))
4243 (tramp-message vec 5 "Setting shell prompt")
4244 (tramp-send-command
4245 vec (format "PS1=%s PS2='' PS3='' PROMPT_COMMAND=''"
4246 (tramp-shell-quote-argument tramp-end-of-output))
4247 t))
4248
4232 ;; Check proper HISTFILE setting. We give up when not working. 4249 ;; Check proper HISTFILE setting. We give up when not working.
4233 (when (and (stringp tramp-histfile-override) 4250 (when (and (stringp tramp-histfile-override)
4234 (file-name-directory tramp-histfile-override)) 4251 (file-name-directory tramp-histfile-override))
@@ -5524,10 +5541,14 @@ Nonexistent directories are removed from spec."
5524 ;; "--color=never" argument (for example on FreeBSD). 5541 ;; "--color=never" argument (for example on FreeBSD).
5525 (when (tramp-send-command-and-check 5542 (when (tramp-send-command-and-check
5526 vec (format "%s -lnd /" result)) 5543 vec (format "%s -lnd /" result))
5527 (when (tramp-send-command-and-check 5544 (when (and (tramp-send-command-and-check
5528 vec (format 5545 vec (format
5529 "%s --color=never -al %s" 5546 "%s --color=never -al %s"
5530 result (tramp-get-remote-null-device vec))) 5547 result (tramp-get-remote-null-device vec)))
5548 (not (string-match-p
5549 (regexp-quote "\e")
5550 (tramp-get-buffer-string
5551 (tramp-get-buffer vec)))))
5531 (setq result (concat result " --color=never"))) 5552 (setq result (concat result " --color=never")))
5532 (throw 'ls-found result)) 5553 (throw 'ls-found result))
5533 (setq dl (cdr dl)))))) 5554 (setq dl (cdr dl))))))