(setq load-path (cons "/usr/share/emacs/site-lisp" load-path))
(add-to-list 'load-path "~/.elisp")
(add-to-list 'load-path "~/.elisp/matlab")
(load "/usr/share/emacs/site-lisp/site-gentoo")
(cua-mode)
(setq cua-enable-cua-keys nil)
(require 'vc-svn)
(require 'redo)
(global-set-key [(alt z)] 'undo)
(global-set-key [(alt shift z)] 'redo)
(global-set-key (kbd "C-c <left>") 'hs-hide-block)
(global-set-key (kbd "C-c <right>") 'hs-show-block)
(set-background-color "gray96")
(require 'pager)
(global-set-key "\C-v" 'pager-page-down)
(global-set-key [next] 'pager-page-down)
(global-set-key "\ev" 'pager-page-up)
(global-set-key [prior] 'pager-page-up)
(global-set-key "\M-p" 'pager-row-up)
(global-set-key '[M-up] 'pager-row-up)
(global-set-key '[M-kp-8] 'pager-row-up)
(global-set-key "\M-n" 'pager-row-down)
(global-set-key '[M-down] 'pager-row-down)
(global-set-key '[M-kp-2] 'pager-row-down)
(global-set-key '[A-right] 'next-buffer)
(global-set-key '[A-left] 'prev-buffer)
(defun scroll-down-keep-cursor ()
(interactive)
(scroll-down 1))
(defun scroll-up-keep-cursor ()
(interactive)
(scroll-up 1))
(global-set-key '[C-M-up] 'scroll-down-keep-cursor)
(global-set-key '[C-M-down] 'scroll-up-keep-cursor)
(setq scroll-margin 3)
(setq scroll-step 0)
(setq scroll-conservatively 100)
(global-set-key [(alt a)] 'mark-whole-buffer)
(global-set-key [(alt v)] 'yank)
(global-set-key [(alt c)] 'kill-ring-save)
(global-set-key [(alt x)] 'kill-region)
(global-set-key [(alt s)] 'save-buffer)
(global-set-key [(alt l)] 'goto-line)
(global-set-key [(alt o)] 'find-file)
(global-set-key [(alt f)] 'isearch-forward)
(global-set-key [(alt g)] 'isearch-repeat-forward)
(global-set-key [(alt w)]
(lambda () (interactive) (kill-buffer (current-buffer))))
(global-set-key [(alt .)] 'keyboard-quit)
(global-set-key [(alt q)] 'save-buffers-kill-emacs)
(setq confirm-kill-emacs 'y-or-n-p)
(global-set-key [(alt m)] 'iconify-frame)
(add-hook 'minibuffer-setup-hook
'(lambda ()
(define-key minibuffer-local-map "\t" 'comint-dynamic-complete)))
(autoload 'tlc-mode "tlc" "tlc Editing Mode" t)
(add-to-list 'auto-mode-alist '("\\.tlc$" . tlc-mode))
(setq tlc-indent-function t)
(autoload 'matlab-mode "matlab" "Enter Matlab mode." t)
(setq auto-mode-alist (cons '("\\.m\\'" . matlab-mode) auto-mode-alist))
(autoload 'matlab-shell "matlab" "Interactive Matlab mode." t)
(setq matlab-shell-command-switches '("-nodesktop" "-nosplash" "-display :0.0"))
(setq matlab-indent-function t) (setq matlab-verify-on-save-flag nil) (defun my-matlab-mode-hook ()
(setq fill-column 76) (setq matlab-comment-region-s "% ")
(defun matlab-insert-parentheses ()
(interactive)
(let ((parens-require-spaces nil))
(insert-parentheses 0)))
(define-key matlab-mode-map "\M-(" 'matlab-insert-parentheses))
(add-hook 'matlab-mode-hook 'my-matlab-mode-hook)
(defun my-matlab-shell-mode-hook ()
'())
(add-hook 'matlab-shell-mode-hook 'my-matlab-shell-mode-hook)
(setq matlab-comment-anti-indent -2)
(setq matlab-indent-level 4)
(setq matlab-shell-command "/Applications/MATLAB704/bin/matlab")
(setq blink-matching-paren )
(setq c-tab-always-indent nil)
(setq standard-indent 4)
(setq tab-always-indent nil)
(setq ecb-layout-name "leftright2")
(setq ecb-layout-window-sizes (quote (("leftright2" (0.24427480916030533 . 0.46) (0.24427480916030533 . 0.52) (0.183206106870229 . 0.46) (0.183206106870229 . 0.52)))))
(setq ecb-primary-secondary-mouse-buttons (quote mouse-1--mouse-2))
(setq ecb-source-path (quote (("~/phase-project/functions/my" #("My project functions" 0 20 (help-echo tree-buffer-help-echo-fn mouse-face highlight))) ("~/phase-project/functions/magnitude_only" #("Hal's project functions" 0 23 (help-echo tree-buffer-help-echo-fn mouse-face highlight))) ("~/school/functions" #("Other functions" 0 15 (help-echo tree-buffer-help-echo-fn mouse-face highlight))) ("~" #("home" 0 4 (help-echo tree-buffer-help-echo-fn mouse-face highlight))) ("/" #("root" 0 4 (help-echo tree-buffer-help-echo-fn mouse-face highlight))))))
(setq ecb-tip-of-the-day nil)
(setq ecb-tree-buffer-style (quote image))
(setq ecb-tree-indent 4)
(setq ecb-windows-height 0.5)
(setq ecb-windows-width 0.15)
(setq semantic-load-turn-useful-things-on t)
(require 'semantic-util)
(setq semantic-load-turn-everything-on t)
(require 'semantic-load)
(require 'ecb)
(ecb-activate)
(scroll-bar-mode (quote right))
(setq mouse-wheel-scroll-amount (quote (1 ((shift) . 1) ((control)))))
(tool-bar-mode 0)
(column-number-mode 1)
(blink-cursor-mode t)
(setq-default cursor-type '(bar . 2))
(setq hl-line-face 'highlight)
(global-hl-line-mode t)
(require 'color-theme)
(global-font-lock-mode t)
(require 'tex-site)
(setq reftex-plug-into-AUCTeX t)
(add-hook 'LaTeX-mode-hook 'turn-on-reftex)
(setq-default TeX-master nil)
(setq TeX-auto-save t)
(setq TeX-parse-self t)
(setq reftex-enable-partial-scans t)
(setq reftex-save-parse-info t)
(setq reftex-use-multiple-selection-buffers t)
(setq reftex-include-file-commands '("include" "input" "includedoc"))
(setq reftex-vref-is-default t)
(setq TeX-electric-escape t)
(load "preview-latex.el" nil t t)
(add-hook 'LaTeX-mode-hook 'LaTeX-install-toolbar)
(setq preview-auto-cache-preamble t)
(load (expand-file-name
"/Users/thomas/Applications/TeXniscope.app/Contents/Resources/txs-search"))
(add-hook 'LaTeX-mode-hook (lambda ()
(local-set-key "\C-c\C-j" 'txs-jump-to-line)))
(setq txs-path "/Users/thomas/Applications/TeXniscope.app")
(setq ispell-program-name "/Users/thomas/Library/PreferencePanes/Spelling.prefPane/Contents/MacOS/cocoAspell")
(auto-fill-mode)
(require 'table)
(set-language-environment "Latin-1")
(set-keyboard-coding-system 'iso-latin-1)
(set-input-mode
(car (current-input-mode))
(nth 1 (current-input-mode))
0
7)
(setq mac-command-key-is-meta nil)
(define-key function-key-map [return] [13])
(defun open-finder-here ()
(interactive)
(shell-command "open ."))
(defun open-file-in-mac ()
(interactive)
(shell-command
(concat "open " (buffer-file-name))))
(defun mac-open-terminal ()
(interactive)
(let ((dir ""))
(cond
((and (local-variable-p 'dired-directory) dired-directory)
(setq dir dired-directory))
((stringp (buffer-file-name))
(setq dir (file-name-directory (buffer-file-name))))
)
(do-applescript
(format "
tell application \"Terminal\"
activate
try
do script with command \"cd %s\"
on error
beep
end try
end tell" dir))
))
(setenv "PATH"
(concat (getenv "PATH")
":")) (setq exec-path (append exec-path
'("/usr/libexec/emacs/22.0.50/powerpc-apple-darwin")))
(custom-set-variables
'(TeX-electric-escape t)
'(exec-path (quote ("/usr/bin" "/bin" "/usr/sbin" "/sbin" "/Users/thomas" "/usr/libexec/emacs/21.3.50/powerpc-apple-darwin7.6.0" "/usr/local/bin")))
'(show-paren-mode t nil (paren))
'(standard-indent 4))
(custom-set-faces
'(ecb-default-highlight-face ((((class color) (background light)) (:background "#ccccff"))))
'(ecb-mode-line-prefix-face ((((class color) (background light)) (:foreground "forestgreen"))))
'(ecb-source-face ((((class color) (background light)) (:inherit ecb-default-highlight-face :background "cornflower blue" :foreground "yellow"))))
'(ecb-tag-header-face ((((class color) (background light)) (:background "seagreen1"))))
'(font-lock-keyword-face ((((class color) (background light)) (:foreground "blue" :weight bold))))
'(highlight ((((class color) (background light)) (:background "#ffff99"))))
'(highline-face ((t (:background "#ffff99"))))
'(matlab-commands-keyword-face ((t (:foreground "blue"))))
'(matlab-region-face ((t (:background "lightblue"))))
'(matlab-types-keyword-face ((t (:foreground "purple" :weight bold))))
'(region ((((class color) (min-colors 88) (background light)) (:background "azure3"))))
'(show-paren-match-face ((((class color) (background light)) (:background "green"))))
'(show-paren-mismatch-face ((((class color)) (:background "red" :foreground "white")))))