replaced a bunch of concats with expand-file-name
This commit is contained in:
parent
618a4627dc
commit
bda721449b
3 changed files with 15 additions and 14 deletions
12
init.el
12
init.el
|
@ -37,19 +37,19 @@
|
||||||
|
|
||||||
(defvar prelude-dir (file-name-directory load-file-name)
|
(defvar prelude-dir (file-name-directory load-file-name)
|
||||||
"The root dir of the Emacs Prelude distribution.")
|
"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
|
"This directory houses all of the built-in Prelude module. You should
|
||||||
avoid modifying the configuration there.")
|
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
|
"Users of Emacs Prelude are encouraged to keep their personal configuration
|
||||||
changes in this directory. All Emacs Lisp files there are loaded automatically
|
changes in this directory. All Emacs Lisp files there are loaded automatically
|
||||||
by Prelude.")
|
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
|
"This directory house Emacs Lisp packages that are not yet available in
|
||||||
ELPA (or MELPA).")
|
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.")
|
"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.")
|
"This folder stores all the automatically generated save/history-files.")
|
||||||
|
|
||||||
(unless (file-exists-p prelude-savefile-dir)
|
(unless (file-exists-p prelude-savefile-dir)
|
||||||
|
@ -72,7 +72,7 @@ ELPA (or MELPA).")
|
||||||
(require 'prelude-osx))
|
(require 'prelude-osx))
|
||||||
|
|
||||||
;; config changes made through the customize UI will be store here
|
;; 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')
|
;; load the personal settings (this includes `custom-file')
|
||||||
(when (file-exists-p prelude-personal-dir)
|
(when (file-exists-p prelude-personal-dir)
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
"Adds all first level `parent-dir' subdirs to the
|
"Adds all first level `parent-dir' subdirs to the
|
||||||
Emacs load path."
|
Emacs load path."
|
||||||
(dolist (f (directory-files parent-dir))
|
(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)
|
(when (and (file-directory-p name)
|
||||||
(not (equal f ".."))
|
(not (equal f ".."))
|
||||||
(not (equal f ".")))
|
(not (equal f ".")))
|
||||||
|
|
|
@ -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 prelude-savefile-dir "saveplace"))
|
(setq save-place-file (expand-file-name "saveplace" prelude-savefile-dir))
|
||||||
;; 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 prelude-savefile-dir "savehist"))
|
savehist-file (expand-file-name "savehist" prelude-savefile-dir))
|
||||||
(savehist-mode t)
|
(savehist-mode t)
|
||||||
|
|
||||||
;; save recent files
|
;; 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-saved-items 200
|
||||||
recentf-max-menu-items 15)
|
recentf-max-menu-items 15)
|
||||||
(recentf-mode t)
|
(recentf-mode t)
|
||||||
|
@ -172,7 +172,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-save-directory-list-file (expand-file-name "ido.hist" prelude-savefile-dir)
|
||||||
ido-default-file-method 'selected-window)
|
ido-default-file-method 'selected-window)
|
||||||
|
|
||||||
;; auto-completion in minibuffer
|
;; auto-completion in minibuffer
|
||||||
|
@ -200,7 +200,7 @@
|
||||||
(require 'expand-region)
|
(require 'expand-region)
|
||||||
|
|
||||||
;; bookmarks
|
;; 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)
|
bookmark-save-flag 1)
|
||||||
|
|
||||||
;; load yasnippet
|
;; load yasnippet
|
||||||
|
@ -210,6 +210,7 @@
|
||||||
|
|
||||||
;; projectile is a project management mode
|
;; projectile is a project management mode
|
||||||
(require 'projectile)
|
(require 'projectile)
|
||||||
|
(setq projectile-cache-file (expand-file-name "projectile.cache" prelude-savefile-dir))
|
||||||
(projectile-global-mode t)
|
(projectile-global-mode t)
|
||||||
|
|
||||||
(require 'helm-misc)
|
(require 'helm-misc)
|
||||||
|
@ -287,10 +288,10 @@ indent yanked text (with prefix arg don't indent)."
|
||||||
(setq reb-re-syntax 'string)
|
(setq reb-re-syntax 'string)
|
||||||
|
|
||||||
(require 'eshell)
|
(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
|
(setq semanticdb-default-save-directory
|
||||||
(concat prelude-savefile-dir "semanticdb"))
|
(expand-file-name "semanticdb" prelude-savefile-dir))
|
||||||
|
|
||||||
;; enable Prelude's keybindings
|
;; enable Prelude's keybindings
|
||||||
(prelude-global-mode t)
|
(prelude-global-mode t)
|
||||||
|
|
Loading…
Reference in a new issue