(if (and warn
(file-newer-than-file-p (make-auto-save-file-name)
buffer-file-name))
- "Auto save file is newer; consider M-x recover-file"
+ (format "%s has auto save data; consider M-x recover-file"
+ (file-name-nondirectory buffer-file-name))
(setq not-serious t)
(if error "(New file)" nil)))
((not error)
("\\.l\\'" . lisp-mode)
("\\.lisp\\'" . lisp-mode)
("\\.f\\'" . fortran-mode)
+ ("\\.F\\'" . fortran-mode)
("\\.for\\'" . fortran-mode)
("\\.p\\'" . pascal-mode)
("\\.pas\\'" . pascal-mode)
("\\.hxx\\'" . c++-mode)
("\\.c\\+\\+\\'" . c++-mode)
("\\.h\\+\\+\\'" . c++-mode)
+ ("\\.java\\'" . java-mode)
("\\.mk\\'" . makefile-mode)
("\\(M\\|m\\|GNUm\\)akefile\\(.in\\)?\\'" . makefile-mode)
;;; Less common extensions come here
(defconst interpreter-mode-alist
'(("perl" . perl-mode)
+ ("perl5" . perl-mode)
("wish" . tcl-mode)
("wishx" . tcl-mode)
("tcl" . tcl-mode)
(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
;; 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))
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)