Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Rearranging things for sanity

  • Loading branch information...
commit 0f7ae3bbd7ca4636323d9bd1b1c4d4bdcf55cb4d 1 parent 58021ac
Randy Morris authored
1  .gitignore
View
@@ -1,4 +1,3 @@
auto-save-list
tramp
-backups
elpa
52 init.el
View
@@ -1,50 +1,32 @@
-;;;; Initial Configuration for Emacs
+;;;; Emacs configuration
;;;; Randy Morris <randy.morris@archlinux.us>
-(defun user-cfg-path (path)
- "Return user-emacs-directory prepended to path"
- (format "%s/%s" user-emacs-directory path))
+(add-to-list 'load-path user-emacs-directory)
-(add-to-list 'load-path (user-cfg-path "configs"))
+(when (require 'package)
+ (load "rm/packages"))
+
+;; mode-specific settings
+(load "rm/configs/ansi-term")
+(load "rm/configs/ediff")
+(load "rm/configs/python-mode")
+(load "rm/configs/tramp")
+(load "rm/configs/whitespace-mode")
;; behavior
(setq inhibit-startup-screen t
require-final-newline t
scroll-conservatively 1
- backup-directory-alist `(("." . ,(user-cfg-path "backups"))))
-
-(tool-bar-mode -1)
-(scroll-bar-mode -1)
+ backup-inhibited t)
;; indentation
(setq-default indent-tabs-mode nil
tab-width 4)
-;; mode-specific settings
-(load "ansi-term-cfg")
-(load "ediff-cfg")
-(load "python-mode-cfg")
-(load "tramp-cfg")
-(load "whitespace-mode-cfg")
+;; display
+(tool-bar-mode -1)
+(scroll-bar-mode -1)
+(menu-bar-mode -1)
;; host-specific settings
-(load-file (format "%s.el" (user-cfg-path system-name)))
-
-(require 'package)
-(add-to-list 'package-archives
- '("marmalade" . "http://marmalade-repo.org/packages/"))
-(package-initialize)
-
-(defun require-package (package)
- "Install PACKAGE when it's not already installed."
- (when (not (package-installed-p package))
- (message "Installing package: %s" package)
- (package-install package)))
-
-(defun init-packages ()
- "Install packages that are not yet installed."
- (interactive)
- (package-refresh-contents)
- (require-package 'expand-region)
- (require-package 'yasnippet)
- (message "Packages installed."))
+(load (format "rm/configs/%s.el" system-name))
0  configs/ansi-term-cfg.el → rm/configs/ansi-term.el
View
File renamed without changes
0  configs/ediff-cfg.el → rm/configs/ediff.el
View
File renamed without changes
0  configs/python-mode-cfg.el → rm/configs/python-mode.el
View
File renamed without changes
0  configs/tramp-cfg.el → rm/configs/tramp.el
View
File renamed without changes
0  configs/whitespace-mode-cfg.el → rm/configs/whitespace-mode.el
View
File renamed without changes
23 rm/packages.el
View
@@ -0,0 +1,23 @@
+;;;; Emacs configuration
+;;;; Randy Morris <randy.morris@archlinux.us>
+;;;;
+;;;; package.el configuration
+
+(add-to-list 'package-archives
+ '("marmalade" . "http://marmalade-repo.org/packages/"))
+(package-initialize)
+
+(defun rm/require-package (package)
+ "Install PACKAGE when it's not already installed."
+ (when (not (package-installed-p package))
+ (message "Installing package: %s" package)
+ (package-install package)))
+
+(defun rm/init-packages ()
+ "Install packages that are not yet installed."
+ (interactive)
+ (package-refresh-contents)
+ (rm/require-package 'expand-region)
+ (rm/require-package 'python-mode)
+ (rm/require-package 'yasnippet)
+ (message "Packages installed."))
Please sign in to comment.
Something went wrong with that request. Please try again.