Moved setting for backups, auto saving, locking earlier.
This keeps policy the same for modes saving state into files. Otherwise you'll
see files like ".recentf~" in "~/.emacs.d".
--- a/.emacs-my Sun Jan 03 14:36:10 2021 +0200
+++ b/.emacs-my Sun Jan 03 15:05:40 2021 +0200
@@ -22,6 +22,42 @@
(setq initial-major-mode (quote fundamental-mode))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+(message "backuping")
+
+;; Keep it above modes saving state into files or you'll see files like ".recentf~" in "~/.emacs.d".
+(setq
+ make-backup-files t
+ ;; In other case (by renaming) you loose original file creation date.
+ backup-by-copying t
+ backup-directory-alist '(("." . "~/.emacs.d/.backup")) ; don't litter my fs tree
+ delete-old-versions t ; delete excess backup versions silently
+ kept-old-versions 1 ; store first original version
+ kept-new-versions 3 ; store last 3 version
+ version-control t) ; use versioned backups
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+(message "lockfile")
+
+;; (info "(elisp) File Locks")
+
+;; Disable stupid file locking. It breaks editing WSL files from Cygwin Emacs.
+;; https://emacs.stackexchange.com/questions/61962/what-is-interlocking-about
+;; https://cygwin.com/pipermail/cygwin/2020-November/246887.html
+(setq create-lockfiles nil)
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+(message "auto save")
+
+;; Disable auto saving, files "#name#" might trigger false rebuild if there is
+;; some file watcher. Also those files looks like garbage in other tools/IDE.
+(setq auto-save-default nil)
+;; If nil autosave to a different file than the original.
+(setq auto-save-visited-file-name nil)
+(setq auto-save-interval 300)
+;; Note: if you kill unsaved file auto save file not deleted.
+(setq delete-auto-save-files t)
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(message "helper buffers")
(define-key global-map "\C-v" nil)
@@ -95,41 +131,6 @@
;; (setq global-auto-revert-mode 1)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(message "lockfile")
-
-;; (info "(elisp) File Locks")
-
-;; Disable stupid file locking. It breaks editing WSL files from Cygwin Emacs.
-;; https://emacs.stackexchange.com/questions/61962/what-is-interlocking-about
-;; https://cygwin.com/pipermail/cygwin/2020-November/246887.html
-(setq create-lockfiles nil)
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(message "backuping")
-
-(setq
- make-backup-files t
- ;; In other case (by renaming) you loose original file creation date.
- backup-by-copying t
- backup-directory-alist '(("." . "~/.emacs.d/.backup")) ; don't litter my fs tree
- delete-old-versions t ; delete excess backup versions silently
- kept-old-versions 1 ; store first original version
- kept-new-versions 3 ; store last 3 version
- version-control t) ; use versioned backups
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(message "auto save")
-
-;; Disable auto saving, files "#name#" might trigger false rebuild if there is
-;; some file watcher. Also those files looks like garbage in other tools/IDE.
-(setq auto-save-default nil)
-;; If nil autosave to a different file than the original.
-(setq auto-save-visited-file-name nil)
-(setq auto-save-interval 300)
-;; Note: if you kill unsaved file auto save file not deleted.
-(setq delete-auto-save-files t)
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(message "debugging")
;; Shut off message buffer by setting nil.