Merge pull request #179 from fbs/savefile

Let the user decide where to store save/history files
This commit is contained in:
Bozhidar Batsov 2012-06-21 23:23:35 -07:00
commit 1f58d377a6
4 changed files with 15 additions and 5 deletions

3
.gitignore vendored
View file

@ -13,4 +13,5 @@ ede-projects.el
.DS_Store
custom.el
places
.smex-items
.smex-items
savefiles/

View file

@ -49,6 +49,8 @@ by Prelude.")
ELPA (or MELPA).")
(defvar prelude-snippets-dir (concat prelude-dir "snippets/")
"This folder houses addition yasnippet bundles distributed with Prelude.")
(defvar prelude-savefile-dir (concat prelude-dir "savefile/")
"This folder stores all the automatically generated save/history-files.")
;; add Prelude's directories to Emacs's `load-path'
(add-to-list 'load-path prelude-modules-dir)

View file

@ -85,7 +85,7 @@
(setq uniquify-ignore-buffers-re "^\\*") ; don't muck with special buffers
;; saveplace remembers your location in a file when saving files
(setq save-place-file (concat user-emacs-directory "saveplace"))
(setq save-place-file (concat prelude-savefile-dir "saveplace"))
;; activate it for all buffers
(setq-default save-place t)
(require 'saveplace)
@ -97,11 +97,11 @@
;; save every minute
savehist-autosave-interval 60
;; keep the home clean
savehist-file (concat user-emacs-directory "savehist"))
savehist-file (concat prelude-savefile-dir "savehist"))
(savehist-mode t)
;; save recent files
(setq recentf-save-file (concat user-emacs-directory "recentf")
(setq recentf-save-file (concat prelude-savefile-dir "recentf")
recentf-max-saved-items 200
recentf-max-menu-items 15)
(recentf-mode t)
@ -155,6 +155,7 @@
ido-create-new-buffer 'always
ido-use-filename-at-point 'guess
ido-max-prospects 10
ido-save-directory-list-file (concat prelude-savefile-dir "ido.hist")
ido-default-file-method 'selected-window)
;; auto-completion in minibuffer
@ -187,7 +188,7 @@
(require 'expand-region)
;; bookmarks
(setq bookmark-default-file (concat user-emacs-directory "bookmarks")
(setq bookmark-default-file (concat prelude-savefile-dir "bookmarks")
bookmark-save-flag 1)
;; enabled auto-fill mode in text-mode and all related modes
@ -276,6 +277,12 @@ indent yanked text (with prefix arg don't indent)."
(require 're-builder)
(setq reb-re-syntax 'string)
(require 'eshell)
(setq eshell-directory-name (concat prelude-savefile-dir "/eshell/"))
(setq semanticdb-default-save-directory
(concat prelude-savefile-dir "semanticdb"))
;; enable Prelude's keybindings
(prelude-global-mode t)

0
savefile/.gitkeep Normal file
View file