diff options
author | Vibhav Pant <vibhavp@gmail.com> | 2017-01-30 18:35:43 +0530 |
---|---|---|
committer | Vibhav Pant <vibhavp@gmail.com> | 2017-01-30 18:35:43 +0530 |
commit | bf7f7c0d82a56ed1b76358657e74ca2833b19fe2 (patch) | |
tree | 90f357b4a735ca7c90d1881ef9948186b9f919df /lisp/files.el | |
parent | 25d38a06eceb0853190a2d9acf53d85686f524bd (diff) | |
parent | 9c4dfdd1af9f97c6a8d7e922b68a39052116790c (diff) | |
download | emacs-bf7f7c0d82a56ed1b76358657e74ca2833b19fe2.tar.gz emacs-bf7f7c0d82a56ed1b76358657e74ca2833b19fe2.tar.bz2 emacs-bf7f7c0d82a56ed1b76358657e74ca2833b19fe2.zip |
Merge remote-tracking branch 'origin/master' into feature/byte-switch
Diffstat (limited to 'lisp/files.el')
-rw-r--r-- | lisp/files.el | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lisp/files.el b/lisp/files.el index b57e35b9a0a..25392fdcc71 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -3723,7 +3723,8 @@ Return the new variables list." (let* ((file-name (or (buffer-file-name) ;; Handle non-file buffers, too. (expand-file-name default-directory))) - (sub-file-name (if file-name + (sub-file-name (if (and file-name + (file-name-absolute-p file-name)) ;; FIXME: Why not use file-relative-name? (substring file-name (length root))))) (condition-case err @@ -6074,8 +6075,8 @@ See also `auto-save-file-name-p'." ;; Make sure auto-save file names don't contain characters ;; invalid for the underlying filesystem. (if (and (memq system-type '(ms-dos windows-nt cygwin)) - ;; Don't modify remote (ange-ftp) filenames - (not (string-match "^/\\w+@[-A-Za-z0-9._]+:" result))) + ;; Don't modify remote filenames + (not (file-remote-p result))) (convert-standard-filename result) result)))) @@ -6112,8 +6113,8 @@ See also `auto-save-file-name-p'." ((file-writable-p "/var/tmp/") "/var/tmp/") ("~/"))))) (if (and (memq system-type '(ms-dos windows-nt cygwin)) - ;; Don't modify remote (ange-ftp) filenames - (not (string-match "^/\\w+@[-A-Za-z0-9._]+:" fname))) + ;; Don't modify remote filenames + (not (file-remote-p fname))) ;; The call to convert-standard-filename is in case ;; buffer-name includes characters not allowed by the ;; DOS/Windows filesystems. make-temp-file writes to the |