;;; do-it-now.el ;;; ;;; Copyright (C) 1996, 1997, 1998, 2000, 2002, ;;; 2003, 2004, 2006, 2007, 2008 Thien-Thi Nguyen ;;; This file is part of ttn's personal elisp library, released under GNU ;;; GPL with ABSOLUTELY NO WARRANTY. See the file COPYING for details. ;;; Description: No definitions, just actions. ;;;--------------------------------------------------------------------------- ;;; Language environment. (set-language-environment "Latin-1") ;;;--------------------------------------------------------------------------- ;;; Set directory environment variables. (let ((dir-env-var-file "~/.directory-env-vars")) (if (not (file-exists-p dir-env-var-file)) (message "Env var file not found, skipping: %s" dir-env-var-file) (message "Setting env vars from file: %s" dir-env-var-file) (jamenv-from-file dir-env-var-file))) ;;;--------------------------------------------------------------------------- ;;; Ensure the agreeableness of things. (map-table-2col (lambda (thing setting) (when (fboundp thing) (funcall thing setting))) '(line-number-mode -1 column-number-mode -1 menu-bar-mode -1 transient-mark-mode 1 scroll-bar-mode -1 tooltip-mode -1 blink-cursor-mode -1 ;; add here. )) ;;;--------------------------------------------------------------------------- ;;; Keep track of time. (display-time) ;;;--------------------------------------------------------------------------- ;;; Window system stuff. (when (or window-system (and (fboundp 'display-color-p) (display-color-p))) (unless noninteractive (turn-on-mic-paren)) (set-theme (if window-system 'new-earthy 'dream)) (set-face-background 'modeline "black") (set-cursor-color "lightblue") (set-face-foreground 'region "green") (set-face-background 'region "black") (set-face-background 'highlight "gray20") (global-font-lock-mode t) ;; old skool (when (fboundp 'fringe-mode) (fringe-mode 0)) ;; enough ghosts in the machine (when (boundp 'cursor-in-non-selected-windows) (setq-default cursor-in-non-selected-windows nil))) ;;;--------------------------------------------------------------------------- ;;; Poor man's face customization. (mapc (lambda (spec) (apply 'set-face-attribute (car spec) nil (cdr spec))) '((font-lock-comment-face :foreground "moccasin") (font-lock-string-face :foreground "orange") (font-lock-keyword-face :bold t :foreground "skyblue") (match :background "gray20"))) ;;;--------------------------------------------------------------------------- ;;; Autoloads ;; database (autoload 'db-find-file "database" "EDB database package" t) ;; ttn-do (autoload 'ttn-do "ttn-do" "There is no try." t) ;; pk-unpk (when (ignore-errors (require 'add-guile-dirs)) (autoload 'pk "pk-unpk" nil t) (autoload 'unpk "pk-unpk" nil t)) ;;;--------------------------------------------------------------------------- ;;; Aliases (defalias 'fdap 'dired-at-point) (defalias 'make 'compile) (defalias 'next-buffer 'bury-buffer) ;;;--------------------------------------------------------------------------- ;;; Elisp indentation specs (put other languages in a mode hook) (mapcar (lambda (x) (put x 'lisp-indent-function 1)) '(edit-vc-file with-vc-file)) ;;; do-it-now.el ends here