summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Heuer <kwzh@gnu.org>1996-05-21 17:21:25 +0000
committerKarl Heuer <kwzh@gnu.org>1996-05-21 17:21:25 +0000
commit28ee503c5aa768e2a750b7ab50ea08d5281a4248 (patch)
treedd3ed5344e00d2fea09b2a9a13e0dac5e118fe12
parent32cdf3f63eaa805a202cb8155ff5f946c4f4451a (diff)
downloademacs-28ee503c5aa768e2a750b7ab50ea08d5281a4248.tar.gz
(make-backup-file-name): Check msdos-long-file-names.
(basic-save-buffer-1, make-auto-save-file-name): Likewise.
-rw-r--r--lisp/files.el9
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 `.'."
(defun make-backup-file-name (file)
"Create the non-numeric backup file name for FILE.
This is a separate function so you can redefine it for customization."
- (if (eq system-type 'ms-dos)
+ (if (and (eq system-type 'ms-dos)
+ (not (msdos-long-file-names)))
(let ((fn (file-name-nondirectory file)))
(concat (file-name-directory file)
(or
@@ -1920,7 +1921,8 @@ After saving the buffer, run `after-save-hook'."
;; Find the temporary name to write under.
(while nogood
(setq tempname (format
- (if (eq system-type 'ms-dos)
+ (if (and (eq system-type 'ms-dos)
+ (not (msdos-long-file-names)))
"%s#%d.tm#" ; MSDOS limits files to 8+3
"%s#tmp#%d")
dir i))
@@ -2419,7 +2421,8 @@ Does not consider `auto-save-visited-file-name' as that variable is checked
before calling this function. You can redefine this for customization.
See also `auto-save-file-name-p'."
(if buffer-file-name
- (if (eq system-type 'ms-dos)
+ (if (and (eq system-type 'ms-dos)
+ (not (msdos-long-file-names)))
(let ((fn (file-name-nondirectory buffer-file-name)))
(string-match "\\`\\([^.]+\\)\\(\\.\\(..?\\)?.?\\|\\)\\'" fn)
(concat (file-name-directory buffer-file-name)