dotfile: new variable dotspacemacs-max-rollback-slots

Replaces the old spacemacs-number-of-rollback-slots
This commit is contained in:
syl20bnr 2015-11-11 00:14:46 -05:00
parent 5d9f6b67cd
commit 9e5e309bf0
3 changed files with 6 additions and 4 deletions

View File

@ -67,9 +67,6 @@
(defconst configuration-layer-rollback-info "rollback-info"
"Spacemacs rollback information file.")
(defvar spacemacs-number-of-rollback-slots 5
"Number of spacemacs rollback slots.")
(defclass cfgl-layer ()
((name :initarg :name
:type symbol
@ -840,7 +837,7 @@ path."
(dirs (sort dirattrs
(lambda (d e)
(time-less-p (nth 6 d) (nth 6 e))))))
(dotimes (c (- (length dirs) spacemacs-number-of-rollback-slots))
(dotimes (c (- (length dirs) dotspacemacs-max-rollback-slots))
(delete-directory (concat configuration-layer-rollback-directory
"/" (car (pop dirs)))
t t))))

View File

@ -124,6 +124,9 @@ with `:' and Emacs commands are executed with `<leader> :'.")
"If non nil then name of the default layout as a string to be displayed in
the mode-line.")
(defvar dotspacemacs-max-rollback-slots 5
"Maximum number of rollback slots to keep in the cache.")
(defvar dotspacemacs-use-ido nil
"If non nil then `ido' replaces `helm' for some commands. For now only
`find-files' (SPC f f) is replaced.")

View File

@ -120,6 +120,8 @@ values."
;; file stored in the cache directory and `nil' to disable auto-saving.
;; (default 'cache)
dotspacemacs-auto-save-file-location 'cache
;; Maximum number of rollback slots to keep in the cache. (default 5)
dotspacemacs-max-rollback-slots 5
;; If non nil then `ido' replaces `helm' for some commands. For now only
;; `find-files' (SPC f f), `find-spacemacs-file' (SPC f e s), and
;; `find-contrib-file' (SPC f e c) are replaced. (default nil)