diff options
author | Tom Tromey <tom@tromey.com> | 2018-08-09 17:56:53 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2018-08-09 17:56:53 -0600 |
commit | accb7b7ecc19f85c2750ded1046a464bc73c6a52 (patch) | |
tree | 1aa94af022d6700a93a8ff2b73f5b210046ac010 /lisp/net | |
parent | f822a2516d88eeb2118fbbc8554f155e86dfd74e (diff) | |
parent | 53483df0de0085dbc9ef0b15a0f629ab808b0147 (diff) | |
download | emacs-accb7b7ecc19f85c2750ded1046a464bc73c6a52.tar.gz |
Merge remote-tracking branch 'origin/master' into feature/bignum
Diffstat (limited to 'lisp/net')
-rw-r--r-- | lisp/net/rcirc.el | 2 | ||||
-rw-r--r-- | lisp/net/rlogin.el | 8 | ||||
-rw-r--r-- | lisp/net/soap-client.el | 21 | ||||
-rw-r--r-- | lisp/net/tramp-gvfs.el | 37 | ||||
-rw-r--r-- | lisp/net/tramp-sh.el | 6 | ||||
-rw-r--r-- | lisp/net/tramp.el | 12 | ||||
-rw-r--r-- | lisp/net/trampver.el | 2 |
7 files changed, 53 insertions, 35 deletions
diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el index 5b63e0c34df..108e368373f 100644 --- a/lisp/net/rcirc.el +++ b/lisp/net/rcirc.el @@ -583,7 +583,7 @@ If ARG is non-nil, instead prompt for connection parameters." (setq-local rcirc-connection-info (list server port nick user-name full-name startup-channels - password encryption)) + password encryption server-alias)) (setq-local rcirc-process process) (setq-local rcirc-server server) (setq-local rcirc-server-name diff --git a/lisp/net/rlogin.el b/lisp/net/rlogin.el index 3bfc4d7f356..015e04f4075 100644 --- a/lisp/net/rlogin.el +++ b/lisp/net/rlogin.el @@ -1,4 +1,4 @@ -;;; rlogin.el --- remote login interface +;;; rlogin.el --- remote login interface -*- lexical-binding:t -*- ;; Copyright (C) 1992-1995, 1997-1998, 2001-2018 Free Software ;; Foundation, Inc. @@ -30,9 +30,9 @@ ;; tracking and the sending of some special characters. ;; If you wish for rlogin mode to prompt you in the minibuffer for -;; passwords when a password prompt appears, just enter m-x send-invisible -;; and type in your line, or add `comint-watch-for-password-prompt' to -;; `comint-output-filter-functions'. +;; passwords when a password prompt appears, just enter +;; M-x comint-send-invisible and type in your line (or tweak +;; `comint-password-prompt-regexp' to match your password prompt). ;;; Code: diff --git a/lisp/net/soap-client.el b/lisp/net/soap-client.el index 17f83082f8d..f5de05dc3d7 100644 --- a/lisp/net/soap-client.el +++ b/lisp/net/soap-client.el @@ -685,14 +685,17 @@ This is a specialization of `soap-decode-type' for (anyType (soap-decode-any-type node)) (Array (soap-decode-array node)))))) -(defun soap-type-of (element) - "Return the type of ELEMENT." - ;; Support Emacs < 26 byte-code running in Emacs >= 26 sessions - ;; (Bug#31742). - (let ((type (type-of element))) - (if (eq type 'vector) - (aref element 0) ; For Emacs 25 and earlier. - type))) +(defalias 'soap-type-of + (if (eq 'soap-xs-basic-type (type-of (make-soap-xs-basic-type))) + ;; `type-of' in Emacs ≥ 26 already does what we need. + #'type-of + ;; For Emacs < 26, use our own function. + (lambda (element) + "Return the type of ELEMENT." + (if (vectorp element) + (aref element 0) ;Assume this vector is actually a struct! + ;; This should never happen. + (type-of element))))) ;; Register methods for `soap-xs-basic-type' (let ((tag (soap-type-of (make-soap-xs-basic-type)))) @@ -2881,6 +2884,8 @@ reference multiRef parts which are external to RESPONSE-NODE." ;;;; SOAP type encoding +;; FIXME: Use `cl-defmethod' (but this requires Emacs-25). + (defun soap-encode-attributes (value type) "Encode XML attributes for VALUE according to TYPE. This is a generic function which determines the attribute encoder diff --git a/lisp/net/tramp-gvfs.el b/lisp/net/tramp-gvfs.el index 1f40339c271..84af410de07 100644 --- a/lisp/net/tramp-gvfs.el +++ b/lisp/net/tramp-gvfs.el @@ -49,9 +49,9 @@ ;; The user option `tramp-gvfs-methods' contains the list of supported ;; connection methods. Per default, these are "afp", "dav", "davs", -;; "gdrive", "owncloud" and "sftp". +;; "gdrive", "nextcloud" and "sftp". -;; "gdrive" and "owncloud" connection methods require a respective +;; "gdrive" and "nextcloud" connection methods require a respective ;; account in GNOME Online Accounts, with enabled "Files" service. ;; Other possible connection methods are "ftp", "http", "https" and @@ -121,7 +121,7 @@ ;;;###tramp-autoload (defcustom tramp-gvfs-methods - '("afp" "dav" "davs" "gdrive" "owncloud" "sftp") + '("afp" "dav" "davs" "gdrive" "nextcloud" "sftp") "List of methods for remote files, accessed with GVFS." :group 'tramp :version "27.1" @@ -132,11 +132,11 @@ (const "gdrive") (const "http") (const "https") - (const "owncloud") + (const "nextcloud") (const "sftp") (const "smb")))) -(defconst tramp-goa-methods '("gdrive" "owncloud") +(defconst tramp-goa-methods '("gdrive" "nextcloud") "List of methods which require registration at GNOME Online Accounts.") ;; Remove GNOME Online Accounts methods if not supported. @@ -511,11 +511,11 @@ It has been changed in GVFS 1.14.") ":[[:blank:]]+\\(.*\\)$") "Regexp to parse GVFS file system attributes with `gvfs-info'.") -(defconst tramp-gvfs-owncloud-default-prefix "/remote.php/webdav" +(defconst tramp-gvfs-nextcloud-default-prefix "/remote.php/webdav" "Default prefix for owncloud / nextcloud methods.") -(defconst tramp-gvfs-owncloud-default-prefix-regexp - (concat (regexp-quote tramp-gvfs-owncloud-default-prefix) "$") +(defconst tramp-gvfs-nextcloud-default-prefix-regexp + (concat (regexp-quote tramp-gvfs-nextcloud-default-prefix) "$") "Regexp of default prefix for owncloud / nextcloud methods.") @@ -1380,7 +1380,7 @@ file-notify events." (with-parsed-tramp-file-name filename nil (when (string-equal "gdrive" method) (setq method "google-drive")) - (when (string-equal "owncloud" method) + (when (string-equal "nextcloud" method) (setq method "davs" localname (concat (tramp-gvfs-get-remote-prefix v) localname))) @@ -1543,8 +1543,8 @@ file-notify events." (setq method "davs")) (when (and (string-equal "davs" method) (string-match - tramp-gvfs-owncloud-default-prefix-regexp prefix)) - (setq method "owncloud")) + tramp-gvfs-nextcloud-default-prefix-regexp prefix)) + (setq method "nextcloud")) (when (string-equal "google-drive" method) (setq method "gdrive")) (when (and (string-equal "http" method) (stringp uri)) @@ -1633,8 +1633,8 @@ file-notify events." (setq method "davs")) (when (and (string-equal "davs" method) (string-match - tramp-gvfs-owncloud-default-prefix-regexp prefix)) - (setq method "owncloud")) + tramp-gvfs-nextcloud-default-prefix-regexp prefix)) + (setq method "nextcloud")) (when (string-equal "google-drive" method) (setq method "gdrive")) (when (and (string-equal "http" method) (stringp uri)) @@ -1688,7 +1688,7 @@ It was \"a(say)\", but has changed to \"a{sv})\"." (localname (tramp-file-name-unquote-localname vec)) (share (when (string-match "^/?\\([^/]+\\)" localname) (match-string 1 localname))) - (ssl (if (string-match "^davs\\|^owncloud" method) "true" "false")) + (ssl (if (string-match "^davs\\|^nextcloud" method) "true" "false")) (mount-spec `(:array ,@(cond @@ -1696,7 +1696,7 @@ It was \"a(say)\", but has changed to \"a{sv})\"." (list (tramp-gvfs-mount-spec-entry "type" "smb-share") (tramp-gvfs-mount-spec-entry "server" host) (tramp-gvfs-mount-spec-entry "share" share))) - ((string-match "^dav\\|^owncloud" method) + ((string-match "^dav\\|^nextcloud" method) (list (tramp-gvfs-mount-spec-entry "type" "dav") (tramp-gvfs-mount-spec-entry "host" host) (tramp-gvfs-mount-spec-entry "ssl" ssl))) @@ -1707,6 +1707,9 @@ It was \"a(say)\", but has changed to \"a{sv})\"." ((string-equal "gdrive" method) (list (tramp-gvfs-mount-spec-entry "type" "google-drive") (tramp-gvfs-mount-spec-entry "host" host))) + ((string-equal "nextcloud" method) + (list (tramp-gvfs-mount-spec-entry "type" "owncloud") + (tramp-gvfs-mount-spec-entry "host" host))) ((string-match "^http" method) (list (tramp-gvfs-mount-spec-entry "type" "http") (tramp-gvfs-mount-spec-entry @@ -1980,6 +1983,8 @@ VEC is used only for traces." :port (match-string 3 identity))) (when (string-equal (tramp-goa-name-method key) "google") (setf (tramp-goa-name-method key) "gdrive")) + (when (string-equal (tramp-goa-name-method key) "owncloud") + (setf (tramp-goa-name-method key) "nextcloud")) ;; Cache all properties. (dolist (prop (nconc account-properties files-properties)) (tramp-set-connection-property key (car prop) (cdr prop))) @@ -2086,7 +2091,7 @@ This uses \"avahi-browse\" in case D-Bus is not enabled in Avahi." ;; * (Customizable) unmount when exiting Emacs. See tramp-archive.el. ;; * Host name completion for existing mount points (afp-server, -;; smb-server, google-drive, owncloud) or via smb-network or network. +;; smb-server, google-drive, nextcloud) or via smb-network or network. ;; ;; * Check, how two shares of the same SMB server can be mounted in ;; parallel. diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 2d253506dde..86e82d40929 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -2547,7 +2547,11 @@ The method used must be an out-of-band method." "Like `make-directory' for Tramp files." (setq dir (expand-file-name dir)) (with-parsed-tramp-file-name dir nil - (tramp-flush-directory-properties v (file-name-directory localname)) + ;; When PARENTS is non-nil, DIR could be a chain of non-existent + ;; directories a/b/c/... Instead of checking, we simply flush the + ;; whole cache. + (tramp-flush-directory-properties + v (if parents "/" (file-name-directory localname))) (save-excursion (tramp-barf-unless-okay v (format "%s %s" diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index d56b09a604d..1af2defd586 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -3567,16 +3567,20 @@ support symbolic links." ;; First, we must replace environment variables. (setq filename (tramp-replace-environment-variables filename)) (with-parsed-tramp-file-name filename nil - ;; We do not want to replace environment variables, again. + ;; We do not want to replace environment variables, again. "//" + ;; has a special meaning at the beginning of a file name on + ;; Cygwin and MS-Windows, we must remove it. (let (process-environment) ;; Ignore in LOCALNAME everything before "//" or "/~". (when (stringp localname) (if (string-match "//\\(/\\|~\\)" localname) - (setq filename (substitute-in-file-name localname)) + (setq filename + (replace-regexp-in-string + "\\`/+" "/" (substitute-in-file-name localname))) (setq filename (concat (file-remote-p filename) - (tramp-run-real-handler - 'substitute-in-file-name (list localname))))))) + (replace-regexp-in-string + "\\`/+" "/" (substitute-in-file-name localname))))))) ;; "/m:h:~" does not work for completion. We use "/m:h:~/". (if (and (stringp localname) (string-equal "~" localname)) (concat filename "/") diff --git a/lisp/net/trampver.el b/lisp/net/trampver.el index 0b83afcc590..9bc8768384e 100644 --- a/lisp/net/trampver.el +++ b/lisp/net/trampver.el @@ -69,7 +69,7 @@ ("2.2.9-24.4" . "24.4") ("2.2.11-24.5" . "24.5") ("2.2.13.25.1" . "25.1") ("2.2.13.25.2" . "25.2") ("2.2.13.25.2" . "25.3") - ("2.3.3.26.1" . "26.1"))) + ("2.3.3.26.1" . "26.1") ("2.3.4.26.2" . "26.2"))) (add-hook 'tramp-unload-hook (lambda () |