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

1
.gitignore vendored
View file

@ -14,3 +14,4 @@ ede-projects.el
custom.el custom.el
places places
.smex-items .smex-items
savefiles/

View file

@ -49,6 +49,8 @@ by Prelude.")
ELPA (or MELPA).") ELPA (or MELPA).")
(defvar prelude-snippets-dir (concat prelude-dir "snippets/") (defvar prelude-snippets-dir (concat prelude-dir "snippets/")
"This folder houses addition yasnippet bundles distributed with Prelude.") "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 Prelude's directories to Emacs's `load-path'
(add-to-list 'load-path prelude-modules-dir) (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 (setq uniquify-ignore-buffers-re "^\\*") ; don't muck with special buffers
;; saveplace remembers your location in a file when saving files ;; 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 ;; activate it for all buffers
(setq-default save-place t) (setq-default save-place t)
(require 'saveplace) (require 'saveplace)
@ -97,11 +97,11 @@
;; save every minute ;; save every minute
savehist-autosave-interval 60 savehist-autosave-interval 60
;; keep the home clean ;; keep the home clean
savehist-file (concat user-emacs-directory "savehist")) savehist-file (concat prelude-savefile-dir "savehist"))
(savehist-mode t) (savehist-mode t)
;; save recent files ;; 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-saved-items 200
recentf-max-menu-items 15) recentf-max-menu-items 15)
(recentf-mode t) (recentf-mode t)
@ -155,6 +155,7 @@
ido-create-new-buffer 'always ido-create-new-buffer 'always
ido-use-filename-at-point 'guess ido-use-filename-at-point 'guess
ido-max-prospects 10 ido-max-prospects 10
ido-save-directory-list-file (concat prelude-savefile-dir "ido.hist")
ido-default-file-method 'selected-window) ido-default-file-method 'selected-window)
;; auto-completion in minibuffer ;; auto-completion in minibuffer
@ -187,7 +188,7 @@
(require 'expand-region) (require 'expand-region)
;; bookmarks ;; bookmarks
(setq bookmark-default-file (concat user-emacs-directory "bookmarks") (setq bookmark-default-file (concat prelude-savefile-dir "bookmarks")
bookmark-save-flag 1) bookmark-save-flag 1)
;; enabled auto-fill mode in text-mode and all related modes ;; 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) (require 're-builder)
(setq reb-re-syntax 'string) (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 ;; enable Prelude's keybindings
(prelude-global-mode t) (prelude-global-mode t)

0
savefile/.gitkeep Normal file
View file