From a004477efffe52098d652b259f3382afe309b628 Mon Sep 17 00:00:00 2001 From: Jim Myhrberg Date: Fri, 18 Apr 2014 16:04:59 +0100 Subject: [PATCH] Rename config-path helper function to get-config-path --- init.el | 26 ++++++++-------- mode-customizations.el | 50 +++++++++++++++--------------- mode-customizations/erlang-mode.el | 2 +- packages.el | 2 +- vendor.el | 2 +- 5 files changed, 41 insertions(+), 41 deletions(-) diff --git a/init.el b/init.el index 8a9195f..5295672 100644 --- a/init.el +++ b/init.el @@ -11,25 +11,25 @@ (if (or (getenv "EMACS_GUI_SERVER") window-system) t 'nil)) ;; Helper function for config path -(defun config-path(path) +(defun get-config-path(path) "Appends argument at the end of emacs-config-dir using expand-file-name" (expand-file-name path emacs-config-dir)) ;; Load various config files -(load-file (config-path "env.el")) -(load-file (config-path "packages.el")) -(load-file (config-path "helpers.el")) -(load-file (config-path "mode-customizations.el")) -(load-file (config-path "vendor.el")) -(load-file (config-path "behavior.el")) -(load-file (config-path "appearance.el")) -(load-file (config-path "keybindings.el")) -(load-file (config-path "aliases.el")) -(load-file (config-path "remember.el")) -(load-file (config-path "project-definitions.el")) +(load-file (get-config-path "env.el")) +(load-file (get-config-path "packages.el")) +(load-file (get-config-path "helpers.el")) +(load-file (get-config-path "mode-customizations.el")) +(load-file (get-config-path "vendor.el")) +(load-file (get-config-path "behavior.el")) +(load-file (get-config-path "appearance.el")) +(load-file (get-config-path "keybindings.el")) +(load-file (get-config-path "aliases.el")) +(load-file (get-config-path "remember.el")) +(load-file (get-config-path "project-definitions.el")) ;; Custom variables file -(setq custom-file (config-path "custom-variables.el")) +(setq custom-file (get-config-path "custom-variables.el")) (load-file custom-file) ;; Initialize packages in packages.el diff --git a/mode-customizations.el b/mode-customizations.el index db80b68..6c28836 100644 --- a/mode-customizations.el +++ b/mode-customizations.el @@ -3,30 +3,30 @@ ;; ;; Programming languages -(load-file (config-path "mode-customizations/ack-mode.el")) -(load-file (config-path "mode-customizations/coffee-mode.el")) -(load-file (config-path "mode-customizations/conf-mode.el")) -(load-file (config-path "mode-customizations/css-mode.el")) -(load-file (config-path "mode-customizations/dired-mode.el")) -(load-file (config-path "mode-customizations/emacs-lisp-mode.el")) -(load-file (config-path "mode-customizations/erlang-mode.el")) -(load-file (config-path "mode-customizations/feature-mode.el")) -(load-file (config-path "mode-customizations/git-commit-mode.el")) -(load-file (config-path "mode-customizations/haml-mode.el")) -(load-file (config-path "mode-customizations/html-mode.el")) -(load-file (config-path "mode-customizations/js-mode.el")) -(load-file (config-path "mode-customizations/lisp-mode.el")) -(load-file (config-path "mode-customizations/makefile-mode.el")) -(load-file (config-path "mode-customizations/markdown-mode.el")) -(load-file (config-path "mode-customizations/php-mode.el")) -(load-file (config-path "mode-customizations/puppet-mode.el")) -(load-file (config-path "mode-customizations/python-mode.el")) -(load-file (config-path "mode-customizations/rhtml-mode.el")) -(load-file (config-path "mode-customizations/ruby-mode.el")) -(load-file (config-path "mode-customizations/sass-mode.el")) -(load-file (config-path "mode-customizations/sh-mode.el")) -(load-file (config-path "mode-customizations/slim-mode.el")) -(load-file (config-path "mode-customizations/yaml-mode.el")) +(load-file (get-config-path "mode-customizations/ack-mode.el")) +(load-file (get-config-path "mode-customizations/coffee-mode.el")) +(load-file (get-config-path "mode-customizations/conf-mode.el")) +(load-file (get-config-path "mode-customizations/css-mode.el")) +(load-file (get-config-path "mode-customizations/dired-mode.el")) +(load-file (get-config-path "mode-customizations/emacs-lisp-mode.el")) +(load-file (get-config-path "mode-customizations/erlang-mode.el")) +(load-file (get-config-path "mode-customizations/feature-mode.el")) +(load-file (get-config-path "mode-customizations/git-commit-mode.el")) +(load-file (get-config-path "mode-customizations/haml-mode.el")) +(load-file (get-config-path "mode-customizations/html-mode.el")) +(load-file (get-config-path "mode-customizations/js-mode.el")) +(load-file (get-config-path "mode-customizations/lisp-mode.el")) +(load-file (get-config-path "mode-customizations/makefile-mode.el")) +(load-file (get-config-path "mode-customizations/markdown-mode.el")) +(load-file (get-config-path "mode-customizations/php-mode.el")) +(load-file (get-config-path "mode-customizations/puppet-mode.el")) +(load-file (get-config-path "mode-customizations/python-mode.el")) +(load-file (get-config-path "mode-customizations/rhtml-mode.el")) +(load-file (get-config-path "mode-customizations/ruby-mode.el")) +(load-file (get-config-path "mode-customizations/sass-mode.el")) +(load-file (get-config-path "mode-customizations/sh-mode.el")) +(load-file (get-config-path "mode-customizations/slim-mode.el")) +(load-file (get-config-path "mode-customizations/yaml-mode.el")) ;; Misc modes -(load-file (config-path "mode-customizations/magit-mode.el")) +(load-file (get-config-path "mode-customizations/magit-mode.el")) diff --git a/mode-customizations/erlang-mode.el b/mode-customizations/erlang-mode.el index 7addd17..3cf5b62 100644 --- a/mode-customizations/erlang-mode.el +++ b/mode-customizations/erlang-mode.el @@ -2,7 +2,7 @@ ;; no simple way to create a el-get package. So it's one ;; more thing thats not installed through el-get. -(add-to-list 'load-path (config-path "mode-customizations/erlang")) +(add-to-list 'load-path (get-config-path "mode-customizations/erlang")) (setq erlang-root-dir "/usr/local") (setq exec-path (cons "/usr/local/bin" exec-path)) (require 'erlang-start) diff --git a/packages.el b/packages.el index 8725baa..de28875 100644 --- a/packages.el +++ b/packages.el @@ -15,7 +15,7 @@ (package-initialize) ;; Load el-get -(add-to-list 'load-path (config-path "el-get/el-get")) +(add-to-list 'load-path (get-config-path "el-get/el-get")) (require 'el-get) diff --git a/vendor.el b/vendor.el index 20039b0..769d9c0 100644 --- a/vendor.el +++ b/vendor.el @@ -1,2 +1,2 @@ ;; Load-path -(add-to-list 'load-path (config-path "vendor")) +(add-to-list 'load-path (get-config-path "vendor"))