;(defvar dired-kept-versions 2
; "*When cleaning directory, number of versions to keep.")
-(defcustom delete-old-versions nil
+(defcustom delete-old-versions (when noninteractive 'leave)
"*If t, delete excess backup versions silently.
If nil, ask confirmation. Any other value prevents any trimming."
:type '(choice (const :tag "Delete" t)
;; The resultant buffer is identical, alter
;; modtime, update mods and exit
(set-visited-file-modtime)
- (after-find-file nil nil t t t))
+ (after-find-file nil nil t t t)
+ ;; We preserved modes above so fixup the local
+ ;; variables manually
+ (condition-case err
+ (hack-local-variables)
+ (error (lwarn 'local-variables 'warning
+ "File local-variables error: %s"
+ (error-message-string err)))))
(t t))
t)))))