replaced a bunch of concats with expand-file-name

This commit is contained in:
Bozhidar Batsov 2012-10-21 18:16:40 +03:00
parent 618a4627dc
commit bda721449b
3 changed files with 15 additions and 14 deletions

12
init.el
View file

@ -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)
@ -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)

View file

@ -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 ".")))

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 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)
@ -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)
@ -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
@ -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
@ -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)
@ -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)