• Michael Albinus's avatar
    Improve compatibility with older Emacsen, and XEmacs. · af9ff9e8
    Michael Albinus authored
    * net/tramp.el (tramp-find-method, tramp-find-user): Call `propertize'
    only if it is bound.  It isn't for XEmacs.
    (with-tramp-progress-reporter): Do not let-bind `result'.  This
    yields to scoping errors in XEmacs.
    (tramp-handle-make-auto-save-file-name): New function, moved from
    tramp-sh.el.
    
    * net/tramp-adb.el (tramp-adb-file-name-handler-alist): Add handler
    for `make-auto-save-file-name'.
    (tramp-adb--gnu-switches-to-ash): Use
    `tramp-compat-replace-regexp-in-string'.
    
    * net/tramp-cache.el (tramp-cache-print): Call
    `substring-no-properties' only if it is bound.  It isn't for XEmacs.
    
    * net/tramp-cmds.el (tramp-bug): Call `propertize' only if it is
    bound.  It isn't for XEmacs.
    
    * net/tramp-compat.el (tramp-compat-copy-file): Catch
    `wrong-number-of-arguments' error.
    (tramp-compat-replace-regexp-in-string): New defun.
    
    * net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist): Add handler
    for `make-auto-save-file-name'.
    (tramp-gvfs-handle-copy-file): Use `tramp-compat-funcall' for
    `copy-file'.
    (tramp-gvfs-file-gvfs-monitor-file-process-filter)
    (tramp-gvfs-file-name): Use `tramp-compat-replace-regexp-in-string'.
    (tramp-synce-list-devices): Use `push' instead of `pushnew'.
    
    * net/tramp-gw.el (tramp-gw-open-network-stream): Use
    `tramp-compat-replace-regexp-in-string'.
    
    * net/tramp-sh.el (tramp-sh-file-name-handler-alist): Call
    `tramp-handle-make-auto-save-file-name'.
    (tramp-sh-handle-make-auto-save-file-name): Move to tramp.el.
    (tramp-sh-file-gvfs-monitor-dir-process-filter)
    (tramp-sh-file-inotifywait-process-filter): Use
    `tramp-compat-replace-regexp-in-string'.
    (tramp-compute-multi-hops): Use `push' instead of `pushnew'.
    
    * net/tramp-smb.el (tramp-smb-file-name-handler-alist): Add handler
    for `make-auto-save-file-name'.
    (tramp-smb-handle-copy-directory): Call
    `tramp-compat-replace-regexp-in-string'.
    (tramp-smb-get-file-entries): Use `push' instead of `pushnew'.
    (tramp-smb-handle-copy-file): Improve error message.
    (tramp-smb-handle-rename-file): Rename directly only in case
    `newname' does not exist yet.  This is a restriction of smbclient.
    (tramp-smb-maybe-open-connection): Rerun the function only when
    `auth-sources' is non-nil.
    af9ff9e8
tramp-smb.el 66.3 KB