;;; -*- emacs-lisp -*- ;; This file contains customizations written by emacs, and load / ;; start code. Other configs are moved to separate file. ;; TODO ;; * info files ;; * shell completers (darcs), more specificly bash stuff ;; * (previous-point) ?? undo-navigation ;; * menu bars : see (pp-eval-expression 'menu-bar-files-menu) ;; CUSTOMIZATIONS (custom-set-variables ;; custom-set-variables was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. '(browse-url-browser-function (quote browse-url-w3)) '(case-fold-search t) '(current-language-environment "English") '(dired-listing-switches "-BGgh") '(ecb-options-version "2.32") '(ecb-source-path (quote (("~/darcs/" "")))) '(global-font-lock-mode t nil (font-lock)) '(gnus-nntp-server "news.i") '(grep-command "grep -nrI . -e ") '(mail-specify-envelope-from t) '(quack-default-program "mzscheme") '(quack-fontify-style (quote plt)) '(quack-run-scheme-always-prompts-p t) '(quack-smart-open-paren-p nil) '(quack-switch-to-scheme-method (quote cmuscheme)) '(safe-local-variable-values (quote ((buffer-file-coding-system . iso-latin-1)))) '(tags-revert-without-query t) '(user-mail-address "tom@zwizwa.be") '(w3m-use-cookies t) '(woman-cache-filename "~/.wmncach.el") '(woman-cache-level 3) '(woman-fill-column 75) '(woman-use-own-frame nil)) (custom-set-faces ;; custom-set-faces was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. '(nxml-attribute-local-name-face ((t (:inherit font-lock-variable-name-face)))) '(nxml-cdata-section-CDATA-face ((t (:inherit zenburn-primary-4)))) '(nxml-cdata-section-content-face ((t (:inherit nxml-text-face)))) '(nxml-cdata-section-delimiter-face ((t (:inherit nxml-cdata-section-CDATA-face)))) '(nxml-char-ref-delimiter-face ((t (:inherit nxml-entity-ref-delimiter-face)))) '(nxml-char-ref-number-face ((t (:inherit nxml-entity-ref-name-face)))) '(nxml-comment-content-face ((t (:inherit font-lock-comment-face)))) '(nxml-comment-delimiter-face ((t (:inherit nxml-comment-content-face)))) '(nxml-delimited-data-face ((t (:inherit font-lock-string-face)))) '(nxml-delimiter-face ((t (:inherit default)))) '(nxml-entity-ref-delimiter-face ((t (:inherit nxml-entity-ref-name-face)))) '(nxml-entity-ref-name-face ((t (:inherit font-lock-doc-face)))) '(nxml-name-face ((t (:inherit font-lock-function-name-face)))) '(nxml-processing-instruction-content-face ((t (:inherit nxml-processing-instruction-target-face)))) '(nxml-processing-instruction-delimiter-face ((t (:inherit nxml-processing-instruction-target-face)))) '(nxml-processing-instruction-target-face ((t (:inherit zenburn-primary-2)))) '(nxml-ref-face ((t (:inherit font-lock-name-face)))) '(nxml-text-face ((t (:inherit default))) t) '(quack-pltish-comment-face ((((class color) (background dark)) (:inherit font-lock-comment-face)))) '(quack-pltish-defn-face ((t (:inherit font-lock-function-name-face)))) '(quack-pltish-keyword-face ((t (:inherit font-lock-keyword-face)))) '(quack-pltish-module-defn-face ((((class color) (background dark)) (:inherit font-lock-variable-name-face)))) '(quack-pltish-paren-face ((((class color) (background dark)) (:foreground "white")))) '(quack-pltish-selfeval-face ((((class color) (background dark)) (:inherit font-lock-string-face)))) '(woman-bold-face ((t (:foreground "white" :weight bold))))) ;; Fix annoying interactive prompt on startup after hard kill. I ;; never run more than 1 session so this is OK. (let ((file "~/.emacs.desktop.lock")) (if (file-exists-p file) (delete-file file))) ;; Set default frame font. (push '(font . "-xos4-terminus-bold-r-normal--16-160-72-72-c-80-iso8859-1") default-frame-alist) (require 'cl) (defvar emacs-root (format "%s/" (getenv "HOME"))) (labels ((add-path (p) (add-to-list 'load-path (concat emacs-root p)))) (add-path "emacs/") (add-path "libpf/emacs/") (add-path "staapl/emacs/") (add-path "snot/snot/") ; (add-path "elisp/slime48") ) (load-library "keys") (load-library "modes") (load-library "misc") (load-library "terminal") (load-library "longlines") ; (load-library "darcsum") (load-library "xdarcs") (load-library "python") (load-library "sh") (require 'quack) (require 'org) (require 'tramp) ;(require 'staapl) ;; Load ; (eval (read (shell-command-to-string "mzscheme -p zwizwa/snot/elisp"))) (load-library "snot") ;; MISC EMACS CONFIG (put 'downcase-region 'disabled nil) (put 'upcase-region 'disabled nil) (transient-mark-mode 1) (auto-compression-mode 1) ;(shell-command-completion-mode) (set 'kill-read-only-ok 1) (set 'truncate-partial-width-windows nil) (winner-mode 1) (setq backup-by-copying-when-linked t) ; make sure links are preserved (desktop-save-mode 1) (setq-default indent-tabs-mode nil) (require 'nxml-mode) (defalias 'xml-mode 'nxml-mode) ;; something wrong with emacs-snapshot and the idle loop (100% cpu usage) ;; http://groups-beta.google.com/group/gnu.emacs.help/browse_thread/thread/7b92e13dc879d71a/284174fec5a56c29?hl=de (setq semantic-idle-scheduler-idle-time 432000) (prefer-coding-system 'utf-8) ;; server (setenv "PAGER" "/bin/cat") (setenv "EDITOR" "/usr/bin/emacsclient") (server-start) (frame-font-set-current) (require 'inf-haskell) ;; Do not change directory to ~/.cabal on load (setq inferior-haskell-find-project-root nil) (setq tags-case-fold-search nil) ;; tags operations should be case-sensitive (message "") (require 'cflow-mode) (require 'xcscope) (setq cscope-do-not-update-database t) ;; Cscope + small hacks: FIXME: put these somewhere else. (require 'xcscope) (defun cscope-enter () (interactive) (let ((cscope-display-cscope-buffer nil)) (cscope-find-global-definition-no-prompting))) (global-set-key [f11] 'cscope-enter) ;;; This was installed by package-install.el. ;;; This provides support for the package system and ;;; interfacing with ELPA, the package archive. ;;; Move this code earlier if you want to reference ;;; packages in your .emacs. ;(when ; (load ; (expand-file-name "~/.emacs.d/elpa/package.el")) ; (package-initialize)) (setq mail-self-blind t) ; xterm/dtach workaround (global-set-key (kbd "M-[ h") 'beginning-of-line) (global-set-key (kbd "M-[ f") 'end-of-line) ; Rigol DS1052E control (defun tmc-run () (interactive) (shell-command "tmc :RUN")) (defun tmc-trig-single () (interactive) (shell-command "tmc ':TRIG:EDGE:SWE SING'")) (defun tmc-trig-auto () (interactive) (shell-command "tmc ':TRIG:EDGE:SWE AUTO'")) (defun ocd.SAM7 () (interactive) (comint-run "~/git/openocd/sam7/ocd.SAM7")) (defun ocd () (interactive) (comint-run "telnet 4444")) ;; Google search (defun google-search-quoted (literal) (shell-command (concat "google-search \"" literal "\""))) (defun google-search-selection () (interactive) (google-search-quoted (buffer-substring-no-properties (point) (mark)))) (setq show-trailing-whitespace t)