Fixed font problem and removed os-specific config files.
authorLuke Hoersten <Luke@Hoersten.org>
Sun, 12 Dec 2010 22:39:16 -0600
changeset 32 68b57950fa11
parent 31 27930e0310d6
child 33 3be3d7b4cae4
Fixed font problem and removed os-specific config files.
darwin.el
init.el
linux.el
--- a/darwin.el	Sun Dec 12 10:43:21 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,15 +0,0 @@
-;; ~/.emacs.d/darwin.el
-;; Luke Hoersten <[email protected]>
-
-;; Keyboard layout: caps=command, command=alt
-(setq-default ns-command-modifier 'control)
-
-(if window-system
-    (progn
-      (tabbar-mode nil)
-      (menu-bar-mode t)
-      (set-default-font "Menlo-12")
-      ))
-
-(message "Loaded Darwin settings")
-(provide 'darwin)
--- a/init.el	Sun Dec 12 10:43:21 2010 -0600
+++ b/init.el	Sun Dec 12 22:39:16 2010 -0600
@@ -1,7 +1,8 @@
 ;; ~/.emacs.d/init.el (~/.emacs)
 ;; Luke Hoersten <[email protected]>
 
-;;;; General
+
+;;;; General ;;;;
 (add-to-list 'load-path "~/.emacs.d")     ; set default emacs load path
 
 (setq-default
@@ -36,13 +37,28 @@
  (kbd "C-c C-c")
  'comment-or-uncomment-region)            ; toggle region comment
 
-;;; X stuff
+;;; Darwin
+(if (string-match "darwin" (emacs-version))
+    (progn
+      (setq-default ns-command-modifier 'control)
+      (tabbar-mode nil)
+      (menu-bar-mode t)))
+
+;;; Xorg
 (if window-system
     (progn
+      (defun get-font ()
+        "Get appropriate font based on system and hostname."
+        (cond
+         ((string-match "darwin" (emacs-version)) "Menlo-12")
+         ((string-match "HoldenCaulfield" (system-name)) "monospace-7")
+         ("monospace-10")))
+
       (tool-bar-mode -1)      ; remove tool bar
       (scroll-bar-mode -1)    ; remove scroll bar
       (visual-line-mode t)    ; word wrap break on whitespace
       (global-hl-line-mode t) ; highlight current line
+      (set-frame-font (get-font))
 
       ;; twilight theme
       (require 'color-theme)
@@ -52,19 +68,10 @@
 
 ;;; terminal
 (global-set-key (kbd "C-c s") 'eshell) ; start shell
-(add-hook 'eshell-mode-hook '(lambda ()
-    (progn
-      (setenv "PATH" "~/.cabal/bin:$PATH") ; haskell cabal
-      (setenv "TERM" "emacs"))))           ; enable colors
-
-;;; OS specific configs
-(cond
- ((string-match "linux" (emacs-version)) (require 'linux))
- ((string-match "darwin" (emacs-version)) (require 'darwin))
- )
+(add-hook 'eshell-mode-hook '(lambda () (setenv "TERM" "emacs"))) ; enable colors
 
 
-;;;; Mode-Specific
+;;;; Mode-Specific ;;;;
 
 ;;; linum-mode - line numbers
 (mapc
@@ -117,8 +124,8 @@
     haskell-font-lock-symbols 'unicode
     haskell-indent-offset 4
     whitespace-line-column 87))
- t ; append instead of prepend else haskell-mode overwrites these settings
- )
+ t) ; append instead of prepend else haskell-mode overwrites these settings
+
 
 ;;; org-mode
 (add-hook
@@ -129,8 +136,22 @@
    (local-set-key (kbd "M-n") 'org-move-item-down)
    (local-set-key (kbd "M-S-n") 'org-move-subtree-down)))
 
+;;; ibuffer
+(global-set-key (kbd "C-x C-b") 'ibuffer) ; better buffer browser
+(setq-default
+ ibuffer-saved-filter-groups
+ '(("Hoersten"
+    ("Emacs Configs" (saved . "Emacs Configs"))))
 
-;;;; Requires
+ ibuffer-saved-filters
+ '(("Emacs Configs"
+    ((filename . "\\.emacs\\.d/.*\\.el$")))
+   ("gnus" ((or (mode . message-mode) (mode . mail-mode) (mode . gnus-group-mode) (mode . gnus-summary-mode) (mode . gnus-article-mode))))
+   ("programming" ((or (mode . emacs-lisp-mode) (mode . cperl-mode) (mode . c-mode) (mode . java-mode) (mode . idl-mode) (mode . lisp-mode))))
+   ))
+
+
+;;;; Requires ;;;;
 
 (require 'hoersten-align-with-spaces) ; use only spaces for alignment
 (require 'hoersten-pastebin-region)   ; send selected text to pastebin
--- a/linux.el	Sun Dec 12 10:43:21 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,9 +0,0 @@
-;; ~/.emacs.d/linux.el
-;; Luke Hoersten <[email protected]>
-
-(if window-system
-    (progn
-      (set-default-font "Monospace-10")
-      ))
-(message "Loaded Linux settings")
-(provide 'linux)