* lisp/files.el (insert-file-contents-literally):
Bind `inhibit-file-name-handlers' the default way.
(file-name-non-special): Rework, mainly for operations with two
file name arguments.
(file-name-unquote-non-special): New defsubst.
(file-name-unquote): Use it.
* test/lisp/files-tests.el (files-test-bug-18141): Skip if needed.
(files-tests--with-temp-non-special): Add docstring. Delete also
`non-special-name' if the file/directory exists.
(files-tests--special-file-name-extension)
(files-tests--special-file-name-regexp): New defconst.
(files-tests--special-file-name-handler, files-tests--new-name):
New defuns.
(files-tests--with-temp-non-special-and-file-name-handler): New macro.
(files-tests-file-name-non-special-access-file)
(files-tests-file-name-non-special-add-name-to-file)
(files-tests-file-name-non-special-byte-compiler-base-file-name)
(files-tests-file-name-non-special-copy-directory)
(files-tests-file-name-non-special-copy-file)
(files-tests-file-name-non-special-delete-directory)
(files-tests-file-name-non-special-delete-file)
(files-tests-file-name-non-special-diff-latest-backup-file)
(files-tests-file-name-non-special-directory-file-name)
(files-tests-file-name-non-special-directory-files)
(files-tests-file-name-non-special-directory-files-and-attributes)
(files-tests-file-name-non-special-dired-compress-handler)
(files-tests-file-name-non-special-dired-uncache)
(files-tests-file-name-non-special-expand-file-name)
(files-tests-file-name-non-special-file-accessible-directory-p)
(files-tests-file-name-non-special-file-acl)
(files-tests-file-name-non-special-file-attributes)
(files-tests-file-name-non-special-file-directory-p)
(files-tests-file-name-non-special-file-equal-p)
(files-tests-file-name-non-special-file-executable-p)
(files-tests-file-name-non-special-file-exists-p)
(files-tests-file-name-non-special-file-in-directory-p)
(files-tests-file-name-non-special-file-local-copy)
(files-tests-file-name-non-special-file-modes)
(files-tests-file-name-non-special-file-name-all-completions)
(files-tests-file-name-non-special-file-name-as-directory)
(files-tests-file-name-non-special-file-name-case-insensitive-p)
(files-tests-file-name-non-special-file-name-completion)
(files-tests-file-name-non-special-file-name-directory)
(files-tests-file-name-non-special-file-name-nondirectory)
(files-tests-file-name-non-special-file-name-sans-versions)
(files-tests-file-name-non-special-file-newer-than-file-p)
(files-tests-file-name-non-special-notify-handlers)
(files-tests-file-name-non-special-file-ownership-preserved-p)
(files-tests-file-name-non-special-file-readable-p)
(files-tests-file-name-non-special-file-regular-p)
(files-tests-file-name-non-special-file-remote-p)
(files-tests-file-name-non-special-file-selinux-context)
(files-tests-file-name-non-special-file-symlink-p)
(files-tests-file-name-non-special-file-truename)
(files-tests-file-name-non-special-file-writable-p)
(files-tests-file-name-non-special-find-backup-file-name)
(files-tests-file-name-non-special-get-file-buffer)
(files-tests-file-name-non-special-insert-directory)
(files-tests-file-name-non-special-insert-file-contents)
(files-tests-file-name-non-special-load)
(files-tests-file-name-non-special-make-auto-save-file-name)
(files-tests-file-name-non-special-make-directory)
(files-tests-file-name-non-special-make-directory-internal)
(files-tests-file-name-non-special-make-symbolic-link)
(files-tests-file-name-non-special-rename-file)
(files-tests-file-name-non-special-set-file-acl)
(files-tests-file-name-non-special-set-file-modes)
(files-tests-file-name-non-special-set-file-selinux-context)
(files-tests-file-name-non-special-set-file-times)
(files-tests-file-name-non-special-set-visited-file-modtime)
(files-tests-file-name-non-special-shell-command)
(files-tests-file-name-non-special-start-file-process)
(files-tests-file-name-non-special-substitute-in-file-name)
(files-tests-file-name-non-special-temporary-file-directory)
(files-tests-file-name-non-special-unhandled-file-name-directory)
(files-tests-file-name-non-special-vc-registered)
(files-tests-file-name-non-special-write-region): Extends tests to
quoted file names, which would require a file name handler if unquoted.
(files-test-no-file-write-contents): Make test more robust.
* test/lisp/net/tramp-tests.el (tramp-test21-file-links): Adapt test.
(tramp--test-emacs25-p): New defun.
(tramp-test34-vc-registered): Use it.