Commits

Mike Steder committed 6670c52

Tweaking so my config works with emacs22 (the default that ships with the mac still).

  • Participants
  • Parent commits 228a954

Comments (0)

Files changed (5)

 ;-*- mode: emacs-lisp -*-
 ;;; Mike Steder <steder@gmail.com>
-;;; Emacs configuration 
+;;; Emacs configuration
 ;; Add my local ~/emacs to the load-path
 ;(eval-after-load "tramp"
 ;  '(debug))

emacs.d/custom.el

   ;; Your init file should contain only one such instance.
   ;; If there is more than one, they won't work right.
  '(aquamacs-additional-fontsets nil t)
- '(aquamacs-customization-version-id 211 t)
+ '(aquamacs-customization-version-id 213 t)
  '(aquamacs-tool-bar-user-customization nil t)
- '(column-number-mode nil)
- '(default-frame-alist (quote ((foreground-color . "Black") (background-color . "White") (cursor-type . box) (cursor-color . "Red") (internal-border-width . 0) (left-fringe . 1) (right-fringe) (fringe) (tool-bar-lines . 0) (menu-bar-lines . 1) (vertical-scroll-bars . right))))
+ '(default-frame-alist (quote ((vertical-scroll-bars . right) (menu-bar-lines . 1) (tool-bar-lines . 0) (fringe) (right-fringe) (left-fringe . 1) (internal-border-width . 0) (cursor-type . box) (background-color . "#ffffff") (background-mode . light) (border-color . "black") (cursor-color . "#000000") (foreground-color . "#000000") (mouse-color . "#000000"))))
  '(display-time-mode t)
  '(mu-worlds (quote (["Waterfall Glen" "wfg.mcs.anl.gov" 7777 "mikeps" "bub4202"])))
  '(ns-tool-bar-display-mode nil t)

emacs.d/keybindings.el

 (global-set-key "\C-cb" 'org-iswitchb)
 
 ;; http://emacs-fu.blogspot.com/2008/12/showing-line-numbers.html
-(when (require 'linum)
-  (global-set-key (kbd "<f6>") 'linum-mode))
+(if (>= emacs-major-version 23)
+    (when (require 'linum)
+      (global-set-key (kbd "<f6>") 'linum-mode))
+  )
 
 ;; from http://emacs-fu.blogspot.com/2009/02/transparent-emacs.html
 (defun djcb-opacity-modify (&optional dec)
 ;; Another emacs-fu snippet:
 (defun djcb-zoom (n)
   "with positive N, increase the font size, otherwise decrease it"
-  (set-face-attribute 'default (selected-frame) :height 
-    (+ (face-attribute 'default :height) (* (if (> n 0) 1 -1) 10)))) 
+  (set-face-attribute 'default (selected-frame) :height
+    (+ (face-attribute 'default :height) (* (if (> n 0) 1 -1) 10))))
 
 (global-set-key (kbd "C-+")      '(lambda nil (interactive) (djcb-zoom 1)))
 (global-set-key [C-kp-add]       '(lambda nil (interactive) (djcb-zoom 1)))

emacs.d/look_and_feel.el

 (setq show-paren-style 'mixed)
 ;; to customize styles for matches:
 ; (set-face-background 'show-paren-match-face "#aaaaaa")
-; (set-face-attribute 'show-paren-match-face nil 
+; (set-face-attribute 'show-paren-match-face nil
 ;         :weight 'bold :underline nil :overline nil :slant 'normal)
 ;; to customize style for mis-matches:
-; (set-face-foreground 'show-paren-mismatch-face "red") 
-; (set-face-attribute 'show-paren-mismatch-face nil 
+; (set-face-foreground 'show-paren-mismatch-face "red")
+; (set-face-attribute 'show-paren-mismatch-face nil
 ;                     :weight 'bold :underline t :overline nil :slant 'normal)
 
 ;;; Disable some UI elements.
 ;;; put the scrollbar on the right:
 ;; 'left is the default, 'right and nil are options
 ;; nil hides the scrollbar completely
-(set-scroll-bar-mode 'right)
+(if (>= emacs-major-version 23)
+    (set-scroll-bar-mode 'right)
+  )
 
 ;;; Configure scrolling behavior:
 ;; scroll-margin: the cursors distance from the top/bottom when
 ;;  in the same position on the screen as it scrolls
 (setq
  scroll-margin 0
- scroll-conservatively 1000 
+ scroll-conservatively 1000
  scroll-preserve-screen-position 1)
 
 ;;visual bell instead of annoying beep
 ;; (set-face-attribute
 ;;  'tabbar-separator-face nil
 ;;  :height 0.7)
-;; 
+;;
 
 (tabbar-mode)
 (global-set-key [(control f10)] 'tabbar-local-mode)
 
 ; (color-theme-comidia)
 (if window-system
-    (progn 
+    (progn
       (color-theme-initialize) ; If gui window, load this theme
       ( color-theme-tango ))
   (progn
 
 ; customize find-grep to exclude vcs files:
 (cond (linux-p
-       (setq grep-find-command 
+       (setq grep-find-command
              "find . -type f '!' -wholename '*/.svn/*' -print0 | xargs -0 -e grep -nHi -e ")
        )
       ;; xargs on mac os x doesn't support -e option
       (macosx-p
-       (setq grep-find-command 
+       (setq grep-find-command
              "find . -type f '!' -wholename '*/.svn/*' -print0 | xargs -0 grep -nHi -e ")
        )
       )
 
 
 ;; On write, delete trailing whitespace:
-;(add-hook 'write-file-functions 'delete-trailing-whitespace)
+(add-hook 'write-file-functions 'delete-trailing-whitespace)
 
 ;;; Quick hack to display tab characters:
 ;(standard-display-ascii ?\t "^I")
 
 ;; Scrollbar info in the modeline:
 (if (require 'sml-modeline nil 'noerror)    ;; use sml-modeline if available
-  (progn 
+  (progn
     (sml-modeline-mode 1)                   ;; show buffer pos in the mode line
 ;;    (scroll-bar-mode -1))                   ;; turn off the scrollbar
 ;;  (scroll-bar-mode 1)                       ;; otherwise, show a scrollbar...

emacs.d/mspython.el

 ;; Spell checking could be helpful as well:
 (add-hook 'rst-mode-hook (lambda () (flyspell-mode 1)))
 
+
 ;; MS TEST
 (require 'mstest)
 
 
 ;; Let's try treating psp files as xml?
 (add-to-list 'auto-mode-alist '("\\.psp\\'" . nxml-mode))
+(add-to-list 'auto-mode-alist '("\\.jinja2\\'" . nxml-mode))
 ;;(add-to-list 'auto-mode-alist '("\\.jsp\\'" . jsp-mode))