1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

Fix rx forms in Tramp

* lisp/net/tramp.el (tramp-restricted-shell-hosts-alist)
(tramp-local-host-regexp, tramp-echoed-echo-mark-regexp)
(tramp-login-prompt-regexp, tramp-terminal-prompt-regexp)
(tramp-antispoof-regexp)
(tramp-build-completion-file-name-regexp)
(tramp-debug-outline-regexp)
(tramp-use-absolute-autoload-file-names)
(tramp-lock-file-info-regexp, tramp-shell-quote-argument):
* lisp/net/tramp-adb.el (tramp-do-parse-file-attributes-with-ls)
* lisp/net/tramp-cache.el (tramp-flush-file-function):
* lisp/net/tramp-gvfs.el (tramp-gvfs-file-name):
* lisp/net/tramp-integration.el (tramp-rfn-eshadow-update-overlay-regexp)
(info-lookup-maybe-add-help):
* lisp/net/tramp-sh.el (tramp-default-user-alist, tramp-sunos-unames)
(tramp-scp-direct-remote-copying, tramp-get-remote-locale):
* lisp/net/tramp-smb.el (tramp-smb-prompt, tramp-smb-wrong-passwd-regexp)
(tramp-smb-errors, tramp-smb-get-localname)
(tramp-smb-read-file-entry): Simplify rx forms.

* lisp/net/tramp.el (tramp-handle-find-backup-file-name)
(tramp-handle-lock-file, tramp-handle-make-auto-save-file-name):
* lisp/net/tramp-adb.el (tramp-adb-handle-set-file-times)
(tramp-adb-maybe-open-connection):
* lisp/net/tramp-gvfs.el
(tramp-gvfs-file-attributes-with-gvfs-ls-regexp):
* lisp/net/tramp-sh.el (tramp-open-shell, tramp-find-shell): Do not use
`eval-when-compile'.

* lisp/net/tramp-cmds.el (tramp-rename-files, tramp-rename-these-files):
Use rx.

* lisp/net/tramp-gvfs.el (tramp-gvfs-password-tcrypt): New defonst.
(tramp-gvfs-handle-file-attributes): Use `number-to-string'.

* test/lisp/net/tramp-archive-tests.el
(tramp-archive-test17-insert-directory):
* test/lisp/net/tramp-tests.el (tramp-test17-insert-directory)
(tramp--test-share-p): Simplify rx forms.
This commit is contained in:
Michael Albinus 2022-09-04 13:44:30 +02:00
parent 4751b51d5e
commit f1635c8efb
11 changed files with 195 additions and 206 deletions

View file

@ -86,7 +86,7 @@ special handling of `substitute-in-file-name'."
(defun tramp-rfn-eshadow-update-overlay-regexp ()
"An overlay covering the shadowed part of the filename."
(rx-to-string
`(: (* (not (any ,tramp-postfix-host-format "/~"))) (or "/" "~"))))
`(: (* (not (any ,tramp-postfix-host-format "/~"))) (| "/" "~"))))
(defun tramp-rfn-eshadow-update-overlay ()
"Update `rfn-eshadow-overlay' to cover shadowed part of minibuffer input.
@ -218,11 +218,11 @@ NAME must be equal to `tramp-current-connection'."
:mode 'tramp-info-lookup-mode :topic 'symbol
:regexp (rx (+ (not (any "\t\n \"'(),[]`"))))
:doc-spec '(("(tramp)Function Index" nil
(rx bol " " (+ "-") " " (* nonl) ": ")
(rx (group (| " " eol))))
(rx bol space (+ "-") space (* nonl) ": ")
(rx (| space eol)))
("(tramp)Variable Index" nil
(rx bol " " (+ "-") " " (* nonl) ": ")
(rx (group (| " " eol))))))
(rx bol space (+ "-") space (* nonl) ": ")
(rx (| space eol)))))
(add-hook
'tramp-integration-unload-hook