diff options
| author | Karl Heuer | 1996-05-21 17:21:25 +0000 |
|---|---|---|
| committer | Karl Heuer | 1996-05-21 17:21:25 +0000 |
| commit | 28ee503c5aa768e2a750b7ab50ea08d5281a4248 (patch) | |
| tree | dd3ed5344e00d2fea09b2a9a13e0dac5e118fe12 | |
| parent | 32cdf3f63eaa805a202cb8155ff5f946c4f4451a (diff) | |
| download | emacs-28ee503c5aa768e2a750b7ab50ea08d5281a4248.tar.gz emacs-28ee503c5aa768e2a750b7ab50ea08d5281a4248.zip | |
(make-backup-file-name): Check msdos-long-file-names.
(basic-save-buffer-1, make-auto-save-file-name): Likewise.
| -rw-r--r-- | lisp/files.el | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lisp/files.el b/lisp/files.el index 1aaf22348bd..eb2b3ed9c9d 100644 --- a/lisp/files.el +++ b/lisp/files.el | |||
| @@ -1667,7 +1667,8 @@ The extension, in a file name, is the part that follows the last `.'." | |||
| 1667 | (defun make-backup-file-name (file) | 1667 | (defun make-backup-file-name (file) |
| 1668 | "Create the non-numeric backup file name for FILE. | 1668 | "Create the non-numeric backup file name for FILE. |
| 1669 | This is a separate function so you can redefine it for customization." | 1669 | This is a separate function so you can redefine it for customization." |
| 1670 | (if (eq system-type 'ms-dos) | 1670 | (if (and (eq system-type 'ms-dos) |
| 1671 | (not (msdos-long-file-names))) | ||
| 1671 | (let ((fn (file-name-nondirectory file))) | 1672 | (let ((fn (file-name-nondirectory file))) |
| 1672 | (concat (file-name-directory file) | 1673 | (concat (file-name-directory file) |
| 1673 | (or | 1674 | (or |
| @@ -1920,7 +1921,8 @@ After saving the buffer, run `after-save-hook'." | |||
| 1920 | ;; Find the temporary name to write under. | 1921 | ;; Find the temporary name to write under. |
| 1921 | (while nogood | 1922 | (while nogood |
| 1922 | (setq tempname (format | 1923 | (setq tempname (format |
| 1923 | (if (eq system-type 'ms-dos) | 1924 | (if (and (eq system-type 'ms-dos) |
| 1925 | (not (msdos-long-file-names))) | ||
| 1924 | "%s#%d.tm#" ; MSDOS limits files to 8+3 | 1926 | "%s#%d.tm#" ; MSDOS limits files to 8+3 |
| 1925 | "%s#tmp#%d") | 1927 | "%s#tmp#%d") |
| 1926 | dir i)) | 1928 | dir i)) |
| @@ -2419,7 +2421,8 @@ Does not consider `auto-save-visited-file-name' as that variable is checked | |||
| 2419 | before calling this function. You can redefine this for customization. | 2421 | before calling this function. You can redefine this for customization. |
| 2420 | See also `auto-save-file-name-p'." | 2422 | See also `auto-save-file-name-p'." |
| 2421 | (if buffer-file-name | 2423 | (if buffer-file-name |
| 2422 | (if (eq system-type 'ms-dos) | 2424 | (if (and (eq system-type 'ms-dos) |
| 2425 | (not (msdos-long-file-names))) | ||
| 2423 | (let ((fn (file-name-nondirectory buffer-file-name))) | 2426 | (let ((fn (file-name-nondirectory buffer-file-name))) |
| 2424 | (string-match "\\`\\([^.]+\\)\\(\\.\\(..?\\)?.?\\|\\)\\'" fn) | 2427 | (string-match "\\`\\([^.]+\\)\\(\\.\\(..?\\)?.?\\|\\)\\'" fn) |
| 2425 | (concat (file-name-directory buffer-file-name) | 2428 | (concat (file-name-directory buffer-file-name) |