Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
replaced a bunch of concats with expand-file-name
  • Loading branch information
Bozhidar Batsov committed Oct 21, 2012
1 parent 618a462 commit bda7214
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 14 deletions.
12 changes: 6 additions & 6 deletions init.el
Expand Up @@ -37,19 +37,19 @@

(defvar prelude-dir (file-name-directory load-file-name)
"The root dir of the Emacs Prelude distribution.")
(defvar prelude-modules-dir (concat prelude-dir "prelude/")
(defvar prelude-modules-dir (expand-file-name "prelude" prelude-dir)
"This directory houses all of the built-in Prelude module. You should
avoid modifying the configuration there.")
(defvar prelude-personal-dir (concat prelude-dir "personal/")
(defvar prelude-personal-dir (expand-file-name "personal" prelude-dir)
"Users of Emacs Prelude are encouraged to keep their personal configuration
changes in this directory. All Emacs Lisp files there are loaded automatically
by Prelude.")
(defvar prelude-vendor-dir (concat prelude-dir "vendor/")
(defvar prelude-vendor-dir (expand-file-name "vendor" prelude-dir)
"This directory house Emacs Lisp packages that are not yet available in
ELPA (or MELPA).")
(defvar prelude-snippets-dir (concat prelude-dir "snippets/")
(defvar prelude-snippets-dir (expand-file-name "snippets" prelude-dir)
"This folder houses addition yasnippet bundles distributed with Prelude.")
(defvar prelude-savefile-dir (concat prelude-dir "savefile/")
(defvar prelude-savefile-dir (expand-file-name "savefile" prelude-dir)
"This folder stores all the automatically generated save/history-files.")

(unless (file-exists-p prelude-savefile-dir)
Expand All @@ -72,7 +72,7 @@ ELPA (or MELPA).")
(require 'prelude-osx))

;; config changes made through the customize UI will be store here
(setq custom-file (concat prelude-personal-dir "custom.el"))
(setq custom-file (expand-file-name "custom.el" prelude-personal-dir))

;; load the personal settings (this includes `custom-file')
(when (file-exists-p prelude-personal-dir)
Expand Down
2 changes: 1 addition & 1 deletion prelude/prelude-core.el
Expand Up @@ -39,7 +39,7 @@
"Adds all first level `parent-dir' subdirs to the
Emacs load path."
(dolist (f (directory-files parent-dir))
(let ((name (concat parent-dir f)))
(let ((name (expand-file-name f parent-dir)))
(when (and (file-directory-p name)
(not (equal f ".."))
(not (equal f ".")))
Expand Down
15 changes: 8 additions & 7 deletions prelude/prelude-editor.el
Expand Up @@ -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 prelude-savefile-dir "saveplace"))
(setq save-place-file (expand-file-name "saveplace" prelude-savefile-dir))
;; activate it for all buffers
(setq-default save-place t)
(require 'saveplace)
Expand All @@ -97,11 +97,11 @@
;; save every minute
savehist-autosave-interval 60
;; keep the home clean
savehist-file (concat prelude-savefile-dir "savehist"))
savehist-file (expand-file-name "savehist" prelude-savefile-dir))
(savehist-mode t)

;; save recent files
(setq recentf-save-file (concat prelude-savefile-dir "recentf")
(setq recentf-save-file (expand-file-name "recentf" prelude-savefile-dir)
recentf-max-saved-items 200
recentf-max-menu-items 15)
(recentf-mode t)
Expand Down Expand Up @@ -172,7 +172,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-save-directory-list-file (expand-file-name "ido.hist" prelude-savefile-dir)
ido-default-file-method 'selected-window)

;; auto-completion in minibuffer
Expand Down Expand Up @@ -200,7 +200,7 @@
(require 'expand-region)

;; bookmarks
(setq bookmark-default-file (concat prelude-savefile-dir "bookmarks")
(setq bookmark-default-file (expand-file-name "bookmarks" prelude-savefile-dir)
bookmark-save-flag 1)

;; load yasnippet
Expand All @@ -210,6 +210,7 @@

;; projectile is a project management mode
(require 'projectile)
(setq projectile-cache-file (expand-file-name "projectile.cache" prelude-savefile-dir))
(projectile-global-mode t)

(require 'helm-misc)
Expand Down Expand Up @@ -287,10 +288,10 @@ indent yanked text (with prefix arg don't indent)."
(setq reb-re-syntax 'string)

(require 'eshell)
(setq eshell-directory-name (concat prelude-savefile-dir "/eshell/"))
(setq eshell-directory-name (expand-file-name "eshell" prelude-savefile-dir))

(setq semanticdb-default-save-directory
(concat prelude-savefile-dir "semanticdb"))
(expand-file-name "semanticdb" prelude-savefile-dir))

;; enable Prelude's keybindings
(prelude-global-mode t)
Expand Down

0 comments on commit bda7214

Please sign in to comment.