# HG changeset patch # User Shohei KOKUBO # Date 1398022259 -32400 # Node ID 2764b4f45f9f510dd48edc6148f857d9ff04f55f 1st commit diff -r 000000000000 -r 2764b4f45f9f .emacs --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,146 @@ +;;htmllize +(load "~/.emacs.d/htmlize.el") + +;;load path +(setq load-path (cons "~/.emacs.d" load-path)) +(setq load-path (cons (expand-file-name "~/.emacs.d/color-theme-6.6.0") load-path)) +(display-time-mode 1) + +;;カーソル位置表示 +(line-number-mode 1) +(column-number-mode 1) +(blink-cursor-mode 0) + +;;キーバインド +(define-key global-map "\C-u" 'undo) +(define-key global-map "\C-j" 'dabbrev-expand) +(define-key global-map "\C-h" 'delete-backward-char) +(define-key global-map "\C-c\C-i" 'indent-region) +(define-key global-map "\C-ch" 'windmove-left) +(define-key global-map "\C-cj" 'windmove-down) +(define-key global-map "\C-ck" 'windmove-up) +(define-key global-map "\C-cl" 'windmove-right) +(define-key global-map "\C-c\C-c" 'comment-or-uncomment-region) +(define-key global-map "\C-c\C-v" 'split-window-horizontally) + +;;括弧の対応 +(show-paren-mode 1) + +;;スクロール設定 +(setq scroll-step 1) + +;;関数名 +(which-function-mode 1) + +;; スケルトンでのペア補完をオン +(setq skeleton-pair 1) + +;;; スケルトンでのペア補完定義 +;;(global-set-key "(" 'skeleton-pair-insert-maybe) +;;(global-set-key "[" 'skeleton-pair-insert-maybe) +;;(global-set-key "{" 'skeleton-pair-insert-maybe) +;;(global-set-key "\"" 'skeleton-pair-insert-maybe) +;;(global-set-key "'" 'skeleton-pair-insert-maybe) + +;;選択範囲に色をつける +(setq transient-mark-mode t) + +;;行削除 +(setq kill-whole-line t) + +;;聞き方の変更 +(fset 'yes-or-no-p 'y-or-n-p) + +;;インデント関係 +(global-set-key "\C-m" 'newline-and-indent) +(setq-default indent-tabs-mode nil) +(setq-default tab-width 4) +(setq c-basic-offset 4) +;; (setq default-tab-width 4) + +;;カラーテーマ +(require 'color-theme) +(color-theme-initialize) +(color-theme-pok-wob) + +;;(load-library "php-mode") +;;(reguire 'php-mode) + +;;全角 +(defface my-face-b-1 '((t (:background "medium aquamarine"))) nil) +(defface my-face-b-1 '((t (:background "dark turquoise"))) nil) +(defface my-face-b-2 '((t (:background "cyan"))) nil) +(defface my-face-b-2 '((t (:background "SeaGreen"))) nil) +(defface my-face-u-1 '((t (:foreground "SteelBlue" :underline t))) nil) +(defvar my-face-b-1 'my-face-b-1) +(defadvice font-lock-mode (before my-font-lock-mode ()) + (font-lock-add-keywords + major-mode + '( + (" " 0 my-face-b-1 append) + ))) +(ad-enable-advice 'font-lock-mode 'before 'my-font-lock-mode) +(ad-activate 'font-lock-mode) +(add-hook 'find-file-hooks '(lambda () + (if font-lock-mode + nil + (font-lock-mode t)))) +(put 'set-goal-column 'disabled nil) + +;;gosh +(setq scheme-program-name "gosh -i") + +;; groovy +(global-font-lock-mode 1) +(autoload 'groovy-mode "groovy-mode" "Major mode for editing Groovy code." t) +(add-to-list 'auto-mode-alist '("\.groovy$" . groovy-mode)) +(add-to-list 'interpreter-mode-alist '("groovy" . groovy-mode)) +(add-hook 'groovy-mode-hook + '(lambda () + (require 'groovy-electric) + (groovy-electric-mode))) + +;;backup +(setq make-backup-files nil) +(setq auto-save-default nil) + +;; OpenCL +(add-to-list 'auto-mode-alist '("\.cl$" . c++-mode)) +(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. + '(gud-gdb-command-name "gdb --annotate=1") + '(large-file-warning-threshold nil) + '(tab-width 8)) +(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. + ) + +;; Cuda +(add-to-list 'auto-mode-alist '("\.cu$" . c++-mode)) +(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. + '(gud-gdb-command-name "gdb --annotate=1") + '(large-file-warning-threshold nil) + '(tab-width 8)) +(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. + ) + +;; Haskell +(add-to-list 'load-path "~/.emacs.d/haskell-mode/") +(require 'haskell-mode-autoloads) +(add-to-list 'Info-default-directory-list "~/.emacs.d/haskell-mode/") +(add-hook 'haskell-mode-hook 'turn-on-haskell-doc-mode) +(add-hook 'haskell-mode-hook 'turn-on-haskell-indent) diff -r 000000000000 -r 2764b4f45f9f .emacs.d/.emacs.el --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/.emacs.el Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,71 @@ +;;; 対応する括弧を光らせる。 +(show-paren-mode 1) + +;;; カーソルの位置が何文字目かを表示する +(column-number-mode t) + +;;; カーソルの位置が何行目かを表示する +(line-number-mode t) + +;;; スクロールを一行ずつにする +(setq scroll-step 1) + +;;; 行の先頭でC-kを一回押すだけで行全体を消去する +(setq kill-whole-line t) + +;;; モードラインに時間を表示する +(display-time) + +;;; 現在の関数名をモードラインに表示 +(which-function-mode 1) + +;;; 補完時に大文字小文字を区別しない +(setq completion-ignore-case t) + +;;; 強力な補完機能を使う +;;; p-bでprint-bufferとか +;;(load "complete") +(partial-completion-mode 1) + +;;; 補完可能なものを随時表示 +;;; 少しうるさい +(icomplete-mode 1) + +;; スプラッシュ非表示 : 起動が速くなる +(setq inhibit-startup-message t) + +;;; don't make backup file +(setq make-backup-files nil) + +;;; don't make save-default file +(setq auto-save-default nil) + +;;; C-h to delete +(define-key global-map "\C-h" 'delete-backward-char) + +;;; C-z to undo +(define-key global-map "\C-z" 'undo) + +;;オートインデント +(global-set-key "\C-m" 'newline-and-indent) +(global-set-key "\C-j" 'newline) + +;;インデント幅 +(setq c-default-style "user") + +;;カラースキン +(if window-system (progn + + (set-face-foreground 'font-lock-comment-face "MediumSeaGreen") + (set-face-foreground 'font-lock-string-face "purple") + (set-face-foreground 'font-lock-keyword-face "blue") + (set-face-foreground 'font-lock-function-name-face "blue") + (set-face-bold-p 'font-lock-function-name-face t) + (set-face-foreground 'font-lock-variable-name-face "black") + (set-face-foreground 'font-lock-type-face "LightSeaGreen") + (set-face-foreground 'font-lock-builtin-face "purple") + (set-face-foreground 'font-lock-constant-face "black") + (set-face-foreground 'font-lock-warning-face "blue") + (set-face-bold-p 'font-lock-warning-face nil) + + )) \ No newline at end of file diff -r 000000000000 -r 2764b4f45f9f .emacs.d/auto-save-list/.saves-10027-kkpb.local~ diff -r 000000000000 -r 2764b4f45f9f .emacs.d/auto-save-list/.saves-10365-kkpb.local~ diff -r 000000000000 -r 2764b4f45f9f .emacs.d/auto-save-list/.saves-10404-kkpb.local~ diff -r 000000000000 -r 2764b4f45f9f .emacs.d/auto-save-list/.saves-10417-kkb.st.ie.u-ryukyu.ac.jp~ diff -r 000000000000 -r 2764b4f45f9f .emacs.d/auto-save-list/.saves-12278-kkb.st.ie.u-ryukyu.ac.jp~ diff -r 000000000000 -r 2764b4f45f9f .emacs.d/auto-save-list/.saves-12524-kkpb.local~ diff -r 000000000000 -r 2764b4f45f9f .emacs.d/auto-save-list/.saves-12724-kkpb.local~ diff -r 000000000000 -r 2764b4f45f9f .emacs.d/auto-save-list/.saves-1299-kkb.local~ --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/auto-save-list/.saves-1299-kkb.local~ Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,2 @@ +/Users/e105744/Desktop/ieLT/shower/ru.htm +/Users/e105744/Desktop/ieLT/shower/#ru.htm# diff -r 000000000000 -r 2764b4f45f9f .emacs.d/auto-save-list/.saves-13426-kkpb.local~ diff -r 000000000000 -r 2764b4f45f9f .emacs.d/auto-save-list/.saves-1393-nw1044.st.ie.u-ryukyu.ac.jp~ --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/auto-save-list/.saves-1393-nw1044.st.ie.u-ryukyu.ac.jp~ Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,2 @@ +/Users/e105744/Documents/Processing/AR_exp/AR_exp.java +/Users/e105744/Documents/Processing/AR_exp/#AR_exp.java# diff -r 000000000000 -r 2764b4f45f9f .emacs.d/auto-save-list/.saves-14274-kkb.local~ --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/auto-save-list/.saves-14274-kkb.local~ Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,2 @@ +/Users/e105744/Desktop/exp1102-3-105744J/exp1102-3-105744J.tex +/Users/e105744/Desktop/exp1102-3-105744J/#exp1102-3-105744J.tex# diff -r 000000000000 -r 2764b4f45f9f .emacs.d/auto-save-list/.saves-1431-nw1044-1.st.ie.u-ryukyu.ac.jp~ diff -r 000000000000 -r 2764b4f45f9f .emacs.d/auto-save-list/.saves-1464-kkb.local~ --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/auto-save-list/.saves-1464-kkb.local~ Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,2 @@ +/Users/e105744/desktop/prog4/trupper.c +/Users/e105744/desktop/prog4/#trupper.c# diff -r 000000000000 -r 2764b4f45f9f .emacs.d/auto-save-list/.saves-14860-kkpb.local~ diff -r 000000000000 -r 2764b4f45f9f .emacs.d/auto-save-list/.saves-14923-kkb.local~ diff -r 000000000000 -r 2764b4f45f9f .emacs.d/auto-save-list/.saves-15002-nw1044-1.st.ie.u-ryukyu.ac.jp~ diff -r 000000000000 -r 2764b4f45f9f .emacs.d/auto-save-list/.saves-15087-kkb.local~ --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/auto-save-list/.saves-15087-kkb.local~ Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,2 @@ +/Users/e105744/Desktop/os_ex4.1/schedularSimulator/schedularSimulator.py +/Users/e105744/Desktop/os_ex4.1/schedularSimulator/#schedularSimulator.py# diff -r 000000000000 -r 2764b4f45f9f .emacs.d/auto-save-list/.saves-15133-nw1044-1.st.ie.u-ryukyu.ac.jp~ diff -r 000000000000 -r 2764b4f45f9f .emacs.d/auto-save-list/.saves-15384-nw1044-1.st.ie.u-ryukyu.ac.jp~ diff -r 000000000000 -r 2764b4f45f9f .emacs.d/auto-save-list/.saves-16560-kkb.st.ie.u-ryukyu.ac.jp~ diff -r 000000000000 -r 2764b4f45f9f .emacs.d/auto-save-list/.saves-17637-wlan-116-253.cc.u-ryukyu.ac.jp~ --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/auto-save-list/.saves-17637-wlan-116-253.cc.u-ryukyu.ac.jp~ Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,2 @@ +/Users/e105744/Desktop/exp-sys/pb_data.py +/Users/e105744/Desktop/exp-sys/#pb_data.py# diff -r 000000000000 -r 2764b4f45f9f .emacs.d/auto-save-list/.saves-17640-nw1044.st.ie.u-ryukyu.ac.jp~ --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/auto-save-list/.saves-17640-nw1044.st.ie.u-ryukyu.ac.jp~ Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,2 @@ +/Users/e105744/Desktop/member +/Users/e105744/Desktop/#member# diff -r 000000000000 -r 2764b4f45f9f .emacs.d/auto-save-list/.saves-18175-kkb.st.ie.u-ryukyu.ac.jp~ diff -r 000000000000 -r 2764b4f45f9f .emacs.d/auto-save-list/.saves-18255-kkpb.local~ diff -r 000000000000 -r 2764b4f45f9f .emacs.d/auto-save-list/.saves-18491-kkb.st.ie.u-ryukyu.ac.jp~ diff -r 000000000000 -r 2764b4f45f9f .emacs.d/auto-save-list/.saves-1861-Syouhei-KOKUBO-no-MacBook-Pro.local~ --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/auto-save-list/.saves-1861-Syouhei-KOKUBO-no-MacBook-Pro.local~ Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,2 @@ +/Users/e105744/desktop/prog6/sam.c +/Users/e105744/desktop/prog6/#sam.c# diff -r 000000000000 -r 2764b4f45f9f .emacs.d/auto-save-list/.saves-19534-kkb.st.ie.u-ryukyu.ac.jp~ diff -r 000000000000 -r 2764b4f45f9f .emacs.d/auto-save-list/.saves-19904-kkpb.local~ diff -r 000000000000 -r 2764b4f45f9f .emacs.d/auto-save-list/.saves-20566-kkb.st.ie.u-ryukyu.ac.jp~ diff -r 000000000000 -r 2764b4f45f9f .emacs.d/auto-save-list/.saves-21693-kkb.st.ie.u-ryukyu.ac.jp~ diff -r 000000000000 -r 2764b4f45f9f .emacs.d/auto-save-list/.saves-22402-kkb.local~ --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/auto-save-list/.saves-22402-kkb.local~ Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,2 @@ +/Users/e105744/desktop/algon/list2.c +/Users/e105744/desktop/algon/#list2.c# diff -r 000000000000 -r 2764b4f45f9f .emacs.d/auto-save-list/.saves-22886-kkpb.local~ diff -r 000000000000 -r 2764b4f45f9f .emacs.d/auto-save-list/.saves-2294-Syouhei-KOKUBO-no-MacBook-Pro.local~ --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/auto-save-list/.saves-2294-Syouhei-KOKUBO-no-MacBook-Pro.local~ Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,2 @@ +/Users/e105744/desktop/prog/hello.c +/Users/e105744/desktop/prog/#hello.c# diff -r 000000000000 -r 2764b4f45f9f .emacs.d/auto-save-list/.saves-23169-kkpb.local~ diff -r 000000000000 -r 2764b4f45f9f .emacs.d/auto-save-list/.saves-28115-kkb.local~ --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/auto-save-list/.saves-28115-kkb.local~ Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,2 @@ +/Users/e105744/Desktop/exp1101-1-105744J/exp1101-1-105744J.tex +/Users/e105744/Desktop/exp1101-1-105744J/#exp1101-1-105744J.tex# diff -r 000000000000 -r 2764b4f45f9f .emacs.d/auto-save-list/.saves-2863-nw1044-1.st.ie.u-ryukyu.ac.jp~ diff -r 000000000000 -r 2764b4f45f9f .emacs.d/auto-save-list/.saves-2875-kkb.local~ --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/auto-save-list/.saves-2875-kkb.local~ Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,2 @@ +/Users/e105744/helloworld/grails-app/controllers/helloworld/TwitterController.groovy +/Users/e105744/helloworld/grails-app/controllers/helloworld/#TwitterController.groovy# diff -r 000000000000 -r 2764b4f45f9f .emacs.d/auto-save-list/.saves-2910-kkb.st.ie.u-ryukyu.ac.jp~ diff -r 000000000000 -r 2764b4f45f9f .emacs.d/auto-save-list/.saves-29154-kkb.st.ie.u-ryukyu.ac.jp~ diff -r 000000000000 -r 2764b4f45f9f .emacs.d/auto-save-list/.saves-29611-kkb.st.ie.u-ryukyu.ac.jp~ diff -r 000000000000 -r 2764b4f45f9f .emacs.d/auto-save-list/.saves-3266-nw1044.st.ie.u-ryukyu.ac.jp~ --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/auto-save-list/.saves-3266-nw1044.st.ie.u-ryukyu.ac.jp~ Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,2 @@ +/Users/e105744/rank.tex +/Users/e105744/#rank.tex# diff -r 000000000000 -r 2764b4f45f9f .emacs.d/auto-save-list/.saves-33495-kkb.local~ --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/auto-save-list/.saves-33495-kkb.local~ Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,2 @@ +/Users/e105744/Desktop/exp-sys/ab_plot.py +/Users/e105744/Desktop/exp-sys/#ab_plot.py# diff -r 000000000000 -r 2764b4f45f9f .emacs.d/auto-save-list/.saves-33539-kkb.local~ --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/auto-save-list/.saves-33539-kkb.local~ Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,2 @@ +/Users/e105744/Desktop/R1-105744J/change_10s_18.py +/Users/e105744/Desktop/R1-105744J/#change_10s_18.py# diff -r 000000000000 -r 2764b4f45f9f .emacs.d/auto-save-list/.saves-34415-nw1044-1.st.ie.u-ryukyu.ac.jp~ diff -r 000000000000 -r 2764b4f45f9f .emacs.d/auto-save-list/.saves-34525-kkb.local~ --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/auto-save-list/.saves-34525-kkb.local~ Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,2 @@ +/Users/e105744/Desktop/exp2_root/change_10s.py +/Users/e105744/Desktop/exp2_root/#change_10s.py# diff -r 000000000000 -r 2764b4f45f9f .emacs.d/auto-save-list/.saves-3496-Syouhei-KOKUBO-no-MacBook-Pro.local~ --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/auto-save-list/.saves-3496-Syouhei-KOKUBO-no-MacBook-Pro.local~ Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,2 @@ +/Users/e105744/desktop/prog6/r1.c +/Users/e105744/desktop/prog6/#r1.c# diff -r 000000000000 -r 2764b4f45f9f .emacs.d/auto-save-list/.saves-3566-kkb.st.ie.u-ryukyu.ac.jp~ diff -r 000000000000 -r 2764b4f45f9f .emacs.d/auto-save-list/.saves-42415-kkb.st.ie.u-ryukyu.ac.jp~ diff -r 000000000000 -r 2764b4f45f9f .emacs.d/auto-save-list/.saves-4637-nw1044-1.st.ie.u-ryukyu.ac.jp~ diff -r 000000000000 -r 2764b4f45f9f .emacs.d/auto-save-list/.saves-47098-kkb.local~ --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/auto-save-list/.saves-47098-kkb.local~ Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,2 @@ +/Users/e105744/hello.py +/Users/e105744/#hello.py# diff -r 000000000000 -r 2764b4f45f9f .emacs.d/auto-save-list/.saves-47483-kkb.local~ diff -r 000000000000 -r 2764b4f45f9f .emacs.d/auto-save-list/.saves-47511-kkb.local~ diff -r 000000000000 -r 2764b4f45f9f .emacs.d/auto-save-list/.saves-47548-kkb.local~ diff -r 000000000000 -r 2764b4f45f9f .emacs.d/auto-save-list/.saves-4768-kkpb.local~ diff -r 000000000000 -r 2764b4f45f9f .emacs.d/auto-save-list/.saves-5046-kkb.st.ie.u-ryukyu.ac.jp~ diff -r 000000000000 -r 2764b4f45f9f .emacs.d/auto-save-list/.saves-50588-nw1044-1.st.ie.u-ryukyu.ac.jp~ diff -r 000000000000 -r 2764b4f45f9f .emacs.d/auto-save-list/.saves-51574-nw1044-1.st.ie.u-ryukyu.ac.jp~ --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/auto-save-list/.saves-51574-nw1044-1.st.ie.u-ryukyu.ac.jp~ Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,2 @@ +/Users/e105744/Desktop/pso/rand.py +/Users/e105744/Desktop/pso/#rand.py# diff -r 000000000000 -r 2764b4f45f9f .emacs.d/auto-save-list/.saves-52587-kkb.local~ diff -r 000000000000 -r 2764b4f45f9f .emacs.d/auto-save-list/.saves-52725-kkb.local~ diff -r 000000000000 -r 2764b4f45f9f .emacs.d/auto-save-list/.saves-5331-Syouhei-KOKUBO-no-MacBook-Pro.local~ --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/auto-save-list/.saves-5331-Syouhei-KOKUBO-no-MacBook-Pro.local~ Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,2 @@ +/Users/e105744/desktop/prog6/R1.c +/Users/e105744/desktop/prog6/#R1.c# diff -r 000000000000 -r 2764b4f45f9f .emacs.d/auto-save-list/.saves-5642-wlan-118-214.cc.u-ryukyu.ac.jp~ diff -r 000000000000 -r 2764b4f45f9f .emacs.d/auto-save-list/.saves-56831-kkb.local~ diff -r 000000000000 -r 2764b4f45f9f .emacs.d/auto-save-list/.saves-57296-kkb.local~ diff -r 000000000000 -r 2764b4f45f9f .emacs.d/auto-save-list/.saves-57711-kkb.local~ diff -r 000000000000 -r 2764b4f45f9f .emacs.d/auto-save-list/.saves-57765-kkb.local~ diff -r 000000000000 -r 2764b4f45f9f .emacs.d/auto-save-list/.saves-58508-kkb.local~ diff -r 000000000000 -r 2764b4f45f9f .emacs.d/auto-save-list/.saves-59219-kkb.local~ diff -r 000000000000 -r 2764b4f45f9f .emacs.d/auto-save-list/.saves-6064-kkb.st.ie.u-ryukyu.ac.jp~ diff -r 000000000000 -r 2764b4f45f9f .emacs.d/auto-save-list/.saves-6149-Syouhei-KOKUBO-no-MacBook-Pro.local~ --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/auto-save-list/.saves-6149-Syouhei-KOKUBO-no-MacBook-Pro.local~ Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,2 @@ +/Users/e105744/wa.m +/Users/e105744/#wa.m# diff -r 000000000000 -r 2764b4f45f9f .emacs.d/auto-save-list/.saves-6333-kkb.st.ie.u-ryukyu.ac.jp~ diff -r 000000000000 -r 2764b4f45f9f .emacs.d/auto-save-list/.saves-6487-kkb.st.ie.u-ryukyu.ac.jp~ diff -r 000000000000 -r 2764b4f45f9f .emacs.d/auto-save-list/.saves-6583-kkpb.local~ diff -r 000000000000 -r 2764b4f45f9f .emacs.d/auto-save-list/.saves-66465-kkb.st.ie.u-ryukyu.ac.jp~ diff -r 000000000000 -r 2764b4f45f9f .emacs.d/auto-save-list/.saves-6878-Syouhei-KOKUBO-no-MacBook-Pro.local~ --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/auto-save-list/.saves-6878-Syouhei-KOKUBO-no-MacBook-Pro.local~ Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,2 @@ +/Users/e105744/desktop/prog6/p.c +/Users/e105744/desktop/prog6/#p.c# diff -r 000000000000 -r 2764b4f45f9f .emacs.d/auto-save-list/.saves-7148-kkb.st.ie.u-ryukyu.ac.jp~ diff -r 000000000000 -r 2764b4f45f9f .emacs.d/auto-save-list/.saves-7473-nw1044-1.st.ie.u-ryukyu.ac.jp~ diff -r 000000000000 -r 2764b4f45f9f .emacs.d/auto-save-list/.saves-7741-kkb.st.ie.u-ryukyu.ac.jp~ diff -r 000000000000 -r 2764b4f45f9f .emacs.d/auto-save-list/.saves-7989-kkpb.local~ diff -r 000000000000 -r 2764b4f45f9f .emacs.d/auto-save-list/.saves-8018-kkb.st.ie.u-ryukyu.ac.jp~ diff -r 000000000000 -r 2764b4f45f9f .emacs.d/auto-save-list/.saves-8116-Syouhei-KOKUBO-no-MacBook-Pro.local~ --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/auto-save-list/.saves-8116-Syouhei-KOKUBO-no-MacBook-Pro.local~ Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,2 @@ +/Users/e105744/a +/Users/e105744/#a# diff -r 000000000000 -r 2764b4f45f9f .emacs.d/auto-save-list/.saves-814-kkb.st.ie.u-ryukyu.ac.jp~ diff -r 000000000000 -r 2764b4f45f9f .emacs.d/auto-save-list/.saves-8349-kkb.st.ie.u-ryukyu.ac.jp~ diff -r 000000000000 -r 2764b4f45f9f .emacs.d/auto-save-list/.saves-8857-kkb.st.ie.u-ryukyu.ac.jp~ diff -r 000000000000 -r 2764b4f45f9f .emacs.d/auto-save-list/.saves-90741-kkb.st.ie.u-ryukyu.ac.jp~ diff -r 000000000000 -r 2764b4f45f9f .emacs.d/auto-save-list/.saves-9297-nw1044-1.st.ie.u-ryukyu.ac.jp~ --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/auto-save-list/.saves-9297-nw1044-1.st.ie.u-ryukyu.ac.jp~ Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,2 @@ +/Users/e105744/Downloads/ga-knapsack/plot.py +/Users/e105744/Downloads/ga-knapsack/#plot.py# diff -r 000000000000 -r 2764b4f45f9f .emacs.d/auto-save-list/.saves-9312-nw1044-1.st.ie.u-ryukyu.ac.jp~ --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/auto-save-list/.saves-9312-nw1044-1.st.ie.u-ryukyu.ac.jp~ Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,4 @@ +/Users/e105744/Downloads/ga-knapsack/plot.py +/Users/e105744/Downloads/ga-knapsack/#plot.py# +/Users/e105744/Downloads/ga-knapsack/1-1-KP_List.data-10.max +/Users/e105744/Downloads/ga-knapsack/#1-1-KP_List.data-10.max# diff -r 000000000000 -r 2764b4f45f9f .emacs.d/auto-save-list/.saves-9578-kkpb.local~ --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/auto-save-list/.saves-9578-kkpb.local~ Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,2 @@ +/Users/e105744/Downloads/ga-knapsack/plot.py +/Users/e105744/Downloads/ga-knapsack/#plot.py# diff -r 000000000000 -r 2764b4f45f9f .emacs.d/auto-save-list/.saves-9643-kkb.st.ie.u-ryukyu.ac.jp~ diff -r 000000000000 -r 2764b4f45f9f .emacs.d/auto-save-list/.saves-9743-w-133-13-243-54.cc.u-ryukyu.ac.jp~ --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/auto-save-list/.saves-9743-w-133-13-243-54.cc.u-ryukyu.ac.jp~ Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,2 @@ +/Users/e105744/desktop/prog4/trupper.c +/Users/e105744/desktop/prog4/#trupper.c# diff -r 000000000000 -r 2764b4f45f9f .emacs.d/auto-save-list/.saves-9781-kkpb.local~ diff -r 000000000000 -r 2764b4f45f9f .emacs.d/auto-save-list/.saves-9791-kkb.st.ie.u-ryukyu.ac.jp~ diff -r 000000000000 -r 2764b4f45f9f .emacs.d/auto-save-list/.saves-9800-kkpb.local~ diff -r 000000000000 -r 2764b4f45f9f .emacs.d/auto-save-list/.saves-9821-kkpb.local~ diff -r 000000000000 -r 2764b4f45f9f .emacs.d/color-theme-6.6.0/AUTHORS --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/color-theme-6.6.0/AUTHORS Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,31 @@ + + ***************************************** + AUTHORS + ***************************************** + +NOTE: NEVER send bug reports, help and feature requests directly to the + authors ! + +Original code and ideas by Jonadab the Unsightly One + +Current Maintainers: + * Xavier Maillard (release manager) + * Brian Palmer + +Previous maintainers: + * (1999 2000) Jonadab the Unsightly One + * (2000, 2001, 2002, 2003) Alex Schroeder + +Contributors + + * Deepak Goel + * S. Pokrovsky for ideas and discussion + * Gordon Messmer for ideas and discussion. + * Sriram Karra for the color-theme-submit stuff. + * Olgierd `Kingsajz' Ziolko for the spec-filter idea. + * Brian Palmer for color-theme-library ideas and code + +Note: all the users that contributed their color themes. See CREDITS.themes + for a complete listing of them. + +Thank you all of you ! diff -r 000000000000 -r 2764b4f45f9f .emacs.d/color-theme-6.6.0/BUGS --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/color-theme-6.6.0/BUGS Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,71 @@ +This is the list of common problems. + +Emacs 20.7: Some faces are created using copy-face; these faces are +not printed correctly using M-x color-theme-print. They will have +(nil) in their spec. M-x customize-face has the same problem. + +Example: + +(copy-face 'bold 'new-bold) +(color-theme-spec 'bold) + => (bold ((t (:bold t)))) +(color-theme-spec 'new-bold) + => (new-bold ((t (nil)))) + +XEmacs 21.1: Some faces are defined using a certain font instead of +of the correct attribute. They will have (nil) in their spec. +M-x customize-face has the same problem. + +Example: + +(color-theme-spec 'bold) + => (bold ((t (nil)))) + +XEmacs 21.2 and up, Emacs 21: Not compatible with the custom-theme +mode. It should be easy to transform the color-theme source into +custom-theme source, however. + +If you are running XEmacs, then only foreground and background color +of the default face and only the background color of the text-cursor +face will used. This is due to the fact that these three pieces of +information are stored as frame parameters in Emacs. + +If you are running XEmacs, variables cannot have a frame-local +binding. Therefore, if color-theme-is-global is set to nil, the +variable settings in a color theme are ignored. + +Using Emacs and a non-nil value for color-theme-is-global will +install a new color theme for all frames. Using XEmacs and a non-nil +value for color-theme-is-global will install a new color theme only +on those frames that are not using a local color theme. + +If your system does not define the color names used, you will get the +error "undefined color". See the output of `list-colors-display' for +a list of colors defined on your display. + +The :box, :height, and other new attributes will be honored in Emacs +21, but when you print such a color-theme on Emacs 20 or XEmacs 21, +the information will get lost. So don't do that. Furthermore, +customizing these faces may end up showing you a lisp expression +instead of the real widgets on Emacs 20 or XEmacs 21 because these +attributes are not understood. + +:inverse-video handling differs in Emacs and XEmacs. We therefore do +away with it. When printing a color-theme, the inverse-video +attribute should be handled correctly without ever appearing in color +themes. For maintenance, the following might be usefull for +query-replace-regexp. +:background "\([^"]*\)"\(.*\):foreground "\([^"]*\)"\(.*\) :inverse-video t +:background "\3"\2:foreground "\1"\4 + +In XEmacs 21.1, some of the face tests don't work. Example: +(custom-face-bold 'bold) returns nil on my system. A bug report was +submitted. + +Emacs 20 users will loose with new color themes, because these will +set the colors of the default face only, leaving frame background +untouched. In Emacs 20, the colors of the default face and of the +frame could be changed independently. In Emacs 21, this is no longer +true. New color themes will not be made backwards compatible. + +This release was superficially tested with Emacs 21.x/22.x and XEmacs 21.4. diff -r 000000000000 -r 2764b4f45f9f .emacs.d/color-theme-6.6.0/COPYING --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/color-theme-6.6.0/COPYING Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,342 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. + + diff -r 000000000000 -r 2764b4f45f9f .emacs.d/color-theme-6.6.0/ChangeLog --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/color-theme-6.6.0/ChangeLog Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,121 @@ +2006-05-28 Xavier Maillard + + * Version 6.6.0 is released + + * Tagged source with RELEASE_6-6-0 for "Back in the business" release + + * HAGKING, BUGS, README: New files. + + * color-theme.el (color-theme-libraries): Changed docstring. + (define-color-theme): Reworked macro to properly define themes. + (color-theme-initialize): Actually does what expected. + (color-theme-theme): Removed this useless variable. + + Removed commentary section (splitted into specific files) + + * Makefile.defs (DEBNAME): Changed default value to reveal all + needed informations + (LASTUPLOAD): New version. + (CVSMODULE, CVSBRANCH, CVSROOT): New variables used to + prepare a release. + + * Makefile (dist, dist-prepare, debian, + tarball, realease, upload, $TARBALL, $DEBNAME): New targets. + (distclean): Delete old build traces (files, package, etc...) + + * debian/control: Changed Maintainer informations. + + * debian/emacsen-startup: Safely load autoloads file or die if tests fail. + + * debian/rules: Fixed bad package construction. + + * debian/emacsen-install: Handle theme files installation correctfully. + +2006-05-27 Xavier Maillard + + * debian: New directory. Contains all stuff to build a neat and + cool color-theme-el Debian package. + + * AUTHORS: New file. + + * color-theme-autoloads.in: Ditto.. + + * Makefile.defs: Ditto. + + * Makefile: Ditto. + + * color-theme.el (replace-in-string): New function. Used in define-color-theme + (color-theme-directory): New variable. + (color-theme-libraries): Changed default value to color-theme + official theme directory + (color-theme-load-all-themes): New variable. + (color-theme-initialize): Load theme files defined either in + color-theme-libraries or color-theme-directory. + +2006-05-22 Xavier Maillard + + * color-theme-library.el: make bytecompiler happy. + + * color-theme.el (color-theme-initialize, color-theme-select) + (color-theme-describe, color-theme-install-at-mouse) + (color-theme-install-at-point) + (color-theme-install-at-point-for-current-frame) + (color-theme-print, color-theme-analyze-defun) + (color-theme-make-snapshot, color-theme-compare) + (color-theme-submit, color-theme-initialize): Added autoload cookies + + * COPYING: New file + +2006-05-21 Xavier Maillard + + * color-theme.el: Make byte compiler happy. + Added autoload cookie on color-theme-install (useless ??) + Added eval-when-compile in color-theme-print + +2006-05-14 Xavier Maillard + + * color-theme.el: Cosmetic changes + + * color-theme-library.el: Ditto (added header, legal notice) + +2006-05-11 Xavier Maillard + + * color-theme.el (color-theme-xemacs-p): Check for xemacs feature. + (color-theme-face-attr-construct): New function. Use it when + face-custom-attributes-get is bound. Fixes a bug on M-x + color-theme-select. + +2006-05-07 Xavier Maillard + + * color-theme.el (color-theme-entry-path): New variable used for easymenu definition. + We now check which (x)emacs version is used to correctly define our menu. + (Fixes a long standing bug) + +2006-03-31 Brian Palmer + + * color-theme-library.el (color-theme-renegade): Added new theme + by Dave Benjamin. Thanks Dave. + + * color-theme.el (color-theme-select): Call + color-theme-initialized if it has not been called before. + (color-theme-initialized): Variable tracking initialization state, used in color-theme-select + (color-themes): Added renegade theme by Dave Benjamin. Thanks Dave. + + +2006-01-13 Xavier Maillard + + * color-theme.el: Changed copyright header (just to test Gna services) + +2006-01-10 Brian Palmer + + * color-theme-library.el: Added color-theme-library.el, containing + the defined themes. + * color-theme.el (color-theme-libraries): Customizable variable. + * color-theme.el (color-theme-initialize): Load each file + specified in color-theme-libraries. + +2006-01-10 Brian Palmer + + * Added color-theme.el 6.5.5 to the repository. + * Added ChangeLog to the repository. + diff -r 000000000000 -r 2764b4f45f9f .emacs.d/color-theme-6.6.0/HACKING --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/color-theme-6.6.0/HACKING Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,26 @@ +This file is intented to help any color-theme hacker and particulary +color-theme release team. + + +To release a new version, please follow these instructions: + +1a. Change Makefile.defs (VERSION and LASTUPLOAD) + +1b. Verify color-theme.el header file + +2. Prepare debian/ directory + => control and changelog + => check other files + +3. Tag the whole source files with: + + cvs tag -c RELEASE-X-X-X + +4. Launch the automatic tarball/debian creation: + + make release + +5. Pray :) + + + diff -r 000000000000 -r 2764b4f45f9f .emacs.d/color-theme-6.6.0/Makefile --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/color-theme-6.6.0/Makefile Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,141 @@ +# -*- Makefile -*- + +# Borrowed from many emacs places + +include Makefile.defs + +SPECIAL = +UNCOMPILED = +AUTOLOADFILE = color-theme-autoloads +TESTING = +THEMES_DIRECTORY = themes +THEMES_FILES := $(wildcard $(THEMES_DIRECTORY)/*.el) +ALLSOURCE := $(wildcard *.el) $(THEMES_FILES) +SOURCE = $(filter-out $(SPECIAL) $(UNCOMPILED) $(TESTING),$(ALLSOURCE)) +TARGET = $(patsubst %.el,%.elc,$(SPECIAL) $(SOURCE)) +MANUAL = color-theme +MISC = AUTHORS COPYING ChangeLog Makefile.defs Makefile $(AUTOLOADFILE).in +#AUTHORS CREDITS HISTORY NEWS README Makefile ChangeLog \ +#ChangeLog.2005 ChangeLog.2004 ChangeLog.2003 ChangeLog.2002 \ +#ChangeLog.2001 servers.pl color-theme-auto.in color-theme.texi + +all: lisp #$(MANUAL).info + +lisp: clean $(TARGET) + +autoloads: $(AUTOLOADFILE).elc + +$(AUTOLOADFILE).el: $(AUTOLOADFILE).in #$(TARGET) + cp $(AUTOLOADFILE).in $(AUTOLOADFILE).el + rm -f $(AUTOLOADFILE).elc + @$(EMACS) -q $(SITEFLAG) -batch \ + -l $(shell pwd | sed -e 's|^/cygdrive/\([a-z]\)|\1:|')/$(AUTOLOADFILE) \ + -f color-theme-generate-autoloads \ + $(shell pwd | sed -e 's|^/cygdrive/\([a-z]\)|\1:|')/$(AUTOLOADFILE).el . \ + $(THEMES_DIRECTORY) + +$(AUTOLOADFILE).elc: $(AUTOLOADFILE).el + @echo "Byte compiling the autoload file "$< + @$(EMACS) -batch -q -f batch-byte-compile $^ + @echo "*******************************************************************" + @echo "Autoloads up to date. Put the following lines in your configuration" + @echo "file (~/.emacs for a single user) :" + @echo + @echo ${patsubst %, "(add-to-list 'load-path \""%"\") ", $(LISPDIRS)} + @echo "(require 'color-theme-autoload \""$(AUTOLOADFILE)"\")" + @echo + +%.elc: %.el + @$(EMACS) $(OPTIONCOMPILE) \ + --eval '(setq load-path (cons "." load-path))' \ + -f batch-byte-compile $< + +%.info: %.texi + @echo "No doc yet !" +# makeinfo $< + +%.html: %.texi + @echo "No doc yet !" +# makeinfo --html --no-split $< + +doc: $(MANUAL).info $(MANUAL).html + @echo "No doc yet !" + +clean: + -rm -f themes/*.elc + -rm -f *~ *.elc $(AUTOLOADFILE).el + +realclean: clean + -rm -f $(MANUAL).info $(MANUAL).html $(TARGET) $(SPECIAL) + +install-info: $(MANUAL).info + [ -d $(INFODIR) ] || install -d $(INFODIR) + install -m 0644 $(MANUAL).info $(INFODIR)/$(MANUAL) + $(INSTALLINFO) $(INFODIR)/$(MANUAL) + +install-bin: lisp + install -d $(ELISPDIR) + install -d $(ELISPDIR)/themes + install -m 0644 $(ALLSOURCE) $(TARGET) $(ELISPDIR) + install -m 0644 $(THEMES_FILES) $(TARGET) $(ELISPDIR)/themes + +install: install-bin install-info + +## DO NOT TOUCH THIS ! +## HELPERS FOR MAINTAINER(S) +distclean: + -rm $(MANUAL).info $(MANUAL).html $(TARGET) + -rm -Rf ../$(DISTDIR) + -rm -f debian/dirs debian/files + -rm -rf $(DISTDIR) $(TARBALL)* $(ZIPFILE)* $(DEBNAME)* + +dist: distclean Makefile + $(MAKE) dist-prepare + +# Idea taken from w3m-el +dist-prepare: CVS/Root CVS/Repository + cvs -d $(CVSROOT) -w export -d $(DISTDIR) -r $(CVSBRANCH) $(CVSMODULE) + -cvs diff |( cd $(DISTDIR) && patch -p0 ) + +$(TARBALL): tarball +$(DEBNAME): debian + +tarball: dist + find $(DISTDIR) -name .cvsignore | xargs rm -f + find $(DISTDIR) -name debian | xargs rm -fr + find $(DISTDIR) -type d | xargs chmod 755 + find $(DISTDIR) -type f | xargs chmod 644 + + tar -cf `basename $(TARBALL) .gz` $(DISTDIR) + gzip -9 `basename $(TARBALL) .gz` + zip -r $(ZIPFILE) $(DISTDIR) + gpg --detach $(TARBALL) + gpg --detach $(ZIPFILE) + +debian: dist + (cd $(DISTDIR) && \ + dpkg-buildpackage -v$(LASTUPLOAD) $(BUILDOPTS) \ + -us -uc -rfakeroot && \ + echo "Running lintian ..." && \ + lintian -i ../$(DEBNAME)*.deb || : && \ + echo "Done running lintian." && \ + debsign) + + cp $(DEBNAME)* /var/spool/repo + (cd /var/spool/repo && \ + dpkg-scanpackages . /dev/null | gzip -9 > Packages.gz && \ + dpkg-scansources . | gzip -9 > Sources.gz) + +release: $(DEBNAME) $(TARBALL) + rm -rf $(DISTDIR) + $(MAKE) upload distclean + +upload: + (cd /var/spool/repo && echo open perso.nerim.net > upload.lftp ; \ + echo cd /var/spool/repo >> upload.lftp ; \ + echo mput * >> upload.lftp ; \ + echo close >> upload.lftp ; \ + lftp -f upload.lftp ; \ + rm -f upload.lftp) + (scp $(ZIPFILE)* $(TARBALL)* \ + zeDek@download.gna.org:/upload/color-theme) diff -r 000000000000 -r 2764b4f45f9f .emacs.d/color-theme-6.6.0/Makefile.defs --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/color-theme-6.6.0/Makefile.defs Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,39 @@ +# -*- Makefile -*- +EMACS = emacs +SITEFLAG = --no-site-file +OPTIONCOMPILE = -q --no-site-file --batch + +# XEmacs users will probably want the following settings. +#EMACS = xemacs +#SITEFLAG = -no-site-file + +# Installation options +# PREFIX is only used here. +PREFIX = /usr/local +ELISPDIR = $(PREFIX)/share/emacs/site-lisp/color-theme-el +INFODIR = $(PREFIX)/info + +# Command to use to install the Info dir entry +# If you're using Debian, uncomment the following line and comment out +#the above line. +#INSTALLINFO = install-info --section "Emacs" "emacs" --info-dir=$(INFODIR) +INSTALLINFO = install-info --info-dir=$(INFODIR) + +# Useful only for the maintainer +PROJECT = color-theme +VERSION = 6.6.0 +DISTDIR = $(PROJECT)-$(VERSION) +DEBNAME = $(PROJECT)-el_$(VERSION) +TARBALL = $(DISTDIR).tar.gz +ZIPFILE = $(DISTDIR).zip + +MANUAL = +LASTUPLOAD = 6.6.0-2 +BUILDOPTS = + +# DO NOT TOUCH THIS +TAG = $(shell echo RELEASE-$(VERSION) | tr '.' '-') +CVSMODULE = $(shell cat CVS/Repository) +CVSBRANCH = $(shell cvs status color-theme.el |grep "Sticky Tag:"|awk '{print $$3}'|sed 's/(none)/HEAD/') +CVSBRANCH = $(shell echo rel-$(VERSION) | tr '.' '-') +CVSROOT = $(shell cat CVS/Root) diff -r 000000000000 -r 2764b4f45f9f .emacs.d/color-theme-6.6.0/README --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/color-theme-6.6.0/README Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,86 @@ +Sharing your current color setup: + +Use `color-theme-submit'. If you have already invested time in +customizing Emacs faces, please consider sharing your current setup. +Make sure that color-theme.el is in your `load-path'. Type M-x +load-library RET color-theme RET to load all the functions. Type M-x +color-theme-submit RET and mail the result to the maintainer of this +package (see above for mail addres). + +If you want to make sure that all your customization was exported, +type M-x list-faces-display RET to get a list of all faces currently +defined. This is the list of faces that `color-theme-print' uses. + +Installing a color theme: + +Make sure that color-theme.el is in your `load-path'. Type M-x +load-library RET color-theme RET to load all the functions. + +The main function to call is color-theme-select. Type M-x +color-theme-select RET. That creates a Color Theme Selection +buffer. Press RET or `i' on a color theme to install it for the +rest of your session. + +If you want to install the color theme as soon as Emacs is started +up, read the description of the theme you like and remember the +name of the color theme function. Press `d' on a color theme in +the Color Theme Selection buffer to read the description. Assuming +you like the Gnome2 theme, you'll find that the function to use is +called `color-theme-gnome2'. Add the following to the end of your +.emacs (removing the leading `;;'). + +(require 'color-theme) +(color-theme-gnome2) + +Changing menu colors: + +In Emacs 21 on X, you can set the menu colors and font using the +menu face. Example for your .emacs file: + + (set-face-font 'menu "7x14") + (set-face-foreground 'menu "white"). + +If are using X, you can set the menu foreground and background using +a resource file, usually .Xdefaults or .Xresources. Usually +.Xdefaults is used when you start your session using a display +manager such as xdm or gdm. .Xresources is usually used when you +start X directly via a shell script such as startx. If you set +Emacs*Background and Emacs*Foreground in such a resource file, the +foreground and background of Emacs including the menu will be set. +If your .emacs then loads a color theme, the foreground and +background are changed -- with the exception of the menu. There is +no way to manipulate the menu foreground and background color from +elisp. You can also set more specific menu resources for Emacs in +the resource file. Here is a sample entry for your resource file: + + Emacs*Background: DarkSlateGray + Emacs*Foreground: wheat + +Creating your own color theme: + +Use M-x customize-face and customize the faces. Make sure to "Set +for Current Session" -- you don't want to save these using custom! +When you are done, call M-x color-theme-print to produce the elisp +code required to recreate your theme. Better yet, use M-x +color-theme-submit to mail it to the maintainer. That way it will be +added to future versions of color-theme.el. + +For more information on the elisp format of a color theme, start with +the documentation of `color-theme-install' using C-h f +color-theme-install. + +When your color theme is just a variation of an existing color theme, +take a look at `color-theme-robin-hood' in order to see an example of +how to do it. Essentially you want to call all the parent color +themes before installing your changes. For all but the first parent +color theme, you need to make sure that `color-theme-is-cumulative' +is bound to t. If you don't do that, users that set +`color-theme-is-cumulative' to nil will only install your changes +without the parent color themes. + +Making a color theme work for both Emacs and XEmacs: + +Once you have printed the color-theme, you can make sure it looks +similar in both Emacs and XEmacs by running +`color-theme-analyze-defun' on the printed theme. This function +will check for missing faces for the other editor... diff -r 000000000000 -r 2764b4f45f9f .emacs.d/color-theme-6.6.0/build-stamp diff -r 000000000000 -r 2764b4f45f9f .emacs.d/color-theme-6.6.0/color-theme-autoloads.el --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/color-theme-6.6.0/color-theme-autoloads.el Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,159 @@ +;;; -*-emacs-lisp-*- + +;; Copyright (C) 2002 Free Software Foundation, Inc. + +(defvar generated-autoload-file) +(defvar command-line-args-left) +(defun color-theme-generate-autoloads () + (interactive) + (require 'autoload) + (setq generated-autoload-file (car command-line-args-left)) + (setq command-line-args-left (cdr command-line-args-left)) + (batch-update-autoloads)) + +(provide 'color-theme-autoloads) +;;; Generated autoloads follow (made by autoload.el). + +;;;### (autoloads nil nil ("themes/color-theme-example.el" "themes/color-theme-library.el") +;;;;;; (19958 62098 412404)) + +;;;*** + +;;;### (autoloads (color-theme-initialize color-theme-submit color-theme-install +;;;;;; color-theme-compare color-theme-make-snapshot color-theme-analyze-defun +;;;;;; color-theme-print color-theme-install-at-point-for-current-frame +;;;;;; color-theme-install-at-mouse color-theme-describe color-theme-select) +;;;;;; "color-theme" "color-theme.el" (17529 41105)) +;;; Generated autoloads from color-theme.el + +(autoload (quote color-theme-select) "color-theme" "\ +Displays a special buffer for selecting and installing a color theme. +With optional prefix ARG, this buffer will include color theme libraries +as well. A color theme library is in itself not complete, it must be +used as part of another color theme to be useful. Thus, color theme +libraries are mainly useful for color theme authors. + +\(fn &optional ARG)" t nil) + +(autoload (quote color-theme-describe) "color-theme" "\ +Describe color theme listed at point. +This shows the documentation of the value of text-property color-theme +at point. The text-property color-theme should be a color theme +function. See `color-themes'. + +\(fn)" t nil) + +(autoload (quote color-theme-install-at-mouse) "color-theme" "\ +Install color theme clicked upon using the mouse. +First argument EVENT is used to set point. Then +`color-theme-install-at-point' is called. + +\(fn EVENT)" t nil) + +(autoload (quote color-theme-install-at-point-for-current-frame) "color-theme" "\ +Install color theme at point for current frame only. +Binds `color-theme-is-global' to nil and calls +`color-theme-install-at-point'. + +\(fn)" t nil) + +(autoload (quote color-theme-print) "color-theme" "\ +Print the current color theme function. + +You can contribute this function to or +paste it into your .emacs file and call it. That should recreate all +the settings necessary for your color theme. + +Example: + + (require 'color-theme) + (defun my-color-theme () + \"Color theme by Alex Schroeder, created 2000-05-17.\" + (interactive) + (color-theme-install + '(... + ... + ...))) + (my-color-theme) + +If you want to use a specific color theme function, you can call the +color theme function in your .emacs directly. + +Example: + + (require 'color-theme) + (color-theme-gnome2) + +\(fn &optional BUF)" t nil) + +(autoload (quote color-theme-analyze-defun) "color-theme" "\ +Once you have a color-theme printed, check for missing faces. +This is used by maintainers who receive a color-theme submission +and want to make sure it follows the guidelines by the color-theme +author. + +\(fn)" t nil) + +(autoload (quote color-theme-make-snapshot) "color-theme" "\ +Return the definition of the current color-theme. +The function returned will recreate the color-theme in use at the moment. + +\(fn)" nil nil) + +(autoload (quote color-theme-compare) "color-theme" "\ +Compare two color themes. +This will print the differences between installing THEME-A and +installing THEME-B. Note that the order is important: If a face is +defined in THEME-A and not in THEME-B, then this will not show up as a +difference, because there is no reset before installing THEME-B. If a +face is defined in THEME-B and not in THEME-A, then this will show up as +a difference. + +\(fn THEME-A THEME-B)" t nil) + +(autoload (quote color-theme-install) "color-theme" "\ +Install a color theme defined by frame parameters, variables and faces. + +The theme is installed for all present and future frames; any missing +faces are created. See `color-theme-install-faces'. + +THEME is a color theme definition. See below for more information. + +If you want to install a color theme from your .emacs, use the output +generated by `color-theme-print'. This produces color theme function +which you can copy to your .emacs. + +A color theme definition is a list: +\([FUNCTION] FRAME-PARAMETERS VARIABLE-SETTINGS FACE-DEFINITIONS) + +FUNCTION is the color theme function which called `color-theme-install'. +This is no longer used. There was a time when this package supported +automatic factoring of color themes. This has been abandoned. + +FRAME-PARAMETERS is an alist of frame parameters. These are installed +with `color-theme-install-frame-params'. These are installed last such +that any changes to the default face can be changed by the frame +parameters. + +VARIABLE-DEFINITIONS is an alist of variable settings. These are +installed with `color-theme-install-variables'. + +FACE-DEFINITIONS is an alist of face definitions. These are installed +with `color-theme-install-faces'. + +If `color-theme-is-cumulative' is nil, a color theme will undo face and +frame-parameter settings of previous color themes. + +\(fn THEME)" nil nil) + +(autoload (quote color-theme-submit) "color-theme" "\ +Submit your color-theme to the maintainer. + +\(fn)" t nil) + +(autoload (quote color-theme-initialize) "color-theme" "\ +Initialize the color theme package by loading color-theme-libraries. + +\(fn)" t nil) + +;;;*** diff -r 000000000000 -r 2764b4f45f9f .emacs.d/color-theme-6.6.0/color-theme-autoloads.elc Binary file .emacs.d/color-theme-6.6.0/color-theme-autoloads.elc has changed diff -r 000000000000 -r 2764b4f45f9f .emacs.d/color-theme-6.6.0/color-theme-autoloads.el~ --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/color-theme-6.6.0/color-theme-autoloads.el~ Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,15 @@ +;;; -*-emacs-lisp-*- + +;; Copyright (C) 2002 Free Software Foundation, Inc. + +(defvar generated-autoload-file) +(defvar command-line-args-left) +(defun color-theme-generate-autoloads () + (interactive) + (require 'autoload) + (setq generated-autoload-file (car command-line-args-left)) + (setq command-line-args-left (cdr command-line-args-left)) + (batch-update-autoloads)) + +(provide 'color-theme-autoloads) +;;; Generated autoloads follow (made by autoload.el). diff -r 000000000000 -r 2764b4f45f9f .emacs.d/color-theme-6.6.0/color-theme-autoloads.in --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/color-theme-6.6.0/color-theme-autoloads.in Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,15 @@ +;;; -*-emacs-lisp-*- + +;; Copyright (C) 2002 Free Software Foundation, Inc. + +(defvar generated-autoload-file) +(defvar command-line-args-left) +(defun color-theme-generate-autoloads () + (interactive) + (require 'autoload) + (setq generated-autoload-file (car command-line-args-left)) + (setq command-line-args-left (cdr command-line-args-left)) + (batch-update-autoloads)) + +(provide 'color-theme-autoloads) +;;; Generated autoloads follow (made by autoload.el). diff -r 000000000000 -r 2764b4f45f9f .emacs.d/color-theme-6.6.0/color-theme.el --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/color-theme-6.6.0/color-theme.el Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,1668 @@ +;;; color-theme.el --- install color themes + +;; Copyright (C) 1999, 2000 Jonadab the Unsightly One +;; Copyright (C) 2000, 2001, 2002, 2003 Alex Schroeder +;; Copyright (C) 2003, 2004, 2005, 2006 Xavier Maillard + +;; Version: 6.6.0 +;; Keywords: faces +;; Author: Jonadab the Unsightly One +;; Maintainer: Xavier Maillard +;; URL: http://www.emacswiki.org/cgi-bin/wiki.pl?ColorTheme + +;; This file is not (YET) part of GNU Emacs. + +;; This is free software; you can redistribute it and/or modify it under +;; the terms of the GNU General Public License as published by the Free +;; Software Foundation; either version 2, or (at your option) any later +;; version. +;; +;; This is distributed in the hope that it will be useful, but WITHOUT +;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +;; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +;; for more details. +;; +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +;; MA 02111-1307, USA. + +;;; Commentary: + +;; Please read README and BUGS files for any relevant help. +;; Contributors (not themers) should also read HACKING file. + +;;; Thanks + +;; Deepak Goel +;; S. Pokrovsky for ideas and discussion. +;; Gordon Messmer for ideas and discussion. +;; Sriram Karra for the color-theme-submit stuff. +;; Olgierd `Kingsajz' Ziolko for the spec-filter idea. +;; Brian Palmer for color-theme-library ideas and code +;; All the users that contributed their color themes. + + + +;;; Code: +(eval-when-compile + (require 'easymenu) + (require 'reporter) + (require 'sendmail)) + +(require 'cl); set-difference is a function... + +;; for custom-face-attributes-get or face-custom-attributes-get +(require 'cus-face) +(require 'wid-edit); for widget-apply stuff in cus-face.el + +(defconst color-theme-maintainer-address "zedek@gnu.org" + "Address used by `submit-color-theme'.") + +;; Emacs / XEmacs compatibility and workaround layer + +(cond ((and (facep 'tool-bar) + (not (facep 'toolbar))) + (put 'toolbar 'face-alias 'tool-bar)) + ((and (facep 'toolbar) + (not (facep 'tool-bar))) + (put 'tool-bar 'face-alias 'toolbar))) + +(defvar color-theme-xemacs-p (and (featurep 'xemacs) + (string-match "XEmacs" emacs-version)) + "Non-nil if running XEmacs.") + +;; Add this since it appears to miss in emacs-2x +(or (fboundp 'replace-in-string) + (defun replace-in-string (target old new) + (replace-regexp-in-string old new target))) + +;; face-attr-construct has a problem in Emacs 20.7 and older when +;; dealing with inverse-video faces. Here is a short test to check +;; wether you are affected. + +;; (set-background-color "wheat") +;; (set-foreground-color "black") +;; (setq a (make-face 'a-face)) +;; (face-spec-set a '((t (:background "white" :foreground "black" :inverse-video t)))) +;; (face-attr-construct a) +;; => (:background "black" :inverse-video t) + +;; The expected response is the original specification: +;; => (:background "white" :foreground "black" :inverse-video t) + +;; That's why we depend on cus-face.el functionality. + +(cond ((fboundp 'custom-face-attributes-get) + (defun color-theme-face-attr-construct (face frame) + (if (atom face) + (custom-face-attributes-get face frame) + (if (and (consp face) (eq (car face) 'quote)) + (custom-face-attributes-get (cadr face) frame) + (custom-face-attributes-get (car face) frame))))) + ((fboundp 'face-custom-attributes-get) + (defalias 'color-theme-face-attr-construct + 'face-custom-attributes-get)) + (t + (defun color-theme-face-attr-construct (&rest ignore) + (error "Unable to construct face attributes")))) + +(defun color-theme-alist (plist) + "Transform PLIST into an alist if it is a plist and return it. +If the first element of PLIST is a cons cell, we just return PLIST, +assuming PLIST to be an alist. If the first element of plist is not a +symbol, this is an error: We cannot distinguish a plist from an ordinary +list, but a list that doesn't start with a symbol is certainly no plist +and no alist. + +This is used to make sure `default-frame-alist' really is an alist and not +a plist. In XEmacs, the alist is deprecated; a plist is used instead." + (cond ((consp (car plist)) + plist) + ((not (symbolp (car plist))) + (error "Wrong type argument: plist, %S" plist)) + ((featurep 'xemacs) + (plist-to-alist plist)))); XEmacs only + +;; Customization + +(defgroup color-theme nil + "Color Themes for Emacs. +A color theme consists of frame parameter settings, variable settings, +and face definitions." + :version "20.6" + :group 'faces) + +(defcustom color-theme-legal-frame-parameters "\\(color\\|mode\\)$" + "Regexp that matches frame parameter names. +Only frame parameter names that match this regexp can be changed as part +of a color theme." + :type '(choice (const :tag "Colors only" "\\(color\\|mode\\)$") + (const :tag "Colors, fonts, and size" + "\\(color\\|mode\\|font\\|height\\|width\\)$") + (regexp :tag "Custom regexp")) + :group 'color-theme + :link '(info-link "(elisp)Window Frame Parameters")) + +(defcustom color-theme-legal-variables "\\(color\\|face\\)$" + "Regexp that matches variable names. +Only variables that match this regexp can be changed as part of a color +theme. In addition to matching this name, the variables have to be user +variables (see function `user-variable-p')." + :type 'regexp + :group 'color-theme) + +(defcustom color-theme-illegal-faces "^w3-" + "Regexp that matches face names forbidden in themes. +The default setting \"^w3-\" excludes w3 faces since these +are created dynamically." + :type 'regexp + :group 'color-theme + :link '(info-link "(elisp)Faces for Font Lock") + :link '(info-link "(elisp)Standard Faces")) + +(defcustom color-theme-illegal-default-attributes '(:family :height :width) + "A list of face properties to be ignored when installing faces. +This prevents Emacs from doing terrible things to your display just because +a theme author likes weird fonts." + :type '(repeat symbol) + :group 'color-theme) + +(defcustom color-theme-is-global t + "*Determines wether a color theme is installed on all frames or not. +If non-nil, color themes will be installed for all frames. +If nil, color themes will be installed for the selected frame only. + +A possible use for this variable is dynamic binding. Here is a larger +example to put in your ~/.emacs; it will make the Blue Sea color theme +the default used for the first frame, and it will create two additional +frames with different color themes. + +setup: + \(require 'color-theme) + ;; set default color theme + \(color-theme-blue-sea) + ;; create some frames with different color themes + \(let ((color-theme-is-global nil)) + \(select-frame (make-frame)) + \(color-theme-gnome2) + \(select-frame (make-frame)) + \(color-theme-standard)) + +Please note that using XEmacs and and a nil value for +color-theme-is-global will ignore any variable settings for the color +theme, since XEmacs doesn't have frame-local variable bindings. + +Also note that using Emacs and a non-nil value for color-theme-is-global +will install a new color theme for all frames. Using XEmacs and a +non-nil value for color-theme-is-global will install a new color theme +only on those frames that are not using a local color theme." + :type 'boolean + :group 'color-theme) + +(defcustom color-theme-is-cumulative t + "*Determines wether new color themes are installed on top of each other. +If non-nil, installing a color theme will undo all settings made by +previous color themes." + :type 'boolean + :group 'color-theme) + +(defcustom color-theme-directory nil + "Directory where we can find additionnal themes (personnal). +Note that there is at least one directory shipped with the official +color-theme distribution where all contributed themes are located. +This official selection can't be changed with that variable. +However, you still can decide to turn it on or off and thus, +not be shown with all themes but yours." + :type '(repeat string) + :group 'color-theme) + +(defcustom color-theme-libraries (directory-files + (concat + (file-name-directory (locate-library "color-theme")) + "/themes") t "^color-theme") + "A list of files, which will be loaded in color-theme-initialize depending +on `color-theme-load-all-themes' value. +This allows a user to prune the default color-themes (which can take a while +to load)." + :type '(repeat string) + :group 'color-theme) + +(defcustom color-theme-load-all-themes t + "When t, load all color-theme theme files +as presented by `color-theme-libraries'. Else +do not load any of this themes." + :type 'boolean + :group 'color-theme) + +(defcustom color-theme-mode-hook nil + "Hook for color-theme-mode." + :type 'hook + :group 'color-theme) + +(defvar color-theme-mode-map + (let ((map (make-sparse-keymap))) + (define-key map (kbd "RET") 'color-theme-install-at-point) + (define-key map (kbd "c") 'list-colors-display) + (define-key map (kbd "d") 'color-theme-describe) + (define-key map (kbd "f") 'list-faces-display) + (define-key map (kbd "i") 'color-theme-install-at-point) + (define-key map (kbd "l") 'color-theme-install-at-point-for-current-frame) + (define-key map (kbd "p") 'color-theme-print) + (define-key map (kbd "q") 'bury-buffer) + (define-key map (kbd "?") 'color-theme-describe) + (if color-theme-xemacs-p + (define-key map (kbd "") 'color-theme-install-at-mouse) + (define-key map (kbd "") 'color-theme-install-at-mouse)) + map) + "Mode map used for the buffer created by `color-theme-select'.") + +(defvar color-theme-initialized nil + "Internal variable determining whether color-theme-initialize has been invoked yet") + +(defvar color-theme-buffer-name "*Color Theme Selection*" + "Name of the color theme selection buffer.") + +(defvar color-theme-original-frame-alist nil + "nil until one of the color themes has been installed.") + +(defvar color-theme-history nil + "List of color-themes called, in reverse order") + +(defcustom color-theme-history-max-length nil + "Max length of history to maintain. +Two other values are acceptable: t means no limit, and +nil means that no history is maintained." + :type '(choice (const :tag "No history" nil) + (const :tag "Unlimited length" t) + integer) + :group 'color-theme) + +(defvar color-theme-counter 0 + "Counter for every addition to `color-theme-history'. +This counts how many themes were installed, regardless +of `color-theme-history-max-length'.") + +(defvar color-theme-entry-path (cond + ;; Emacs 22.x and later + ((lookup-key global-map [menu-bar tools]) + '("tools")) + ;; XEmacs + ((featurep 'xemacs) + (setq tool-entry '("Tools"))) + ;; Emacs < 22 + (t + '("Tools"))) + "Menu tool entry path.") + +(defun color-theme-add-to-history (name) + "Add color-theme NAME to `color-theme-history'." + (setq color-theme-history + (cons (list name color-theme-is-cumulative) + color-theme-history) + color-theme-counter (+ 1 color-theme-counter)) + ;; Truncate the list if necessary. + (when (and (integerp color-theme-history-max-length) + (>= (length color-theme-history) + color-theme-history-max-length)) + (setcdr (nthcdr (1- color-theme-history-max-length) + color-theme-history) + nil))) + +;; (let ((l '(1 2 3 4 5))) +;; (setcdr (nthcdr 2 l) nil) +;; l) + + + +;; List of color themes used to create the *Color Theme Selection* +;; buffer. + +(defvar color-themes + '((color-theme-aalto-dark "Aalto Dark" "Jari Aalto ") + (color-theme-aalto-light "Aalto Light" "Jari Aalto ") + (color-theme-aliceblue "Alice Blue" "Girish Bharadwaj ") + (color-theme-andreas "Andreas" "Andreas Busch ") + (color-theme-arjen "Arjen" "Arjen Wiersma ") + (color-theme-beige-diff "Beige Diff" "Alex Schroeder " t) + (color-theme-bharadwaj "Bharadwaj" "Girish Bharadwaj ") + (color-theme-bharadwaj-slate "Bharadwaj Slate" "Girish Bharadwaj ") + (color-theme-billw "Billw" "Bill White ") + (color-theme-black-on-gray "BlackOnGray" "Sudhir Bhojwani ") + (color-theme-blippblopp "Blipp Blopp" "Thomas Sicheritz-Ponten") + (color-theme-simple-1 "Black" "Jonadab ") + (color-theme-blue-erc "Blue ERC" "Alex Schroeder " t) + (color-theme-blue-gnus "Blue Gnus" "Alex Schroeder " t) + (color-theme-blue-mood "Blue Mood" "Nelson Loyola ") + (color-theme-blue-sea "Blue Sea" "Alex Schroeder ") + (color-theme-calm-forest "Calm Forest" "Artur Hefczyc ") + (color-theme-charcoal-black "Charcoal Black" "Lars Chr. Hausmann ") + (color-theme-goldenrod "Cheap Goldenrod" "Alex Schroeder ") + (color-theme-clarity "Clarity and Beauty" "Richard Wellum ") + (color-theme-classic "Classic" "Frederic Giroud ") + (color-theme-comidia "Comidia" "Marcelo Dias de Toledo ") + (color-theme-jsc-dark "Cooper Dark" "John S Cooper ") + (color-theme-jsc-light "Cooper Light" "John S Cooper ") + (color-theme-jsc-light2 "Cooper Light 2" "John S Cooper ") + (color-theme-dark-blue "Dark Blue" "Chris McMahan ") + (color-theme-dark-blue2 "Dark Blue 2" "Chris McMahan ") + (color-theme-dark-green "Dark Green" "eddy_woody@hotmail.com") + (color-theme-dark-laptop "Dark Laptop" "Laurent Michel ") + (color-theme-deep-blue "Deep Blue" "Tomas Cerha ") + (color-theme-digital-ofs1 "Digital OFS1" "Gareth Owen ") + (color-theme-euphoria "Euphoria" "oGLOWo@oGLOWo.cjb.net") + (color-theme-feng-shui "Feng Shui" "Walter Higgins ") + (color-theme-fischmeister "Fischmeister" + "Sebastian Fischmeister ") + (color-theme-gnome "Gnome" "Jonadab ") + (color-theme-gnome2 "Gnome 2" "Alex Schroeder ") + (color-theme-gray1 "Gray1" "Paul Pulli ") + (color-theme-gray30 "Gray30" "Girish Bharadwaj ") + (color-theme-kingsajz "Green Kingsajz" "Olgierd `Kingsajz' Ziolko ") + (color-theme-greiner "Greiner" "Kevin Greiner ") + (color-theme-gtk-ide "GTK IDE" "Gordon Messmer ") + (color-theme-high-contrast "High Contrast" "Alex Schroeder ") + (color-theme-hober "Hober" "Edward O'Connor ") + (color-theme-infodoc "Infodoc" "Frederic Giroud ") + (color-theme-jb-simple "JB Simple" "jeff@dvns.com") + (color-theme-jedit-grey "Jedit Grey" "Gordon Messmer ") + (color-theme-jonadabian "Jonadab" "Jonadab ") + (color-theme-jonadabian-slate "Jonadabian Slate" "Jonadab ") + (color-theme-katester "Katester" "Higgins_Walter@emc.com") + (color-theme-late-night "Late Night" "Alex Schroeder ") + (color-theme-lawrence "Lawrence" "lawrence mitchell ") + (color-theme-lethe "Lethe" "Ivica Loncar ") + (color-theme-ld-dark "Linh Dang Dark" "Linh Dang ") + (color-theme-marine "Marine" "Girish Bharadwaj ") + (color-theme-matrix "Matrix" "Walter Higgins ") + (color-theme-marquardt "Marquardt" "Colin Marquardt ") + (color-theme-midnight "Midnight" "Gordon Messmer ") + (color-theme-mistyday "Misty Day" "Hari Kumar ") + (color-theme-montz "Montz" "Brady Montz ") + (color-theme-oswald "Oswald" "Tom Oswald ") + (color-theme-parus "Parus" "Jon K Hellan ") + (color-theme-pierson "Pierson" "Dan L. Pierson ") + (color-theme-ramangalahy "Ramangalahy" "Solofo Ramangalahy ") + (color-theme-raspopovic "Raspopovic" "Pedja Raspopovic ") + (color-theme-renegade "Renegade" "Dave Benjamin ") + (color-theme-resolve "Resolve" "Damien Elmes ") + (color-theme-retro-green "Retro Green" "Alex Schroeder ") + (color-theme-retro-orange "Retro Orange" "Alex Schroeder ") + (color-theme-robin-hood "Robin Hood" "Alex Schroeder ") + (color-theme-rotor "Rotor" "Jinwei Shen ") + (color-theme-ryerson "Ryerson" "Luis Fernandes ") + (color-theme-salmon-diff "Salmon Diff" "Alex Schroeder " t) + (color-theme-salmon-font-lock "Salmon Font-Lock" "Alex Schroeder " t) + (color-theme-scintilla "Scintilla" "Gordon Messmer ") + (color-theme-shaman "Shaman" "shaman@interdon.net") + (color-theme-sitaramv-nt "Sitaram NT" + "Sitaram Venkatraman ") + (color-theme-sitaramv-solaris "Sitaram Solaris" + "Sitaram Venkatraman ") + (color-theme-snow "Snow" "Nicolas Rist ") + (color-theme-snowish "Snowish" "Girish Bharadwaj ") + (color-theme-standard-ediff "Standard Ediff" "Emacs Team, added by Alex Schroeder " t) + (color-theme-standard "Standard Emacs 20" "Emacs Team, added by Alex Schroeder ") + (color-theme-emacs-21 "Standard Emacs 21" "Emacs Team, added by Alex Schroeder ") + (color-theme-emacs-nw "Standard Emacs 21 No Window" "Emacs Team, added by D. Goel ") + (color-theme-xemacs "Standard XEmacs" "XEmacs Team, added by Alex Schroeder ") + (color-theme-subtle-blue "Subtle Blue" "Chris McMahan ") + (color-theme-subtle-hacker "Subtle Hacker" "Colin Walters ") + (color-theme-taming-mr-arneson "Taming Mr Arneson" "Erik Arneson ") + (color-theme-taylor "Taylor" "Art Taylor ") + (color-theme-tty-dark "TTY Dark" "O Polite ") + (color-theme-vim-colors "Vim Colors" "Michael Soulier ") + (color-theme-whateveryouwant "Whateveryouwant" "Fabien Penso , color by Scott Jaderholm ") + (color-theme-wheat "Wheat" "Alex Schroeder ") + (color-theme-pok-wob "White On Black" "S. Pokrovsky ") + (color-theme-pok-wog "White On Grey" "S. Pokrovsky ") + (color-theme-word-perfect "WordPerfect" "Thomas Gehrlein ") + (color-theme-xp "XP" "Girish Bharadwaj ")) + "List of color themes. + +Each THEME is itself a three element list (FUNC NAME MAINTAINER &optional LIBRARY). + +FUNC is a color theme function which does the setup. The function +FUNC may call `color-theme-install'. The color theme function may be +interactive. + +NAME is the name of the theme and MAINTAINER is the name and/or email of +the maintainer of the theme. + +If LIBRARY is non-nil, the color theme will be considered a library and +may not be shown in the default menu. + +If you defined your own color theme and want to add it to this list, +use something like this: + + (add-to-list 'color-themes '(color-theme-gnome2 \"Gnome2\" \"Alex\"))") + +;;; Functions + +(defun color-theme-backup-original-values () + "Back up the original `default-frame-alist'. +The values are stored in `color-theme-original-frame-alist' on +startup." + (if (null color-theme-original-frame-alist) + (setq color-theme-original-frame-alist + (color-theme-filter (frame-parameters (selected-frame)) + color-theme-legal-frame-parameters)))) +(add-hook 'after-init-hook 'color-theme-backup-original-values) + +;;;###autoload +(defun color-theme-select (&optional arg) + "Displays a special buffer for selecting and installing a color theme. +With optional prefix ARG, this buffer will include color theme libraries +as well. A color theme library is in itself not complete, it must be +used as part of another color theme to be useful. Thus, color theme +libraries are mainly useful for color theme authors." + (interactive "P") + (unless color-theme-initialized (color-theme-initialize)) + (switch-to-buffer (get-buffer-create color-theme-buffer-name)) + (setq buffer-read-only nil) + (erase-buffer) + ;; recreate the snapshot if necessary + (when (or (not (assq 'color-theme-snapshot color-themes)) + (not (commandp 'color-theme-snapshot))) + (fset 'color-theme-snapshot (color-theme-make-snapshot)) + (setq color-themes (delq (assq 'color-theme-snapshot color-themes) + color-themes) + color-themes (delq (assq 'bury-buffer color-themes) + color-themes) + color-themes (append '((color-theme-snapshot + "[Reset]" "Undo changes, if possible.") + (bury-buffer + "[Quit]" "Bury this buffer.")) + color-themes))) + (dolist (theme color-themes) + (let ((func (nth 0 theme)) + (name (nth 1 theme)) + (author (nth 2 theme)) + (library (nth 3 theme)) + (desc)) + (when (or (not library) arg) + (setq desc (format "%-23s %s" + (if library (concat name " [lib]") name) + author)) + (put-text-property 0 (length desc) 'color-theme func desc) + (put-text-property 0 (length name) 'face 'bold desc) + (put-text-property 0 (length name) 'mouse-face 'highlight desc) + (insert desc) + (newline)))) + (goto-char (point-min)) + (setq buffer-read-only t) + (set-buffer-modified-p nil) + (color-theme-mode)) + +(when (require 'easymenu) + (easy-menu-add-item nil color-theme-entry-path "--") + (easy-menu-add-item nil color-theme-entry-path + ["Color Themes" color-theme-select t])) + +(defun color-theme-mode () + "Major mode to select and install color themes. + +Use \\[color-theme-install-at-point] to install a color theme on all frames. +Use \\[color-theme-install-at-point-for-current-frame] to install a color theme for the current frame only. + +The changes are applied on top of your current setup. This is a +feature. + +Some of the themes should be considered extensions to the standard color +theme: they modify only a limited number of faces and variables. To +verify the final look of a color theme, install the standard color +theme, then install the other color theme. This is a feature. It allows +you to mix several color themes. + +Use \\[color-theme-describe] to read more about the color theme function at point. +If you want to install the color theme permanently, put the call to the +color theme function into your ~/.emacs: + + \(require 'color-theme) + \(color-theme-gnome2) + +If you worry about the size of color-theme.el: You are right. Use +\\[color-theme-print] to print the current color theme and save the resulting buffer +as ~/.emacs-color-theme. Now you can install only this specific color +theme in your .emacs: + + \(load-file \"~/.emacs-color-theme\") + \(my-color-theme) + +The Emacs menu is not affected by color themes within Emacs. Depending +on the toolkit you used to compile Emacs, you might have to set specific +X ressources. See the info manual for more information. Here is an +example ~/.Xdefaults fragment: + + emacs*Background: DarkSlateGray + emacs*Foreground: wheat + +\\{color-theme-mode-map} + +The color themes are listed in `color-themes', which see." + (kill-all-local-variables) + (setq major-mode 'color-theme-mode) + (setq mode-name "Color Themes") + (use-local-map color-theme-mode-map) + (when (functionp 'goto-address); Emacs + (goto-address)) + (run-hooks 'color-theme-mode-hook)) + +;;; Commands in Color Theme Selection mode + +;;;###autoload +(defun color-theme-describe () + "Describe color theme listed at point. +This shows the documentation of the value of text-property color-theme +at point. The text-property color-theme should be a color theme +function. See `color-themes'." + (interactive) + (describe-function (get-text-property (point) 'color-theme))) + +;;;###autoload +(defun color-theme-install-at-mouse (event) + "Install color theme clicked upon using the mouse. +First argument EVENT is used to set point. Then +`color-theme-install-at-point' is called." + (interactive "e") + (save-excursion + (mouse-set-point event) + (color-theme-install-at-point))) + +;;;autoload +(defun color-theme-install-at-point () + "Install color theme at point. +This calls the value of the text-property `color-theme' at point. +The text-property `color-theme' should be a color theme function. +See `color-themes'." + (interactive) + (let ((func (get-text-property (point) 'color-theme))) + ;; install theme + (if func + (funcall func)) + ;; If goto-address is being used, remove all overlays in the current + ;; buffer and run it again. The face used for the mail addresses in + ;; the the color theme selection buffer is based on the variable + ;; goto-address-mail-face. Changes in that variable will not affect + ;; existing overlays, however, thereby confusing users. + (when (functionp 'goto-address); Emacs + (dolist (o (overlays-in (point-min) (point-max))) + (delete-overlay o)) + (goto-address)))) + +;;;###autoload +(defun color-theme-install-at-point-for-current-frame () + "Install color theme at point for current frame only. +Binds `color-theme-is-global' to nil and calls +`color-theme-install-at-point'." + (interactive) + (let ((color-theme-is-global nil)) + (color-theme-install-at-point))) + + + +;; Taking a snapshot of the current color theme and pretty printing it. + +(defun color-theme-filter (old-list regexp &optional exclude) + "Filter OLD-LIST. +The resulting list will be newly allocated and contains only elements +with names matching REGEXP. OLD-LIST may be a list or an alist. If you +want to filter a plist, use `color-theme-alist' to convert your plist to +an alist, first. + +If the optional argument EXCLUDE is non-nil, then the sense is +reversed: only non-matching elements will be retained." + (let (elem new-list) + (dolist (elem old-list) + (setq name (symbol-name (if (listp elem) (car elem) elem))) + (when (or (and (not exclude) + (string-match regexp name)) + (and exclude + (not (string-match regexp name)))) + ;; Now make sure that if elem is a cons cell, and the cdr of + ;; that cons cell is a string, then we need a *new* string in + ;; the new list. Having a new cons cell is of no use because + ;; modify-frame-parameters will modify this string, thus + ;; modifying our color theme functions! + (when (and (consp elem) + (stringp (cdr elem))) + (setq elem (cons (car elem) + (copy-sequence (cdr elem))))) + ;; Now store elem + (setq new-list (cons elem new-list)))) + new-list)) + +(defun color-theme-spec-filter (spec) + "Filter the attributes in SPEC. +This makes sure that SPEC has the form ((t (PLIST ...))). +Only properties not in `color-theme-illegal-default-attributes' +are included in the SPEC returned." + (let ((props (cadar spec)) + result prop val) + (while props + (setq prop (nth 0 props) + val (nth 1 props) + props (nthcdr 2 props)) + (unless (memq prop color-theme-illegal-default-attributes) + (setq result (cons val (cons prop result))))) + `((t ,(nreverse result))))) + +;; (color-theme-spec-filter '((t (:background "blue3")))) +;; (color-theme-spec-filter '((t (:stipple nil :background "Black" :foreground "SteelBlue" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :width semi-condensed :family "misc-fixed")))) + +(defun color-theme-plist-delete (plist prop) + "Delete property PROP from property list PLIST by side effect. +This modifies PLIST." + ;; deal with prop at the start + (while (eq (car plist) prop) + (setq plist (cddr plist))) + ;; deal with empty plist + (when plist + (let ((lastcell (cdr plist)) + (l (cddr plist))) + (while l + (if (eq (car l) prop) + (progn + (setq l (cddr l)) + (setcdr lastcell l)) + (setq lastcell (cdr l) + l (cddr l)))))) + plist) + +;; (color-theme-plist-delete '(a b c d e f g h) 'a) +;; (color-theme-plist-delete '(a b c d e f g h) 'b) +;; (color-theme-plist-delete '(a b c d e f g h) 'c) +;; (color-theme-plist-delete '(a b c d e f g h) 'g) +;; (color-theme-plist-delete '(a b c d c d e f g h) 'c) +;; (color-theme-plist-delete '(a b c d e f c d g h) 'c) + +(if (or (featurep 'xemacs) + (< emacs-major-version 21)) + (defalias 'color-theme-spec-compat 'identity) + (defun color-theme-spec-compat (spec) + "Filter the attributes in SPEC such that is is never invalid. +Example: Eventhough :bold works in Emacs, it is not recognized by +`customize-face' -- and then the face is uncustomizable. This +function replaces a :bold attribute with the corresponding :weight +attribute, if there is no :weight, or deletes it. This undoes the +doings of `color-theme-spec-canonical-font', more or less." + (let ((props (cadar spec))) + (when (plist-member props :bold) + (setq props (color-theme-plist-delete props :bold)) + (unless (plist-member props :weight) + (setq props (plist-put props :weight 'bold)))) + (when (plist-member props :italic) + (setq props (color-theme-plist-delete props :italic)) + (unless (plist-member props :slant) + (setq props (plist-put props :slant 'italic)))) + `((t ,props))))) + +;; (color-theme-spec-compat '((t (:foreground "blue" :bold t)))) +;; (color-theme-spec-compat '((t (:bold t :foreground "blue" :weight extra-bold)))) +;; (color-theme-spec-compat '((t (:italic t :foreground "blue")))) +;; (color-theme-spec-compat '((t (:slant oblique :italic t :foreground "blue")))) + +(defun color-theme-spec-canonical-font (atts) + "Add :bold and :italic attributes if necessary." + ;; add these to the front of atts -- this will keept the old value for + ;; customize-face in Emacs 21. + (when (and (memq (plist-get atts :weight) + '(ultra-bold extra-bold bold semi-bold)) + (not (plist-get atts :bold))) + (setq atts (cons :bold (cons t atts)))) + (when (and (not (memq (plist-get atts :slant) + '(normal nil))) + (not (plist-get atts :italic))) + (setq atts (cons :italic (cons t atts)))) + atts) +;; (color-theme-spec-canonical-font (color-theme-face-attr-construct 'bold (selected-frame))) +;; (defface foo '((t (:weight extra-bold))) "foo") +;; (color-theme-spec-canonical-font (color-theme-face-attr-construct 'foo (selected-frame))) +;; (face-spec-set 'foo '((t (:weight extra-bold))) nil) +;; (face-spec-set 'foo '((t (:bold t))) nil) +;; (face-spec-set 'foo '((t (:bold t :weight extra-bold))) nil) + +;; Handle :height according to NEWS file for Emacs 21 +(defun color-theme-spec-resolve-height (old new) + "Return the new height given OLD and NEW height. +OLD is the current setting, NEW is the setting inherited from." + (cond ((not old) + new) + ((integerp old) + old) + ((and (floatp old) + (integerp new)) + (round (* old new))) + ((and (floatp old) + (floatp new)) + (* old new)) + ((and (functionp old) + (integerp new)) + (round (funcall old new))) + ((and (functionp old) + (float new)) + `(lambda (f) (* (funcall ,old f) ,new))) + ((and (functionp old) + (functionp new)) + `(lambda (f) (* (funcall ,old (funcall ,new f))))) + (t + (error "Illegal :height attributes: %S or %S" old new)))) +;; (color-theme-spec-resolve-height 12 1.2) +;; (color-theme-spec-resolve-height 1.2 1.2) +;; (color-theme-spec-resolve-height 1.2 12) +;; (color-theme-spec-resolve-height 1.2 'foo) +;; (color-theme-spec-resolve-height (lambda (f) (* 2 f)) 5) +;; (color-theme-spec-resolve-height (lambda (f) (* 2 f)) 2.0) +;; the following lambda is the result from the above calculation +;; (color-theme-spec-resolve-height (lambda (f) (* (funcall (lambda (f) (* 2 f)) f) 2.0)) 5) + +(defun color-theme-spec-resolve-inheritance (atts) + "Resolve all occurences of the :inherit attribute." + (let ((face (plist-get atts :inherit))) + ;; From the Emacs 21 NEWS file: "Attributes from inherited faces are + ;; merged into the face like an underlying face would be." -- + ;; therefore properties of the inherited face only add missing + ;; attributes. + (when face + ;; remove :inherit face from atts -- this assumes only one + ;; :inherit attribute. + (setq atts (delq ':inherit (delq face atts))) + (let ((more-atts (color-theme-spec-resolve-inheritance + (color-theme-face-attr-construct + face (selected-frame)))) + att val) + (while more-atts + (setq att (car more-atts) + val (cadr more-atts) + more-atts (cddr more-atts)) + ;; Color-theme assumes that no value is ever 'unspecified. + (cond ((eq att ':height); cumulative effect! + (setq atts (plist-put atts + ':height + (color-theme-spec-resolve-height + (plist-get atts att) + val)))) + ;; Default: Only put if it has not been specified before. + ((not (plist-get atts att)) + (setq atts (cons att (cons val atts)))) + +)))) + atts)) +;; (color-theme-spec-resolve-inheritance '(:bold t)) +;; (color-theme-spec-resolve-inheritance '(:bold t :foreground "blue")) +;; (color-theme-face-attr-construct 'font-lock-comment-face (selected-frame)) +;; (color-theme-spec-resolve-inheritance '(:bold t :inherit font-lock-comment-face)) +;; (color-theme-spec-resolve-inheritance '(:bold t :foreground "red" :inherit font-lock-comment-face)) +;; (color-theme-face-attr-construct 'Info-title-2-face (selected-frame)) +;; (color-theme-face-attr-construct 'Info-title-3-face (selected-frame)) +;; (color-theme-face-attr-construct 'Info-title-4-face (selected-frame)) +;; (color-theme-spec-resolve-inheritance '(:inherit Info-title-2-face)) + +;; The :inverse-video attribute causes Emacs to swap foreground and +;; background colors, XEmacs does not. Therefore, if anybody chooses +;; the inverse-video attribute, we 1. swap the colors ourselves in Emacs +;; and 2. we remove the inverse-video attribute in Emacs and XEmacs. +;; Inverse-video is only useful on a monochrome tty. +(defun color-theme-spec-maybe-invert (atts) + "Remove the :inverse-video attribute from ATTS. +If ATTS contains :inverse-video t, remove it and swap foreground and +background color. Return ATTS." + (let ((inv (plist-get atts ':inverse-video))) + (if inv + (let (result att) + (while atts + (setq att (car atts) + atts (cdr atts)) + (cond ((and (eq att :foreground) (not color-theme-xemacs-p)) + (setq result (cons :background result))) + ((and (eq att :background) (not color-theme-xemacs-p)) + (setq result (cons :foreground result))) + ((eq att :inverse-video) + (setq atts (cdr atts))); this prevents using dolist + (t + (setq result (cons att result))))) + (nreverse result)) + ;; else + atts))) +;; (color-theme-spec-maybe-invert '(:bold t)) +;; (color-theme-spec-maybe-invert '(:foreground "blue")) +;; (color-theme-spec-maybe-invert '(:background "red")) +;; (color-theme-spec-maybe-invert '(:inverse-video t)) +;; (color-theme-spec-maybe-invert '(:inverse-video t :foreground "red")) +;; (color-theme-spec-maybe-invert '(:inverse-video t :background "red")) +;; (color-theme-spec-maybe-invert '(:inverse-video t :background "red" :foreground "blue" :bold t)) +;; (color-theme-spec-maybe-invert '(:inverse-video nil :background "red" :foreground "blue" :bold t)) + +(defun color-theme-spec (face) + "Return a list for FACE which has the form (FACE SPEC). +See `defface' for the format of SPEC. In this case we use only one +DISPLAY, t, and determine ATTS using `color-theme-face-attr-construct'. +If ATTS is nil, (nil) is used instead. + +If ATTS contains :inverse-video t, we remove it and swap foreground and +background color using `color-theme-spec-maybe-invert'. We do this +because :inverse-video is handled differently in Emacs and XEmacs. We +will loose on a tty without colors, because in that situation, +:inverse-video means something." + (let ((atts + (color-theme-spec-canonical-font + (color-theme-spec-maybe-invert + (color-theme-spec-resolve-inheritance + (color-theme-face-attr-construct face (selected-frame))))))) + (if atts + `(,face ((t ,atts))) + `(,face ((t (nil))))))) + +(defun color-theme-get-params () + "Return a list of frame parameter settings usable in a color theme. +Such an alist may be installed by `color-theme-install-frame-params'. The +frame parameters returned must match `color-theme-legal-frame-parameters'." + (let ((params (color-theme-filter (frame-parameters (selected-frame)) + color-theme-legal-frame-parameters))) + (sort params (lambda (a b) (string< (symbol-name (car a)) + (symbol-name (car b))))))) + +(defun color-theme-get-vars () + "Return a list of variable settings usable in a color theme. +Such an alist may be installed by `color-theme-install-variables'. +The variable names must match `color-theme-legal-variables', and the +variable must be a user variable according to `user-variable-p'." + (let ((vars) + (val)) + (mapatoms (lambda (v) + (and (boundp v) + (user-variable-p v) + (string-match color-theme-legal-variables + (symbol-name v)) + (setq val (eval v)) + (add-to-list 'vars (cons v val))))) + (sort vars (lambda (a b) (string< (car a) (car b)))))) + +(defun color-theme-print-alist (alist) + "Print ALIST." + (insert "\n " (if alist "(" "nil")) + (dolist (elem alist) + (when (= (preceding-char) ?\)) + (insert "\n ")) + (prin1 elem (current-buffer))) + (when (= (preceding-char) ?\)) (insert ")"))) + +(defun color-theme-get-faces () + "Return a list of faces usable in a color theme. +Such an alist may be installed by `color-theme-install-faces'. The +faces returned must not match `color-theme-illegal-faces'." + (let ((faces (color-theme-filter (face-list) color-theme-illegal-faces t))) + ;; default face must come first according to comments in + ;; custom-save-faces, the rest is to be sorted by name + (cons 'default (sort (delq 'default faces) 'string-lessp)))) + +(defun color-theme-get-face-definitions () + "Return face settings usable in a color-theme." + (let ((faces (color-theme-get-faces))) + (mapcar 'color-theme-spec faces))) + +(defun color-theme-print-faces (faces) + "Print face settings for all faces returned by `color-theme-get-faces'." + (when faces + (insert "\n ")) + (dolist (face faces) + (when (= (preceding-char) ?\)) + (insert "\n ")) + (prin1 face (current-buffer)))) + +(defun color-theme-reset-faces () + "Reset face settings for all faces returned by `color-theme-get-faces'." + (let ((faces (color-theme-get-faces)) + (face) (spec) (entry) + (frame (if color-theme-is-global nil (selected-frame)))) + (while faces + (setq entry (color-theme-spec (car faces))) + (setq face (nth 0 entry)) + (setq spec '((t (nil)))) + (setq faces (cdr faces)) + (if (functionp 'face-spec-reset-face) + (face-spec-reset-face face frame) + (face-spec-set face spec frame) + (if color-theme-is-global + (put face 'face-defface-spec spec)))))) + +(defun color-theme-print-theme (func doc params vars faces) + "Print a theme into the current buffer. +FUNC is the function name, DOC the doc string, PARAMS the +frame parameters, VARS the variable bindings, and FACES +the list of faces and their specs." + (insert "(defun " (symbol-name func) " ()\n" + " \"" doc "\"\n" + " (interactive)\n" + " (color-theme-install\n" + " '(" (symbol-name func)) + ;; alist of frame parameters + (color-theme-print-alist params) + ;; alist of variables + (color-theme-print-alist vars) + ;; remaining elements of snapshot: face specs + (color-theme-print-faces faces) + (insert ")))\n") + (insert "(add-to-list 'color-themes '(" (symbol-name func) " " + " \"THEME NAME\" \"YOUR NAME\"))") + (goto-char (point-min))) + +;;;###autoload +(defun color-theme-print (&optional buf) + "Print the current color theme function. + +You can contribute this function to or +paste it into your .emacs file and call it. That should recreate all +the settings necessary for your color theme. + +Example: + + \(require 'color-theme) + \(defun my-color-theme () + \"Color theme by Alex Schroeder, created 2000-05-17.\" + \(interactive) + \(color-theme-install + '(... + ... + ...))) + \(my-color-theme) + +If you want to use a specific color theme function, you can call the +color theme function in your .emacs directly. + +Example: + + \(require 'color-theme) + \(color-theme-gnome2)" + (interactive) + (message "Pretty printing current color theme function...") + (switch-to-buffer (if buf + buf + (get-buffer-create "*Color Theme*"))) + (unless buf + (setq buffer-read-only nil) + (erase-buffer)) + ;; insert defun + (insert "(eval-when-compile" + " (require 'color-theme))\n") + (color-theme-print-theme 'my-color-theme + (concat "Color theme by " + (if (string= "" user-full-name) + (user-login-name) + user-full-name) + ", created " (format-time-string "%Y-%m-%d") ".") + (color-theme-get-params) + (color-theme-get-vars) + (mapcar 'color-theme-spec (color-theme-get-faces))) + (unless buf + (emacs-lisp-mode)) + (goto-char (point-min)) + (message "Pretty printing current color theme function... done")) + +(defun color-theme-analyze-find-theme (code) + "Find the sexpr that calls `color-theme-install'." + (let (theme) + (while (and (not theme) code) + (when (eq (car code) 'color-theme-install) + (setq theme code)) + (when (listp (car code)) + (setq theme (color-theme-analyze-find-theme (car code)))) + (setq code (cdr code))) + theme)) + +;; (equal (color-theme-analyze-find-theme +;; '(defun color-theme-blue-eshell () +;; "Color theme for eshell faces only." +;; (color-theme-install +;; '(color-theme-blue-eshell +;; nil +;; (eshell-ls-archive-face ((t (:bold t :foreground "IndianRed")))) +;; (eshell-ls-backup-face ((t (:foreground "Grey")))))))) +;; '(color-theme-install +;; (quote +;; (color-theme-blue-eshell +;; nil +;; (eshell-ls-archive-face ((t (:bold t :foreground "IndianRed")))) +;; (eshell-ls-backup-face ((t (:foreground "Grey"))))))))) + +(defun color-theme-analyze-add-face (a b regexp faces) + "If only one of A or B are in FACES, the other is added, and FACES is returned. +If REGEXP is given, this is only done if faces contains a match for regexps." + (when (or (not regexp) + (catch 'found + (dolist (face faces) + (when (string-match regexp (symbol-name (car face))) + (throw 'found t))))) + (let ((face-a (assoc a faces)) + (face-b (assoc b faces))) + (if (and face-a (not face-b)) + (setq faces (cons (list b (nth 1 face-a)) + faces)) + (if (and (not face-a) face-b) + (setq faces (cons (list a (nth 1 face-b)) + faces)))))) + faces) + +;; (equal (color-theme-analyze-add-face +;; 'blue 'violet nil +;; '((blue ((t (:foreground "blue")))) +;; (bold ((t (:bold t)))))) +;; '((violet ((t (:foreground "blue")))) +;; (blue ((t (:foreground "blue")))) +;; (bold ((t (:bold t)))))) +;; (equal (color-theme-analyze-add-face +;; 'violet 'blue nil +;; '((blue ((t (:foreground "blue")))) +;; (bold ((t (:bold t)))))) +;; '((violet ((t (:foreground "blue")))) +;; (blue ((t (:foreground "blue")))) +;; (bold ((t (:bold t)))))) +;; (equal (color-theme-analyze-add-face +;; 'violet 'blue "foo" +;; '((blue ((t (:foreground "blue")))) +;; (bold ((t (:bold t)))))) +;; '((blue ((t (:foreground "blue")))) +;; (bold ((t (:bold t)))))) +;; (equal (color-theme-analyze-add-face +;; 'violet 'blue "blue" +;; '((blue ((t (:foreground "blue")))) +;; (bold ((t (:bold t)))))) +;; '((violet ((t (:foreground "blue")))) +;; (blue ((t (:foreground "blue")))) +;; (bold ((t (:bold t)))))) + +(defun color-theme-analyze-add-faces (faces) + "Add missing faces to FACES and return it." + ;; The most important thing is to add missing faces for the other + ;; editor. These are the most important faces to check. The + ;; following rules list two faces, A and B. If either of the two is + ;; part of the theme, the other must be, too. The optional third + ;; argument specifies a regexp. Only if an existing face name + ;; matches this regexp, is the rule applied. + (let ((rules '((font-lock-builtin-face font-lock-reference-face) + (font-lock-doc-face font-lock-doc-string-face) + (font-lock-constant-face font-lock-preprocessor-face) + ;; In Emacs 21 `modeline' is just an alias for + ;; `mode-line'. I recommend the use of + ;; `modeline' until further notice. + (modeline mode-line) + (modeline modeline-buffer-id) + (modeline modeline-mousable) + (modeline modeline-mousable-minor-mode) + (region primary-selection) + (region zmacs-region) + (font-lock-string-face dired-face-boring "^dired") + (font-lock-function-name-face dired-face-directory "^dired") + (default dired-face-executable "^dired") + (font-lock-warning-face dired-face-flagged "^dired") + (font-lock-warning-face dired-face-marked "^dired") + (default dired-face-permissions "^dired") + (default dired-face-setuid "^dired") + (default dired-face-socket "^dired") + (font-lock-keyword-face dired-face-symlink "^dired") + (tool-bar menu)))) + (dolist (rule rules) + (setq faces (color-theme-analyze-add-face + (nth 0 rule) (nth 1 rule) (nth 2 rule) faces)))) + ;; The `fringe' face defines what the left and right borders of the + ;; frame look like in Emacs 21. To give them default fore- and + ;; background colors, use (fringe ((t (nil)))) in your color theme. + ;; Usually it makes more sense to choose a color slightly lighter or + ;; darker from the default background. + (unless (assoc 'fringe faces) + (setq faces (cons '(fringe ((t (nil)))) faces))) + ;; The tool-bar should not be part of the frame-parameters, since it + ;; should not appear or disappear depending on the color theme. The + ;; apppearance of the toolbar, however, can be changed by the color + ;; theme. For Emacs 21, use the `tool-bar' face. The easiest way + ;; to do this is to give it the default fore- and background colors. + ;; This can be achieved using (tool-bar ((t (nil)))) in the theme. + ;; Usually it makes more sense, however, to provide the same colors + ;; as used in the `menu' face, and to specify a :box attribute. In + ;; order to alleviate potential Emacs/XEmacs incompatibilities, + ;; `toolbar' will be defined as an alias for `tool-bar' if it does + ;; not exist, and vice-versa. This is done eventhough the face + ;; `toolbar' seems to have no effect on XEmacs. If you look at + ;; XEmacs lisp/faces.el, however, you will find that it is in fact + ;; referenced for XPM stuff. + (unless (assoc 'tool-bar faces) + (setq faces (cons '(tool-bar ((t (nil)))) faces))) + ;; Move the default face back to the front, and sort the rest. + (unless (eq (caar faces) 'default) + (let ((face (assoc 'default faces))) + (setq faces (cons face + (sort (delete face faces) + (lambda (a b) + (string-lessp (car a) (car b)))))))) + faces) + +(defun color-theme-analyze-remove-heights (faces) + "Remove :height property where it is an integer and return FACES." + ;; I don't recommend making font sizes part of a color theme. Most + ;; users would be surprised to see their font sizes change when they + ;; install a color-theme. Therefore, remove all :height attributes + ;; if the value is an integer. If the value is a float, this is ok + ;; -- the value is relative to the default height. One notable + ;; exceptions is for a color-theme created for visually impaired + ;; people. These *must* use a larger font in order to be usable. + (let (result) + (dolist (face faces) + (let ((props (cadar (nth 1 face)))) + (if (and (plist-member props :height) + (integerp (plist-get props :height))) + (setq props (color-theme-plist-delete props :height) + result (cons (list (car face) `((t ,props))) + result)) + (setq result (cons face result))))) + (nreverse result))) + +;; (equal (color-theme-analyze-remove-heights +;; '((blue ((t (:foreground "blue" :height 2)))) +;; (bold ((t (:bold t :height 1.0)))))) +;; '((blue ((t (:foreground "blue")))) +;; (bold ((t (:bold t :height 1.0)))))) + +;;;###autoload +(defun color-theme-analyze-defun () + "Once you have a color-theme printed, check for missing faces. +This is used by maintainers who receive a color-theme submission +and want to make sure it follows the guidelines by the color-theme +author." + ;; The support for :foreground and :background attributes works for + ;; Emacs 20 and 21 as well as for XEmacs. :inverse-video is taken + ;; care of while printing color themes. + (interactive) + ;; Parse the stuff and find the call to color-theme-install + (save-excursion + (save-restriction + (narrow-to-defun) + ;; define the function + (eval-defun nil) + (goto-char (point-min)) + (let* ((code (read (current-buffer))) + (theme (color-theme-canonic + (eval + (cadr + (color-theme-analyze-find-theme + code))))) + (func (color-theme-function theme)) + (doc (documentation func t)) + (variables (color-theme-variables theme)) + (faces (color-theme-faces theme)) + (params (color-theme-frame-params theme))) + (setq faces (color-theme-analyze-remove-heights + (color-theme-analyze-add-faces faces))) + ;; Remove any variable bindings of faces that point to their + ;; symbol? Perhaps not, because another theme might want to + ;; change this, so it is important to be able to reset them. + ;; (let (result) + ;; (dolist (var variables) + ;; (unless (eq (car var) (cdr var)) + ;; (setq result (cons var result)))) + ;; (setq variables (nreverse result))) + ;; Now modify the theme directly. + (setq theme (color-theme-analyze-find-theme code)) + (setcdr (cadadr theme) (list params variables faces)) + (message "Pretty printing analysed color theme function...") + (with-current-buffer (get-buffer-create "*Color Theme*") + (setq buffer-read-only nil) + (erase-buffer) + ;; insert defun + (color-theme-print-theme func doc params variables faces) + (emacs-lisp-mode)) + (message "Pretty printing analysed color theme function... done") + (ediff-buffers (current-buffer) + (get-buffer "*Color Theme*")))))) + +;;; Creating a snapshot of the current color theme + +(defun color-theme-snapshot nil) + +;;;###autoload +(defun color-theme-make-snapshot () + "Return the definition of the current color-theme. +The function returned will recreate the color-theme in use at the moment." + (eval `(lambda () + "The color theme in use when the selection buffer was created. +\\[color-theme-select] creates the color theme selection buffer. At the +same time, this snapshot is created as a very simple undo mechanism. +The snapshot is created via `color-theme-snapshot'." + (interactive) + (color-theme-install + '(color-theme-snapshot + ;; alist of frame parameters + ,(color-theme-get-params) + ;; alist of variables + ,(color-theme-get-vars) + ;; remaining elements of snapshot: face specs + ,@(color-theme-get-face-definitions)))))) + + + +;;; Handling the various parts of a color theme install + +(defvar color-theme-frame-param-frobbing-rules + '((foreground-color default foreground) + (background-color default background)) + "List of rules to use when frobbing faces based on frame parameters. +This is only necessary for XEmacs, because in Emacs 21 changing the +frame paramters automatically affects the relevant faces.") + +;; fixme: silent the bytecompiler with set-face-property +(defun color-theme-frob-faces (params) + "Change certain faces according to PARAMS. +This uses `color-theme-frame-param-frobbing-rules'." + (dolist (rule color-theme-frame-param-frobbing-rules) + (let* ((param (nth 0 rule)) + (face (nth 1 rule)) + (prop (nth 2 rule)) + (val (cdr (assq param params))) + (frame (if color-theme-is-global nil (selected-frame)))) + (when val + (set-face-property face prop val frame))))) + +(defun color-theme-alist-reduce (old-list) + "Reduce OLD-LIST. +The resulting list will be newly allocated and will not contain any elements +with duplicate cars. This will speed the installation of new themes by +only installing unique attributes." + (let (new-list) + (dolist (elem old-list) + (when (not (assq (car elem) new-list)) + (setq new-list (cons elem new-list)))) + new-list)) + +(defun color-theme-install-frame-params (params) + "Change frame parameters using alist PARAMETERS. + +If `color-theme-is-global' is non-nil, all frames are modified using +`modify-frame-parameters' and the PARAMETERS are prepended to +`default-frame-alist'. The value of `initial-frame-alist' is not +modified. If `color-theme-is-global' is nil, only the selected frame is +modified. If `color-theme-is-cumulative' is nil, the frame parameters +are restored from `color-theme-original-frame-alist'. + +If the current frame parameters have a parameter `minibuffer' with +value `only', then the frame parameters are not installed, since this +indicates a dedicated minibuffer frame. + +Called from `color-theme-install'." + (setq params (color-theme-filter + params color-theme-legal-frame-parameters)) + ;; We have a new list in params now, therefore we may use + ;; destructive nconc. + (if color-theme-is-global + (let ((frames (frame-list))) + (if (or color-theme-is-cumulative + (null color-theme-original-frame-alist)) + (setq default-frame-alist + (append params (color-theme-alist default-frame-alist)) + minibuffer-frame-alist + (append params (color-theme-alist minibuffer-frame-alist))) + (setq default-frame-alist + (append params color-theme-original-frame-alist) + minibuffer-frame-alist + (append params (color-theme-alist minibuffer-frame-alist)))) + (setq default-frame-alist + (color-theme-alist-reduce default-frame-alist) + minibuffer-frame-alist + (color-theme-alist-reduce minibuffer-frame-alist)) + (dolist (frame frames) + (let ((params (if (eq 'only (cdr (assq 'minibuffer (frame-parameters frame)))) + minibuffer-frame-alist + default-frame-alist))) + (condition-case var + (modify-frame-parameters frame params) + (error (message "Error using params %S: %S" params var)))))) + (condition-case var + (modify-frame-parameters (selected-frame) params) + (error (message "Error using params %S: %S" params var)))) + (when color-theme-xemacs-p + (color-theme-frob-faces params))) + +;; (setq default-frame-alist (cons '(height . 30) default-frame-alist)) + +(defun color-theme-install-variables (vars) + "Change variables using alist VARS. +All variables matching `color-theme-legal-variables' are set. + +If `color-theme-is-global' and `color-theme-xemacs-p' are nil, variables +are made frame-local before setting them. Variables are set using `set' +in either case. This may lead to problems if changing the variable +requires the usage of the function specified with the :set tag in +defcustom declarations. + +Called from `color-theme-install'." + (let ((vars (color-theme-filter vars color-theme-legal-variables))) + (dolist (var vars) + (if (or color-theme-is-global color-theme-xemacs-p) + (set (car var) (cdr var)) + (make-variable-frame-local (car var)) + (modify-frame-parameters (selected-frame) (list var)))))) + +(defun color-theme-install-faces (faces) + "Change faces using FACES. + +Change faces for all frames and create any faces listed in FACES which +don't exist. The modified faces will be marked as \"unchanged from +its standard setting\". This is OK, since the changes made by +installing a color theme should never by saved in .emacs by +customization code. + +FACES should be a list where each entry has the form: + + (FACE SPEC) + +See `defface' for the format of SPEC. + +If `color-theme-is-global' is non-nil, faces are modified on all frames +using `face-spec-set'. If `color-theme-is-global' is nil, faces are +only modified on the selected frame. Non-existing faces are created +using `make-empty-face' in either case. If `color-theme-is-cumulative' +is nil, all faces are reset before installing the new faces. + +Called from `color-theme-install'." + ;; clear all previous faces + (when (not color-theme-is-cumulative) + (color-theme-reset-faces)) + ;; install new faces + (let ((faces (color-theme-filter faces color-theme-illegal-faces t)) + (frame (if color-theme-is-global nil (selected-frame)))) + (dolist (entry faces) + (let ((face (nth 0 entry)) + (spec (nth 1 entry))) + (or (facep face) + (make-empty-face face)) + ;; remove weird properties from the default face only + (when (eq face 'default) + (setq spec (color-theme-spec-filter spec))) + ;; Emacs/XEmacs customization issues: filter out :bold when + ;; the spec contains :weight, etc, such that the spec remains + ;; "valid" for custom. + (setq spec (color-theme-spec-compat spec)) + ;; using a spec of ((t (nil))) to reset a face doesn't work + ;; in Emacs 21, we use the new function face-spec-reset-face + ;; instead + (if (and (functionp 'face-spec-reset-face) + (equal spec '((t (nil))))) + (face-spec-reset-face face frame) + (condition-case var + (progn + (face-spec-set face spec frame) + (if color-theme-is-global + (put face 'face-defface-spec spec))) + (error (message "Error using spec %S: %S" spec var)))))))) + +;; `custom-set-faces' is unusable here because it doesn't allow to set +;; the faces for one frame only. + +;; Emacs `face-spec-set': If FRAME is nil, the face is created and +;; marked as a customized face. This is achieved by setting the +;; `face-defface-spec' property. If we don't, new frames will not be +;; created using the face we installed because `face-spec-set' is +;; broken: If given a FRAME of nil, it will not set the default faces; +;; instead it will walk through all the frames and set modify the faces. +;; If we do set a property (`saved-face' or `face-defface-spec'), +;; `make-frame' will correctly use the faces we defined with our color +;; theme. If we used the property `saved-face', +;; `customize-save-customized' will save all the faces installed as part +;; of a color-theme in .emacs. That's why we use the +;; `face-defface-spec' property. + + + +;;; Theme accessor functions, canonicalization, merging, comparing + +(defun color-theme-canonic (theme) + "Return the canonic form of THEME. +This deals with all the backwards compatibility stuff." + (let (function frame-params variables faces) + (when (functionp (car theme)) + (setq function (car theme) + theme (cdr theme))) + (setq frame-params (car theme) + theme (cdr theme)) + ;; optional variable defintions (for backwards compatibility) + (when (listp (caar theme)) + (setq variables (car theme) + theme (cdr theme))) + ;; face definitions + (setq faces theme) + (list function frame-params variables faces))) + +(defun color-theme-function (theme) + "Return function used to create THEME." + (nth 0 theme)) + +(defun color-theme-frame-params (theme) + "Return frame-parameters defined by THEME." + (nth 1 theme)) + +(defun color-theme-variables (theme) + "Return variables set by THEME." + (nth 2 theme)) + +(defun color-theme-faces (theme) + "Return faces defined by THEME." + (nth 3 theme)) + +(defun color-theme-merge-alists (&rest alists) + "Merges all the alist arguments into one alist. +Only the first instance of every key will be part of the resulting +alist. Membership will be tested using `assq'." + (let (result) + (dolist (l alists) + (dolist (entry l) + (unless (assq (car entry) result) + (setq result (cons entry result))))) + (nreverse result))) +;; (color-theme-merge-alists '((a . 1) (b . 2))) +;; (color-theme-merge-alists '((a . 1) (b . 2) (a . 3))) +;; (color-theme-merge-alists '((a . 1) (b . 2)) '((a . 3))) +;; (color-theme-merge-alists '((a . 1) (b . 2)) '((c . 3))) +;; (color-theme-merge-alists '((a . 1) (b . 2)) '((c . 3) (d . 4))) +;; (color-theme-merge-alists '((a . 1) (b . 2)) '((c . 3) (d . 4) (b . 5))) + +;;;###autoload +(defun color-theme-compare (theme-a theme-b) + "Compare two color themes. +This will print the differences between installing THEME-A and +installing THEME-B. Note that the order is important: If a face is +defined in THEME-A and not in THEME-B, then this will not show up as a +difference, because there is no reset before installing THEME-B. If a +face is defined in THEME-B and not in THEME-A, then this will show up as +a difference." + (interactive + (list + (intern + (completing-read "Theme A: " + (mapcar (lambda (i) (list (symbol-name (car i)))) + color-themes) + (lambda (i) (string-match "color-theme" (car i))))) + (intern + (completing-read "Theme B: " + (mapcar (lambda (i) (list (symbol-name (car i)))) + color-themes) + (lambda (i) (string-match "color-theme" (car i))))))) + ;; install the themes in a new frame and get the definitions + (let ((color-theme-is-global nil)) + (select-frame (make-frame)) + (funcall theme-a) + (setq theme-a (list theme-a + (color-theme-get-params) + (color-theme-get-vars) + (color-theme-get-face-definitions))) + (funcall theme-b) + (setq theme-b (list theme-b + (color-theme-get-params) + (color-theme-get-vars) + (color-theme-get-face-definitions))) + (delete-frame)) + (let ((params (set-difference + (color-theme-frame-params theme-b) + (color-theme-frame-params theme-a) + :test 'equal)) + (vars (set-difference + (color-theme-variables theme-b) + (color-theme-variables theme-a) + :test 'equal)) + (faces (set-difference + (color-theme-faces theme-b) + (color-theme-faces theme-a) + :test 'equal))) + (list 'diff + params + vars + faces))) + + + +;;; Installing a color theme +;;;###autoload +(defun color-theme-install (theme) + "Install a color theme defined by frame parameters, variables and faces. + +The theme is installed for all present and future frames; any missing +faces are created. See `color-theme-install-faces'. + +THEME is a color theme definition. See below for more information. + +If you want to install a color theme from your .emacs, use the output +generated by `color-theme-print'. This produces color theme function +which you can copy to your .emacs. + +A color theme definition is a list: +\([FUNCTION] FRAME-PARAMETERS VARIABLE-SETTINGS FACE-DEFINITIONS) + +FUNCTION is the color theme function which called `color-theme-install'. +This is no longer used. There was a time when this package supported +automatic factoring of color themes. This has been abandoned. + +FRAME-PARAMETERS is an alist of frame parameters. These are installed +with `color-theme-install-frame-params'. These are installed last such +that any changes to the default face can be changed by the frame +parameters. + +VARIABLE-DEFINITIONS is an alist of variable settings. These are +installed with `color-theme-install-variables'. + +FACE-DEFINITIONS is an alist of face definitions. These are installed +with `color-theme-install-faces'. + +If `color-theme-is-cumulative' is nil, a color theme will undo face and +frame-parameter settings of previous color themes." + (setq theme (color-theme-canonic theme)) + (color-theme-install-variables (color-theme-variables theme)) + (color-theme-install-faces (color-theme-faces theme)) + ;; frame parameters override faces + (color-theme-install-frame-params (color-theme-frame-params theme)) + (when color-theme-history-max-length + (color-theme-add-to-history + (car theme)))) + + + +;; Sharing your stuff +;;;###autoload +(defun color-theme-submit () + "Submit your color-theme to the maintainer." + (interactive) + (require 'reporter) + (let ((reporter-eval-buffer (current-buffer)) + final-resting-place + after-sep-pos + (reporter-status-message "Formatting buffer...") + (reporter-status-count 0) + (problem "Yet another color-theme") + (agent (reporter-compose-outgoing)) + (mailbuf (current-buffer)) + hookvar) + ;; do the work + (require 'sendmail) + ;; If mailbuf did not get made visible before, make it visible now. + (let (same-window-buffer-names same-window-regexps) + (pop-to-buffer mailbuf) + ;; Just in case the original buffer is not visible now, bring it + ;; back somewhere + (and pop-up-windows (display-buffer reporter-eval-buffer))) + (goto-char (point-min)) + (mail-position-on-field "to") + (insert color-theme-maintainer-address) + (mail-position-on-field "subject") + (insert problem) + ;; move point to the body of the message + (mail-text) + (setq after-sep-pos (point)) + (unwind-protect + (progn + (setq final-resting-place (point-marker)) + (goto-char final-resting-place)) + (color-theme-print (current-buffer)) + (goto-char final-resting-place) + (insert "\n\n") + (goto-char final-resting-place) + (insert "Hello there!\n\nHere's my color theme named: ") + (set-marker final-resting-place nil)) + ;; compose the minibuf message and display this. + (let* ((sendkey-whereis (where-is-internal + (get agent 'sendfunc) nil t)) + (abortkey-whereis (where-is-internal + (get agent 'abortfunc) nil t)) + (sendkey (if sendkey-whereis + (key-description sendkey-whereis) + "C-c C-c")); TBD: BOGUS hardcode + (abortkey (if abortkey-whereis + (key-description abortkey-whereis) + "M-x kill-buffer"))); TBD: BOGUS hardcode + (message "Enter a message and type %s to send or %s to abort." + sendkey abortkey)))) + + + +;; Use this to define themes +(defmacro define-color-theme (name author description &rest forms) + (let ((n name)) + `(progn + (add-to-list 'color-themes + (list ',n + (upcase-initials + (replace-in-string + (replace-in-string + (symbol-name ',n) "^color-theme-" "") "-" " ")) + ,author)) + (defun ,n () + ,description + (interactive) + ,@forms)))) + + +;;; FIXME: is this useful ?? +;;;###autoload +(defun color-theme-initialize () + "Initialize the color theme package by loading color-theme-libraries." + (interactive) + + (cond ((and (not color-theme-load-all-themes) + color-theme-directory) + (setq color-theme-libraries + (directory-files color-theme-directory t "^color-theme"))) + (color-theme-directory + (push (cdr (directory-files color-theme-directory t "^color-theme")) + color-theme-libraries))) + (dolist (library color-theme-libraries) + (load library))) + +(when nil + (setq color-theme-directory "themes/" + color-theme-load-all-themes nil) + (color-theme-initialize) +) +;; TODO: I don't like all those function names cluttering up my namespace. +;; Instead, a hashtable for the color-themes should be created. Now that +;; define-color-theme is around, it should be easy to change in just the +;; one place. + + +(provide 'color-theme) + +;;; color-theme.el ends here diff -r 000000000000 -r 2764b4f45f9f .emacs.d/color-theme-6.6.0/color-theme.elc Binary file .emacs.d/color-theme-6.6.0/color-theme.elc has changed diff -r 000000000000 -r 2764b4f45f9f .emacs.d/color-theme-6.6.0/configure-stamp diff -r 000000000000 -r 2764b4f45f9f .emacs.d/color-theme-6.6.0/themes/color-theme-example.el --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/color-theme-6.6.0/themes/color-theme-example.el Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,22 @@ +(eval-when-compile + (require 'color-theme)) + +(defun color-theme-example () + "Example theme. Carbon copy of color-theme-gnome contributed by Jonadab." + (interactive) + (color-theme-install + '(color-theme-example + ((foreground-color . "wheat") + (background-color . "darkslategrey") + (background-mode . dark)) + (default ((t (nil)))) + (region ((t (:foreground "cyan" :background "dark cyan")))) + (underline ((t (:foreground "yellow" :underline t)))) + (modeline ((t (:foreground "dark cyan" :background "wheat")))) + (modeline-buffer-id ((t (:foreground "dark cyan" :background "wheat")))) + (modeline-mousable ((t (:foreground "dark cyan" :background "wheat")))) + (modeline-mousable-minor-mode ((t (:foreground "dark cyan" :background "wheat")))) + (italic ((t (:foreground "dark red" :italic t)))) + (bold-italic ((t (:foreground "dark red" :bold t :italic t)))) + (font-lock-comment-face ((t (:foreground "Firebrick")))) + (bold ((t (:bold))))))) diff -r 000000000000 -r 2764b4f45f9f .emacs.d/color-theme-6.6.0/themes/color-theme-library.el --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/color-theme-6.6.0/themes/color-theme-library.el Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,13539 @@ +;;; color-theme-library.el --- The real color theme functions + +;; Copyright (C) 2005, 2006 Xavier Maillard +;; Copyright (C) 2005, 2006 Brian Palmer + +;; Version: 0.0.9 +;; Keywords: faces +;; Author: Brian Palmer, Xavier Maillard +;; Maintainer: Xavier Maillard +;; URL: http://www.emacswiki.org/cgi-bin/wiki.pl?ColorTheme + +;; This file is not (YET) part of GNU Emacs. + +;; This is free software; you can redistribute it and/or modify it under +;; the terms of the GNU General Public License as published by the Free +;; Software Foundation; either version 2, or (at your option) any later +;; version. +;; +;; This is distributed in the hope that it will be useful, but WITHOUT +;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +;; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +;; for more details. +;; +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +;; MA 02111-1307, USA. + +;; Code: +(eval-when-compile + (require 'color-theme)) + +(defun color-theme-gnome () + "Wheat on darkslategrey scheme. +From one version of Emacs in RH6 and Gnome, modified by Jonadab." + (interactive) + (color-theme-install + '(color-theme-gnome + ((foreground-color . "wheat") + (background-color . "darkslategrey") + (background-mode . dark)) + (default ((t (nil)))) + (region ((t (:foreground "cyan" :background "dark cyan")))) + (underline ((t (:foreground "yellow" :underline t)))) + (modeline ((t (:foreground "dark cyan" :background "wheat")))) + (modeline-buffer-id ((t (:foreground "dark cyan" :background "wheat")))) + (modeline-mousable ((t (:foreground "dark cyan" :background "wheat")))) + (modeline-mousable-minor-mode ((t (:foreground "dark cyan" :background "wheat")))) + (italic ((t (:foreground "dark red" :italic t)))) + (bold-italic ((t (:foreground "dark red" :bold t :italic t)))) + (font-lock-comment-face ((t (:foreground "Firebrick")))) + (bold ((t (:bold))))))) + +(defun color-theme-blue-gnus () + "Color theme for gnus and message faces only. +This is intended for other color themes to use (eg. `color-theme-gnome2' +and `color-theme-blue-sea')." + (interactive) + (color-theme-install + '(color-theme-blue-gnus + nil + (gnus-cite-attribution-face ((t (:lforeground "lemon chiffon" :bold t)))) + (gnus-cite-face-1 ((t (:foreground "LightSalmon")))) + (gnus-cite-face-2 ((t (:foreground "Khaki")))) + (gnus-cite-face-3 ((t (:foreground "Coral")))) + (gnus-cite-face-4 ((t (:foreground "yellow green")))) + (gnus-cite-face-5 ((t (:foreground "dark khaki")))) + (gnus-cite-face-6 ((t (:foreground "bisque")))) + (gnus-cite-face-7 ((t (:foreground "peru")))) + (gnus-cite-face-8 ((t (:foreground "light coral")))) + (gnus-cite-face-9 ((t (:foreground "plum")))) + (gnus-emphasis-bold ((t (:bold t)))) + (gnus-emphasis-bold-italic ((t (:italic t :bold t)))) + (gnus-emphasis-highlight-words ((t (:background "black" :foreground "yellow")))) + (gnus-emphasis-italic ((t (:italic t)))) + (gnus-emphasis-underline ((t (:underline t)))) + (gnus-emphasis-underline-bold ((t (:bold t :underline t)))) + (gnus-emphasis-underline-bold-italic ((t (:italic t :bold t :underline t)))) + (gnus-emphasis-underline-italic ((t (:italic t :underline t)))) + (gnus-group-mail-1-empty-face ((t (:foreground "White")))) + (gnus-group-mail-1-face ((t (:bold t :foreground "White")))) + (gnus-group-mail-2-empty-face ((t (:foreground "light cyan")))) + (gnus-group-mail-2-face ((t (:bold t :foreground "light cyan")))) + (gnus-group-mail-3-empty-face ((t (:foreground "LightBlue")))) + (gnus-group-mail-3-face ((t (:bold t :foreground "LightBlue")))) + (gnus-group-mail-low-empty-face ((t (:foreground "Aquamarine")))) + (gnus-group-mail-low-face ((t (:bold t :foreground "Aquamarine")))) + (gnus-group-news-1-empty-face ((t (:foreground "White")))) + (gnus-group-news-1-face ((t (:bold t :foreground "White")))) + (gnus-group-news-2-empty-face ((t (:foreground "light cyan")))) + (gnus-group-news-2-face ((t (:bold t :foreground "light cyan")))) + (gnus-group-news-3-empty-face ((t (:foreground "LightBlue")))) + (gnus-group-news-3-face ((t (:bold t :foreground "LightBlue")))) + (gnus-group-news-4-empty-face ((t (:foreground "Aquamarine")))) + (gnus-group-news-4-face ((t (:bold t :foreground "Aquamarine")))) + (gnus-group-news-5-empty-face ((t (:foreground "MediumAquamarine")))) + (gnus-group-news-5-face ((t (:bold t :foreground "MediumAquamarine")))) + (gnus-group-news-6-empty-face ((t (:foreground "MediumAquamarine")))) + (gnus-group-news-6-face ((t (:bold t :foreground "MediumAquamarine")))) + (gnus-group-news-low-empty-face ((t (:foreground "MediumAquamarine")))) + (gnus-group-news-low-face ((t (:bold t :foreground "MediumAquamarine")))) + (gnus-header-content-face ((t (:foreground "LightSkyBlue3")))) + (gnus-header-from-face ((t (:bold t :foreground "light cyan")))) + (gnus-header-name-face ((t (:bold t :foreground "LightBlue")))) + (gnus-header-newsgroups-face ((t (:bold t :foreground "MediumAquamarine")))) + (gnus-header-subject-face ((t (:bold t :foreground "light cyan")))) + (gnus-signature-face ((t (:foreground "Grey")))) + (gnus-splash-face ((t (:foreground "ForestGreen")))) + (gnus-summary-cancelled-face ((t (:background "Black" :foreground "Yellow")))) + (gnus-summary-high-ancient-face ((t (:bold t :foreground "MediumAquamarine")))) + (gnus-summary-high-read-face ((t (:bold t :foreground "Aquamarine")))) + (gnus-summary-high-ticked-face ((t (:bold t :foreground "LightSalmon")))) + (gnus-summary-high-unread-face ((t (:bold t :foreground "beige")))) + (gnus-summary-low-ancient-face ((t (:foreground "DimGray")))) + (gnus-summary-low-read-face ((t (:foreground "slate gray")))) + (gnus-summary-low-ticked-face ((t (:foreground "Pink")))) + (gnus-summary-low-unread-face ((t (:foreground "LightGray")))) + (gnus-summary-normal-ancient-face ((t (:foreground "MediumAquamarine")))) + (gnus-summary-normal-read-face ((t (:foreground "Aquamarine")))) + (gnus-summary-normal-ticked-face ((t (:foreground "LightSalmon")))) + (gnus-summary-normal-unread-face ((t (nil)))) + (gnus-summary-selected-face ((t (:background "DarkSlateBlue")))) + (message-cited-text-face ((t (:foreground "LightSalmon")))) + (message-header-cc-face ((t (:foreground "light cyan")))) + (message-header-name-face ((t (:foreground "LightBlue")))) + (message-header-newsgroups-face ((t (:bold t :foreground "MediumAquamarine")))) + (message-header-other-face ((t (:foreground "MediumAquamarine")))) + (message-header-subject-face ((t (:bold t :foreground "light cyan")))) + (message-header-to-face ((t (:bold t :foreground "light cyan")))) + (message-header-xheader-face ((t (:foreground "MediumAquamarine")))) + (message-separator-face ((t (:foreground "chocolate"))))))) + +(defun color-theme-dark-gnus () + "Color theme for gnus and message faces only. +This is intended for other color themes to use +\(eg. `color-theme-late-night')." + (interactive) + (color-theme-install + '(color-theme-blue-gnus + nil + (gnus-cite-attribution-face ((t (:foreground "#bbb")))) + (gnus-cite-face-1 ((t (:foreground "#aaa")))) + (gnus-cite-face-2 ((t (:foreground "#aaa")))) + (gnus-cite-face-3 ((t (:foreground "#aaa")))) + (gnus-cite-face-4 ((t (:foreground "#aaa")))) + (gnus-cite-face-5 ((t (:foreground "#aaa")))) + (gnus-cite-face-6 ((t (:foreground "#aaa")))) + (gnus-cite-face-7 ((t (:foreground "#aaa")))) + (gnus-cite-face-8 ((t (:foreground "#aaa")))) + (gnus-cite-face-9 ((t (:foreground "#aaa")))) + (gnus-emphasis-bold ((t (:bold t)))) + (gnus-emphasis-bold-italic ((t (:italic t :bold t)))) + (gnus-emphasis-highlight-words ((t (:foreground "#ccc")))) + (gnus-emphasis-italic ((t (:italic t)))) + (gnus-emphasis-underline ((t (:underline t)))) + (gnus-emphasis-underline-bold ((t (:bold t :underline t)))) + (gnus-emphasis-underline-bold-italic ((t (:italic t :bold t :underline t)))) + (gnus-emphasis-underline-italic ((t (:italic t :underline t)))) + (gnus-group-mail-1-empty-face ((t (:foreground "#999")))) + (gnus-group-mail-1-face ((t (:bold t :foreground "#999")))) + (gnus-group-mail-2-empty-face ((t (:foreground "#999")))) + (gnus-group-mail-2-face ((t (:bold t :foreground "#999")))) + (gnus-group-mail-3-empty-face ((t (:foreground "#888")))) + (gnus-group-mail-3-face ((t (:bold t :foreground "#888")))) + (gnus-group-mail-low-empty-face ((t (:foreground "#777")))) + (gnus-group-mail-low-face ((t (:bold t :foreground "#777")))) + (gnus-group-news-1-empty-face ((t (:foreground "#999")))) + (gnus-group-news-1-face ((t (:bold t :foreground "#999")))) + (gnus-group-news-2-empty-face ((t (:foreground "#888")))) + (gnus-group-news-2-face ((t (:bold t :foreground "#888")))) + (gnus-group-news-3-empty-face ((t (:foreground "#777")))) + (gnus-group-news-3-face ((t (:bold t :foreground "#777")))) + (gnus-group-news-4-empty-face ((t (:foreground "#666")))) + (gnus-group-news-4-face ((t (:bold t :foreground "#666")))) + (gnus-group-news-5-empty-face ((t (:foreground "#666")))) + (gnus-group-news-5-face ((t (:bold t :foreground "#666")))) + (gnus-group-news-6-empty-face ((t (:foreground "#666")))) + (gnus-group-news-6-face ((t (:bold t :foreground "#666")))) + (gnus-group-news-low-empty-face ((t (:foreground "#666")))) + (gnus-group-news-low-face ((t (:bold t :foreground "#666")))) + (gnus-header-content-face ((t (:foreground "#888")))) + (gnus-header-from-face ((t (:bold t :foreground "#888")))) + (gnus-header-name-face ((t (:bold t :foreground "#777")))) + (gnus-header-newsgroups-face ((t (:bold t :foreground "#777")))) + (gnus-header-subject-face ((t (:bold t :foreground "#999")))) + (gnus-signature-face ((t (:foreground "#444")))) + (gnus-splash-face ((t (:foreground "#ccc")))) + (gnus-summary-cancelled-face ((t (:background "#555" :foreground "#000")))) + (gnus-summary-high-ancient-face ((t (:bold t :foreground "#555")))) + (gnus-summary-high-read-face ((t (:bold t :foreground "#666")))) + (gnus-summary-high-ticked-face ((t (:bold t :foreground "#777")))) + (gnus-summary-high-unread-face ((t (:bold t :foreground "#888")))) + (gnus-summary-low-ancient-face ((t (:foreground "#444")))) + (gnus-summary-low-read-face ((t (:foreground "#555")))) + (gnus-summary-low-ticked-face ((t (:foreground "#666")))) + (gnus-summary-low-unread-face ((t (:foreground "#777")))) + (gnus-summary-normal-ancient-face ((t (:foreground "#555")))) + (gnus-summary-normal-read-face ((t (:foreground "#666")))) + (gnus-summary-normal-ticked-face ((t (:foreground "#777")))) + (gnus-summary-normal-unread-face ((t (:foreground "#888")))) + (gnus-summary-selected-face ((t (:background "#333")))) + (message-cited-text-face ((t (:foreground "#aaa")))) + (message-header-cc-face ((t (:foreground "#888")))) + (message-header-name-face ((t (:bold t :foreground "#777")))) + (message-header-newsgroups-face ((t (:bold t :foreground "#777")))) + (message-header-other-face ((t (:foreground "#666")))) + (message-header-subject-face ((t (:bold t :foreground "#999")))) + (message-header-to-face ((t (:bold t :foreground "#777")))) + (message-header-xheader-face ((t (:foreground "#666")))) + (message-separator-face ((t (:foreground "#999"))))))) + +(defun color-theme-blue-eshell () + "Color theme for eshell faces only. +This is intended for other color themes to use (eg. `color-theme-gnome2')." + (interactive) + (color-theme-install + '(color-theme-blue-eshell + nil + (eshell-ls-archive-face ((t (:bold t :foreground "IndianRed")))) + (eshell-ls-backup-face ((t (:foreground "Grey")))) + (eshell-ls-clutter-face ((t (:foreground "DimGray")))) + (eshell-ls-directory-face ((t (:bold t :foreground "MediumSlateBlue")))) + (eshell-ls-executable-face ((t (:foreground "Coral")))) + (eshell-ls-missing-face ((t (:foreground "black")))) + (eshell-ls-picture-face ((t (:foreground "Violet")))) ; non-standard face + (eshell-ls-product-face ((t (:foreground "LightSalmon")))) + (eshell-ls-readonly-face ((t (:foreground "Aquamarine")))) + (eshell-ls-special-face ((t (:foreground "Gold")))) + (eshell-ls-symlink-face ((t (:foreground "White")))) + (eshell-ls-text-face ((t (:foreground "medium aquamarine")))) ; non-standard face + (eshell-ls-todo-face ((t (:bold t :foreground "aquamarine")))) ; non-standard face + (eshell-ls-unreadable-face ((t (:foreground "DimGray")))) + (eshell-prompt-face ((t (:foreground "powder blue"))))))) + +(defun color-theme-salmon-font-lock () + "Color theme for font-lock faces only. +This is intended for other color themes to use (eg. `color-theme-gnome2')." + (interactive) + (color-theme-install + '(color-theme-salmon-font-lock + nil + (font-lock-builtin-face ((t (:bold t :foreground "PaleGreen")))) + (font-lock-comment-face ((t (:foreground "LightBlue")))) + (font-lock-constant-face ((t (:foreground "Aquamarine")))) + (font-lock-doc-string-face ((t (:foreground "LightSalmon")))) + (font-lock-function-name-face ((t (:bold t :foreground "Aquamarine")))) + (font-lock-keyword-face ((t (:foreground "Salmon")))) + (font-lock-preprocessor-face ((t (:foreground "Salmon")))) + (font-lock-reference-face ((t (:foreground "pale green")))) + (font-lock-string-face ((t (:foreground "LightSalmon")))) + (font-lock-type-face ((t (:bold t :foreground "YellowGreen")))) + (font-lock-variable-name-face ((t (:bold t :foreground "Aquamarine")))) + (font-lock-warning-face ((t (:bold t :foreground "red"))))))) + +(defun color-theme-dark-font-lock () + "Color theme for font-lock faces only. +This is intended for other color themes to use (eg. `color-theme-late-night')." + (interactive) + (color-theme-install + '(color-theme-dark-font-lock + nil + (font-lock-builtin-face ((t (:bold t :foreground "#777")))) + (font-lock-comment-face ((t (:foreground "#555")))) + (font-lock-constant-face ((t (:foreground "#777")))) + (font-lock-doc-string-face ((t (:foreground "#777")))) + (font-lock-doc-face ((t (:foreground "#777")))) + (font-lock-function-name-face ((t (:bold t :foreground "#777")))) + (font-lock-keyword-face ((t (:foreground "#777")))) + (font-lock-preprocessor-face ((t (:foreground "#777")))) + (font-lock-reference-face ((t (:foreground "#777")))) + (font-lock-string-face ((t (:foreground "#777")))) + (font-lock-type-face ((t (:bold t)))) + (font-lock-variable-name-face ((t (:bold t :foreground "#888")))) + (font-lock-warning-face ((t (:bold t :foreground "#999"))))))) + +(defun color-theme-dark-info () + "Color theme for info, help and apropos faces. +This is intended for other color themes to use (eg. `color-theme-late-night')." + (interactive) + (color-theme-install + '(color-theme-dark-info + nil + (info-header-node ((t (:foreground "#666")))) + (info-header-xref ((t (:foreground "#666")))) + (info-menu-5 ((t (:underline t)))) + (info-menu-header ((t (:bold t :foreground "#666")))) + (info-node ((t (:bold t :foreground "#888")))) + (info-xref ((t (:bold t :foreground "#777"))))))) + +(defun color-theme-gnome2 () + "Wheat on darkslategrey scheme. +`color-theme-gnome' started it all. + +This theme supports standard faces, font-lock, eshell, info, message, +gnus, custom, widget, woman, diary, cperl, bbdb, and erc. This theme +includes faces for Emacs and XEmacs. + +The theme does not support w3 faces because w3 faces can be controlled +by your default style sheet. + +This is what you should put in your .Xdefaults file, if you want to +change the colors of the menus in Emacs 20 as well: + +emacs*Background: DarkSlateGray +emacs*Foreground: Wheat" + (interactive) + (color-theme-blue-gnus) + (let ((color-theme-is-cumulative t)) + (color-theme-blue-erc) + (color-theme-blue-eshell) + (color-theme-salmon-font-lock) + (color-theme-salmon-diff) + (color-theme-install + '(color-theme-gnome2 + ((foreground-color . "wheat") + (background-color . "darkslategrey") + (mouse-color . "Grey") + (cursor-color . "LightGray") + (border-color . "black") + (background-mode . dark)) + ((apropos-keybinding-face . underline) + (apropos-label-face . italic) + (apropos-match-face . secondary-selection) + (apropos-property-face . bold-italic) + (apropos-symbol-face . info-xref) + (goto-address-mail-face . message-header-to-face) + (goto-address-mail-mouse-face . secondary-selection) + (goto-address-url-face . info-xref) + (goto-address-url-mouse-face . highlight) + (list-matching-lines-face . bold) + (view-highlight-face . highlight)) + (default ((t (nil)))) + (bbdb-company ((t (:foreground "pale green")))) + (bbdb-name ((t (:bold t :foreground "pale green")))) + (bbdb-field-name ((t (:foreground "medium sea green")))) + (bbdb-field-value ((t (:foreground "dark sea green")))) + (bold ((t (:bold t)))) + (bold-italic ((t (:italic t :bold t :foreground "beige")))) + (calendar-today-face ((t (:underline t)))) + (comint-highlight-prompt ((t (:foreground "medium aquamarine")))) + (cperl-array-face ((t (:foreground "Yellow")))) + (cperl-hash-face ((t (:foreground "White")))) + (cperl-nonoverridable-face ((t (:foreground "SkyBlue")))) + (custom-button-face ((t (:underline t :foreground "MediumSlateBlue")))) + (custom-documentation-face ((t (:foreground "Grey")))) + (custom-group-tag-face ((t (:foreground "MediumAquamarine")))) + (custom-state-face ((t (:foreground "LightSalmon")))) + (custom-variable-tag-face ((t (:foreground "Aquamarine")))) + (diary-face ((t (:foreground "IndianRed")))) + (dired-face-directory ((t (:bold t :foreground "sky blue")))) + (dired-face-permissions ((t (:foreground "aquamarine")))) + (dired-face-flagged ((t (:foreground "tomato")))) + (dired-face-marked ((t (:foreground "light salmon")))) + (dired-face-executable ((t (:foreground "green yellow")))) + (fringe ((t (:background "darkslategrey")))) + (highlight ((t (:background "PaleGreen" :foreground "DarkGreen")))) + (highline-face ((t (:background "SeaGreen")))) + (holiday-face ((t (:background "DimGray")))) + (hyper-apropos-hyperlink ((t (:bold t :foreground "DodgerBlue1")))) + (hyper-apropos-documentation ((t (:foreground "LightSalmon")))) + (info-header-xref ((t (:foreground "DodgerBlue1" :bold t)))) + (info-menu-5 ((t (:underline t)))) + (info-node ((t (:underline t :bold t :foreground "DodgerBlue1")))) + (info-xref ((t (:bold t :foreground "DodgerBlue1")))) + (isearch ((t (:background "sea green")))) + (italic ((t (:italic t)))) + (menu ((t (:foreground "wheat" :background "darkslategrey")))) + (modeline ((t (:background "dark olive green" :foreground "wheat")))) + (modeline-buffer-id ((t (:background "dark olive green" :foreground "beige")))) + (modeline-mousable ((t (:background "dark olive green" :foreground "yellow green")))) + (modeline-mousable-minor-mode ((t (:background "dark olive green" :foreground "wheat")))) + (region ((t (:background "dark cyan" :foreground "cyan")))) + (secondary-selection ((t (:background "Aquamarine" :foreground "SlateBlue")))) + (show-paren-match-face ((t (:bold t :background "Aquamarine" :foreground "steel blue")))) + (show-paren-mismatch-face ((t (:background "Red" :foreground "White")))) + (underline ((t (:underline t)))) + (widget-field-face ((t (:foreground "LightBlue")))) + (widget-inactive-face ((t (:foreground "DimGray")))) + (widget-single-line-field-face ((t (:foreground "LightBlue")))) + (w3m-anchor-face ((t (:bold t :foreground "DodgerBlue1")))) + (w3m-arrived-anchor-face ((t (:bold t :foreground "DodgerBlue3")))) + (w3m-header-line-location-title-face ((t (:foreground "beige" :background "dark olive green")))) + (w3m-header-line-location-content-face ((t (:foreground "wheat" :background "dark olive green")))) + (woman-bold-face ((t (:bold t)))) + (woman-italic-face ((t (:foreground "beige")))) + (woman-unknown-face ((t (:foreground "LightSalmon")))) + (zmacs-region ((t (:background "dark cyan" :foreground "cyan")))))))) + +(defun color-theme-simple-1 () + "Black background. +Doesn't mess with most faces, but does turn on dark background mode." + (interactive) + (color-theme-install + '(color-theme-simple-1 + ((foreground-color . "white") + (background-color . "black") + (cursor-color . "indian red") + (background-mode . dark)) + (default ((t (nil)))) + (modeline ((t (:foreground "black" :background "white")))) + (modeline-buffer-id ((t (:foreground "black" :background "white")))) + (modeline-mousable ((t (:foreground "black" :background "white")))) + (modeline-mousable-minor-mode ((t (:foreground "black" :background "white")))) + (underline ((t (:underline t)))) + (region ((t (:background "grey"))))))) + +(defun color-theme-jonadabian () + "Dark blue background. +Supports standard faces, font-lock, highlight-changes, widget and +custom." + (interactive) + (color-theme-install + '(color-theme-jonadabian + ((foreground-color . "#CCBB77") + (cursor-color . "medium turquoise") + (background-color . "#000055") + (background-mode . dark)) + (default ((t (nil)))) + (modeline ((t (:foreground "cyan" :background "#007080")))) + (modeline-buffer-id ((t (:foreground "cyan" :background "#007080")))) + (modeline-mousable ((t (:foreground "cyan" :background "#007080")))) + (modeline-mousable-minor-mode ((t (:foreground "cyan" :background "#007080")))) + (underline ((t (:underline t)))) + (region ((t (:background "#004080")))) + (font-lock-keyword-face ((t (:foreground "#00BBBB")))) + (font-lock-comment-face ((t (:foreground "grey50" :bold t :italic t)))) + (font-lock-string-face ((t (:foreground "#10D010")))) + (font-lock-constant-face ((t (:foreground "indian red")))) + (highlight-changes-face ((t (:background "navy")))) + (highlight-changes-delete-face ((t (:foreground "red" :background "navy")))) + (widget-field-face ((t (:foreground "black" :background "grey35")))) + (widget-inactive-face ((t (:foreground "gray")))) + (custom-button-face ((t (:foreground "yellow" :background "dark blue")))) + (custom-state-face ((t (:foreground "mediumaquamarine")))) + (custom-face-tag-face ((t (:foreground "goldenrod" :underline t)))) + (custom-documentation-face ((t (:foreground "#10D010")))) + (custom-set-face ((t (:foreground "#2020D0"))))))) + +(defun color-theme-ryerson () + "White on midnightblue scheme. +Used at Ryerson Polytechnic University in the Electronic Engineering department." + (interactive) + (color-theme-install + '(color-theme-ryerson + ((foreground-color . "white") + (background-color . "midnightblue") + (cursor-color . "red") + (background-mode . dark)) + (default ((t (nil)))) + (modeline ((t (:foreground "black" :background "slategray3")))) + (modeline-buffer-id ((t (:foreground "black" :background "slategray3")))) + (modeline-mousable ((t (:foreground "black" :background "slategray3")))) + (modeline-mousable-minor-mode ((t (:foreground "black" :background "slategray3")))) + (underline ((t (:underline t)))) + (region ((t (:foreground "black" :background "slategray3"))))))) + +(defun color-theme-wheat () + "Default colors on a wheat background. +Calls the standard color theme function `color-theme-standard' in order +to reset all faces." + (interactive) + (color-theme-standard) + (let ((color-theme-is-cumulative t)) + (color-theme-install + '(color-theme-wheat + ((background-color . "Wheat")))))) + +(defun color-theme-standard () + "Emacs default colors. +If you are missing standard faces in this theme, please notify the maintainer." + (interactive) + ;; Note that some of the things that make up a color theme are + ;; actually variable settings! + (color-theme-install + '(color-theme-standard + ((foreground-color . "black") + (background-color . "white") + (mouse-color . "black") + (cursor-color . "black") + (border-color . "black") + (background-mode . light)) + ((Man-overstrike-face . bold) + (Man-underline-face . underline) + (apropos-keybinding-face . underline) + (apropos-label-face . italic) + (apropos-match-face . secondary-selection) + (apropos-property-face . bold-italic) + (apropos-symbol-face . bold) + (goto-address-mail-face . italic) + (goto-address-mail-mouse-face . secondary-selection) + (goto-address-url-face . bold) + (goto-address-url-mouse-face . highlight) + (help-highlight-face . underline) + (list-matching-lines-face . bold) + (view-highlight-face . highlight)) + (default ((t (nil)))) + (bold ((t (:bold t)))) + (bold-italic ((t (:bold t :italic t)))) + (calendar-today-face ((t (:underline t)))) + (cperl-array-face ((t (:foreground "Blue" :background "lightyellow2" :bold t)))) + (cperl-hash-face ((t (:foreground "Red" :background "lightyellow2" :bold t :italic t)))) + (cperl-nonoverridable-face ((t (:foreground "chartreuse3")))) + (custom-button-face ((t (nil)))) + (custom-changed-face ((t (:foreground "white" :background "blue")))) + (custom-documentation-face ((t (nil)))) + (custom-face-tag-face ((t (:underline t)))) + (custom-group-tag-face ((t (:foreground "blue" :underline t)))) + (custom-group-tag-face-1 ((t (:foreground "red" :underline t)))) + (custom-invalid-face ((t (:foreground "yellow" :background "red")))) + (custom-modified-face ((t (:foreground "white" :background "blue")))) + (custom-rogue-face ((t (:foreground "pink" :background "black")))) + (custom-saved-face ((t (:underline t)))) + (custom-set-face ((t (:foreground "blue" :background "white")))) + (custom-state-face ((t (:foreground "dark green")))) + (custom-variable-button-face ((t (:bold t :underline t)))) + (custom-variable-tag-face ((t (:foreground "blue" :underline t)))) + (diary-face ((t (:foreground "red")))) + (ediff-current-diff-face-A ((t (:foreground "firebrick" :background "pale green")))) + (ediff-current-diff-face-Ancestor ((t (:foreground "Black" :background "VioletRed")))) + (ediff-current-diff-face-B ((t (:foreground "DarkOrchid" :background "Yellow")))) + (ediff-current-diff-face-C ((t (:foreground "Navy" :background "Pink")))) + (ediff-even-diff-face-A ((t (:foreground "Black" :background "light grey")))) + (ediff-even-diff-face-Ancestor ((t (:foreground "White" :background "Grey")))) + (ediff-even-diff-face-B ((t (:foreground "White" :background "Grey")))) + (ediff-even-diff-face-C ((t (:foreground "Black" :background "light grey")))) + (ediff-fine-diff-face-A ((t (:foreground "Navy" :background "sky blue")))) + (ediff-fine-diff-face-Ancestor ((t (:foreground "Black" :background "Green")))) + (ediff-fine-diff-face-B ((t (:foreground "Black" :background "cyan")))) + (ediff-fine-diff-face-C ((t (:foreground "Black" :background "Turquoise")))) + (ediff-odd-diff-face-A ((t (:foreground "White" :background "Grey")))) + (ediff-odd-diff-face-Ancestor ((t (:foreground "Black" :background "light grey")))) + (ediff-odd-diff-face-B ((t (:foreground "Black" :background "light grey")))) + (ediff-odd-diff-face-C ((t (:foreground "White" :background "Grey")))) + (eshell-ls-archive-face ((t (:foreground "Orchid" :bold t)))) + (eshell-ls-backup-face ((t (:foreground "OrangeRed")))) + (eshell-ls-clutter-face ((t (:foreground "OrangeRed" :bold t)))) + (eshell-ls-directory-face ((t (:foreground "Blue" :bold t)))) + (eshell-ls-executable-face ((t (:foreground "ForestGreen" :bold t)))) + (eshell-ls-missing-face ((t (:foreground "Red" :bold t)))) + (eshell-ls-product-face ((t (:foreground "OrangeRed")))) + (eshell-ls-readonly-face ((t (:foreground "Brown")))) + (eshell-ls-special-face ((t (:foreground "Magenta" :bold t)))) + (eshell-ls-symlink-face ((t (:foreground "DarkCyan" :bold t)))) + (eshell-ls-unreadable-face ((t (:foreground "Grey30")))) + (eshell-prompt-face ((t (:foreground "Red" :bold t)))) + (eshell-test-failed-face ((t (:foreground "OrangeRed" :bold t)))) + (eshell-test-ok-face ((t (:foreground "Green" :bold t)))) + (excerpt ((t (:italic t)))) + (fixed ((t (:bold t)))) + (flyspell-duplicate-face ((t (:foreground "Gold3" :bold t :underline t)))) + (flyspell-incorrect-face ((t (:foreground "OrangeRed" :bold t :underline t)))) + (font-lock-builtin-face ((t (:foreground "Orchid")))) + (font-lock-comment-face ((t (:foreground "Firebrick")))) + (font-lock-constant-face ((t (:foreground "CadetBlue")))) + (font-lock-function-name-face ((t (:foreground "Blue")))) + (font-lock-keyword-face ((t (:foreground "Purple")))) + (font-lock-string-face ((t (:foreground "RosyBrown")))) + (font-lock-type-face ((t (:foreground "ForestGreen")))) + (font-lock-variable-name-face ((t (:foreground "DarkGoldenrod")))) + (font-lock-warning-face ((t (:foreground "Red" :bold t)))) + (fringe ((t (:background "grey95")))) + (gnus-cite-attribution-face ((t (:italic t)))) + (gnus-cite-face-1 ((t (:foreground "MidnightBlue")))) + (gnus-cite-face-10 ((t (:foreground "medium purple")))) + (gnus-cite-face-11 ((t (:foreground "turquoise")))) + (gnus-cite-face-2 ((t (:foreground "firebrick")))) + (gnus-cite-face-3 ((t (:foreground "dark green")))) + (gnus-cite-face-4 ((t (:foreground "OrangeRed")))) + (gnus-cite-face-5 ((t (:foreground "dark khaki")))) + (gnus-cite-face-6 ((t (:foreground "dark violet")))) + (gnus-cite-face-7 ((t (:foreground "SteelBlue4")))) + (gnus-cite-face-8 ((t (:foreground "magenta")))) + (gnus-cite-face-9 ((t (:foreground "violet")))) + (gnus-emphasis-bold ((t (:bold t)))) + (gnus-emphasis-bold-italic ((t (:bold t :italic t)))) + (gnus-emphasis-italic ((t (:italic t)))) + (gnus-emphasis-underline ((t (:underline t)))) + (gnus-emphasis-underline-bold ((t (:bold t :underline t)))) + (gnus-emphasis-underline-bold-italic ((t (:bold t :italic t :underline t)))) + (gnus-emphasis-underline-italic ((t (:italic t :underline t)))) + (gnus-group-mail-1-empty-face ((t (:foreground "DeepPink3")))) + (gnus-group-mail-1-face ((t (:foreground "DeepPink3" :bold t)))) + (gnus-group-mail-2-empty-face ((t (:foreground "HotPink3")))) + (gnus-group-mail-2-face ((t (:foreground "HotPink3" :bold t)))) + (gnus-group-mail-3-empty-face ((t (:foreground "magenta4")))) + (gnus-group-mail-3-face ((t (:foreground "magenta4" :bold t)))) + (gnus-group-mail-low-empty-face ((t (:foreground "DeepPink4")))) + (gnus-group-mail-low-face ((t (:foreground "DeepPink4" :bold t)))) + (gnus-group-news-1-empty-face ((t (:foreground "ForestGreen")))) + (gnus-group-news-1-face ((t (:foreground "ForestGreen" :bold t)))) + (gnus-group-news-2-empty-face ((t (:foreground "CadetBlue4")))) + (gnus-group-news-2-face ((t (:foreground "CadetBlue4" :bold t)))) + (gnus-group-news-3-empty-face ((t (nil)))) + (gnus-group-news-3-face ((t (:bold t)))) + (gnus-group-news-low-empty-face ((t (:foreground "DarkGreen")))) + (gnus-group-news-low-face ((t (:foreground "DarkGreen" :bold t)))) + (gnus-header-content-face ((t (:foreground "indianred4" :italic t)))) + (gnus-header-from-face ((t (:foreground "red3")))) + (gnus-header-name-face ((t (:foreground "maroon")))) + (gnus-header-newsgroups-face ((t (:foreground "MidnightBlue" :italic t)))) + (gnus-header-subject-face ((t (:foreground "red4")))) + (gnus-signature-face ((t (:italic t)))) + (gnus-splash-face ((t (:foreground "ForestGreen")))) + (gnus-summary-cancelled-face ((t (:foreground "yellow" :background "black")))) + (gnus-summary-high-ancient-face ((t (:foreground "RoyalBlue" :bold t)))) + (gnus-summary-high-read-face ((t (:foreground "DarkGreen" :bold t)))) + (gnus-summary-high-ticked-face ((t (:foreground "firebrick" :bold t)))) + (gnus-summary-high-unread-face ((t (:bold t)))) + (gnus-summary-low-ancient-face ((t (:foreground "RoyalBlue" :italic t)))) + (gnus-summary-low-read-face ((t (:foreground "DarkGreen" :italic t)))) + (gnus-summary-low-ticked-face ((t (:foreground "firebrick" :italic t)))) + (gnus-summary-low-unread-face ((t (:italic t)))) + (gnus-summary-normal-ancient-face ((t (:foreground "RoyalBlue")))) + (gnus-summary-normal-read-face ((t (:foreground "DarkGreen")))) + (gnus-summary-normal-ticked-face ((t (:foreground "firebrick")))) + (gnus-summary-normal-unread-face ((t (nil)))) + (gnus-summary-selected-face ((t (:underline t)))) + (highlight ((t (:background "darkseagreen2")))) + (highlight-changes-delete-face ((t (:foreground "red" :underline t)))) + (highlight-changes-face ((t (:foreground "red")))) + (highline-face ((t (:background "paleturquoise")))) + (holiday-face ((t (:background "pink")))) + (info-menu-5 ((t (:underline t)))) + (info-node ((t (:bold t :italic t)))) + (info-xref ((t (:bold t)))) + (italic ((t (:italic t)))) + (makefile-space-face ((t (:background "hotpink")))) + (message-cited-text-face ((t (:foreground "red")))) + (message-header-cc-face ((t (:foreground "MidnightBlue")))) + (message-header-name-face ((t (:foreground "cornflower blue")))) + (message-header-newsgroups-face ((t (:foreground "blue4" :bold t :italic t)))) + (message-header-other-face ((t (:foreground "steel blue")))) + (message-header-subject-face ((t (:foreground "navy blue" :bold t)))) + (message-header-to-face ((t (:foreground "MidnightBlue" :bold t)))) + (message-header-xheader-face ((t (:foreground "blue")))) + (message-separator-face ((t (:foreground "brown")))) + (modeline ((t (:foreground "white" :background "black")))) + (modeline-buffer-id ((t (:foreground "white" :background "black")))) + (modeline-mousable ((t (:foreground "white" :background "black")))) + (modeline-mousable-minor-mode ((t (:foreground "white" :background "black")))) + (region ((t (:background "gray")))) + (secondary-selection ((t (:background "paleturquoise")))) + (show-paren-match-face ((t (:background "turquoise")))) + (show-paren-mismatch-face ((t (:foreground "white" :background "purple")))) + (speedbar-button-face ((t (:foreground "green4")))) + (speedbar-directory-face ((t (:foreground "blue4")))) + (speedbar-file-face ((t (:foreground "cyan4")))) + (speedbar-highlight-face ((t (:background "green")))) + (speedbar-selected-face ((t (:foreground "red" :underline t)))) + (speedbar-tag-face ((t (:foreground "brown")))) + (term-black ((t (:foreground "black")))) + (term-blackbg ((t (:background "black")))) + (term-blue ((t (:foreground "blue")))) + (term-bluebg ((t (:background "blue")))) + (term-bold ((t (:bold t)))) + (term-cyan ((t (:foreground "cyan")))) + (term-cyanbg ((t (:background "cyan")))) + (term-default-bg ((t (nil)))) + (term-default-bg-inv ((t (nil)))) + (term-default-fg ((t (nil)))) + (term-default-fg-inv ((t (nil)))) + (term-green ((t (:foreground "green")))) + (term-greenbg ((t (:background "green")))) + (term-invisible ((t (nil)))) + (term-invisible-inv ((t (nil)))) + (term-magenta ((t (:foreground "magenta")))) + (term-magentabg ((t (:background "magenta")))) + (term-red ((t (:foreground "red")))) + (term-redbg ((t (:background "red")))) + (term-underline ((t (:underline t)))) + (term-white ((t (:foreground "white")))) + (term-whitebg ((t (:background "white")))) + (term-yellow ((t (:foreground "yellow")))) + (term-yellowbg ((t (:background "yellow")))) + (underline ((t (:underline t)))) + (vcursor ((t (:foreground "blue" :background "cyan" :underline t)))) + (vhdl-font-lock-attribute-face ((t (:foreground "Orchid")))) + (vhdl-font-lock-directive-face ((t (:foreground "CadetBlue")))) + (vhdl-font-lock-enumvalue-face ((t (:foreground "Gold4")))) + (vhdl-font-lock-function-face ((t (:foreground "Orchid4")))) + (vhdl-font-lock-prompt-face ((t (:foreground "Red" :bold t)))) + (vhdl-font-lock-reserved-words-face ((t (:foreground "Orange" :bold t)))) + (vhdl-font-lock-translate-off-face ((t (:background "LightGray")))) + (vhdl-speedbar-architecture-face ((t (:foreground "Blue")))) + (vhdl-speedbar-architecture-selected-face ((t (:foreground "Blue" :underline t)))) + (vhdl-speedbar-configuration-face ((t (:foreground "DarkGoldenrod")))) + (vhdl-speedbar-configuration-selected-face ((t (:foreground "DarkGoldenrod" :underline t)))) + (vhdl-speedbar-entity-face ((t (:foreground "ForestGreen")))) + (vhdl-speedbar-entity-selected-face ((t (:foreground "ForestGreen" :underline t)))) + (vhdl-speedbar-instantiation-face ((t (:foreground "Brown")))) + (vhdl-speedbar-instantiation-selected-face ((t (:foreground "Brown" :underline t)))) + (vhdl-speedbar-package-face ((t (:foreground "Grey50")))) + (vhdl-speedbar-package-selected-face ((t (:foreground "Grey50" :underline t)))) + (viper-minibuffer-emacs-face ((t (:foreground "Black" :background "darkseagreen2")))) + (viper-minibuffer-insert-face ((t (:foreground "Black" :background "pink")))) + (viper-minibuffer-vi-face ((t (:foreground "DarkGreen" :background "grey")))) + (viper-replace-overlay-face ((t (:foreground "Black" :background "darkseagreen2")))) + (viper-search-face ((t (:foreground "Black" :background "khaki")))) + (widget-button-face ((t (:bold t)))) + (widget-button-pressed-face ((t (:foreground "red")))) + (widget-documentation-face ((t (:foreground "dark green")))) + (widget-field-face ((t (:background "gray85")))) + (widget-inactive-face ((t (:foreground "dim gray")))) + (widget-single-line-field-face ((t (:background "gray85"))))))) + +(defun color-theme-fischmeister () + "The light colors on a grey blackground. +Sebastian Fischmeister " + (interactive) + (color-theme-install + '(color-theme-fischmeister + ((foreground-color . "black") + (background-color . "gray80") + (mouse-color . "red") + (cursor-color . "yellow") + (border-color . "black") + (background-mode . light)) + (default ((t (nil)))) + (modeline ((t (:foreground "gray80" :background "black")))) + (modeline-buffer-id ((t (:foreground "gray80" :background "black")))) + (modeline-mousable ((t (:foreground "gray80" :background "black")))) + (modeline-mousable-minor-mode ((t (:foreground "gray80" :background "black")))) + (highlight ((t (:background "darkseagreen2")))) + (bold ((t (:bold t)))) + (italic ((t (:italic t)))) + (bold-italic ((t (:bold t :italic t)))) + (region ((t (:background "gray")))) + (secondary-selection ((t (:background "paleturquoise")))) + (underline ((t (:underline t)))) + (show-paren-match-face ((t (:foreground "yellow" :background "darkgreen")))) + (show-paren-mismatch-face ((t (:foreground "white" :background "red")))) + (font-lock-comment-face ((t (:foreground "FireBrick" :bold t :italic t)))) + (font-lock-string-face ((t (:foreground "DarkSlateBlue" :italic t)))) + (font-lock-keyword-face ((t (:foreground "navy")))) + (font-lock-builtin-face ((t (:foreground "white")))) + (font-lock-function-name-face ((t (:foreground "Blue")))) + (font-lock-variable-name-face ((t (:foreground "Darkblue")))) + (font-lock-type-face ((t (:foreground "darkgreen")))) + (font-lock-constant-face ((t (:foreground "CadetBlue")))) + (font-lock-warning-face ((t (:foreground "Orchid" :bold t)))) + (font-lock-reference-face ((t (:foreground "SteelBlue"))))))) + +(defun color-theme-sitaramv-solaris () + "White on a midnight blue background. Lots of yellow and orange. +Includes faces for font-lock, widget, custom, speedbar, message, gnus, +eshell." + (interactive) + (color-theme-install + '(color-theme-sitaramv-solaris + ((foreground-color . "white") + (background-color . "MidnightBlue") + (mouse-color . "yellow") + (cursor-color . "magenta2") + (border-color . "black") + (background-mode . dark)) + (default ((t (nil)))) + (modeline ((t (:foreground "black" :background "gold2")))) + (modeline-buffer-id ((t (:foreground "black" :background "gold2")))) + (modeline-mousable ((t (:foreground "black" :background "gold2")))) + (modeline-mousable-minor-mode ((t (:foreground "black" :background "gold2")))) + (highlight ((t (:foreground "black" :background "Aquamarine")))) + (bold ((t (:bold t)))) + (italic ((t (:italic t)))) + (bold-italic ((t (:bold t :italic t)))) + (region ((t (:foreground "black" :background "snow3")))) + (secondary-selection ((t (:foreground "black" :background "aquamarine")))) + (underline ((t (:underline t)))) + (lazy-highlight-face ((t (:foreground "yellow")))) + (font-lock-comment-face ((t (:foreground "orange" :italic t)))) + (font-lock-string-face ((t (:foreground "orange")))) + (font-lock-keyword-face ((t (:foreground "green")))) + (font-lock-builtin-face ((t (:foreground "LightSteelBlue")))) + (font-lock-function-name-face ((t (:foreground "cyan" :bold t)))) + (font-lock-variable-name-face ((t (:foreground "white")))) + (font-lock-type-face ((t (:foreground "cyan")))) + (font-lock-constant-face ((t (:foreground "Aquamarine")))) + (font-lock-warning-face ((t (:foreground "Pink" :bold t)))) + (widget-documentation-face ((t (:foreground "lime green")))) + (widget-button-face ((t (:bold t)))) + (widget-field-face ((t (:background "dim gray")))) + (widget-single-line-field-face ((t (:background "dim gray")))) + (widget-inactive-face ((t (:foreground "light gray")))) + (widget-button-pressed-face ((t (:foreground "red")))) + (custom-invalid-face ((t (:foreground "yellow" :background "red")))) + (custom-rogue-face ((t (:foreground "pink" :background "black")))) + (custom-modified-face ((t (:foreground "white" :background "blue")))) + (custom-set-face ((t (:foreground "blue" :background "white")))) + (custom-changed-face ((t (:foreground "white" :background "blue")))) + (custom-saved-face ((t (:underline t)))) + (custom-button-face ((t (nil)))) + (custom-documentation-face ((t (nil)))) + (custom-state-face ((t (:foreground "lime green")))) + (custom-variable-tag-face ((t (:foreground "light blue" :underline t)))) + (custom-variable-button-face ((t (:bold t :underline t)))) + (custom-face-tag-face ((t (:underline t)))) + (custom-group-tag-face-1 ((t (:foreground "pink" :underline t)))) + (custom-group-tag-face ((t (:foreground "light blue" :underline t)))) + (speedbar-button-face ((t (:foreground "green3")))) + (speedbar-file-face ((t (:foreground "cyan")))) + (speedbar-directory-face ((t (:foreground "light blue")))) + (speedbar-tag-face ((t (:foreground "yellow")))) + (speedbar-selected-face ((t (:foreground "red" :underline t)))) + (speedbar-highlight-face ((t (:background "sea green")))) + (font-lock-doc-string-face ((t (:foreground "Plum1" :bold t)))) + (font-lock-exit-face ((t (:foreground "green")))) + (ff-paths-non-existant-file-face ((t (:foreground "NavyBlue" :bold t)))) + (show-paren-match-face ((t (:background "red")))) + (show-paren-mismatch-face ((t (:foreground "white" :background "purple")))) + (message-header-to-face ((t (:foreground "green2" :bold t)))) + (message-header-cc-face ((t (:foreground "LightGoldenrod" :bold t)))) + (message-header-subject-face ((t (:foreground "green3")))) + (message-header-newsgroups-face ((t (:foreground "yellow" :bold t :italic t)))) + (message-header-other-face ((t (:foreground "Salmon")))) + (message-header-name-face ((t (:foreground "green3")))) + (message-header-xheader-face ((t (:foreground "GreenYellow")))) + (message-separator-face ((t (:foreground "Tan")))) + (message-cited-text-face ((t (:foreground "Gold")))) + (message-mml-face ((t (:foreground "ForestGreen")))) + (gnus-group-news-1-face ((t (:foreground "PaleTurquoise" :bold t)))) + (gnus-group-news-1-empty-face ((t (:foreground "PaleTurquoise")))) + (gnus-group-news-2-face ((t (:foreground "turquoise" :bold t)))) + (gnus-group-news-2-empty-face ((t (:foreground "turquoise")))) + (gnus-group-news-3-face ((t (:bold t)))) + (gnus-group-news-3-empty-face ((t (nil)))) + (gnus-group-news-4-face ((t (:bold t)))) + (gnus-group-news-4-empty-face ((t (nil)))) + (gnus-group-news-5-face ((t (:bold t)))) + (gnus-group-news-5-empty-face ((t (nil)))) + (gnus-group-news-6-face ((t (:bold t)))) + (gnus-group-news-6-empty-face ((t (nil)))) + (gnus-group-news-low-face ((t (:foreground "DarkTurquoise" :bold t)))) + (gnus-group-news-low-empty-face ((t (:foreground "DarkTurquoise")))) + (gnus-group-mail-1-face ((t (:foreground "aquamarine1" :bold t)))) + (gnus-group-mail-1-empty-face ((t (:foreground "aquamarine1")))) + (gnus-group-mail-2-face ((t (:foreground "aquamarine2" :bold t)))) + (gnus-group-mail-2-empty-face ((t (:foreground "aquamarine2")))) + (gnus-group-mail-3-face ((t (:foreground "aquamarine3" :bold t)))) + (gnus-group-mail-3-empty-face ((t (:foreground "aquamarine3")))) + (gnus-group-mail-low-face ((t (:foreground "aquamarine4" :bold t)))) + (gnus-group-mail-low-empty-face ((t (:foreground "aquamarine4")))) + (gnus-summary-selected-face ((t (:underline t)))) + (gnus-summary-cancelled-face ((t (:foreground "yellow" :background "black")))) + (gnus-summary-high-ticked-face ((t (:foreground "pink" :bold t)))) + (gnus-summary-low-ticked-face ((t (:foreground "pink" :italic t)))) + (gnus-summary-normal-ticked-face ((t (:foreground "pink")))) + (gnus-summary-high-ancient-face ((t (:foreground "SkyBlue" :bold t)))) + (gnus-summary-low-ancient-face ((t (:foreground "SkyBlue" :italic t)))) + (gnus-summary-normal-ancient-face ((t (:foreground "SkyBlue")))) + (gnus-summary-high-unread-face ((t (:bold t)))) + (gnus-summary-low-unread-face ((t (:italic t)))) + (gnus-summary-normal-unread-face ((t (nil)))) + (gnus-summary-high-read-face ((t (:foreground "PaleGreen" :bold t)))) + (gnus-summary-low-read-face ((t (:foreground "PaleGreen" :italic t)))) + (gnus-summary-normal-read-face ((t (:foreground "PaleGreen")))) + (gnus-splash-face ((t (:foreground "Brown")))) + (eshell-ls-directory-face ((t (:foreground "SkyBlue" :bold t)))) + (eshell-ls-symlink-face ((t (:foreground "Cyan" :bold t)))) + (eshell-ls-executable-face ((t (:foreground "Green" :bold t)))) + (eshell-ls-readonly-face ((t (:foreground "Pink")))) + (eshell-ls-unreadable-face ((t (:foreground "DarkGrey")))) + (eshell-ls-special-face ((t (:foreground "Magenta" :bold t)))) + (eshell-ls-missing-face ((t (:foreground "Red" :bold t)))) + (eshell-ls-archive-face ((t (:foreground "Orchid" :bold t)))) + (eshell-ls-backup-face ((t (:foreground "LightSalmon")))) + (eshell-ls-product-face ((t (:foreground "LightSalmon")))) + (eshell-ls-clutter-face ((t (:foreground "OrangeRed" :bold t)))) + (eshell-prompt-face ((t (:foreground "Pink" :bold t)))) + (term-default-fg ((t (nil)))) + (term-default-bg ((t (nil)))) + (term-default-fg-inv ((t (nil)))) + (term-default-bg-inv ((t (nil)))) + (term-bold ((t (:bold t)))) + (term-underline ((t (:underline t)))) + (term-invisible ((t (nil)))) + (term-invisible-inv ((t (nil)))) + (term-black ((t (:foreground "black")))) + (term-red ((t (:foreground "red")))) + (term-green ((t (:foreground "green")))) + (term-yellow ((t (:foreground "yellow")))) + (term-blue ((t (:foreground "blue")))) + (term-magenta ((t (:foreground "magenta")))) + (term-cyan ((t (:foreground "cyan")))) + (term-white ((t (:foreground "white")))) + (term-blackbg ((t (:background "black")))) + (term-redbg ((t (:background "red")))) + (term-greenbg ((t (:background "green")))) + (term-yellowbg ((t (:background "yellow")))) + (term-bluebg ((t (:background "blue")))) + (term-magentabg ((t (:background "magenta")))) + (term-cyanbg ((t (:background "cyan")))) + (term-whitebg ((t (:background "white")))) + (gnus-emphasis-bold ((t (:bold t)))) + (gnus-emphasis-italic ((t (:italic t)))) + (gnus-emphasis-underline ((t (:underline t)))) + (gnus-emphasis-underline-bold ((t (:bold t :underline t)))) + (gnus-emphasis-underline-italic ((t (:italic t :underline t)))) + (gnus-emphasis-bold-italic ((t (:bold t :italic t)))) + (gnus-emphasis-underline-bold-italic ((t (:bold t :italic t :underline t)))) + (gnus-emphasis-highlight-words ((t (:foreground "yellow" :background "black")))) + (gnus-signature-face ((t (:italic t)))) + (gnus-header-from-face ((t (:foreground "spring green")))) + (gnus-header-subject-face ((t (:foreground "yellow" :bold t)))) + (gnus-header-newsgroups-face ((t (:foreground "SeaGreen3" :bold t :italic t)))) + (gnus-header-name-face ((t (:foreground "pink")))) + (gnus-header-content-face ((t (:foreground "lime green" :italic t)))) + (gnus-cite-attribution-face ((t (:italic t)))) + (gnus-cite-face-1 ((t (:foreground "light blue")))) + (gnus-cite-face-2 ((t (:foreground "light cyan")))) + (gnus-cite-face-3 ((t (:foreground "light yellow")))) + (gnus-cite-face-4 ((t (:foreground "light pink")))) + (gnus-cite-face-5 ((t (:foreground "pale green")))) + (gnus-cite-face-6 ((t (:foreground "beige")))) + (gnus-cite-face-7 ((t (:foreground "orange")))) + (gnus-cite-face-8 ((t (:foreground "magenta")))) + (gnus-cite-face-9 ((t (:foreground "violet")))) + (gnus-cite-face-10 ((t (:foreground "medium purple")))) + (gnus-cite-face-11 ((t (:foreground "turquoise"))))))) + +(defun color-theme-sitaramv-nt () + "Black foreground on white background. +Includes faces for font-lock, widget, custom, speedbar." + (interactive) + (color-theme-install + '(color-theme-sitaramv-nt + ((foreground-color . "black") + (background-color . "white") + (mouse-color . "sienna3") + (cursor-color . "HotPink") + (border-color . "Blue") + (background-mode . light)) + (default ((t (nil)))) + (modeline ((t (:foreground "black" :background "gold2")))) + (modeline-buffer-id ((t (:foreground "black" :background "gold2")))) + (modeline-mousable ((t (:foreground "black" :background "gold2")))) + (modeline-mousable-minor-mode ((t (:foreground "black" :background "gold2")))) + (highlight ((t (:foreground "black" :background "darkseagreen2")))) + (bold ((t (:bold t)))) + (italic ((t (:italic t)))) + (bold-italic ((t (:bold t :italic t)))) + (region ((t (:foreground "black" :background "snow3")))) + (secondary-selection ((t (:background "paleturquoise")))) + (underline ((t (:underline t)))) + (lazy-highlight-face ((t (:foreground "dark magenta" :bold t)))) + (font-lock-comment-face ((t (:foreground "ForestGreen" :italic t)))) + (font-lock-string-face ((t (:foreground "red")))) + (font-lock-keyword-face ((t (:foreground "blue" :bold t)))) + (font-lock-builtin-face ((t (:foreground "black")))) + (font-lock-function-name-face ((t (:foreground "dark magenta" :bold t)))) + (font-lock-variable-name-face ((t (:foreground "black")))) + (font-lock-type-face ((t (:foreground "blue")))) + (font-lock-constant-face ((t (:foreground "CadetBlue")))) + (font-lock-warning-face ((t (:foreground "Red" :bold t)))) + (widget-documentation-face ((t (:foreground "dark green")))) + (widget-button-face ((t (:bold t)))) + (widget-field-face ((t (:background "gray85")))) + (widget-single-line-field-face ((t (:background "gray85")))) + (widget-inactive-face ((t (:foreground "dim gray")))) + (widget-button-pressed-face ((t (:foreground "red")))) + (custom-invalid-face ((t (:foreground "yellow" :background "red")))) + (custom-rogue-face ((t (:foreground "pink" :background "black")))) + (custom-modified-face ((t (:foreground "white" :background "blue")))) + (custom-set-face ((t (:foreground "blue" :background "white")))) + (custom-changed-face ((t (:foreground "white" :background "blue")))) + (custom-saved-face ((t (:underline t)))) + (custom-button-face ((t (nil)))) + (custom-documentation-face ((t (nil)))) + (custom-state-face ((t (:foreground "dark green")))) + (custom-variable-tag-face ((t (:foreground "blue" :underline t)))) + (custom-variable-button-face ((t (:bold t :underline t)))) + (custom-face-tag-face ((t (:underline t)))) + (custom-group-tag-face-1 ((t (:foreground "red" :underline t)))) + (custom-group-tag-face ((t (:foreground "blue" :underline t)))) + (speedbar-button-face ((t (:foreground "green4")))) + (speedbar-file-face ((t (:foreground "cyan4")))) + (speedbar-directory-face ((t (:foreground "blue4")))) + (speedbar-tag-face ((t (:foreground "brown")))) + (speedbar-selected-face ((t (:foreground "red" :underline t)))) + (speedbar-highlight-face ((t (:background "green")))) + (ff-paths-non-existant-file-face ((t (:foreground "NavyBlue" :bold t)))) + (show-paren-match-face ((t (:background "light blue")))) + (show-paren-mismatch-face ((t (:foreground "white" :background "purple"))))))) + +(defun color-theme-billw () + "Cornsilk on black. +Includes info, diary, font-lock, eshell, sgml, message, gnus, +widget, custom, latex, ediff." + (interactive) + (color-theme-install + '(color-theme-billw + ((foreground-color . "cornsilk") + (background-color . "black") + (mouse-color . "black") + (cursor-color . "white") + (border-color . "black") + (background-mode . dark)) + (default ((t (nil)))) + (modeline ((t (:foreground "black" :background "wheat")))) + (modeline-buffer-id ((t (:foreground "black" :background "wheat")))) + (modeline-mousable ((t (:foreground "black" :background "wheat")))) + (modeline-mousable-minor-mode ((t (:foreground "black" :background "wheat")))) + (highlight ((t (:foreground "wheat" :background "darkslategray")))) + (bold ((t (:bold t)))) + (italic ((t (:italic t)))) + (bold-italic ((t (:bold t :italic t)))) + (region ((t (:background "dimgray")))) + (secondary-selection ((t (:background "deepskyblue4")))) + (underline ((t (:underline t)))) + (info-node ((t (:foreground "yellow" :bold t :italic t)))) + (info-menu-5 ((t (:underline t)))) + (info-xref ((t (:foreground "yellow" :bold t)))) + (diary-face ((t (:foreground "orange")))) + (calendar-today-face ((t (:underline t)))) + (holiday-face ((t (:background "red")))) + (show-paren-match-face ((t (:background "deepskyblue4")))) + (show-paren-mismatch-face ((t (:foreground "white" :background "red")))) + (font-lock-comment-face ((t (:foreground "gold")))) + (font-lock-string-face ((t (:foreground "orange")))) + (font-lock-keyword-face ((t (:foreground "cyan1")))) + (font-lock-builtin-face ((t (:foreground "LightSteelBlue")))) + (font-lock-function-name-face ((t (:foreground "mediumspringgreen")))) + (font-lock-variable-name-face ((t (:foreground "light salmon")))) + (font-lock-type-face ((t (:foreground "yellow1")))) + (font-lock-constant-face ((t (:foreground "salmon")))) + (font-lock-warning-face ((t (:foreground "gold" :bold t)))) + (blank-space-face ((t (:background "LightGray")))) + (blank-tab-face ((t (:foreground "black" :background "cornsilk")))) + (highline-face ((t (:background "gray35")))) + (eshell-ls-directory-face ((t (:foreground "green" :bold t)))) + (eshell-ls-symlink-face ((t (:foreground "Cyan" :bold t)))) + (eshell-ls-executable-face ((t (:foreground "orange" :bold t)))) + (eshell-ls-readonly-face ((t (:foreground "gray")))) + (eshell-ls-unreadable-face ((t (:foreground "DarkGrey")))) + (eshell-ls-special-face ((t (:foreground "Magenta" :bold t)))) + (eshell-ls-missing-face ((t (:foreground "Red" :bold t)))) + (eshell-ls-archive-face ((t (:foreground "Orchid" :bold t)))) + (eshell-ls-backup-face ((t (:foreground "LightSalmon")))) + (eshell-ls-product-face ((t (:foreground "LightSalmon")))) + (eshell-ls-clutter-face ((t (:foreground "blue" :bold t)))) + (sgml-start-tag-face ((t (:foreground "mediumspringgreen")))) + (custom-button-face ((t (:foreground "white")))) + (sgml-ignored-face ((t (:foreground "gray20" :background "gray60")))) + (sgml-doctype-face ((t (:foreground "orange")))) + (sgml-sgml-face ((t (:foreground "yellow")))) + (vc-annotate-face-0046FF ((t (:foreground "wheat" :background "black")))) + (custom-documentation-face ((t (:foreground "white")))) + (sgml-end-tag-face ((t (:foreground "greenyellow")))) + (linemenu-face ((t (:background "gray30")))) + (sgml-entity-face ((t (:foreground "gold")))) + (message-header-to-face ((t (:foreground "floral white" :bold t)))) + (message-header-cc-face ((t (:foreground "ivory")))) + (message-header-subject-face ((t (:foreground "papaya whip" :bold t)))) + (message-header-newsgroups-face ((t (:foreground "lavender blush" :bold t :italic t)))) + (message-header-other-face ((t (:foreground "pale turquoise")))) + (message-header-name-face ((t (:foreground "light sky blue")))) + (message-header-xheader-face ((t (:foreground "blue")))) + (message-separator-face ((t (:foreground "sandy brown")))) + (message-cited-text-face ((t (:foreground "plum1")))) + (message-mml-face ((t (:foreground "ForestGreen")))) + (gnus-group-news-1-face ((t (:foreground "white" :bold t)))) + (gnus-group-news-1-empty-face ((t (:foreground "white")))) + (gnus-group-news-2-face ((t (:foreground "lightcyan" :bold t)))) + (gnus-group-news-2-empty-face ((t (:foreground "lightcyan")))) + (gnus-group-news-3-face ((t (:foreground "tan" :bold t)))) + (gnus-group-news-3-empty-face ((t (:foreground "tan")))) + (gnus-group-news-4-face ((t (:foreground "white" :bold t)))) + (gnus-group-news-4-empty-face ((t (:foreground "white")))) + (gnus-group-news-5-face ((t (:foreground "wheat" :bold t)))) + (gnus-group-news-5-empty-face ((t (:foreground "wheat")))) + (gnus-group-news-6-face ((t (:foreground "tan" :bold t)))) + (gnus-group-news-6-empty-face ((t (:foreground "tan")))) + (gnus-group-news-low-face ((t (:foreground "DarkTurquoise" :bold t)))) + (gnus-group-news-low-empty-face ((t (:foreground "DarkTurquoise")))) + (gnus-group-mail-1-face ((t (:foreground "white" :bold t)))) + (gnus-group-mail-1-empty-face ((t (:foreground "gray80")))) + (gnus-group-mail-2-face ((t (:foreground "lightcyan" :bold t)))) + (gnus-group-mail-2-empty-face ((t (:foreground "lightcyan")))) + (gnus-group-mail-3-face ((t (:foreground "tan" :bold t)))) + (gnus-group-mail-3-empty-face ((t (:foreground "tan")))) + (gnus-group-mail-low-face ((t (:foreground "aquamarine4" :bold t)))) + (gnus-group-mail-low-empty-face ((t (:foreground "aquamarine4")))) + (gnus-summary-selected-face ((t (:background "deepskyblue4" :underline t)))) + (gnus-summary-cancelled-face ((t (:foreground "black" :background "gray")))) + (gnus-summary-high-ticked-face ((t (:foreground "gray70" :bold t)))) + (gnus-summary-low-ticked-face ((t (:foreground "gray70" :bold t)))) + (gnus-summary-normal-ticked-face ((t (:foreground "gray70" :bold t)))) + (gnus-summary-high-ancient-face ((t (:foreground "SkyBlue" :bold t)))) + (gnus-summary-low-ancient-face ((t (:foreground "SkyBlue" :italic t)))) + (gnus-summary-normal-ancient-face ((t (:foreground "SkyBlue")))) + (gnus-summary-high-unread-face ((t (:bold t)))) + (gnus-summary-low-unread-face ((t (:italic t)))) + (gnus-summary-normal-unread-face ((t (nil)))) + (gnus-summary-high-read-face ((t (:foreground "PaleGreen" :bold t)))) + (gnus-summary-low-read-face ((t (:foreground "PaleGreen" :italic t)))) + (gnus-summary-normal-read-face ((t (:foreground "PaleGreen")))) + (gnus-splash-face ((t (:foreground "gold")))) + (font-latex-bold-face ((t (nil)))) + (font-latex-italic-face ((t (nil)))) + (font-latex-math-face ((t (nil)))) + (font-latex-sedate-face ((t (:foreground "Gray85")))) + (font-latex-string-face ((t (:foreground "orange")))) + (font-latex-warning-face ((t (:foreground "gold")))) + (widget-documentation-face ((t (:foreground "lime green")))) + (widget-button-face ((t (:bold t)))) + (widget-field-face ((t (:background "gray20")))) + (widget-single-line-field-face ((t (:background "gray20")))) + (widget-inactive-face ((t (:foreground "wheat")))) + (widget-button-pressed-face ((t (:foreground "red")))) + (custom-invalid-face ((t (:foreground "yellow" :background "red")))) + (custom-rogue-face ((t (:foreground "pink" :background "black")))) + (custom-modified-face ((t (:foreground "white" :background "blue")))) + (custom-set-face ((t (:foreground "blue")))) + (custom-changed-face ((t (:foreground "wheat" :background "skyblue")))) + (custom-saved-face ((t (:underline t)))) + (custom-state-face ((t (:foreground "light green")))) + (custom-variable-tag-face ((t (:foreground "skyblue" :underline t)))) + (custom-variable-button-face ((t (:bold t :underline t)))) + (custom-face-tag-face ((t (:foreground "white" :underline t)))) + (custom-group-tag-face-1 ((t (:foreground "pink" :underline t)))) + (custom-group-tag-face ((t (:foreground "skyblue" :underline t)))) + (swbuff-current-buffer-face ((t (:foreground "red" :bold t)))) + (ediff-current-diff-face-A ((t (:foreground "firebrick" :background "pale green")))) + (ediff-current-diff-face-B ((t (:foreground "DarkOrchid" :background "Yellow")))) + (ediff-current-diff-face-C ((t (:foreground "white" :background "indianred")))) + (ediff-current-diff-face-Ancestor ((t (:foreground "Black" :background "VioletRed")))) + (ediff-fine-diff-face-A ((t (:foreground "Navy" :background "sky blue")))) + (ediff-fine-diff-face-B ((t (:foreground "Black" :background "cyan")))) + (ediff-fine-diff-face-C ((t (:foreground "Black" :background "Turquoise")))) + (ediff-fine-diff-face-Ancestor ((t (:foreground "Black" :background "Green")))) + (ediff-even-diff-face-A ((t (:foreground "Black" :background "light grey")))) + (ediff-even-diff-face-B ((t (:foreground "White" :background "Grey")))) + (ediff-even-diff-face-C ((t (:foreground "Black" :background "light grey")))) + (ediff-even-diff-face-Ancestor ((t (:foreground "White" :background "Grey")))) + (ediff-odd-diff-face-A ((t (:foreground "White" :background "Grey")))) + (ediff-odd-diff-face-B ((t (:foreground "Black" :background "light grey")))) + (ediff-odd-diff-face-C ((t (:foreground "White" :background "Grey")))) + (ediff-odd-diff-face-Ancestor ((t (:foreground "Black" :background "light grey")))) + (gnus-emphasis-bold ((t (:bold t)))) + (gnus-emphasis-italic ((t (:italic t)))) + (gnus-emphasis-underline ((t (:foreground "white" :background "goldenrod4")))) + (gnus-emphasis-underline-bold ((t (:foreground "black" :background "yellow" :bold t :underline t)))) + (gnus-emphasis-underline-italic ((t (:foreground "black" :background "yellow" :italic t :underline t)))) + (gnus-emphasis-bold-italic ((t (:bold t :italic t)))) + (gnus-emphasis-underline-bold-italic ((t (:foreground "black" :background "yellow" :bold t :italic t :underline t)))) + (gnus-emphasis-highlight-words ((t (:foreground "yellow" :background "black")))) + (gnus-signature-face ((t (:italic t)))) + (gnus-header-from-face ((t (:foreground "wheat")))) + (gnus-header-subject-face ((t (:foreground "wheat" :bold t)))) + (gnus-header-newsgroups-face ((t (:foreground "wheat" :italic t)))) + (gnus-header-name-face ((t (:foreground "white")))) + (gnus-header-content-face ((t (:foreground "tan" :italic t)))) + (gnus-filterhist-face-1 ((t (nil)))) + (gnus-splash ((t (:foreground "Brown")))) + (gnus-cite-attribution-face ((t (:italic t)))) + (gnus-cite-face-1 ((t (:foreground "light blue")))) + (gnus-cite-face-2 ((t (:foreground "light cyan")))) + (gnus-cite-face-3 ((t (:foreground "light yellow")))) + (gnus-cite-face-4 ((t (:foreground "light pink")))) + (gnus-cite-face-5 ((t (:foreground "pale green")))) + (gnus-cite-face-6 ((t (:foreground "beige")))) + (gnus-cite-face-7 ((t (:foreground "orange")))) + (gnus-cite-face-8 ((t (:foreground "magenta")))) + (gnus-cite-face-9 ((t (:foreground "violet")))) + (gnus-cite-face-10 ((t (:foreground "medium purple")))) + (gnus-cite-face-11 ((t (:foreground "turquoise"))))))) + +(defun color-theme-retro-green (&optional color func) + "Plain green on black faces for those longing for the good old days." + (interactive) + ;; Build a list of faces without parameters + (let ((old-faces (face-list)) + (faces) + (face) + (foreground (or color "green"))) + (dolist (face old-faces) + (cond ((memq face '(bold bold-italic)) + (add-to-list 'faces `(,face (( t (:bold t)))))) + ((memq face '(italic underline show-paren-mismatch-face)) + (add-to-list 'faces `(,face (( t (:underline t)))))) + ((memq face '(modeline modeline-buffer-id modeline-mousable + modeline-mousable-minor-mode highlight region + secondary-selection show-paren-match-face)) + (add-to-list 'faces `(,face (( t (:foreground "black" + :background ,foreground + :inverse t)))))) + (t + (add-to-list 'faces `(,face (( t (nil)))))))) + (color-theme-install + (append + (list (or func 'color-theme-retro-green) + (list (cons 'foreground-color foreground) + (cons 'background-color "black") + (cons 'mouse-color foreground) + (cons 'cursor-color foreground) + (cons 'border-color foreground) + (cons 'background-mode 'dark))) + faces)))) + +(defun color-theme-retro-orange () + "Plain orange on black faces for those longing for the good old days." + (interactive) + (color-theme-retro-green "orange" 'color-theme-retro-orange)) + +(defun color-theme-subtle-hacker () + "Subtle Hacker Color Theme. +Based on gnome2, but uses white for important things like comments, +and less of the unreadable tomato. By Colin Walters " + (interactive) + (color-theme-gnome2) + (let ((color-theme-is-cumulative t)) + (color-theme-install + '(color-theme-subtle-hacker + nil + nil + (custom-state-face ((t (:foreground "Coral")))) + (diary-face ((t (:bold t :foreground "IndianRed")))) + (eshell-ls-clutter-face ((t (:bold t :foreground "DimGray")))) + (eshell-ls-executable-face ((t (:bold t :foreground "Coral")))) + (eshell-ls-missing-face ((t (:bold t :foreground "black")))) + (eshell-ls-special-face ((t (:bold t :foreground "Gold")))) + (eshell-ls-symlink-face ((t (:bold t :foreground "White")))) + (font-lock-comment-face ((t (:foreground "White")))) + (font-lock-constant-face ((t (:bold t :foreground "Aquamarine")))) + (font-lock-function-name-face ((t (:bold t :foreground "MediumSlateBlue")))) + (font-lock-string-face ((t (:italic t :foreground "LightSalmon")))) + (font-lock-variable-name-face ((t (:italic t :bold t :foreground "Aquamarine")))) + (gnus-cite-face-1 ((t (:foreground "dark khaki")))) + (gnus-cite-face-2 ((t (:foreground "chocolate")))) + (gnus-cite-face-3 ((t (:foreground "tomato")))) + (gnus-group-mail-1-empty-face ((t (:foreground "light cyan")))) + (gnus-group-mail-1-face ((t (:bold t :foreground "light cyan")))) + (gnus-group-mail-2-empty-face ((t (:foreground "turquoise")))) + (gnus-group-mail-2-face ((t (:bold t :foreground "turquoise")))) + (gnus-group-mail-3-empty-face ((t (:foreground "tomato")))) + (gnus-group-mail-3-face ((t (:bold t :foreground "tomato")))) + (gnus-group-mail-low-empty-face ((t (:foreground "dodger blue")))) + (gnus-group-mail-low-face ((t (:bold t :foreground "dodger blue")))) + (gnus-group-news-1-empty-face ((t (:foreground "green yellow")))) + (gnus-group-news-1-face ((t (:bold t :foreground "green yellow")))) + (gnus-group-news-2-empty-face ((t (:foreground "dark orange")))) + (gnus-group-news-2-face ((t (:bold t :foreground "dark orange")))) + (gnus-group-news-3-empty-face ((t (:foreground "tomato")))) + (gnus-group-news-3-face ((t (:bold t :foreground "tomato")))) + (gnus-group-news-low-empty-face ((t (:foreground "yellow green")))) + (gnus-group-news-low-face ((t (:bold t :foreground "yellow green")))) + (gnus-header-name-face ((t (:bold t :foreground "DodgerBlue1")))) + (gnus-header-newsgroups-face ((t (:italic t :bold t :foreground "LightSkyBlue3")))) + (gnus-signature-face ((t (:foreground "salmon")))) + (gnus-summary-cancelled-face ((t (:background "black" :foreground "yellow")))) + (gnus-summary-high-ancient-face ((t (:bold t :foreground "RoyalBlue")))) + (gnus-summary-high-read-face ((t (:bold t :foreground "forest green")))) + (gnus-summary-high-ticked-face ((t (:bold t :foreground "burlywood")))) + (gnus-summary-high-unread-face ((t (:italic t :bold t :foreground "cyan")))) + (gnus-summary-low-ancient-face ((t (:italic t :foreground "chocolate")))) + (gnus-summary-low-read-face ((t (:foreground "light sea green")))) + (gnus-summary-low-ticked-face ((t (:italic t :foreground "chocolate")))) + (gnus-summary-low-unread-face ((t (:italic t :foreground "light sea green")))) + (gnus-summary-normal-ancient-face ((t (:foreground "RoyalBlue")))) + (gnus-summary-normal-read-face ((t (:foreground "khaki")))) + (gnus-summary-normal-ticked-face ((t (:foreground "sandy brown")))) + (gnus-summary-normal-unread-face ((t (:foreground "aquamarine")))) + (message-cited-text-face ((t (:foreground "White")))) + (message-header-name-face ((t (:foreground "DodgerBlue1")))) + (message-header-newsgroups-face ((t (:italic t :bold t :foreground "LightSkyBlue3")))) + (message-header-other-face ((t (:foreground "LightSkyBlue3")))) + (message-header-xheader-face ((t (:foreground "DodgerBlue3")))))))) + +(defun color-theme-pok-wog () + "Low-contrast White-on-Gray by S.Pokrovsky. + +The following might be a good addition to your .Xdefaults file: + +Emacs.pane.menubar.background: darkGrey +Emacs.pane.menubar.foreground: black" + (interactive) + (color-theme-install + '(color-theme-pok-wog + ((foreground-color . "White") + (background-color . "DarkSlateGray") + (mouse-color . "gold") + (cursor-color . "Cyan") + (border-color . "black") + (background-mode . dark)) + (default ((t (nil)))) + (bold ((t (:bold t :foreground "Wheat")))) + (bold-italic ((t (:italic t :bold t :foreground "wheat")))) + (calendar-today-face ((t (:underline t :foreground "white")))) + (diary-face ((t (:foreground "red")))) + (font-lock-builtin-face ((t (:bold t :foreground "cyan")))) + (font-lock-comment-face ((t (:foreground "Gold")))) + (font-lock-constant-face ((t (:bold t :foreground "LightSteelBlue")))) + (font-lock-function-name-face ((t (:bold t :foreground "Yellow")))) + (font-lock-keyword-face ((t (:bold t :foreground "Cyan")))) + (font-lock-string-face ((t (:foreground "Khaki")))) + (font-lock-type-face ((t (:bold t :foreground "Cyan")))) + (font-lock-variable-name-face ((t (:foreground "LightGoldenrod")))) + (font-lock-warning-face ((t (:bold t :foreground "Pink")))) + (gnus-cite-attribution-face ((t (:bold t :foreground "Wheat")))) + (gnus-cite-face-1 ((t (:foreground "wheat")))) + (gnus-cite-face-10 ((t (:foreground "wheat")))) + (gnus-cite-face-11 ((t (:foreground "turquoise")))) + (gnus-cite-face-2 ((t (:foreground "cyan")))) + (gnus-cite-face-3 ((t (:foreground "light yellow")))) + (gnus-cite-face-4 ((t (:foreground "light pink")))) + (gnus-cite-face-5 ((t (:foreground "pale green")))) + (gnus-cite-face-6 ((t (:foreground "beige")))) + (gnus-cite-face-7 ((t (:foreground "orange")))) + (gnus-cite-face-8 ((t (:foreground "magenta")))) + (gnus-cite-face-9 ((t (:foreground "violet")))) + (gnus-emphasis-bold ((t (:bold t :foreground "wheat")))) + (gnus-emphasis-bold-italic ((t (:italic t :bold t)))) + (gnus-emphasis-highlight-words ((t (:background "black" :foreground "yellow")))) + (gnus-emphasis-italic ((t (:italic t :foreground "white")))) + (gnus-emphasis-underline ((t (:underline t :foreground "white")))) + (gnus-emphasis-underline-bold ((t (:underline t :bold t :foreground "wheat")))) + (gnus-emphasis-underline-bold-italic ((t (:underline t :italic t :bold t)))) + (gnus-emphasis-underline-italic ((t (:underline t :italic t :foreground "white")))) + (gnus-group-mail-1-empty-face ((t (:foreground "aquamarine1")))) + (gnus-group-mail-1-face ((t (:bold t :foreground "aquamarine1")))) + (gnus-group-mail-2-empty-face ((t (:foreground "aquamarine2")))) + (gnus-group-mail-2-face ((t (:bold t :foreground "aquamarine2")))) + (gnus-group-mail-3-empty-face ((t (:foreground "Salmon")))) + (gnus-group-mail-3-face ((t (:bold t :foreground "gold")))) + (gnus-group-mail-low-empty-face ((t (:foreground "Wheat")))) + (gnus-group-mail-low-face ((t (:bold t :foreground "aquamarine4")))) + (gnus-group-news-1-empty-face ((t (:foreground "PaleTurquoise")))) + (gnus-group-news-1-face ((t (:bold t :foreground "PaleTurquoise")))) + (gnus-group-news-2-empty-face ((t (:foreground "turquoise")))) + (gnus-group-news-2-face ((t (:bold t :foreground "turquoise")))) + (gnus-group-news-3-empty-face ((t (nil)))) + (gnus-group-news-3-face ((t (:bold t :foreground "Wheat")))) + (gnus-group-news-4-empty-face ((t (nil)))) + (gnus-group-news-4-face ((t (:bold t)))) + (gnus-group-news-5-empty-face ((t (nil)))) + (gnus-group-news-5-face ((t (:bold t)))) + (gnus-group-news-6-empty-face ((t (nil)))) + (gnus-group-news-6-face ((t (:bold t)))) + (gnus-group-news-low-empty-face ((t (:foreground "DarkTurquoise")))) + (gnus-group-news-low-face ((t (:bold t :foreground "DarkTurquoise")))) + (gnus-header-content-face ((t (:italic t :foreground "Wheat")))) + (gnus-header-from-face ((t (:foreground "light yellow")))) + (gnus-header-name-face ((t (:foreground "cyan")))) + (gnus-header-newsgroups-face ((t (:italic t :foreground "yellow")))) + (gnus-header-subject-face ((t (:bold t :foreground "Gold")))) + (gnus-signature-face ((t (:italic t :foreground "wheat")))) + (gnus-splash-face ((t (:foreground "orange")))) + (gnus-summary-cancelled-face ((t (:background "black" :foreground "yellow")))) + (gnus-summary-high-ancient-face ((t (:bold t :foreground "SkyBlue")))) + (gnus-summary-high-read-face ((t (:bold t :foreground "PaleGreen")))) + (gnus-summary-high-ticked-face ((t (:bold t :foreground "pink")))) + (gnus-summary-high-unread-face ((t (:bold t :foreground "gold")))) + (gnus-summary-low-ancient-face ((t (:italic t :foreground "SkyBlue")))) + (gnus-summary-low-read-face ((t (:italic t :foreground "PaleGreen")))) + (gnus-summary-low-ticked-face ((t (:italic t :foreground "pink")))) + (gnus-summary-low-unread-face ((t (:italic t)))) + (gnus-summary-normal-ancient-face ((t (:foreground "SkyBlue")))) + (gnus-summary-normal-read-face ((t (:foreground "PaleGreen")))) + (gnus-summary-normal-ticked-face ((t (:foreground "pink")))) + (gnus-summary-normal-unread-face ((t (:foreground "wheat")))) + (gnus-summary-selected-face ((t (:underline t :foreground "white")))) + (highlight ((t (:background "Blue" :foreground "white")))) + (highline-face ((t (:background "black" :foreground "white")))) + (holiday-face ((t (:background "pink" :foreground "white")))) + (info-menu-5 ((t (:underline t)))) + (info-node ((t (:italic t :bold t :foreground "white")))) + (info-xref ((t (:bold t :foreground "wheat")))) + (italic ((t (:italic t :foreground "white")))) + (makefile-space-face ((t (:background "hotpink")))) + (message-cited-text-face ((t (:foreground "green")))) + (message-header-cc-face ((t (:bold t :foreground "Aquamarine")))) + (message-header-name-face ((t (:foreground "Gold")))) + (message-header-newsgroups-face ((t (:italic t :bold t :foreground "yellow")))) + (message-header-other-face ((t (:foreground "lightGray")))) + (message-header-subject-face ((t (:foreground "Yellow")))) + (message-header-to-face ((t (:bold t :foreground "green2")))) + (message-header-xheader-face ((t (:foreground "blue")))) + (message-mml-face ((t (:bold t :foreground "khaki")))) + (message-separator-face ((t (:background "aquamarine" :foreground "black")))) + (modeline ((t (:background "DarkGray" :foreground "Black")))) + (modeline-buffer-id ((t (:background "DarkGray" :foreground "Black")))) + (modeline-mousable ((t (:background "DarkGray" :foreground "Black")))) + (modeline-mousable-minor-mode ((t (:background "DarkGray" :foreground "Black")))) + (paren-mismatch-face ((t (:background "DeepPink" :foreground "white")))) + (paren-no-match-face ((t (:background "yellow" :foreground "white")))) + (region ((t (:background "MediumSlateBlue" :foreground "white")))) + (secondary-selection ((t (:background "Sienna" :foreground "white")))) + (show-paren-match-face ((t (:background "turquoise" :foreground "white")))) + (show-paren-mismatch-face ((t (:background "purple" :foreground "white")))) + (speedbar-button-face ((t (:bold t :foreground "magenta")))) + (speedbar-directory-face ((t (:bold t :foreground "orchid")))) + (speedbar-file-face ((t (:foreground "pink")))) + (speedbar-highlight-face ((t (:background "black")))) + (speedbar-selected-face ((t (:underline t :foreground "cyan")))) + (speedbar-tag-face ((t (:foreground "yellow")))) + (swbuff-current-buffer-face ((t (:bold t :foreground "red")))) + (underline ((t (:underline t :foreground "white")))) + (widget-button-face ((t (:bold t :foreground "wheat")))) + (widget-button-pressed-face ((t (:foreground "red")))) + (widget-documentation-face ((t (:foreground "lime green")))) + (widget-field-face ((t (:background "dim gray" :foreground "white")))) + (widget-inactive-face ((t (:foreground "light gray")))) + (widget-single-line-field-face ((t (:background "dim gray" :foreground "white"))))))) + +(defun color-theme-pok-wob () + "White-on-Black by S. Pokrovsky. + +The following might be a good addition to your .Xdefaults file: + +Emacs.pane.menubar.background: darkGrey +Emacs.pane.menubar.foreground: black" + (interactive) +; (setq term-default-fg-color "white" +; term-default-bg "black") + (color-theme-install + '(color-theme-pok-wob + ((foreground-color . "white") + (background-color . "black") + (mouse-color . "gold") + (cursor-color . "yellow") + (border-color . "black") + (background-mode . dark)) + (default ((t (nil)))) + (bold ((t (:bold t :foreground "light gray")))) + (bold-italic ((t (:italic t :bold t :foreground "cyan")))) + (calendar-today-face ((t (:underline t :foreground "white")))) + (custom-button-face ((t (nil)))) + (custom-changed-face ((t (:background "blue" :foreground "white")))) + (custom-documentation-face ((t (nil)))) + (custom-face-tag-face ((t (:underline t)))) + (custom-group-tag-face ((t (:underline t)))) + (custom-group-tag-face-1 ((t (:underline t)))) + (custom-invalid-face ((t (:background "red" :foreground "white")))) + (custom-modified-face ((t (:background "blue" :foreground "white")))) + (custom-rogue-face ((t (:background "black" :foreground "pink")))) + (custom-saved-face ((t (:underline t)))) + (custom-set-face ((t (:background "white" :foreground "blue")))) + (custom-state-face ((t (nil)))) + (custom-variable-button-face ((t (:underline t :bold t)))) + (custom-variable-tag-face ((t (:underline t)))) + (diary-face ((t (:foreground "gold")))) + (font-lock-builtin-face ((t (:bold t :foreground "cyan")))) + (font-lock-comment-face ((t (:foreground "Gold")))) + (font-lock-constant-face ((t (:bold t :foreground "LightSteelBlue")))) + (font-lock-function-name-face ((t (:bold t :foreground "gold")))) + (font-lock-keyword-face ((t (:bold t :foreground "Cyan")))) + (font-lock-string-face ((t (:foreground "Khaki")))) + (font-lock-type-face ((t (:bold t :foreground "Cyan")))) + (font-lock-variable-name-face ((t (:italic t :foreground "gold")))) + (font-lock-warning-face ((t (:bold t :foreground "Pink")))) + (gnus-cite-attribution-face ((t (:underline t :foreground "beige")))) + (gnus-cite-face-1 ((t (:foreground "gold")))) + (gnus-cite-face-10 ((t (:foreground "coral")))) + (gnus-cite-face-11 ((t (:foreground "turquoise")))) + (gnus-cite-face-2 ((t (:foreground "wheat")))) + (gnus-cite-face-3 ((t (:foreground "light pink")))) + (gnus-cite-face-4 ((t (:foreground "khaki")))) + (gnus-cite-face-5 ((t (:foreground "pale green")))) + (gnus-cite-face-6 ((t (:foreground "beige")))) + (gnus-cite-face-7 ((t (:foreground "orange")))) + (gnus-cite-face-8 ((t (:foreground "magenta")))) + (gnus-cite-face-9 ((t (:foreground "violet")))) + (gnus-emphasis-bold ((t (:bold t :foreground "light gray")))) + (gnus-emphasis-bold-italic ((t (:italic t :bold t :foreground "cyan")))) + (gnus-emphasis-highlight-words ((t (:background "black" :foreground "gold")))) + (gnus-emphasis-italic ((t (:italic t :foreground "cyan")))) + (gnus-emphasis-underline ((t (:underline t :foreground "white")))) + (gnus-emphasis-underline-bold ((t (:underline t :bold t :foreground "white")))) + (gnus-emphasis-underline-bold-italic ((t (:underline t :italic t :bold t :foreground "white")))) + (gnus-emphasis-underline-italic ((t (:underline t :italic t :foreground "white")))) + (gnus-group-mail-1-empty-face ((t (:foreground "Magenta")))) + (gnus-group-mail-1-face ((t (:bold t :foreground "Magenta")))) + (gnus-group-mail-2-empty-face ((t (:foreground "aquamarine2")))) + (gnus-group-mail-2-face ((t (:bold t :foreground "aquamarine2")))) + (gnus-group-mail-3-empty-face ((t (:foreground "Cyan")))) + (gnus-group-mail-3-face ((t (:bold t :foreground "Cyan")))) + (gnus-group-mail-low-empty-face ((t (:foreground "Wheat")))) + (gnus-group-mail-low-face ((t (:foreground "aquamarine4")))) + (gnus-group-news-1-empty-face ((t (:foreground "PaleTurquoise")))) + (gnus-group-news-1-face ((t (:bold t :foreground "PaleTurquoise")))) + (gnus-group-news-2-empty-face ((t (:foreground "turquoise")))) + (gnus-group-news-2-face ((t (:bold t :foreground "turquoise")))) + (gnus-group-news-3-empty-face ((t (:foreground "wheat")))) + (gnus-group-news-3-face ((t (:bold t :foreground "Wheat")))) + (gnus-group-news-4-empty-face ((t (nil)))) + (gnus-group-news-4-face ((t (:bold t)))) + (gnus-group-news-5-empty-face ((t (nil)))) + (gnus-group-news-5-face ((t (:bold t)))) + (gnus-group-news-6-empty-face ((t (nil)))) + (gnus-group-news-6-face ((t (:bold t)))) + (gnus-group-news-low-empty-face ((t (:foreground "MediumAquamarine")))) + (gnus-group-news-low-face ((t (:bold t :foreground "MediumAquamarine")))) + (gnus-header-content-face ((t (:italic t :foreground "Wheat")))) + (gnus-header-from-face ((t (:foreground "light yellow")))) + (gnus-header-name-face ((t (:foreground "Wheat")))) + (gnus-header-newsgroups-face ((t (:italic t :foreground "gold")))) + (gnus-header-subject-face ((t (:bold t :foreground "Gold")))) + (gnus-signature-face ((t (:italic t :foreground "white")))) + (gnus-splash-face ((t (:foreground "orange")))) + (gnus-summary-cancelled-face ((t (:background "black" :foreground "orange")))) + (gnus-summary-high-ancient-face ((t (:bold t :foreground "SkyBlue")))) + (gnus-summary-high-read-face ((t (:bold t :foreground "red")))) + (gnus-summary-high-ticked-face ((t (:bold t :foreground "coral")))) + (gnus-summary-high-unread-face ((t (:bold t :foreground "gold")))) + (gnus-summary-low-ancient-face ((t (:italic t :foreground "SkyBlue")))) + (gnus-summary-low-read-face ((t (:italic t :foreground "red")))) + (gnus-summary-low-ticked-face ((t (:italic t :foreground "coral")))) + (gnus-summary-low-unread-face ((t (:italic t :foreground "white")))) + (gnus-summary-normal-ancient-face ((t (:foreground "SkyBlue")))) + (gnus-summary-normal-read-face ((t (:foreground "PaleGreen")))) + (gnus-summary-normal-ticked-face ((t (:foreground "pink")))) + (gnus-summary-normal-unread-face ((t (:foreground "white")))) + (gnus-summary-selected-face ((t (:underline t :foreground "white")))) + (highlight ((t (:background "Blue" :foreground "white")))) + (highline-face ((t (:background "dark slate gray" :foreground "white")))) + (holiday-face ((t (:background "red" :foreground "white")))) + (info-menu-5 ((t (:underline t)))) + (info-node ((t (:italic t :bold t :foreground "white")))) + (info-xref ((t (:bold t :foreground "light gray")))) + (italic ((t (:italic t :foreground "cyan")))) + (makefile-space-face ((t (:background "hotpink" :foreground "white")))) + (message-cited-text-face ((t (:foreground "green")))) + (message-header-cc-face ((t (:bold t :foreground "Aquamarine")))) + (message-header-name-face ((t (:foreground "Gold")))) + (message-header-newsgroups-face ((t (:italic t :bold t :foreground "gold")))) + (message-header-other-face ((t (:foreground "lightGray")))) + (message-header-subject-face ((t (:foreground "Yellow")))) + (message-header-to-face ((t (:bold t :foreground "green2")))) + (message-header-xheader-face ((t (:foreground "sky blue")))) + (message-mml-face ((t (:bold t :foreground "khaki")))) + (message-separator-face ((t (:background "aquamarine" :foreground "black")))) + (modeline ((t (:background "dark gray" :foreground "black")))) + (modeline-buffer-id ((t (:background "dark gray" :foreground "black")))) + (modeline-mousable ((t (:background "dark gray" :foreground "black")))) + (modeline-mousable-minor-mode ((t (:background "dark gray" :foreground "black")))) + (paren-mismatch-face ((t (:bold t :background "white" :foreground "red")))) + (paren-no-match-face ((t (:bold t :background "white" :foreground "red")))) + (region ((t (:background "MediumSlateBlue" :foreground "white")))) + (secondary-selection ((t (:background "Sienna" :foreground "white")))) + (show-paren-match-face ((t (:background "purple" :foreground "white")))) + (show-paren-mismatch-face ((t (:bold t :background "white" :foreground "red")))) + (speedbar-button-face ((t (nil)))) + (speedbar-directory-face ((t (nil)))) + (speedbar-file-face ((t (:bold t)))) + (speedbar-highlight-face ((t (nil)))) + (speedbar-selected-face ((t (:underline t)))) + (speedbar-tag-face ((t (nil)))) + (swbuff-current-buffer-face ((t (:bold t :foreground "red")))) + (underline ((t (:underline t :foreground "white")))) + (widget-button-face ((t (:bold t :foreground "coral")))) + (widget-button-pressed-face ((t (:foreground "red")))) + (widget-documentation-face ((t (:foreground "lime green")))) + (widget-field-face ((t (:background "dim gray" :foreground "white")))) + (widget-inactive-face ((t (:foreground "light gray")))) + (widget-single-line-field-face ((t (:background "dim gray" :foreground "white"))))))) + +(defun color-theme-blue-sea () + "The grey on midnight blue theme. + +Includes faces for apropos, font-lock (Emacs and XEmacs), speedbar, +custom, widget, info, flyspell, gnus, message, man, woman, dired. + +This is what you should put in your .Xdefaults file, if you want to +change the colors of the menus: + +emacs*Background: DarkSlateGray +emacs*Foreground: Wheat" + (interactive) + (color-theme-blue-gnus) + (let ((color-theme-is-cumulative t)) + (color-theme-blue-erc) + (color-theme-install + '(color-theme-blue-sea + ((background-color . "MidnightBlue") + (background-mode . dark) + (border-color . "Grey") + (cursor-color . "Grey") + (foreground-color . "Grey") + (mouse-color . "Grey")) + ((Man-overstrike-face . woman-bold-face) + (Man-underline-face . woman-italic-face)) + (default ((t (nil)))) + (bold ((t (:bold t)))) + (bold-italic ((t (:bold t :foreground "beige")))) + (calendar-today-face ((t (:underline t)))) + (cperl-array-face ((t (:foreground "light salmon" :bold t)))) + (cperl-hash-face ((t (:foreground "beige" :bold t :italic t)))) + (cperl-nonoverridable-face ((t (:foreground "aquamarine")))) + (custom-button-face ((t (:foreground "gainsboro")))) + (custom-changed-face ((t (:foreground "white" :background "blue")))) + (custom-documentation-face ((t (:foreground "light blue")))) + (custom-face-tag-face ((t (:underline t)))) + (custom-group-tag-face ((t (:foreground "pale turquoise" :bold t)))) + (custom-group-tag-face-1 ((t (:foreground "pale turquoise" :underline t)))) + (custom-invalid-face ((t (:foreground "yellow" :background "red")))) + (custom-modified-face ((t (:foreground "white" :background "blue")))) + (custom-rogue-face ((t (:foreground "pink" :background "black")))) + (custom-saved-face ((t (:underline t)))) + (custom-set-face ((t (:foreground "blue" :background "white")))) + (custom-state-face ((t (:foreground "light salmon")))) + (custom-variable-button-face ((t (:bold t :underline t)))) + (custom-variable-tag-face ((t (:foreground "turquoise" :bold t)))) + (diary-face ((t (:foreground "red")))) + (dired-face-directory ((t (:bold t :foreground "sky blue")))) + (dired-face-permissions ((t (:foreground "aquamarine")))) + (dired-face-flagged ((t (:foreground "tomato")))) + (dired-face-marked ((t (:foreground "light salmon")))) + (dired-face-executable ((t (:foreground "green yellow")))) + (eshell-ls-archive-face ((t (:bold t :foreground "medium purple")))) + (eshell-ls-backup-face ((t (:foreground "dim gray")))) + (eshell-ls-clutter-face ((t (:foreground "dim gray")))) + (eshell-ls-directory-face ((t (:bold t :foreground "medium slate blue")))) + (eshell-ls-executable-face ((t (:bold t :foreground "aquamarine")))) + (eshell-ls-missing-face ((t (:foreground "black")))) + (eshell-ls-picture-face ((t (:foreground "violet")))) + (eshell-ls-product-face ((t (:foreground "light steel blue")))) + (eshell-ls-readonly-face ((t (:foreground "aquamarine")))) + (eshell-ls-special-face ((t (:foreground "gold")))) + (eshell-ls-symlink-face ((t (:foreground "white")))) + (eshell-ls-unreadable-face ((t (:foreground "dim gray")))) + (eshell-prompt-face ((t (:foreground "light sky blue" :bold t)))) + (excerpt ((t (:italic t)))) + (fixed ((t (:bold t)))) + (flyspell-duplicate-face ((t (:foreground "Gold3" :bold t :underline t)))) + (flyspell-incorrect-face ((t (:foreground "OrangeRed" :bold t :underline t)))) + (font-lock-builtin-face ((t (:foreground "aquamarine")))) + (font-lock-comment-face ((t (:foreground "light blue")))) + (font-lock-constant-face ((t (:foreground "pale green")))) + (font-lock-doc-string-face ((t (:foreground "sky blue")))) + (font-lock-function-name-face ((t (:bold t :foreground "aquamarine")))) + (font-lock-keyword-face ((t (:foreground "pale turquoise" :bold t)))) + (font-lock-reference-face ((t (:foreground "pale green")))) + (font-lock-string-face ((t (:foreground "light sky blue")))) + (font-lock-type-face ((t (:foreground "sky blue" :bold t)))) + (font-lock-variable-name-face ((t (:foreground "turquoise" :bold t)))) + (font-lock-warning-face ((t (:foreground "Red" :bold t)))) + (fringe ((t (:background "MidnightBlue")))) + (header-line ((t (:background "#002" :foreground "cornflower blue")))) + (highlight ((t (:background "dark slate blue" :foreground "light blue")))) + (highline-face ((t (:background "DeepSkyBlue4")))) + (holiday-face ((t (:background "pink")))) + (info-menu-5 ((t (:underline t)))) + (info-node ((t (:bold t)))) + (info-xref ((t (:bold t :foreground "sky blue")))) + (isearch ((t (:background "slate blue")))) + (italic ((t (:foreground "sky blue")))) + (makefile-space-face ((t (:background "hotpink")))) + (menu ((t (:background "MidnightBlue" :foreground "Grey")))) + (modeline ((t (:foreground "wheat" :background "slate blue")))) + (mode-line-inactive ((t (:background "dark slate blue" :foreground "wheat")))) + (modeline-buffer-id ((t (:foreground "beige" :background "slate blue")))) + (modeline-mousable ((t (:foreground "light cyan" :background "slate blue")))) + (modeline-mousable-minor-mode ((t (:foreground "wheat" :background "slate blue")))) + (region ((t (:background "DarkSlateBlue")))) + (secondary-selection ((t (:background "steel blue")))) + (show-paren-match-face ((t (:foreground "white" :background "light slate blue")))) + (show-paren-mismatch-face ((t (:foreground "white" :background "red")))) + (speedbar-button-face ((t (:foreground "seashell2")))) + (speedbar-directory-face ((t (:foreground "seashell3")))) + (speedbar-file-face ((t (:foreground "seashell4")))) + (speedbar-highlight-face ((t (:background "dark slate blue" :foreground "wheat")))) + (speedbar-selected-face ((t (:foreground "seashell1" :underline t)))) + (speedbar-tag-face ((t (:foreground "antique white")))) + (tool-bar ((t (:background "MidnightBlue" :foreground "Grey" :box (:line-width 1 :style released-button))))) + (underline ((t (:underline t)))) + (widget-button-face ((t (:bold t)))) + (widget-button-pressed-face ((t (:foreground "red")))) + (widget-documentation-face ((t (:foreground "light blue")))) + (widget-field-face ((t (:background "RoyalBlue4" :foreground "wheat")))) + (widget-inactive-face ((t (:foreground "dim gray")))) + (widget-single-line-field-face ((t (:background "slate blue" :foreground "wheat")))) + (woman-bold-face ((t (:foreground "sky blue" :bold t)))) + (woman-italic-face ((t (:foreground "deep sky blue")))) + (woman-unknown-face ((t (:foreground "LightSalmon")))) + (zmacs-region ((t (:background "DarkSlateBlue")))))))) + +(defun color-theme-rotor () + "Black on Beige color theme by Jinwei Shen, created 2000-06-08. +Supports default faces, font-lock, custom, widget, message, man, +show-paren, viper." + (interactive) + (color-theme-install + '(color-theme-rotor + ((background-color . "Beige") + (background-mode . light) + (border-color . "black") + (cursor-color . "Maroon") + (foreground-color . "Black") + (mouse-color . "Black")) + ((Man-overstrike-face . font-lock-function-name-face) + (Man-underline-face . font-lock-type-face) + (list-matching-lines-face . bold) + (rmail-highlight-face . font-lock-function-name-face) + (watson-attribution-face . italic) + (watson-url-face . bold) + (watson-url-mouse-face . highlight)) + (default ((t (nil)))) + (bold ((t (:bold t :background "grey40" :foreground "yellow")))) + (bold-italic ((t (:italic t :bold t :foreground "yellow green")))) + (custom-button-face ((t (nil)))) + (custom-changed-face ((t (:background "blue" :foreground "white")))) + (custom-documentation-face ((t (nil)))) + (custom-face-tag-face ((t (:underline t)))) + (custom-group-tag-face ((t (:underline t :foreground "blue")))) + (custom-group-tag-face-1 ((t (:underline t :foreground "red")))) + (custom-invalid-face ((t (:background "red" :foreground "yellow")))) + (custom-modified-face ((t (:background "blue" :foreground "white")))) + (custom-rogue-face ((t (:background "black" :foreground "pink")))) + (custom-saved-face ((t (:underline t)))) + (custom-set-face ((t (:background "white" :foreground "blue")))) + (custom-state-face ((t (:foreground "dark green")))) + (custom-variable-button-face ((t (:underline t :bold t)))) + (custom-variable-tag-face ((t (:underline t :foreground "blue")))) + (font-lock-builtin-face ((t (:foreground "Orchid")))) + (font-lock-comment-face ((t (:foreground "MediumBlue")))) + (font-lock-constant-face ((t (:foreground "CadetBlue")))) + (font-lock-function-name-face ((t (:foreground "MediumSlateBlue")))) + (font-lock-keyword-face ((t (:foreground "#80a0ff")))) + (font-lock-string-face ((t (:foreground "red")))) + (font-lock-type-face ((t (:foreground "ForestGreen")))) + (font-lock-variable-name-face ((t (:foreground "DarkGoldenrod")))) + (font-lock-warning-face ((t (:bold t :foreground "Red")))) + (highlight ((t (:background "PaleGreen" :foreground "black")))) + (italic ((t (:italic t :foreground "yellow3")))) + (message-cited-text-face ((t (:foreground "red")))) + (message-header-cc-face ((t (:foreground "MidnightBlue")))) + (message-header-name-face ((t (:foreground "cornflower blue")))) + (message-header-newsgroups-face ((t (:italic t :bold t :foreground "blue4")))) + (message-header-other-face ((t (:foreground "steel blue")))) + (message-header-subject-face ((t (:bold t :foreground "navy blue")))) + (message-header-to-face ((t (:bold t :foreground "MidnightBlue")))) + (message-header-xheader-face ((t (:foreground "blue")))) + (message-separator-face ((t (:foreground "brown")))) + (modeline ((t (:background "wheat" :foreground "DarkOliveGreen")))) + (modeline-buffer-id ((t (:background "wheat" :foreground "DarkOliveGreen")))) + (modeline-mousable ((t (:background "wheat" :foreground "DarkOliveGreen")))) + (modeline-mousable-minor-mode ((t (:background "wheat" :foreground "DarkOliveGreen")))) + (nil ((t (nil)))) + (region ((t (:background "dark cyan" :foreground "cyan")))) + (secondary-selection ((t (:background "Turquoise" :foreground "black")))) + (show-paren-match-face ((t (:background "turquoise")))) + (show-paren-mismatch-face ((t (:background "purple" :foreground "white")))) + (underline ((t (:underline t)))) + (viper-minibuffer-emacs-face ((t (:background "darkseagreen2" :foreground "Black")))) + (viper-minibuffer-insert-face ((t (:background "pink" :foreground "Black")))) + (viper-minibuffer-vi-face ((t (:background "grey" :foreground "DarkGreen")))) + (viper-replace-overlay-face ((t (:background "darkseagreen2" :foreground "Black")))) + (viper-search-face ((t (:background "khaki" :foreground "Black")))) + (widget-button-face ((t (:bold t)))) + (widget-button-pressed-face ((t (:foreground "red")))) + (widget-documentation-face ((t (:foreground "dark green")))) + (widget-field-face ((t (:background "gray85")))) + (widget-inactive-face ((t (:foreground "dim gray")))) + (widget-single-line-field-face ((t (:background "gray85"))))))) + +(defun color-theme-pierson () + "Black on White color theme by Dan L. Pierson, created 2000-06-08. +Supports default faces, font-lock, show-paren." + (interactive) + (color-theme-install + '(color-theme-pierson + ((background-color . "AntiqueWhite") + (background-mode . light) + (border-color . "black") + (cursor-color . "Orchid") + (foreground-color . "black") + (mouse-color . "Orchid")) + ((list-matching-lines-face . bold)) + (default ((t (nil)))) + (bold ((t (:bold t)))) + (bold-italic ((t (:italic t :bold t)))) + (font-lock-builtin-face ((t (:foreground "Orchid")))) + (font-lock-comment-face ((t (:foreground "ForestGreen")))) + (font-lock-constant-face ((t (:foreground "CadetBlue")))) + (font-lock-function-name-face ((t (:foreground "blue3")))) + (font-lock-keyword-face ((t (:foreground "Blue")))) + (font-lock-string-face ((t (:foreground "Firebrick")))) + (font-lock-type-face ((t (:foreground "Purple")))) + (font-lock-variable-name-face ((t (:foreground "blue3")))) + (font-lock-warning-face ((t (:bold t :foreground "Red")))) + (highlight ((t (:background "darkseagreen2")))) + (italic ((t (:italic t)))) + (modeline ((t (:foreground "antiquewhite" :background "black")))) + (modeline-mousable-minor-mode ((t (:foreground "antiquewhite" :background "black")))) + (modeline-mousable ((t (:foreground "antiquewhite" :background "black")))) + (modeline-buffer-id ((t (:foreground "antiquewhite" :background "black")))) + (region ((t (:background "gray")))) + (secondary-selection ((t (:background "paleturquoise")))) + (show-paren-match-face ((t (:background "turquoise")))) + (show-paren-mismatch-face ((t (:background "purple" :foreground "white")))) + (underline ((t (:underline t))))))) + +(defun color-theme-xemacs () + "XEmacs standard colors. +If you are missing standard faces in this theme, please notify the maintainer. +Currently, this theme includes the standard faces and font-lock faces, including +some faces used in Emacs only but which are needed to recreate the look of the +XEmacs color theme." + (interactive) + (color-theme-install + '(color-theme-xemacs + ((background-color . "gray80") + (background-mode . light) + (background-toolbar-color . "#cf3ccf3ccf3c") + (border-color . "#000000000000") + (bottom-toolbar-shadow-color . "#79e77df779e7") + (cursor-color . "Red3") + (foreground-color . "black") + (top-toolbar-shadow-color . "#fffffbeeffff")) + (default ((t (nil)))) + (blue ((t (:foreground "blue")))) + (bold ((t (:bold t)))) + (bold-italic ((t (:italic t :bold t)))) + (border-glyph ((t (nil)))) + (custom-button-face ((t (:bold t)))) + (custom-changed-face ((t (:background "blue" :foreground "white")))) + (custom-documentation-face ((t (nil)))) + (custom-face-tag-face ((t (:underline t)))) + (custom-group-tag-face ((t (:underline t :foreground "blue")))) + (custom-group-tag-face-1 ((t (:underline t :foreground "red")))) + (custom-invalid-face ((t (:background "red" :foreground "yellow")))) + (custom-modified-face ((t (:background "blue" :foreground "white")))) + (custom-rogue-face ((t (:background "black" :foreground "pink")))) + (custom-saved-face ((t (:underline t)))) + (custom-set-face ((t (:background "white" :foreground "blue")))) + (custom-state-face ((t (:foreground "dark green")))) + (custom-variable-button-face ((t (:underline t :bold t)))) + (custom-variable-tag-face ((t (:underline t :foreground "blue")))) + (dired-face-boring ((t (:foreground "Gray65")))) + (dired-face-directory ((t (:bold t)))) + (dired-face-executable ((t (:foreground "SeaGreen")))) + (dired-face-flagged ((t (:background "LightSlateGray")))) + (dired-face-marked ((t (:background "PaleVioletRed")))) + (dired-face-permissions ((t (:background "grey75" :foreground "black")))) + (dired-face-setuid ((t (:foreground "Red")))) + (dired-face-socket ((t (:foreground "magenta")))) + (dired-face-symlink ((t (:foreground "cyan")))) + (font-lock-builtin-face ((t (:foreground "red3")))) + (font-lock-comment-face ((t (:foreground "blue4")))) + (font-lock-constant-face ((t (:foreground "red3")))) + (font-lock-doc-string-face ((t (:foreground "green4")))) + (font-lock-function-name-face ((t (:foreground "brown4")))) + (font-lock-keyword-face ((t (:foreground "red4")))) + (font-lock-preprocessor-face ((t (:foreground "blue3")))) + (font-lock-reference-face ((t (:foreground "red3")))) + (font-lock-string-face ((t (:foreground "green4")))) + (font-lock-type-face ((t (:foreground "steelblue")))) + (font-lock-variable-name-face ((t (:foreground "magenta4")))) + (font-lock-warning-face ((t (:bold t :foreground "Red")))) + (green ((t (:foreground "green")))) + (gui-button-face ((t (:background "grey75" :foreground "black")))) + (gui-element ((t (:background "Gray80")))) + (highlight ((t (:background "darkseagreen2")))) + (info-node ((t (:italic t :bold t)))) + (info-xref ((t (:bold t)))) + (isearch ((t (:background "paleturquoise")))) + (italic ((t (:italic t)))) + (left-margin ((t (nil)))) + (list-mode-item-selected ((t (:background "gray68")))) + (modeline ((t (:background "Gray80")))) + (modeline-buffer-id ((t (:background "Gray80" :foreground "blue4")))) + (modeline-mousable ((t (:background "Gray80" :foreground "firebrick")))) + (modeline-mousable-minor-mode ((t (:background "Gray80" :foreground "green4")))) + (paren-blink-off ((t (:foreground "gray80")))) + (paren-match ((t (:background "darkseagreen2")))) + (paren-mismatch ((t (:background "DeepPink" :foreground "black")))) + (pointer ((t (nil)))) + (primary-selection ((t (:background "gray65")))) + (red ((t (:foreground "red")))) + (region ((t (:background "gray65")))) + (right-margin ((t (nil)))) + (secondary-selection ((t (:background "paleturquoise")))) + (text-cursor ((t (:background "Red3" :foreground "gray80")))) + (toolbar ((t (:background "Gray80")))) + (underline ((t (:underline t)))) + (vertical-divider ((t (:background "Gray80")))) + (widget-button-face ((t (:bold t)))) + (widget-button-pressed-face ((t (:foreground "red")))) + (widget-documentation-face ((t (:foreground "dark green")))) + (widget-field-face ((t (:background "gray85")))) + (widget-inactive-face ((t (:foreground "dim gray")))) + (yellow ((t (:foreground "yellow")))) + (zmacs-region ((t (:background "gray65"))))))) + +(defun color-theme-jsc-light () + "Color theme by John S Cooper, created 2000-06-08." + (interactive) + (color-theme-install + '(color-theme-jsc-light + ((background-color . "white") + (background-mode . light) + (border-color . "black") + (cursor-color . "Red") + (foreground-color . "black") + (mouse-color . "black")) + ((gnus-mouse-face . highlight) + (list-matching-lines-face . bold) + (view-highlight-face . highlight)) + (default ((t (nil)))) + (bold ((t (:bold t :foreground "red3")))) + (bold-italic ((t (:italic t :bold t :foreground "red")))) + (custom-button-face ((t (nil)))) + (custom-changed-face ((t (:background "blue" :foreground "white")))) + (custom-documentation-face ((t (nil)))) + (custom-face-tag-face ((t (:underline t)))) + (custom-group-tag-face ((t (:underline t :foreground "blue")))) + (custom-group-tag-face-1 ((t (:underline t :foreground "red")))) + (custom-invalid-face ((t (:background "red" :foreground "yellow")))) + (custom-modified-face ((t (:background "blue" :foreground "white")))) + (custom-rogue-face ((t (:background "black" :foreground "pink")))) + (custom-saved-face ((t (:underline t)))) + (custom-set-face ((t (:background "white" :foreground "blue")))) + (custom-state-face ((t (:foreground "dark green")))) + (custom-variable-button-face ((t (:underline t :bold t)))) + (custom-variable-tag-face ((t (:underline t :foreground "blue")))) + (font-lock-builtin-face ((t (:foreground "Orchid")))) + (font-lock-comment-face ((t (:italic t :bold t :foreground "Red3")))) + (font-lock-constant-face ((t (:foreground "navy")))) + (font-lock-function-name-face ((t (:bold t :foreground "Blue")))) + (font-lock-keyword-face ((t (:bold t :foreground "Purple")))) + (font-lock-string-face ((t (:foreground "Green4")))) + (font-lock-type-face ((t (:foreground "Navy")))) + (font-lock-variable-name-face ((t (:foreground "Tan4")))) + (font-lock-warning-face ((t (:bold t :foreground "Red")))) + (gnus-cite-attribution-face ((t (:italic t)))) + (gnus-cite-face-1 ((t (:foreground "MidnightBlue")))) + (gnus-cite-face-10 ((t (:foreground "medium purple")))) + (gnus-cite-face-11 ((t (:foreground "turquoise")))) + (gnus-cite-face-2 ((t (:foreground "firebrick")))) + (gnus-cite-face-3 ((t (:foreground "dark green")))) + (gnus-cite-face-4 ((t (:foreground "OrangeRed")))) + (gnus-cite-face-5 ((t (:foreground "dark khaki")))) + (gnus-cite-face-6 ((t (:foreground "dark violet")))) + (gnus-cite-face-7 ((t (:foreground "SteelBlue4")))) + (gnus-cite-face-8 ((t (:foreground "magenta")))) + (gnus-cite-face-9 ((t (:foreground "violet")))) + (gnus-emphasis-bold ((t (:bold t)))) + (gnus-emphasis-bold-italic ((t (:italic t :bold t)))) + (gnus-emphasis-highlight-words ((t (:background "black" :foreground "yellow")))) + (gnus-emphasis-italic ((t (:italic t)))) + (gnus-emphasis-underline ((t (:underline t)))) + (gnus-emphasis-underline-bold ((t (:underline t :bold t)))) + (gnus-emphasis-underline-bold-italic ((t (:underline t :italic t :bold t)))) + (gnus-emphasis-underline-italic ((t (:underline t :italic t)))) + (gnus-group-mail-1-empty-face ((t (:foreground "DeepPink3")))) + (gnus-group-mail-1-face ((t (:bold t :foreground "DeepPink3")))) + (gnus-group-mail-2-empty-face ((t (:foreground "HotPink3")))) + (gnus-group-mail-2-face ((t (:bold t :foreground "HotPink3")))) + (gnus-group-mail-3-empty-face ((t (:foreground "magenta4")))) + (gnus-group-mail-3-face ((t (:bold t :foreground "magenta4")))) + (gnus-group-mail-low-empty-face ((t (:foreground "DeepPink4")))) + (gnus-group-mail-low-face ((t (:bold t :foreground "DeepPink4")))) + (gnus-group-news-1-empty-face ((t (:foreground "blue2")))) + (gnus-group-news-1-face ((t (:bold t :foreground "blue2")))) + (gnus-group-news-2-empty-face ((t (:foreground "CadetBlue4")))) + (gnus-group-news-2-face ((t (:bold t :foreground "CadetBlue4")))) + (gnus-group-news-3-empty-face ((t (nil)))) + (gnus-group-news-3-face ((t (:bold t)))) + (gnus-group-news-4-empty-face ((t (nil)))) + (gnus-group-news-4-face ((t (:bold t)))) + (gnus-group-news-5-empty-face ((t (nil)))) + (gnus-group-news-5-face ((t (:bold t)))) + (gnus-group-news-6-empty-face ((t (nil)))) + (gnus-group-news-6-face ((t (:bold t)))) + (gnus-group-news-low-empty-face ((t (:foreground "DarkGreen")))) + (gnus-group-news-low-face ((t (:bold t :foreground "DarkGreen")))) + (gnus-header-content-face ((t (:italic t :foreground "blue")))) + (gnus-header-from-face ((t (:foreground "red3")))) + (gnus-header-name-face ((t (:foreground "red3")))) + (gnus-header-newsgroups-face ((t (:italic t :foreground "MidnightBlue")))) + (gnus-header-subject-face ((t (:bold t :foreground "red")))) + (gnus-signature-face ((t (:foreground "pink")))) + (gnus-splash-face ((t (:foreground "Brown")))) + (gnus-summary-cancelled-face ((t (:background "black" :foreground "yellow")))) + (gnus-summary-high-ancient-face ((t (:bold t :foreground "RoyalBlue")))) + (gnus-summary-high-read-face ((t (:bold t :foreground "navy")))) + (gnus-summary-high-ticked-face ((t (:bold t :foreground "firebrick")))) + (gnus-summary-high-unread-face ((t (:bold t :foreground "blue")))) + (gnus-summary-low-ancient-face ((t (:italic t :foreground "RoyalBlue")))) + (gnus-summary-low-read-face ((t (:italic t :foreground "DarkGreen")))) + (gnus-summary-low-ticked-face ((t (:italic t :foreground "firebrick")))) + (gnus-summary-low-unread-face ((t (:italic t)))) + (gnus-summary-normal-ancient-face ((t (:foreground "RoyalBlue")))) + (gnus-summary-normal-read-face ((t (:foreground "red3")))) + (gnus-summary-normal-ticked-face ((t (:foreground "black")))) + (gnus-summary-normal-unread-face ((t (:bold t :foreground "red3")))) + (gnus-summary-selected-face ((t (:underline t)))) + (highlight ((t (:background "antiquewhite" :foreground "blue")))) + (italic ((t (:italic t)))) + (makefile-space-face ((t (:background "hotpink")))) + (message-cited-text-face ((t (:foreground "red")))) + (message-header-cc-face ((t (:foreground "MidnightBlue")))) + (message-header-name-face ((t (:foreground "cornflower blue")))) + (message-header-newsgroups-face ((t (:italic t :bold t :foreground "blue4")))) + (message-header-other-face ((t (:foreground "steel blue")))) + (message-header-subject-face ((t (:bold t :foreground "navy blue")))) + (message-header-to-face ((t (:bold t :foreground "MidnightBlue")))) + (message-header-xheader-face ((t (:foreground "blue")))) + (message-mml-face ((t (:foreground "ForestGreen")))) + (message-separator-face ((t (:foreground "brown")))) + (modeline ((t (:background "plum" :foreground "black")))) + (modeline-buffer-id ((t (:background "plum" :foreground "black")))) + (modeline-mousable ((t (:background "plum" :foreground "black")))) + (modeline-mousable-minor-mode ((t (:background "plum" :foreground "black")))) + (region ((t (:background "plum")))) + (secondary-selection ((t (:background "palegreen")))) + (show-paren-match-face ((t (:background "plum")))) + (show-paren-mismatch-face ((t (:background "navy" :foreground "white")))) + (speedbar-button-face ((t (:foreground "green4")))) + (speedbar-directory-face ((t (:foreground "blue4")))) + (speedbar-file-face ((t (:foreground "cyan4")))) + (speedbar-highlight-face ((t (:background "green")))) + (speedbar-selected-face ((t (:underline t :foreground "red")))) + (speedbar-tag-face ((t (:foreground "brown")))) + (underline ((t (:underline t)))) + (widget-button-face ((t (:bold t)))) + (widget-button-pressed-face ((t (:foreground "red")))) + (widget-documentation-face ((t (:foreground "dark green")))) + (widget-field-face ((t (:background "gray85")))) + (widget-inactive-face ((t (:foreground "dim gray")))) + (widget-single-line-field-face ((t (:background "gray85"))))))) + +(defun color-theme-jsc-dark () + "Color theme by John S Cooper, created 2000-06-11." + (interactive) + (color-theme-install + '(color-theme-jsc-dark + ((background-color . "black") + (background-mode . dark) + (border-color . "black") + (cursor-color . "white") + (foreground-color . "cornsilk") + (mouse-color . "black")) + ((gnus-mouse-face . highlight) + (goto-address-mail-face . italic) + (goto-address-mail-mouse-face . secondary-selection) + (goto-address-url-face . bold) + (goto-address-url-mouse-face . highlight) + (list-matching-lines-face . bold) + (view-highlight-face . highlight)) + (blank-space-face ((t (:background "LightGray")))) + (blank-tab-face ((t (:background "cornsilk" :foreground "black")))) + (default ((t (nil)))) + (bold ((t (:bold t :foreground "white")))) + (bold-italic ((t (:italic t :bold t)))) + (calendar-today-face ((t (:underline t)))) + (cperl-array-face ((t (:bold t :background "lightyellow2" :foreground "Blue")))) + (cperl-hash-face ((t (:italic t :bold t :background "lightyellow2" :foreground "Red")))) + (cperl-nonoverridable-face ((t (:foreground "chartreuse3")))) + (custom-button-face ((t (:foreground "white")))) + (custom-changed-face ((t (:background "skyblue" :foreground "wheat")))) + (custom-documentation-face ((t (:foreground "white")))) + (custom-face-tag-face ((t (:underline t :foreground "white")))) + (custom-group-tag-face ((t (:underline t :foreground "skyblue")))) + (custom-group-tag-face-1 ((t (:underline t :foreground "pink")))) + (custom-invalid-face ((t (:background "red" :foreground "yellow")))) + (custom-modified-face ((t (:background "blue" :foreground "white")))) + (custom-rogue-face ((t (:background "black" :foreground "pink")))) + (custom-saved-face ((t (:underline t)))) + (custom-set-face ((t (:foreground "blue")))) + (custom-state-face ((t (:foreground "light green")))) + (custom-variable-button-face ((t (:underline t :bold t)))) + (custom-variable-tag-face ((t (:underline t :foreground "skyblue")))) + (diary-face ((t (:bold t :foreground "orange")))) + (font-lock-builtin-face ((t (:bold t :foreground "LightSteelBlue")))) + (font-lock-comment-face ((t (:italic t :foreground "red")))) + (font-lock-constant-face ((t (:bold t :foreground "salmon")))) + (font-lock-function-name-face ((t (:bold t :foreground "orange")))) + (font-lock-keyword-face ((t (:bold t :foreground "gold")))) + (font-lock-string-face ((t (:italic t :foreground "orange")))) + (font-lock-type-face ((t (:bold t :foreground "gold")))) + (font-lock-variable-name-face ((t (:italic t :bold t :foreground "light salmon")))) + (font-lock-warning-face ((t (:bold t :foreground "gold")))) + (gnus-cite-attribution-face ((t (:italic t)))) + (gnus-cite-face-1 ((t (:foreground "light cyan")))) + (gnus-cite-face-10 ((t (:foreground "medium purple")))) + (gnus-cite-face-11 ((t (:foreground "turquoise")))) + (gnus-cite-face-2 ((t (:foreground "light blue")))) + (gnus-cite-face-3 ((t (:foreground "light yellow")))) + (gnus-cite-face-4 ((t (:foreground "light pink")))) + (gnus-cite-face-5 ((t (:foreground "pale green")))) + (gnus-cite-face-6 ((t (:foreground "beige")))) + (gnus-cite-face-7 ((t (:foreground "orange")))) + (gnus-cite-face-8 ((t (:foreground "magenta")))) + (gnus-cite-face-9 ((t (:foreground "violet")))) + (gnus-emphasis-bold ((t (:bold t)))) + (gnus-emphasis-bold-italic ((t (:italic t :bold t)))) + (gnus-emphasis-highlight-words ((t (:background "black" :foreground "yellow")))) + (gnus-emphasis-italic ((t (:italic t)))) + (gnus-emphasis-underline ((t (:background "goldenrod4" :foreground "white")))) + (gnus-emphasis-underline-bold ((t (:underline t :bold t :background "yellow" :foreground "black")))) + (gnus-emphasis-underline-bold-italic ((t (:underline t :italic t :bold t :background "yellow" :foreground "black")))) + (gnus-emphasis-underline-italic ((t (:underline t :italic t :background "yellow" :foreground "black")))) + (gnus-filterhist-face-1 ((t (nil)))) + (gnus-group-mail-1-empty-face ((t (:foreground "gray80")))) + (gnus-group-mail-1-face ((t (:bold t :foreground "white")))) + (gnus-group-mail-2-empty-face ((t (:foreground "lightcyan")))) + (gnus-group-mail-2-face ((t (:bold t :foreground "lightcyan")))) + (gnus-group-mail-3-empty-face ((t (:foreground "tan")))) + (gnus-group-mail-3-face ((t (:bold t :foreground "tan")))) + (gnus-group-mail-low-empty-face ((t (:foreground "aquamarine4")))) + (gnus-group-mail-low-face ((t (:bold t :foreground "aquamarine4")))) + (gnus-group-news-1-empty-face ((t (:foreground "white")))) + (gnus-group-news-1-face ((t (:bold t :foreground "white")))) + (gnus-group-news-2-empty-face ((t (:foreground "lightcyan")))) + (gnus-group-news-2-face ((t (:bold t :foreground "lightcyan")))) + (gnus-group-news-3-empty-face ((t (:foreground "tan")))) + (gnus-group-news-3-face ((t (:bold t :foreground "tan")))) + (gnus-group-news-4-empty-face ((t (:foreground "white")))) + (gnus-group-news-4-face ((t (:bold t :foreground "white")))) + (gnus-group-news-5-empty-face ((t (:foreground "wheat")))) + (gnus-group-news-5-face ((t (:bold t :foreground "wheat")))) + (gnus-group-news-6-empty-face ((t (:foreground "tan")))) + (gnus-group-news-6-face ((t (:bold t :foreground "tan")))) + (gnus-group-news-low-empty-face ((t (:foreground "DarkTurquoise")))) + (gnus-group-news-low-face ((t (:bold t :foreground "DarkTurquoise")))) + (gnus-header-content-face ((t (:italic t :foreground "plum1")))) + (gnus-header-from-face ((t (:bold t :foreground "wheat")))) + (gnus-header-name-face ((t (:bold t :foreground "gold")))) + (gnus-header-newsgroups-face ((t (:italic t :bold t :foreground "wheat")))) + (gnus-header-subject-face ((t (:bold t :foreground "red")))) + (gnus-signature-face ((t (:italic t :foreground "maroon")))) + (gnus-splash ((t (:foreground "Brown")))) + (gnus-splash-face ((t (:foreground "gold")))) + (gnus-summary-cancelled-face ((t (:background "gray" :foreground "black")))) + (gnus-summary-high-ancient-face ((t (:bold t :foreground "SkyBlue")))) + (gnus-summary-high-read-face ((t (:bold t :foreground "PaleGreen")))) + (gnus-summary-high-ticked-face ((t (:bold t :foreground "gray70")))) + (gnus-summary-high-unread-face ((t (:italic t :bold t)))) + (gnus-summary-low-ancient-face ((t (:italic t :foreground "SkyBlue")))) + (gnus-summary-low-read-face ((t (:italic t :foreground "PaleGreen")))) + (gnus-summary-low-ticked-face ((t (:italic t :bold t :foreground "gray70")))) + (gnus-summary-low-unread-face ((t (:italic t)))) + (gnus-summary-normal-ancient-face ((t (:foreground "SkyBlue")))) + (gnus-summary-normal-read-face ((t (:foreground "PaleGreen")))) + (gnus-summary-normal-ticked-face ((t (:bold t :foreground "gray70")))) + (gnus-summary-normal-unread-face ((t (:bold t)))) + (gnus-summary-selected-face ((t (:underline t :background "deepskyblue4")))) + (highlight ((t (:background "darkslategray" :foreground "wheat")))) + (highlight-changes-delete-face ((t (:underline t :foreground "red")))) + (highlight-changes-face ((t (:foreground "red")))) + (highline-face ((t (:background "gray35")))) + (holiday-face ((t (:background "red")))) + (info-menu-5 ((t (:underline t)))) + (info-node ((t (:italic t :bold t :foreground "yellow")))) + (info-xref ((t (:bold t :foreground "plum")))) + (italic ((t (:italic t)))) + (lazy-highlight-face ((t (:bold t :foreground "dark magenta")))) + (linemenu-face ((t (:background "gray30")))) + (makefile-space-face ((t (:background "hotpink")))) + (message-cited-text-face ((t (:foreground "plum1")))) + (message-header-cc-face ((t (:bold t :foreground "ivory")))) + (message-header-name-face ((t (:foreground "light sky blue")))) + (message-header-newsgroups-face ((t (:italic t :bold t :foreground "lavender blush")))) + (message-header-other-face ((t (:foreground "pale turquoise")))) + (message-header-subject-face ((t (:bold t :foreground "papaya whip")))) + (message-header-to-face ((t (:bold t :foreground "floral white")))) + (message-header-xheader-face ((t (:foreground "blue")))) + (message-mml-face ((t (:bold t :foreground "ForestGreen")))) + (message-separator-face ((t (:foreground "sandy brown")))) + (modeline ((t (:background "tan" :foreground "black")))) + (modeline-buffer-id ((t (:background "tan" :foreground "black")))) + (modeline-mousable ((t (:background "tan" :foreground "black")))) + (modeline-mousable-minor-mode ((t (:background "tan" :foreground "black")))) + (paren-mismatch-face ((t (:bold t :background "white" :foreground "red")))) + (paren-no-match-face ((t (:bold t :background "white" :foreground "red")))) + (region ((t (:background "slategrey")))) + (secondary-selection ((t (:background "deepskyblue4")))) + (sgml-doctype-face ((t (:foreground "orange")))) + (sgml-end-tag-face ((t (:foreground "greenyellow")))) + (sgml-entity-face ((t (:foreground "gold")))) + (sgml-ignored-face ((t (:background "gray60" :foreground "gray20")))) + (sgml-sgml-face ((t (:foreground "yellow")))) + (sgml-start-tag-face ((t (:foreground "mediumspringgreen")))) + (show-paren-match-face ((t (:background "deepskyblue4")))) + (show-paren-mismatch-face ((t (:bold t :background "red" :foreground "white")))) + (speedbar-button-face ((t (:foreground "green4")))) + (speedbar-directory-face ((t (:foreground "blue4")))) + (speedbar-file-face ((t (:bold t :foreground "cyan4")))) + (speedbar-highlight-face ((t (:background "green")))) + (speedbar-selected-face ((t (:underline t :foreground "red")))) + (speedbar-tag-face ((t (:foreground "brown")))) + (underline ((t (:underline t)))) + (widget-button-face ((t (:bold t)))) + (widget-button-pressed-face ((t (:foreground "red")))) + (widget-documentation-face ((t (:foreground "lime green")))) + (widget-field-face ((t (:background "gray20")))) + (widget-inactive-face ((t (:foreground "wheat")))) + (widget-single-line-field-face ((t (:background "gray20")))) + (woman-bold-face ((t (:bold t)))) + (woman-italic-face ((t (:foreground "beige")))) + (woman-unknown-face ((t (:foreground "LightSalmon"))))))) + +(defun color-theme-greiner () + "Color theme by Kevin Greiner, created 2000-06-13. +Black on Beige, supports default, font-lock, speedbar, custom, widget +faces. Designed to be easy on the eyes, particularly on Win32 +computers which commonly have white window backgrounds." + (interactive) + (color-theme-install + '(color-theme-greiner + ((background-color . "beige") + (background-mode . light) + (border-color . "black") + (cursor-color . "black") + (foreground-color . "black") + (mouse-color . "black")) + ((list-matching-lines-face . bold)) + (default ((t (nil)))) + (bold ((t (:bold t)))) + (bold-italic ((t (:italic t :bold t)))) + (custom-button-face ((t (nil)))) + (custom-changed-face ((t (:background "blue" :foreground "white")))) + (custom-documentation-face ((t (nil)))) + (custom-face-tag-face ((t (:underline t)))) + (custom-group-tag-face ((t (:underline t :foreground "blue")))) + (custom-group-tag-face-1 ((t (:underline t :foreground "red")))) + (custom-invalid-face ((t (:background "red" :foreground "yellow")))) + (custom-modified-face ((t (:background "blue" :foreground "white")))) + (custom-rogue-face ((t (:background "black" :foreground "pink")))) + (custom-saved-face ((t (:underline t)))) + (custom-set-face ((t (:background "white" :foreground "blue")))) + (custom-state-face ((t (:foreground "dark green")))) + (custom-variable-button-face ((t (:underline t :bold t)))) + (custom-variable-tag-face ((t (:underline t :foreground "blue")))) + (font-lock-builtin-face ((t (:foreground "blue4")))) + (font-lock-comment-face ((t (:foreground "Firebrick")))) + (font-lock-constant-face ((t (:foreground "CadetBlue")))) + (font-lock-function-name-face ((t (:foreground "Blue")))) + (font-lock-keyword-face ((t (:foreground "royal blue")))) + (font-lock-string-face ((t (:foreground "RosyBrown")))) + (font-lock-type-face ((t (:foreground "ForestGreen")))) + (font-lock-variable-name-face ((t (:foreground "DarkGoldenrod")))) + (font-lock-warning-face ((t (:bold t :foreground "Red")))) + (highlight ((t (:background "darkseagreen2")))) + (info-menu-5 ((t (:underline t)))) + (info-node ((t (:italic t :bold t)))) + (info-xref ((t (:bold t)))) + (italic ((t (:italic t)))) + (modeline ((t (:background "black" :foreground "white")))) + (modeline-mousable-minor-mode ((t (:background "black" :foreground "white")))) + (modeline-mousable ((t (:background "black" :foreground "white")))) + (modeline-buffer-id ((t (:background "black" :foreground "white")))) + (region ((t (:background "gray")))) + (secondary-selection ((t (:background "paleturquoise")))) + (show-paren-match-face ((t (:background "turquoise")))) + (show-paren-mismatch-face ((t (:background "purple" :foreground "white")))) + (speedbar-button-face ((t (:foreground "green4")))) + (speedbar-directory-face ((t (:foreground "blue4")))) + (speedbar-file-face ((t (:foreground "cyan4")))) + (speedbar-highlight-face ((t (:background "green")))) + (speedbar-selected-face ((t (:underline t :foreground "red")))) + (speedbar-tag-face ((t (:foreground "brown")))) + (underline ((t (:underline t)))) + (widget-button-face ((t (:bold t)))) + (widget-button-pressed-face ((t (:foreground "red")))) + (widget-documentation-face ((t (:foreground "dark green")))) + (widget-field-face ((t (:background "gray85")))) + (widget-inactive-face ((t (:foreground "dim gray")))) + (widget-single-line-field-face ((t (:background "gray85"))))))) + +(defun color-theme-jb-simple () + "Color theme by jeff, created 2000-06-14. +Uses white background and bold for many things" + (interactive) + (color-theme-install + '(color-theme-jb-simple + ((background-color . "white") + (background-mode . light) + (background-toolbar-color . "#cf3ccf3ccf3c") + (border-color . "black") + (bottom-toolbar-shadow-color . "#79e77df779e7") + (cursor-color . "black") + (foreground-color . "black") + (mouse-color . "black") + (top-toolbar-shadow-color . "#fffffbeeffff")) + ((gnus-mouse-face . highlight) + (list-matching-lines-face . bold) + (rmail-highlight-face . font-lock-function-name-face) + (view-highlight-face . highlight)) + (default ((t (nil)))) + (blank-space-face ((t (nil)))) + (blank-tab-face ((t (nil)))) + (blue ((t (nil)))) + (bold ((t (:bold t)))) + (bold-italic ((t (:italic t :bold t)))) + (border-glyph ((t (nil)))) + (calendar-today-face ((t (:underline t)))) + (cperl-array-face ((t (:bold t :background "lightyellow2" :foreground "Blue")))) + (cperl-hash-face ((t (:italic t :bold t :background "lightyellow2" :foreground "Red")))) + (cperl-nonoverridable-face ((t (:foreground "chartreuse3")))) + (custom-button-face ((t (:bold t)))) + (custom-changed-face ((t (:background "blue" :foreground "white")))) + (custom-documentation-face ((t (nil)))) + (custom-face-tag-face ((t (:underline t)))) + (custom-group-tag-face ((t (:underline t :bold t :foreground "blue")))) + (custom-group-tag-face-1 ((t (:underline t :foreground "red")))) + (custom-invalid-face ((t (:background "red" :foreground "yellow")))) + (custom-modified-face ((t (:background "blue" :foreground "white")))) + (custom-rogue-face ((t (:background "black" :foreground "pink")))) + (custom-saved-face ((t (:underline t)))) + (custom-set-face ((t (:background "white" :foreground "blue")))) + (custom-state-face ((t (:foreground "dark green")))) + (custom-variable-button-face ((t (:underline t :bold t)))) + (custom-variable-tag-face ((t (:underline t :bold t :foreground "blue")))) + (diary-face ((t (:bold t :foreground "red")))) + (ediff-current-diff-face-A ((t (:background "pale green" :foreground "firebrick")))) + (ediff-current-diff-face-Ancestor ((t (:background "VioletRed" :foreground "Black")))) + (ediff-current-diff-face-B ((t (:background "Yellow" :foreground "DarkOrchid")))) + (ediff-current-diff-face-C ((t (:background "Pink" :foreground "Navy")))) + (ediff-even-diff-face-A ((t (:background "light grey" :foreground "Black")))) + (ediff-even-diff-face-Ancestor ((t (:background "Grey" :foreground "White")))) + (ediff-even-diff-face-B ((t (:background "Grey" :foreground "White")))) + (ediff-even-diff-face-C ((t (:background "light grey" :foreground "Black")))) + (ediff-fine-diff-face-A ((t (:background "sky blue" :foreground "Navy")))) + (ediff-fine-diff-face-Ancestor ((t (:background "Green" :foreground "Black")))) + (ediff-fine-diff-face-B ((t (:background "cyan" :foreground "Black")))) + (ediff-fine-diff-face-C ((t (:background "Turquoise" :foreground "Black")))) + (ediff-odd-diff-face-A ((t (:background "Grey" :foreground "White")))) + (ediff-odd-diff-face-Ancestor ((t (:background "light grey" :foreground "Black")))) + (ediff-odd-diff-face-B ((t (:background "light grey" :foreground "Black")))) + (ediff-odd-diff-face-C ((t (:background "Grey" :foreground "White")))) + (erc-action-face ((t (:bold t)))) + (erc-bold-face ((t (:bold t)))) + (erc-default-face ((t (nil)))) + (erc-direct-msg-face ((t (nil)))) + (erc-error-face ((t (:bold t)))) + (erc-input-face ((t (nil)))) + (erc-inverse-face ((t (nil)))) + (erc-notice-face ((t (nil)))) + (erc-pal-face ((t (nil)))) + (erc-prompt-face ((t (nil)))) + (erc-underline-face ((t (nil)))) + (eshell-ls-archive-face ((t (:bold t :foreground "Orchid")))) + (eshell-ls-backup-face ((t (:foreground "OrangeRed")))) + (eshell-ls-clutter-face ((t (:bold t :foreground "OrangeRed")))) + (eshell-ls-directory-face ((t (:bold t :foreground "Blue")))) + (eshell-ls-executable-face ((t (:bold t :foreground "ForestGreen")))) + (eshell-ls-missing-face ((t (:bold t :foreground "Red")))) + (eshell-ls-picture-face ((t (nil)))) + (eshell-ls-product-face ((t (:foreground "OrangeRed")))) + (eshell-ls-readonly-face ((t (:foreground "Brown")))) + (eshell-ls-special-face ((t (:bold t :foreground "Magenta")))) + (eshell-ls-symlink-face ((t (:bold t :foreground "DarkCyan")))) + (eshell-ls-unreadable-face ((t (:foreground "Grey30")))) + (eshell-prompt-face ((t (:bold t :foreground "Red")))) + (eshell-test-failed-face ((t (:bold t :foreground "OrangeRed")))) + (eshell-test-ok-face ((t (:bold t :foreground "Green")))) + (excerpt ((t (:italic t)))) + (ff-paths-non-existant-file-face ((t (:bold t :foreground "NavyBlue")))) + (fixed ((t (:bold t)))) + (flyspell-duplicate-face ((t (:underline t :bold t :foreground "Gold3")))) + (flyspell-incorrect-face ((t (:underline t :bold t :foreground "OrangeRed")))) + (font-latex-bold-face ((t (nil)))) + (font-latex-italic-face ((t (nil)))) + (font-latex-math-face ((t (nil)))) + (font-latex-sedate-face ((t (nil)))) + (font-latex-string-face ((t (nil)))) + (font-latex-warning-face ((t (nil)))) + (font-lock-builtin-face ((t (:bold t :foreground "Orchid")))) + (font-lock-comment-face ((t (:italic t :bold t :foreground "blue4")))) + (font-lock-constant-face ((t (:bold t :foreground "CadetBlue")))) + (font-lock-doc-string-face ((t (:italic t :bold t :foreground "blue4")))) + (font-lock-exit-face ((t (nil)))) + (font-lock-function-name-face ((t (:bold t :foreground "brown4")))) + (font-lock-keyword-face ((t (:bold t :foreground "black")))) + (font-lock-preprocessor-face ((t (:foreground "blue3")))) + (font-lock-reference-face ((t (:foreground "red3")))) + (font-lock-string-face ((t (:italic t :bold t :foreground "green4")))) + (font-lock-type-face ((t (:bold t :foreground "steelblue")))) + (font-lock-variable-name-face ((t (:italic t :bold t :foreground "magenta4")))) + (font-lock-warning-face ((t (:bold t :foreground "Red")))) + (gnus-cite-attribution-face ((t (:italic t :bold t)))) + (gnus-cite-face-1 ((t (:foreground "MidnightBlue")))) + (gnus-cite-face-10 ((t (:foreground "medium purple")))) + (gnus-cite-face-11 ((t (:foreground "turquoise")))) + (gnus-cite-face-2 ((t (:foreground "firebrick")))) + (gnus-cite-face-3 ((t (:foreground "dark green")))) + (gnus-cite-face-4 ((t (:foreground "OrangeRed")))) + (gnus-cite-face-5 ((t (:foreground "dark khaki")))) + (gnus-cite-face-6 ((t (:foreground "dark violet")))) + (gnus-cite-face-7 ((t (:foreground "SteelBlue4")))) + (gnus-cite-face-8 ((t (:foreground "magenta")))) + (gnus-cite-face-9 ((t (:foreground "violet")))) + (gnus-emphasis-bold ((t (:bold t)))) + (gnus-emphasis-bold-italic ((t (:italic t :bold t)))) + (gnus-emphasis-highlight-words ((t (nil)))) + (gnus-emphasis-italic ((t (:italic t)))) + (gnus-emphasis-underline ((t (:underline t)))) + (gnus-emphasis-underline-bold ((t (:underline t :bold t)))) + (gnus-emphasis-underline-bold-italic ((t (:underline t :italic t :bold t)))) + (gnus-emphasis-underline-italic ((t (:underline t :italic t)))) + (gnus-filterhist-face-1 ((t (nil)))) + (gnus-group-mail-1-empty-face ((t (:foreground "DeepPink3")))) + (gnus-group-mail-1-face ((t (:bold t :foreground "DeepPink3")))) + (gnus-group-mail-2-empty-face ((t (:foreground "HotPink3")))) + (gnus-group-mail-2-face ((t (:bold t :foreground "HotPink3")))) + (gnus-group-mail-3-empty-face ((t (:foreground "magenta4")))) + (gnus-group-mail-3-face ((t (:bold t :foreground "magenta4")))) + (gnus-group-mail-low-empty-face ((t (:foreground "DeepPink4")))) + (gnus-group-mail-low-face ((t (:bold t :foreground "DeepPink4")))) + (gnus-group-news-1-empty-face ((t (:foreground "ForestGreen")))) + (gnus-group-news-1-face ((t (:bold t :foreground "ForestGreen")))) + (gnus-group-news-2-empty-face ((t (:foreground "CadetBlue4")))) + (gnus-group-news-2-face ((t (:bold t :foreground "CadetBlue4")))) + (gnus-group-news-3-empty-face ((t (nil)))) + (gnus-group-news-3-face ((t (:bold t)))) + (gnus-group-news-4-empty-face ((t (nil)))) + (gnus-group-news-4-face ((t (:bold t)))) + (gnus-group-news-5-empty-face ((t (nil)))) + (gnus-group-news-5-face ((t (:bold t)))) + (gnus-group-news-6-empty-face ((t (nil)))) + (gnus-group-news-6-face ((t (:bold t)))) + (gnus-group-news-low-empty-face ((t (:foreground "DarkGreen")))) + (gnus-group-news-low-face ((t (:bold t :foreground "DarkGreen")))) + (gnus-header-content-face ((t (:italic t :foreground "indianred4")))) + (gnus-header-from-face ((t (:bold t :foreground "red3")))) + (gnus-header-name-face ((t (:bold t :foreground "maroon")))) + (gnus-header-newsgroups-face ((t (:italic t :bold t :foreground "MidnightBlue")))) + (gnus-header-subject-face ((t (:bold t :foreground "red4")))) + (gnus-signature-face ((t (:italic t)))) + (gnus-splash ((t (nil)))) + (gnus-splash-face ((t (:foreground "ForestGreen")))) + (gnus-summary-cancelled-face ((t (:background "black" :foreground "yellow")))) + (gnus-summary-high-ancient-face ((t (:bold t :foreground "RoyalBlue")))) + (gnus-summary-high-read-face ((t (:bold t :foreground "DarkGreen")))) + (gnus-summary-high-ticked-face ((t (:bold t :foreground "firebrick")))) + (gnus-summary-high-unread-face ((t (:italic t :bold t)))) + (gnus-summary-low-ancient-face ((t (:italic t :foreground "RoyalBlue")))) + (gnus-summary-low-read-face ((t (:italic t :foreground "DarkGreen")))) + (gnus-summary-low-ticked-face ((t (:italic t :bold t :foreground "firebrick")))) + (gnus-summary-low-unread-face ((t (:italic t)))) + (gnus-summary-normal-ancient-face ((t (:foreground "RoyalBlue")))) + (gnus-summary-normal-read-face ((t (:foreground "DarkGreen")))) + (gnus-summary-normal-ticked-face ((t (:bold t :foreground "firebrick")))) + (gnus-summary-normal-unread-face ((t (:bold t)))) + (gnus-summary-selected-face ((t (:underline t)))) + (green ((t (nil)))) + (gui-button-face ((t (:background "grey75")))) + (gui-element ((t (:background "Gray80")))) + (highlight ((t (:background "darkseagreen2")))) + (highlight-changes-delete-face ((t (:underline t :foreground "red")))) + (highlight-changes-face ((t (:foreground "red")))) + (highline-face ((t (:background "paleturquoise")))) + (holiday-face ((t (:background "pink")))) + (html-helper-italic-face ((t (:italic t)))) + (info-menu-5 ((t (:underline t)))) + (info-node ((t (:italic t :bold t)))) + (info-xref ((t (:bold t)))) + (isearch ((t (nil)))) + (italic ((t (:italic t)))) + (lazy-highlight-face ((t (:bold t :foreground "dark magenta")))) + (left-margin ((t (nil)))) + (linemenu-face ((t (nil)))) + (list-mode-item-selected ((t (nil)))) + (makefile-space-face ((t (:background "hotpink")))) + (message-cited-text-face ((t (:foreground "red")))) + (message-header-cc-face ((t (:bold t :foreground "MidnightBlue")))) + (message-header-name-face ((t (:foreground "cornflower blue")))) + (message-header-newsgroups-face ((t (:italic t :bold t :foreground "blue4")))) + (message-header-other-face ((t (:foreground "steel blue")))) + (message-header-subject-face ((t (:bold t :foreground "navy blue")))) + (message-header-to-face ((t (:bold t :foreground "MidnightBlue")))) + (message-header-xheader-face ((t (:foreground "blue")))) + (message-mml-face ((t (:bold t)))) + (message-separator-face ((t (:foreground "brown")))) + (modeline ((t (:background "darkblue" :foreground "yellow")))) + (modeline-buffer-id ((t (:background "black" :foreground "white")))) + (modeline-mousable ((t (:background "black" :foreground "white")))) + (modeline-mousable-minor-mode ((t (:background "black" :foreground "white")))) + (nil ((t (nil)))) + (paren-mismatch-face ((t (:bold t)))) + (paren-no-match-face ((t (:bold t)))) + (pointer ((t (nil)))) + (primary-selection ((t (nil)))) + (red ((t (nil)))) + (region ((t (:background "gray")))) + (right-margin ((t (nil)))) + (secondary-selection ((t (:background "paleturquoise")))) + (sgml-doctype-face ((t (nil)))) + (sgml-end-tag-face ((t (nil)))) + (sgml-entity-face ((t (nil)))) + (sgml-ignored-face ((t (nil)))) + (sgml-sgml-face ((t (nil)))) + (sgml-start-tag-face ((t (nil)))) + (show-paren-match-face ((t (:background "turquoise")))) + (show-paren-mismatch-face ((t (:bold t :background "purple" :foreground "white")))) + (speedbar-button-face ((t (:bold t :foreground "green4")))) + (speedbar-directory-face ((t (:bold t :foreground "blue4")))) + (speedbar-file-face ((t (:bold t :foreground "cyan4")))) + (speedbar-highlight-face ((t (:background "green")))) + (speedbar-selected-face ((t (:underline t :foreground "red")))) + (speedbar-tag-face ((t (:foreground "brown")))) + (swbuff-current-buffer-face ((t (:bold t)))) + (term-black ((t (:foreground "black")))) + (term-blackbg ((t (:background "black")))) + (term-blue ((t (:foreground "blue")))) + (term-bluebg ((t (:background "blue")))) + (term-bold ((t (:bold t)))) + (term-cyan ((t (:foreground "cyan")))) + (term-cyanbg ((t (:background "cyan")))) + (term-default-bg ((t (nil)))) + (term-default-bg-inv ((t (nil)))) + (term-default-fg ((t (nil)))) + (term-default-fg-inv ((t (nil)))) + (term-green ((t (:foreground "green")))) + (term-greenbg ((t (:background "green")))) + (term-invisible ((t (nil)))) + (term-invisible-inv ((t (nil)))) + (term-magenta ((t (:foreground "magenta")))) + (term-magentabg ((t (:background "magenta")))) + (term-red ((t (:foreground "red")))) + (term-redbg ((t (:background "red")))) + (term-underline ((t (:underline t)))) + (term-white ((t (:foreground "white")))) + (term-whitebg ((t (:background "white")))) + (term-yellow ((t (:foreground "yellow")))) + (term-yellowbg ((t (:background "yellow")))) + (text-cursor ((t (nil)))) + (toolbar ((t (nil)))) + (underline ((t (:underline t)))) + (vc-annotate-face-0046FF ((t (nil)))) + (vcursor ((t (:underline t :background "cyan" :foreground "blue")))) + (vertical-divider ((t (nil)))) + (vhdl-font-lock-attribute-face ((t (:foreground "Orchid")))) + (vhdl-font-lock-directive-face ((t (:foreground "CadetBlue")))) + (vhdl-font-lock-enumvalue-face ((t (:foreground "Gold4")))) + (vhdl-font-lock-function-face ((t (:foreground "Orchid4")))) + (vhdl-font-lock-prompt-face ((t (:bold t :foreground "Red")))) + (vhdl-font-lock-reserved-words-face ((t (:bold t :foreground "Orange")))) + (vhdl-font-lock-translate-off-face ((t (:background "LightGray")))) + (vhdl-speedbar-architecture-face ((t (:foreground "Blue")))) + (vhdl-speedbar-architecture-selected-face ((t (:underline t :foreground "Blue")))) + (vhdl-speedbar-configuration-face ((t (:foreground "DarkGoldenrod")))) + (vhdl-speedbar-configuration-selected-face ((t (:underline t :foreground "DarkGoldenrod")))) + (vhdl-speedbar-entity-face ((t (:foreground "ForestGreen")))) + (vhdl-speedbar-entity-selected-face ((t (:underline t :foreground "ForestGreen")))) + (vhdl-speedbar-instantiation-face ((t (:foreground "Brown")))) + (vhdl-speedbar-instantiation-selected-face ((t (:underline t :foreground "Brown")))) + (vhdl-speedbar-package-face ((t (:foreground "Grey50")))) + (vhdl-speedbar-package-selected-face ((t (:underline t :foreground "Grey50")))) + (viper-minibuffer-emacs-face ((t (:background "darkseagreen2" :foreground "Black")))) + (viper-minibuffer-insert-face ((t (:background "pink" :foreground "Black")))) + (viper-minibuffer-vi-face ((t (:background "grey" :foreground "DarkGreen")))) + (viper-replace-overlay-face ((t (:background "darkseagreen2" :foreground "Black")))) + (viper-search-face ((t (:background "khaki" :foreground "Black")))) + (widget-button-face ((t (:bold t)))) + (widget-button-pressed-face ((t (:foreground "red")))) + (widget-documentation-face ((t (:foreground "dark green")))) + (widget-field-face ((t (:background "gray85")))) + (widget-inactive-face ((t (:foreground "dim gray")))) + (widget-single-line-field-face ((t (:background "gray85")))) + (woman-bold-face ((t (:bold t)))) + (woman-italic-face ((t (nil)))) + (woman-unknown-face ((t (nil)))) + (yellow ((t (nil)))) + (zmacs-region ((t (nil))))))) + +(defun color-theme-beige-diff () + "Brownish faces for diff and change-log modes. +This is intended for other color themes to use (eg. `color-theme-gnome2' +and `color-theme-blue-sea')." + (color-theme-install + '(color-theme-beige-diff + nil + (change-log-acknowledgement-face ((t (:foreground "firebrick")))) + (change-log-conditionals-face ((t (:foreground "khaki" :background "sienna")))) + (change-log-date-face ((t (:foreground "gold")))) + (change-log-email-face ((t (:foreground "khaki" :underline t)))) + (change-log-file-face ((t (:bold t :foreground "lemon chiffon")))) + (change-log-function-face ((t (:foreground "khaki" :background "sienna")))) + (change-log-list-face ((t (:foreground "wheat")))) + (change-log-name-face ((t (:bold t :foreground "light goldenrod")))) + (diff-added-face ((t (nil)))) + (diff-changed-face ((t (nil)))) + (diff-context-face ((t (:foreground "grey50")))) + (diff-file-header-face ((t (:bold t :foreground "lemon chiffon")))) + (diff-function-face ((t (:foreground "grey50")))) + (diff-header-face ((t (:foreground "lemon chiffon")))) + (diff-hunk-header-face ((t (:foreground "light goldenrod")))) + (diff-index-face ((t (:bold t :underline t)))) + (diff-nonexistent-face ((t (:bold t :background "grey70" :weight bold)))) + (diff-removed-face ((t (nil)))) + (log-view-message-face ((t (:foreground "lemon chiffon"))))))) + +(defun color-theme-standard-ediff () + "Standard colors for ediff faces. +This is intended for other color themes to use +\(eg. `color-theme-goldenrod')." + (color-theme-install + '(color-theme-beige-diff + nil + (ediff-current-diff-face-A ((t (:background "pale green" :foreground "firebrick")))) + (ediff-current-diff-face-Ancestor ((t (:background "VioletRed" :foreground "Black")))) + (ediff-current-diff-face-B ((t (:background "Yellow" :foreground "DarkOrchid")))) + (ediff-current-diff-face-C ((t (:background "Pink" :foreground "Navy")))) + (ediff-even-diff-face-A ((t (:background "light grey" :foreground "Black")))) + (ediff-even-diff-face-Ancestor ((t (:background "Grey" :foreground "White")))) + (ediff-even-diff-face-B ((t (:background "Grey" :foreground "White")))) + (ediff-even-diff-face-C ((t (:background "light grey" :foreground "Black")))) + (ediff-fine-diff-face-A ((t (:background "sky blue" :foreground "Navy")))) + (ediff-fine-diff-face-Ancestor ((t (:background "Green" :foreground "Black")))) + (ediff-fine-diff-face-B ((t (:background "cyan" :foreground "Black")))) + (ediff-fine-diff-face-C ((t (:background "Turquoise" :foreground "Black")))) + (ediff-odd-diff-face-A ((t (:background "Grey" :foreground "White")))) + (ediff-odd-diff-face-Ancestor ((t (:background "light grey" :foreground "Black")))) + (ediff-odd-diff-face-B ((t (:background "light grey" :foreground "Black")))) + (ediff-odd-diff-face-C ((t (:background "Grey" :foreground "White"))))))) + +(defun color-theme-beige-eshell () + "Brownish colors for eshell faces only. +This is intended for other color themes to use (eg. `color-theme-goldenrod')." + (color-theme-install + '(color-theme-beige-eshell + nil + (eshell-ls-archive-face ((t (:bold t :foreground "IndianRed")))) + (eshell-ls-backup-face ((t (:foreground "Grey")))) + (eshell-ls-clutter-face ((t (:foreground "DimGray")))) + (eshell-ls-directory-face ((t (:bold t :foreground "dark khaki")))) + (eshell-ls-executable-face ((t (:foreground "Coral")))) + (eshell-ls-missing-face ((t (:foreground "black")))) + (eshell-ls-picture-face ((t (:foreground "gold")))) ; non-standard face + (eshell-ls-product-face ((t (:foreground "dark sea green")))) + (eshell-ls-readonly-face ((t (:foreground "light steel blue")))) + (eshell-ls-special-face ((t (:foreground "gold")))) + (eshell-ls-symlink-face ((t (:foreground "peach puff")))) + (eshell-ls-text-face ((t (:foreground "moccasin")))) ; non-standard face + (eshell-ls-todo-face ((t (:bold t :foreground "yellow green")))) ; non-standard face + (eshell-ls-unreadable-face ((t (:foreground "DimGray")))) + (eshell-prompt-face ((t (:foreground "lemon chiffon"))))))) + +(defun color-theme-goldenrod () + "Brown color theme. Very different from the others. +Supports standard, font-lock and info faces, and it uses +`color-theme-blue-gnus', `color-theme-blue-erc' , and +`color-theme-beige-diff'." + (interactive) + (color-theme-blue-gnus) + (let ((color-theme-is-cumulative t)) + (color-theme-blue-erc) + (color-theme-beige-diff) + (color-theme-beige-eshell) + (color-theme-install + '(color-theme-goldenrod + ((background-color . "black") + (background-mode . dark) + (border-color . "black") + (cursor-color . "light goldenrod") + (foreground-color . "goldenrod") + (mouse-color . "goldenrod")) + ((goto-address-mail-face . info-xref) + (list-matching-lines-face . bold) + (view-highlight-face . highlight)) + (default ((t (nil)))) + (bold ((t (:bold t)))) + (bold-italic ((t (:italic t :bold t :foreground "lavender")))) + (font-lock-builtin-face ((t (:foreground "pale goldenrod")))) + (font-lock-comment-face ((t (:foreground "indian red")))) + (font-lock-constant-face ((t (:foreground "pale green")))) + (font-lock-function-name-face ((t (:bold t :foreground "lemon chiffon")))) + (font-lock-keyword-face ((t (:foreground "wheat")))) + (font-lock-string-face ((t (:foreground "gold")))) + (font-lock-type-face ((t (:foreground "dark khaki" :bold t)))) + (font-lock-variable-name-face ((t (:bold t :foreground "khaki")))) + (font-lock-warning-face ((t (:bold t :foreground "orange red")))) + (fringe ((t (:background "gray25")))) + (header-line ((t (:background "gray20" :foreground "gray70")))) + (highlight ((t (:background "dark slate blue")))) + (info-menu-5 ((t (:underline t)))) + (info-node ((t (:bold t)))) + (info-xref ((t (:bold t :foreground "pale goldenrod")))) + (isearch ((t (:background "SeaGreen4")))) + (isearch-lazy-highlight-face ((t (:background "DarkOliveGreen4")))) + (italic ((t (:italic t :foreground "lavender")))) + (menu ((t (:background "gray25" :foreground "lemon chiffon")))) + (modeline ((t (:background "gray40" :foreground "lemon chiffon" :box (:line-width 1 :style released-button))))) + (modeline-buffer-id ((t (:background "AntiqueWhite4" :foreground "lemon chiffon")))) + (modeline-mousable ((t (:background "AntiqueWhite4" :foreground "lemon chiffon")))) + (modeline-mousable-minor-mode ((t (:background "wheat" :foreground "lemon chiffon")))) + (mode-line-inactive ((t (:background "gray20" :foreground "lemon chiffon" :box (:line-width 1 :style released-button))))) + (region ((t (:background "dark olive green")))) + (secondary-selection ((t (:background "dark green")))) + (tool-bar ((t (:background "gray25" :foreground "lemon chiffon" :box (:line-width 1 :style released-button))))) + (underline ((t (:underline t)))))))) + +(defun color-theme-ramangalahy () + "Color theme by Solofo Ramangalahy, created 2000-10-18. +Black on light grey, includes faces for vm, ispell, gnus, +dired, display-time, cperl, font-lock, widget, x-symbol." + (interactive) + (color-theme-install + '(color-theme-ramangalahy + ((background-color . "lightgrey") + (background-mode . light) + (background-toolbar-color . "#bfbfbfbfbfbf") + (border-color . "#000000000000") + (bottom-toolbar-shadow-color . "#737373737373") + (cursor-color . "blue") + (foreground-color . "black") + (top-toolbar-shadow-color . "#e6e6e6e6e6e6")) + ((gnus-mouse-face . highlight) + (goto-address-mail-face . info-xref) + (ispell-highlight-face . highlight) + (notes-bold-face . notes-bold-face) + (setnu-line-number-face . bold) + (tinyreplace-:face . highlight) + (vm-highlight-url-face . bold-italic) + (vm-highlighted-header-face . bold) + (vm-mime-button-face . gui-button-face) + (vm-summary-highlight-face . bold)) + (default ((t (nil)))) + (bbdb-company ((t (nil)))) + (blue ((t (:foreground "blue")))) + (bold ((t (:bold t)))) + (bold-italic ((t (:italic t :bold t)))) + (border-glyph ((t (nil)))) + (cperl-here-face ((t (:foreground "green4")))) + (cperl-pod-face ((t (:foreground "brown4")))) + (cperl-pod-head-face ((t (:foreground "steelblue")))) + (custom-button-face ((t (:bold t)))) + (custom-changed-face ((t (:background "blue" :foreground "white")))) + (custom-documentation-face ((t (nil)))) + (custom-face-tag-face ((t (:underline t)))) + (custom-group-tag-face ((t (:underline t :foreground "blue")))) + (custom-group-tag-face-1 ((t (:underline t :foreground "red")))) + (custom-invalid-face ((t (:background "red" :foreground "yellow")))) + (custom-modified-face ((t (:background "blue" :foreground "white")))) + (custom-rogue-face ((t (:background "black" :foreground "pink")))) + (custom-saved-face ((t (:underline t)))) + (custom-set-face ((t (:background "white" :foreground "blue")))) + (custom-state-face ((t (:foreground "dark green")))) + (custom-variable-button-face ((t (:underline t :bold t)))) + (custom-variable-tag-face ((t (:underline t :foreground "blue")))) + (dired-face-boring ((t (:foreground "Gray65")))) + (dired-face-directory ((t (:bold t)))) + (dired-face-executable ((t (:foreground "SeaGreen")))) + (dired-face-flagged ((t (:background "LightSlateGray")))) + (dired-face-marked ((t (:background "PaleVioletRed")))) + (dired-face-permissions ((t (:background "grey75" :foreground "black")))) + (dired-face-setuid ((t (:foreground "Red")))) + (dired-face-socket ((t (:foreground "magenta")))) + (dired-face-symlink ((t (:foreground "blue")))) + (display-time-mail-balloon-enhance-face ((t (:background "orange")))) + (display-time-mail-balloon-gnus-group-face ((t (:foreground "blue")))) + (display-time-time-balloon-face ((t (:foreground "red")))) + (ff-paths-non-existant-file-face ((t (:bold t :foreground "NavyBlue")))) + (font-lock-comment-face ((t (:bold t :foreground "purple")))) + (font-lock-doc-string-face ((t (:bold t :foreground "slateblue")))) + (font-lock-emphasized-face ((t (:bold t :background "lightyellow2")))) + (font-lock-function-name-face ((t (:bold t :foreground "blue")))) + (font-lock-keyword-face ((t (:bold t :foreground "violetred")))) + (font-lock-other-emphasized-face ((t (:italic t :bold t :background "lightyellow2")))) + (font-lock-other-type-face ((t (:bold t :foreground "orange3")))) + (font-lock-preprocessor-face ((t (:bold t :foreground "mediumblue")))) + (font-lock-reference-face ((t (:foreground "red3")))) + (font-lock-string-face ((t (:foreground "green4")))) + (font-lock-type-face ((t (:bold t :foreground "steelblue")))) + (font-lock-variable-name-face ((t (:foreground "magenta4")))) + (font-lock-warning-face ((t (:bold t :background "yellow" :foreground "Red")))) + (gnus-emphasis-bold ((t (:bold t)))) + (gnus-emphasis-bold-italic ((t (nil)))) + (gnus-emphasis-italic ((t (nil)))) + (gnus-emphasis-underline ((t (:underline t)))) + (gnus-emphasis-underline-bold ((t (:underline t :bold t)))) + (gnus-emphasis-underline-bold-italic ((t (:underline t)))) + (gnus-emphasis-underline-italic ((t (:underline t)))) + (gnus-group-mail-1-empty-face ((t (:foreground "DeepPink3")))) + (gnus-group-mail-1-face ((t (:bold t :foreground "DeepPink3")))) + (gnus-group-mail-2-empty-face ((t (:foreground "HotPink3")))) + (gnus-group-mail-2-face ((t (:bold t :foreground "HotPink3")))) + (gnus-group-mail-3-empty-face ((t (:foreground "magenta4")))) + (gnus-group-mail-3-face ((t (:bold t :foreground "magenta4")))) + (gnus-group-mail-low-empty-face ((t (:foreground "DeepPink4")))) + (gnus-group-mail-low-face ((t (:bold t :foreground "DeepPink4")))) + (gnus-group-news-1-empty-face ((t (:foreground "ForestGreen")))) + (gnus-group-news-1-face ((t (:bold t :foreground "ForestGreen")))) + (gnus-group-news-2-empty-face ((t (:foreground "CadetBlue4")))) + (gnus-group-news-2-face ((t (:bold t :foreground "CadetBlue4")))) + (gnus-group-news-3-empty-face ((t (:foreground "DeepPink4")))) + (gnus-group-news-3-face ((t (:bold t :foreground "DeepPink4")))) + (gnus-group-news-low-empty-face ((t (:foreground "DarkGreen")))) + (gnus-group-news-low-face ((t (:bold t :foreground "DarkGreen")))) + (gnus-header-content-face ((t (:foreground "indianred4")))) + (gnus-header-from-face ((t (:foreground "red3")))) + (gnus-header-name-face ((t (:foreground "maroon")))) + (gnus-header-newsgroups-face ((t (:foreground "MidnightBlue")))) + (gnus-header-subject-face ((t (:foreground "red4")))) + (gnus-signature-face ((t (:bold t)))) + (gnus-splash-face ((t (:foreground "ForestGreen")))) + (gnus-summary-cancelled-face ((t (:background "black" :foreground "yellow")))) + (gnus-summary-high-ancient-face ((t (:bold t :foreground "RoyalBlue")))) + (gnus-summary-high-read-face ((t (:bold t :foreground "DarkGreen")))) + (gnus-summary-high-ticked-face ((t (:bold t :foreground "firebrick")))) + (gnus-summary-high-unread-face ((t (:bold t)))) + (gnus-summary-low-ancient-face ((t (:foreground "RoyalBlue")))) + (gnus-summary-low-read-face ((t (:foreground "DarkGreen")))) + (gnus-summary-low-ticked-face ((t (:foreground "firebrick")))) + (gnus-summary-low-unread-face ((t (nil)))) + (gnus-summary-normal-ancient-face ((t (:foreground "RoyalBlue")))) + (gnus-summary-normal-read-face ((t (:foreground "DarkGreen")))) + (gnus-summary-normal-ticked-face ((t (:foreground "firebrick")))) + (gnus-summary-normal-unread-face ((t (nil)))) + (gnus-summary-selected-face ((t (:underline t)))) + (gnus-x-face ((t (:background "lightgrey" :foreground "black")))) + (green ((t (:foreground "green")))) + (gui-button-face ((t (:background "grey75" :foreground "black")))) + (gui-element ((t (:background "lightgrey")))) + (highlight ((t (:background "darkseagreen2")))) + (info-node ((t (:underline t :bold t :foreground "mediumpurple")))) + (info-xref ((t (:underline t :bold t :foreground "#0000ee")))) + (isearch ((t (:background "paleturquoise")))) + (italic ((t (:italic t)))) + (left-margin ((t (nil)))) + (list-mode-item-selected ((t (:background "gray68" :foreground "black")))) + (message-cited-text ((t (:foreground "slategrey")))) + (message-cited-text-face ((t (:foreground "red")))) + (message-header-cc-face ((t (:foreground "MidnightBlue")))) + (message-header-contents ((t (:italic t)))) + (message-header-name-face ((t (:foreground "cornflower blue")))) + (message-header-newsgroups-face ((t (:bold t :foreground "blue4")))) + (message-header-other-face ((t (:foreground "steel blue")))) + (message-header-subject-face ((t (:bold t :foreground "navy blue")))) + (message-header-to-face ((t (:bold t :foreground "MidnightBlue")))) + (message-header-xheader-face ((t (:foreground "blue")))) + (message-headers ((t (:bold t)))) + (message-highlighted-header-contents ((t (:bold t)))) + (message-separator-face ((t (:foreground "brown")))) + (message-url ((t (:bold t)))) + (modeline ((t (:bold t :background "Gray75" :foreground "Black")))) + (modeline-buffer-id ((t (:bold t :background "Gray75" :foreground "blue4")))) + (modeline-mousable ((t (:bold t :background "Gray75" :foreground "firebrick")))) + (modeline-mousable-minor-mode ((t (:bold t :background "Gray75" :foreground "green4")))) + (paren-blink-off ((t (:foreground "lightgrey")))) + (paren-match ((t (:background "darkseagreen2")))) + (paren-mismatch ((t (:background "DeepPink" :foreground "black")))) + (pointer ((t (:foreground "blue")))) + (primary-selection ((t (:background "gray65")))) + (red ((t (:foreground "red")))) + (region ((t (:background "black" :foreground "white")))) + (right-margin ((t (nil)))) + (searchm-buffer ((t (:bold t :background "white" :foreground "red")))) + (searchm-button ((t (:bold t :background "CadetBlue" :foreground "white")))) + (searchm-field ((t (:background "grey89")))) + (searchm-field-label ((t (:bold t)))) + (searchm-highlight ((t (:bold t :background "darkseagreen2" :foreground "black")))) + (secondary-selection ((t (:background "paleturquoise")))) + (template-message-face ((t (:bold t)))) + (text-cursor ((t (:background "blue" :foreground "lightgrey")))) + (toolbar ((t (nil)))) + (underline ((t (:underline t)))) + (vertical-divider ((t (nil)))) + (widget-button-face ((t (:bold t)))) + (widget-button-pressed-face ((t (:foreground "red")))) + (widget-documentation-face ((t (:foreground "dark green")))) + (widget-field-face ((t (:background "gray85")))) + (widget-inactive-face ((t (:foreground "dim gray")))) + (x-face ((t (:background "white" :foreground "black")))) + (x-symbol-adobe-fontspecific-face ((t (nil)))) + (x-symbol-face ((t (nil)))) + (x-symbol-heading-face ((t (:underline t :bold t :foreground "green4")))) + (x-symbol-info-face ((t (:foreground "green4")))) + (x-symbol-invisible-face ((t (nil)))) + (x-symbol-revealed-face ((t (:background "pink")))) + (yellow ((t (:foreground "yellow")))) + (zmacs-region ((t (:background "yellow"))))))) + +(defun color-theme-raspopovic () + "Color theme by Pedja Raspopovic, created 2000-10-19. +Includes faces for dired, font-lock, info, paren." + (interactive) + (color-theme-install + '(color-theme-raspopovic + ((background-color . "darkblue") + (background-mode . light) + (background-toolbar-color . "#bfbfbfbfbfbf") + (border-color . "#000000000000") + (bottom-toolbar-shadow-color . "#737373737373") + (cursor-color . "Red3") + (foreground-color . "yellow") + (top-toolbar-shadow-color . "#e6e6e6e6e6e6")) + ((setnu-line-number-face . bold) + (goto-address-mail-face . info-xref)) + (default ((t (nil)))) + (blue ((t (:background "darkblue" :foreground "blue")))) + (bold ((t (:bold t :background "darkblue" :foreground "yellow")))) + (bold-italic ((t (:bold t :background "darkblue" :foreground "red3")))) + (comint-input-face ((t (:foreground "deepskyblue")))) + (dired-face-boring ((t (:foreground "Gray65")))) + (dired-face-directory ((t (:foreground "lightgreen")))) + (dired-face-executable ((t (:foreground "indianred")))) + (dired-face-flagged ((t (:background "LightSlateGray")))) + (dired-face-marked ((t (:background "darkblue" :foreground "deepskyblue")))) + (dired-face-permissions ((t (:background "darkblue" :foreground "white")))) + (dired-face-setuid ((t (:foreground "Red")))) + (dired-face-socket ((t (:foreground "magenta")))) + (dired-face-symlink ((t (:foreground "grey95")))) + (font-lock-comment-face ((t (:background "darkblue" :foreground "lightgreen")))) + (font-lock-doc-string-face ((t (:background "darkblue" :foreground "darkseagreen")))) + (font-lock-function-name-face ((t (:bold t :background "darkblue" :foreground "indianred")))) + (font-lock-keyword-face ((t (:background "darkblue" :foreground "skyblue")))) + (font-lock-preprocessor-face ((t (:background "darkblue" :foreground "orange")))) + (font-lock-reference-face ((t (:background "darkblue" :foreground "deepskyblue")))) + (font-lock-string-face ((t (:background "darkblue" :foreground "lightgrey")))) + (font-lock-type-face ((t (:background "darkblue" :foreground "orange")))) + (font-lock-variable-name-face ((t (:background "darkblue" :foreground "white")))) + (green ((t (:background "darkblue" :foreground "green")))) + (gui-button-face ((t (:background "grey75" :foreground "black")))) + (highlight ((t (:background "yellow" :foreground "darkblue")))) + (info-node ((t (:bold t :background "darkblue" :foreground "red3")))) + (info-xref ((t (:bold t :background "darkblue" :foreground "yellow")))) + (isearch ((t (:background "yellow" :foreground "darkblue")))) + (isearch-secondary ((t (:foreground "red3")))) + (italic ((t (:background "darkblue" :foreground "red3")))) + (left-margin ((t (:background "darkblue" :foreground "yellow")))) + (list-mode-item-selected ((t (:background "gray68" :foreground "yellow")))) + (makefile-space-face ((t (:background "hotpink")))) + (modeline ((t (:background "Gray75" :foreground "Black")))) + (modeline-buffer-id ((t (:background "Gray75" :foreground "blue")))) + (modeline-mousable ((t (:background "Gray75" :foreground "red")))) + (modeline-mousable-minor-mode ((t (:background "Gray75" :foreground "green4")))) + (paren-blink-off ((t (:foreground "darkblue")))) + (paren-match ((t (:background "yellow" :foreground "darkblue")))) + (paren-mismatch ((t (:background "DeepPink" :foreground "yellow")))) + (pointer ((t (:background "darkblue" :foreground "red3")))) + (primary-selection ((t (:background "yellow" :foreground "darkblue")))) + (red ((t (:background "darkblue" :foreground "red")))) + (right-margin ((t (:background "darkblue" :foreground "yellow")))) + (secondary-selection ((t (:background "darkblue" :foreground "yellow")))) + (shell-option-face ((t (:background "darkblue" :foreground "cyan2")))) + (shell-output-2-face ((t (:background "darkblue" :foreground "darkseagreen")))) + (shell-output-3-face ((t (:background "darkblue" :foreground "lightgrey")))) + (shell-output-face ((t (:background "darkblue" :foreground "white")))) + (shell-prompt-face ((t (:background "darkblue" :foreground "red")))) + (text-cursor ((t (:background "Red3" :foreground "white")))) + (underline ((t (:underline t :background "darkblue" :foreground "yellow")))) + (vvb-face ((t (:background "pink" :foreground "black")))) + (yellow ((t (:background "darkblue" :foreground "yellow")))) + (zmacs-region ((t (:background "gray" :foreground "black"))))))) + +(defun color-theme-taylor () + "Color theme by Art Taylor, created 2000-10-20. +Wheat on black. Includes faces for font-lock, gnus, paren." + (interactive) + (color-theme-install + '(color-theme-taylor + ((background-color . "black") + (background-mode . dark) + (border-color . "black") + (cursor-color . "red") + (foreground-color . "wheat") + (mouse-color . "black")) + ((gnus-mouse-face . highlight) + (list-matching-lines-face . bold) + (view-highlight-face . highlight)) + (default ((t (nil)))) + (bold ((t (:bold t :background "grey40" :foreground "yellow")))) + (bold-italic ((t (:italic t :bold t :foreground "yellow green")))) + (fl-comment-face ((t (:foreground "medium purple")))) + (fl-function-name-face ((t (:foreground "green")))) + (fl-keyword-face ((t (:foreground "LightGreen")))) + (fl-string-face ((t (:foreground "light coral")))) + (fl-type-face ((t (:foreground "cyan")))) + (font-lock-builtin-face ((t (:foreground "LightSteelBlue")))) + (font-lock-comment-face ((t (:foreground "OrangeRed")))) + (font-lock-constant-face ((t (:foreground "Aquamarine")))) + (font-lock-function-name-face ((t (:foreground "LightSkyBlue")))) + (font-lock-keyword-face ((t (:foreground "Cyan")))) + (font-lock-string-face ((t (:foreground "LightSalmon")))) + (font-lock-type-face ((t (:foreground "PaleGreen")))) + (font-lock-variable-name-face ((t (:foreground "LightGoldenrod")))) + (font-lock-warning-face ((t (:bold t :foreground "Pink")))) + (gnus-group-mail-1-empty-face ((t (:foreground "aquamarine1")))) + (gnus-group-mail-1-face ((t (:bold t :foreground "aquamarine1")))) + (gnus-group-mail-2-empty-face ((t (:foreground "aquamarine2")))) + (gnus-group-mail-2-face ((t (:bold t :foreground "aquamarine2")))) + (gnus-group-mail-3-empty-face ((t (:foreground "aquamarine3")))) + (gnus-group-mail-3-face ((t (:bold t :foreground "aquamarine3")))) + (gnus-group-mail-low-empty-face ((t (:foreground "aquamarine4")))) + (gnus-group-mail-low-face ((t (:bold t :foreground "aquamarine4")))) + (gnus-group-news-1-empty-face ((t (:foreground "PaleTurquoise")))) + (gnus-group-news-1-face ((t (:bold t :foreground "PaleTurquoise")))) + (gnus-group-news-2-empty-face ((t (:foreground "turquoise")))) + (gnus-group-news-2-face ((t (:bold t :foreground "turquoise")))) + (gnus-group-news-3-empty-face ((t (nil)))) + (gnus-group-news-3-face ((t (:bold t)))) + (gnus-group-news-4-empty-face ((t (nil)))) + (gnus-group-news-4-face ((t (:bold t)))) + (gnus-group-news-5-empty-face ((t (nil)))) + (gnus-group-news-5-face ((t (:bold t)))) + (gnus-group-news-6-empty-face ((t (nil)))) + (gnus-group-news-6-face ((t (:bold t)))) + (gnus-group-news-low-empty-face ((t (:foreground "DarkTurquoise")))) + (gnus-group-news-low-face ((t (:bold t :foreground "DarkTurquoise")))) + (gnus-splash-face ((t (:foreground "Brown")))) + (gnus-summary-cancelled-face ((t (:background "black" :foreground "yellow")))) + (gnus-summary-high-ancient-face ((t (:bold t :foreground "SkyBlue")))) + (gnus-summary-high-read-face ((t (:bold t :foreground "PaleGreen")))) + (gnus-summary-high-ticked-face ((t (:bold t :foreground "pink")))) + (gnus-summary-high-unread-face ((t (:bold t)))) + (gnus-summary-low-ancient-face ((t (:italic t :foreground "SkyBlue")))) + (gnus-summary-low-read-face ((t (:italic t :foreground "PaleGreen")))) + (gnus-summary-low-ticked-face ((t (:italic t :foreground "pink")))) + (gnus-summary-low-unread-face ((t (:italic t)))) + (gnus-summary-normal-ancient-face ((t (:foreground "SkyBlue")))) + (gnus-summary-normal-read-face ((t (:foreground "PaleGreen")))) + (gnus-summary-normal-ticked-face ((t (:foreground "pink")))) + (gnus-summary-normal-unread-face ((t (nil)))) + (gnus-summary-selected-face ((t (:underline t)))) + (highlight ((t (:background "black" :foreground "black")))) + (italic ((t (:italic t :foreground "yellow3")))) + (message-cited-text-face ((t (:foreground "red")))) + (message-header-cc-face ((t (:bold t :foreground "green4")))) + (message-header-name-face ((t (:foreground "DarkGreen")))) + (message-header-newsgroups-face ((t (:italic t :bold t :foreground "yellow")))) + (message-header-other-face ((t (:foreground "#b00000")))) + (message-header-subject-face ((t (:foreground "green3")))) + (message-header-to-face ((t (:bold t :foreground "green2")))) + (message-header-xheader-face ((t (:foreground "blue")))) + (message-mml-face ((t (:foreground "ForestGreen")))) + (message-separator-face ((t (:foreground "blue3")))) + (modeline ((t (:background "wheat" :foreground "black")))) + (modeline-buffer-id ((t (:background "wheat" :foreground "black")))) + (modeline-mousable ((t (:background "wheat" :foreground "black")))) + (modeline-mousable-minor-mode ((t (:background "wheat" :foreground "black")))) + (region ((t (:background "blue")))) + (secondary-selection ((t (:background "darkslateblue" :foreground "black")))) + (show-paren-match-face ((t (:background "turquoise")))) + (show-paren-mismatch-face ((t (:background "purple" :foreground "white")))) + (underline ((t (:underline t)))) + (xref-keyword-face ((t (:foreground "blue")))) + (xref-list-default-face ((t (nil)))) + (xref-list-pilot-face ((t (:foreground "navy")))) + (xref-list-symbol-face ((t (:foreground "navy"))))))) + +(defun color-theme-marquardt () + "Color theme by Colin Marquardt, created 2000-10-25. +Black on bisque, a light color. Based on some settings from Robin S. Socha. +Features some color changes to programming languages, especially vhdl-mode. +You might also want to put something like + Emacs*Foreground: Black + Emacs*Background: bisque2 +in your ~/.Xdefaults." + (interactive) + (color-theme-install + '(color-theme-marquardt + ((background-color . "bisque") + (background-mode . light) + (background-toolbar-color . "bisque") + (border-color . "#000000000000") + (bottom-toolbar-shadow-color . "#909099999999") + (cursor-color . "Red3") + (foreground-color . "black") + (top-toolbar-shadow-color . "#ffffffffffff")) + (default ((t (nil)))) + (blue ((t (:foreground "blue")))) + (bold ((t (:bold t)))) + (bold-italic ((t (:bold t)))) + (border-glyph ((t (nil)))) + (calendar-today-face ((t (:underline t)))) + (diary-face ((t (:foreground "red")))) + (display-time-mail-balloon-enhance-face ((t (:background "orange")))) + (display-time-mail-balloon-gnus-group-face ((t (:foreground "blue")))) + (display-time-time-balloon-face ((t (:foreground "red")))) + (ff-paths-non-existant-file-face ((t (:bold t :foreground "NavyBlue")))) + (font-lock-comment-face ((t (:foreground "gray50")))) + (font-lock-doc-string-face ((t (:foreground "green4")))) + (font-lock-function-name-face ((t (:foreground "darkorange")))) + (font-lock-keyword-face ((t (:foreground "blue3")))) + (font-lock-preprocessor-face ((t (:foreground "blue3")))) + (font-lock-reference-face ((t (:foreground "red3")))) + (font-lock-special-comment-face ((t (:foreground "blue4")))) + (font-lock-special-keyword-face ((t (:foreground "red4")))) + (font-lock-string-face ((t (:foreground "green4")))) + (font-lock-type-face ((t (:foreground "steelblue")))) + (font-lock-variable-name-face ((t (:foreground "black")))) + (font-lock-warning-face ((t (:bold t :foreground "Red")))) + (green ((t (:foreground "green")))) + (gui-button-face ((t (:background "grey75" :foreground "black")))) + (gui-element ((t (:background "azure1" :foreground "Black")))) + (highlight ((t (:background "darkseagreen2" :foreground "blue")))) + (holiday-face ((t (:background "pink" :foreground "black")))) + (info-node ((t (:bold t)))) + (info-xref ((t (:bold t)))) + (isearch ((t (:background "yellow" :foreground "red")))) + (italic ((t (:bold t)))) + (left-margin ((t (nil)))) + (list-mode-item-selected ((t (:background "gray68" :foreground "black")))) + (message-cited-text-face ((t (:foreground "red")))) + (message-header-cc-face ((t (:foreground "MidnightBlue")))) + (message-header-name-face ((t (:foreground "cornflower blue")))) + (message-header-newsgroups-face ((t (:bold t :foreground "blue4")))) + (message-header-other-face ((t (:foreground "steel blue")))) + (message-header-subject-face ((t (:bold t :foreground "navy blue")))) + (message-header-to-face ((t (:bold t :foreground "MidnightBlue")))) + (message-header-xheader-face ((t (:foreground "blue")))) + (message-mml-face ((t (:foreground "ForestGreen")))) + (message-separator-face ((t (:foreground "brown")))) + (modeline ((t (:background "bisque2" :foreground "steelblue4")))) + (modeline-buffer-id ((t (:background "bisque2" :foreground "blue4")))) + (modeline-mousable ((t (:background "bisque2" :foreground "firebrick")))) + (modeline-mousable-minor-mode ((t (:background "bisque2" :foreground "green4")))) + (paren-blink-off ((t (:foreground "azure1")))) + (paren-face ((t (:background "lightgoldenrod")))) + (paren-match ((t (:background "bisque2")))) + (paren-mismatch ((t (:background "DeepPink" :foreground "black")))) + (paren-mismatch-face ((t (:background "DeepPink")))) + (paren-no-match-face ((t (:background "yellow")))) + (pointer ((t (:background "white" :foreground "blue")))) + (primary-selection ((t (:background "gray65")))) + (red ((t (:foreground "red")))) + (right-margin ((t (nil)))) + (secondary-selection ((t (:background "paleturquoise")))) + (shell-option-face ((t (:foreground "gray50")))) + (shell-output-2-face ((t (:foreground "green4")))) + (shell-output-3-face ((t (:foreground "green4")))) + (shell-output-face ((t (:bold t)))) + (shell-prompt-face ((t (:foreground "blue3")))) + (speedbar-button-face ((t (:foreground "green4")))) + (speedbar-directory-face ((t (:foreground "blue4")))) + (speedbar-file-face ((t (:foreground "cyan4")))) + (speedbar-highlight-face ((t (:background "green")))) + (speedbar-selected-face ((t (:underline t :foreground "red")))) + (speedbar-tag-face ((t (:foreground "brown")))) + (text-cursor ((t (:background "Red3" :foreground "bisque")))) + (toolbar ((t (:background "Gray80")))) + (underline ((t (:underline t)))) + (vertical-divider ((t (nil)))) + (vhdl-font-lock-attribute-face ((t (:foreground "Orchid")))) + (vhdl-font-lock-directive-face ((t (:foreground "CadetBlue")))) + (vhdl-font-lock-enumvalue-face ((t (:foreground "SaddleBrown")))) + (vhdl-font-lock-function-face ((t (:foreground "DarkCyan")))) + (vhdl-font-lock-generic-/constant-face ((t (:foreground "Gold3")))) + (vhdl-font-lock-prompt-face ((t (:bold t :foreground "Red")))) + (vhdl-font-lock-reserved-words-face ((t (:bold t :foreground "Orange")))) + (vhdl-font-lock-translate-off-face ((t (:background "LightGray")))) + (vhdl-font-lock-type-face ((t (:foreground "ForestGreen")))) + (vhdl-font-lock-variable-face ((t (:foreground "Grey50")))) + (vhdl-speedbar-architecture-face ((t (:foreground "Blue")))) + (vhdl-speedbar-architecture-selected-face ((t (:underline t :foreground "Blue")))) + (vhdl-speedbar-configuration-face ((t (:foreground "DarkGoldenrod")))) + (vhdl-speedbar-configuration-selected-face ((t (:underline t :foreground "DarkGoldenrod")))) + (vhdl-speedbar-entity-face ((t (:foreground "ForestGreen")))) + (vhdl-speedbar-entity-selected-face ((t (:underline t :foreground "ForestGreen")))) + (vhdl-speedbar-instantiation-face ((t (:foreground "Brown")))) + (vhdl-speedbar-instantiation-selected-face ((t (:underline t :foreground "Brown")))) + (vhdl-speedbar-package-face ((t (:foreground "Grey50")))) + (vhdl-speedbar-package-selected-face ((t (:underline t :foreground "Grey50")))) + (vhdl-speedbar-subprogram-face ((t (:foreground "Orchid4")))) + (widget-button-face ((t (:bold t)))) + (widget-button-pressed-face ((t (:foreground "red")))) + (widget-documentation-face ((t (:foreground "dark green")))) + (widget-field-face ((t (:background "gray85")))) + (widget-inactive-face ((t (:foreground "dim gray")))) + (yellow ((t (:foreground "yellow")))) + (zmacs-region ((t (:background "steelblue" :foreground "yellow"))))))) + +(defun color-theme-parus () + "Color theme by Jon K Hellan, created 2000-11-01. +White on dark blue color theme. + +There is some redundancy in the X resources, but I do not have time to +find out which should go or which should stay: + +Emacs*dialog*Background: midnightblue +Emacs*dialog*Foreground: white +Emacs*popup*Background: midnightblue +Emacs*popup*Foreground: white +emacs*background: #00005a +emacs*cursorColor: gray90 +emacs*foreground: White +emacs.dialog*.background: midnightblue +emacs.menu*.background: midnightblue +emacs.pane.menubar.background: midnightblue" + (interactive) + (color-theme-install + '(color-theme-parus + ((background-color . "#00005a") + (background-mode . dark) + (border-color . "black") + (cursor-color . "yellow") + (foreground-color . "White") + (mouse-color . "yellow")) + ((gnus-mouse-face . highlight) + (list-matching-lines-face . bold) + (paren-face . bold) + (paren-mismatch-face . paren-mismatch-face) + (paren-no-match-face . paren-no-match-face) + (view-highlight-face . highlight)) + (default ((t (nil)))) + (bold ((t (:bold t)))) + (bold-italic ((t (:italic t :bold t)))) + (font-latex-bold-face ((t (:bold t :foreground "OliveDrab")))) + (font-latex-italic-face ((t (:italic t :foreground "OliveDrab")))) + (font-latex-math-face ((t (:foreground "burlywood")))) + (font-latex-sedate-face ((t (:foreground "LightGray")))) + (font-latex-string-face ((t (:foreground "LightSalmon")))) + (font-latex-warning-face ((t (:foreground "Pink")))) + (font-lock-builtin-face ((t (:foreground "#e0e0ff")))) + (font-lock-reference-face ((t (:foreground "#e0e0ff")))) + (font-lock-comment-face ((t (:foreground "#FFd1d1")))) + (font-lock-constant-face ((t (:foreground "Aquamarine")))) + (font-lock-preprocessor-face ((t (:foreground "Aquamarine")))) + (font-lock-function-name-face ((t (:foreground "#b2e4ff")))) + (font-lock-keyword-face ((t (:foreground "#a0ffff")))) + (font-lock-string-face ((t (:foreground "#efca10")))) + (font-lock-doc-string-face ((t (:foreground "#efca10")))) + (font-lock-type-face ((t (:foreground "PaleGreen")))) + (font-lock-variable-name-face ((t (:foreground "LightGoldenrod")))) + (font-lock-warning-face ((t (:bold t :foreground "Pink")))) + (gnus-cite-attribution-face ((t (:italic t)))) + (gnus-cite-face-1 ((t (:foreground "#dfdfff")))) + (gnus-cite-face-10 ((t (:foreground "medium purple")))) + (gnus-cite-face-11 ((t (:foreground "turquoise")))) + (gnus-cite-face-2 ((t (:foreground "light cyan")))) + (gnus-cite-face-3 ((t (:foreground "light yellow")))) + (gnus-cite-face-4 ((t (:foreground "light pink")))) + (gnus-cite-face-5 ((t (:foreground "pale green")))) + (gnus-cite-face-6 ((t (:foreground "beige")))) + (gnus-cite-face-7 ((t (:foreground "orange")))) + (gnus-cite-face-8 ((t (:foreground "magenta")))) + (gnus-cite-face-9 ((t (:foreground "violet")))) + (gnus-emphasis-bold ((t (:bold t)))) + (gnus-emphasis-bold-italic ((t (:italic t :bold t)))) + (gnus-emphasis-highlight-words ((t (:background "black" :foreground "yellow")))) + (gnus-emphasis-italic ((t (:italic t)))) + (gnus-emphasis-underline ((t (:underline t)))) + (gnus-emphasis-underline-bold ((t (:underline t :bold t)))) + (gnus-emphasis-underline-bold-italic ((t (:underline t :italic t :bold t)))) + (gnus-emphasis-underline-italic ((t (:underline t :italic t)))) + (gnus-group-mail-1-empty-face ((t (:foreground "aquamarine1")))) + (gnus-group-mail-1-face ((t (:bold t :foreground "aquamarine1")))) + (gnus-group-mail-2-empty-face ((t (:foreground "aquamarine2")))) + (gnus-group-mail-2-face ((t (:bold t :foreground "aquamarine2")))) + (gnus-group-mail-3-empty-face ((t (:foreground "aquamarine3")))) + (gnus-group-mail-3-face ((t (:bold t :foreground "aquamarine3")))) + (gnus-group-mail-low-empty-face ((t (:foreground "aquamarine4")))) + (gnus-group-mail-low-face ((t (:bold t :foreground "aquamarine4")))) + (gnus-group-news-1-empty-face ((t (:foreground "PaleTurquoise")))) + (gnus-group-news-1-face ((t (:bold t :foreground "PaleTurquoise")))) + (gnus-group-news-2-empty-face ((t (:foreground "turquoise")))) + (gnus-group-news-2-face ((t (:bold t :foreground "turquoise")))) + (gnus-group-news-3-empty-face ((t (nil)))) + (gnus-group-news-3-face ((t (:bold t)))) + (gnus-group-news-4-empty-face ((t (nil)))) + (gnus-group-news-4-face ((t (:bold t)))) + (gnus-group-news-5-empty-face ((t (nil)))) + (gnus-group-news-5-face ((t (:bold t)))) + (gnus-group-news-6-empty-face ((t (nil)))) + (gnus-group-news-6-face ((t (:bold t)))) + (gnus-group-news-low-empty-face ((t (:foreground "DarkTurquoise")))) + (gnus-group-news-low-face ((t (:bold t :foreground "DarkTurquoise")))) + (gnus-header-content-face ((t (:italic t :foreground "#90f490")))) + (gnus-header-from-face ((t (:foreground "#aaffaa")))) + (gnus-header-name-face ((t (:foreground "#c7e3c7")))) + (gnus-header-newsgroups-face ((t (:italic t :foreground "yellow")))) + (gnus-header-subject-face ((t (:foreground "#a0f0a0")))) + (gnus-signature-face ((t (:italic t)))) + (gnus-splash-face ((t (:foreground "Brown")))) + (gnus-summary-cancelled-face ((t (:background "black" :foreground "yellow")))) + (gnus-summary-high-ancient-face ((t (:bold t :foreground "SkyBlue")))) + (gnus-summary-high-read-face ((t (:bold t :foreground "PaleGreen")))) + (gnus-summary-high-ticked-face ((t (:bold t :foreground "pink")))) + (gnus-summary-high-unread-face ((t (:bold t)))) + (gnus-summary-low-ancient-face ((t (:italic t :foreground "SkyBlue")))) + (gnus-summary-low-read-face ((t (:italic t :foreground "PaleGreen")))) + (gnus-summary-low-ticked-face ((t (:italic t :foreground "pink")))) + (gnus-summary-low-unread-face ((t (:italic t)))) + (gnus-summary-normal-ancient-face ((t (:foreground "SkyBlue")))) + (gnus-summary-normal-read-face ((t (:foreground "PaleGreen")))) + (gnus-summary-normal-ticked-face ((t (:foreground "pink")))) + (gnus-summary-normal-unread-face ((t (nil)))) + (gnus-summary-selected-face ((t (:underline t)))) + (highlight ((t (:background "darkolivegreen")))) + (italic ((t (:italic t)))) + (message-cited-text-face ((t (:foreground "#dfdfff")))) + (message-header-cc-face ((t (:bold t :foreground "#a0f0a0")))) + (message-header-name-face ((t (:foreground "#c7e3c7")))) + (message-header-newsgroups-face ((t (:italic t :bold t :foreground "yellow")))) + (message-header-other-face ((t (:foreground "#db9b9b")))) + (message-header-subject-face ((t (:foreground "#a0f0a0")))) + (message-header-to-face ((t (:bold t :foreground "#aaffaa")))) + (message-header-xheader-face ((t (:foreground "#e2e2ff")))) + (message-mml-face ((t (:foreground "#abdbab")))) + (message-separator-face ((t (:foreground "#dfdfff")))) + (modeline ((t (:background "White" :foreground "#00005a")))) + (modeline-buffer-id ((t (:background "White" :foreground "#00005a")))) + (modeline-mousable ((t (:background "White" :foreground "#00005a")))) + (modeline-mousable-minor-mode ((t (:background "White" :foreground "#00005a")))) + (paren-mismatch-face ((t (:background "DeepPink")))) + (paren-no-match-face ((t (:background "yellow")))) + (region ((t (:background "blue")))) + (primary-selection ((t (:background "blue")))) + (isearch ((t (:background "blue")))) + (secondary-selection ((t (:background "darkslateblue")))) + (underline ((t (:underline t)))) + (widget-button-face ((t (:bold t)))) + (widget-button-pressed-face ((t (:foreground "red")))) + (widget-documentation-face ((t (:foreground "lime green")))) + (widget-field-face ((t (:background "dim gray")))) + (widget-inactive-face ((t (:foreground "light gray")))) + (widget-single-line-field-face ((t (:background "dim gray"))))))) + +(defun color-theme-high-contrast () + "High contrast color theme, maybe for the visually impaired. +Watch out! This will set a very large font-size! + +If you want to modify the font as well, you should customize variable +`color-theme-legal-frame-parameters' to \"\\(color\\|mode\\|font\\|height\\|width\\)$\". +The default setting will prevent color themes from installing specific +fonts." + (interactive) + (color-theme-standard) + (let ((color-theme-is-cumulative t)) + (color-theme-install + '(color-theme-high-contrast + ((cursor-color . "red") + (width . 60) + (height . 25) + (background . dark)) + (default ((t (:stipple nil :background "white" :foreground "black" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight bold :height 240 :width normal :family "adobe-courier")))) + + (bold ((t (:bold t :underline t)))) + (bold-italic ((t (:bold t :underline t)))) + (font-lock-builtin-face ((t (:bold t :foreground "Red")))) + (font-lock-comment-face ((t (:bold t :foreground "Firebrick")))) + (font-lock-constant-face ((t (:bold t :underline t :foreground "Blue")))) + (font-lock-function-name-face ((t (:bold t :foreground "Blue")))) + (font-lock-keyword-face ((t (:bold t :foreground "Purple")))) + (font-lock-string-face ((t (:bold t :foreground "DarkGreen")))) + (font-lock-type-face ((t (:bold t :foreground "ForestGreen")))) + (font-lock-variable-name-face ((t (:bold t :foreground "DarkGoldenrod")))) + (font-lock-warning-face ((t (:bold t :foreground "Red")))) + (highlight ((t (:background "black" :foreground "white" :bold 1)))) + (info-menu-5 ((t (:underline t :bold t)))) + (info-node ((t (:bold t)))) + (info-xref ((t (:bold t )))) + (italic ((t (:bold t :underline t)))) + (modeline ((t (:background "black" :foreground "white" :bold 1)))) + (modeline-buffer-id ((t (:background "black" :foreground "white" :bold 1)))) + (modeline-mousable ((t (:background "black" :foreground "white" :bold 1)))) + (modeline-mousable-minor-mode ((t (:background "black" :foreground "white" :bold 1)))) + (region ((t (:background "black" :foreground "white" :bold 1)))) + (secondary-selection ((t (:background "black" :foreground "white" :bold 1)))) + (underline ((t (:bold t :underline t)))))))) + +(defun color-theme-infodoc () + "Color theme by Frederic Giroud, created 2001-01-18. +Black on wheat scheme. Based on infodoc (xemacs variant distribution), +with my favorit fontlock color." + (interactive) + (color-theme-install + '(color-theme-infodoc + ((background-color . "wheat") + (background-mode . light) + (background-toolbar-color . "#000000000000") + (border-color . "#000000000000") + (bottom-toolbar-shadow-color . "#000000000000") + (cursor-color . "red") + (foreground-color . "black") + (top-toolbar-shadow-color . "#ffffffffffff")) + nil + (default ((t (:bold t)))) + (blue ((t (:bold t :foreground "blue")))) + (bold ((t (:background "wheat" :foreground "black")))) + (bold-italic ((t (:bold t :background "wheat" :foreground "black")))) + (border-glyph ((t (:bold t)))) + (calendar-today-face ((t (:underline t :bold t)))) + (custom-button-face ((t (nil)))) + (custom-changed-face ((t (:bold t :background "blue" :foreground "white")))) + (custom-documentation-face ((t (:bold t :background "wheat" :foreground "purple4")))) + (custom-face-tag-face ((t (:underline t :bold t)))) + (custom-group-tag-face ((t (:underline t :bold t :background "wheat" :foreground "blue")))) + (custom-group-tag-face-1 ((t (:underline t :bold t :background "wheat" :foreground "red")))) + (custom-invalid-face ((t (:bold t :background "red" :foreground "yellow")))) + (custom-modified-face ((t (:bold t :background "blue" :foreground "white")))) + (custom-rogue-face ((t (:bold t :background "black" :foreground "pink")))) + (custom-saved-face ((t (:underline t :bold t)))) + (custom-set-face ((t (:bold t :background "white" :foreground "blue")))) + (custom-state-face ((t (:bold t :background "wheat" :foreground "dark green")))) + (custom-variable-button-face ((t (:underline t)))) + (custom-variable-tag-face ((t (:underline t :bold t :background "wheat" :foreground "blue")))) + (diary-face ((t (:bold t :foreground "red")))) + (display-time-mail-balloon-enhance-face ((t (:bold t :background "wheat" :foreground "black")))) + (display-time-mail-balloon-gnus-group-face ((t (:bold t :background "wheat" :foreground "blue")))) + (display-time-time-balloon-face ((t (:bold t :background "light salmon" :foreground "dark green")))) + (font-lock-comment-face ((t (:bold t :background "wheat" :foreground "turquoise4")))) + (font-lock-doc-string-face ((t (:bold t :background "wheat" :foreground "purple4")))) + (font-lock-function-name-face ((t (:bold t :background "wheat" :foreground "blue4")))) + (font-lock-keyword-face ((t (:bold t :background "wheat" :foreground "dark orchid")))) + (font-lock-preprocessor-face ((t (:bold t :background "wheat" :foreground "orchid4")))) + (font-lock-reference-face ((t (:bold t :background "wheat" :foreground "red3")))) + (font-lock-string-face ((t (:bold t :background "wheat" :foreground "dark goldenrod")))) + (font-lock-type-face ((t (:bold t :background "wheat" :foreground "brown")))) + (font-lock-variable-name-face ((t (:bold t :background "wheat" :foreground "chocolate")))) + (font-lock-warning-face ((t (:bold t :background "wheat" :foreground "black")))) + (gdb-arrow-face ((t (:bold t :background "LightGreen" :foreground "black")))) + (green ((t (:bold t :foreground "green")))) + (gui-button-face ((t (:bold t :background "wheat" :foreground "red")))) + (gui-element ((t (:bold t :background "wheat" :foreground "black")))) + (highlight ((t (:bold t :background "darkseagreen2" :foreground "dark green")))) + (holiday-face ((t (:bold t :background "pink" :foreground "black")))) + (hproperty:but-face ((t (:bold t :background "wheat" :foreground "medium violet red")))) + (hproperty:flash-face ((t (:bold t :background "wheat" :foreground "gray80")))) + (hproperty:highlight-face ((t (:bold t :background "wheat" :foreground "red")))) + (hproperty:item-face ((t (:bold t)))) + (isearch ((t (:bold t :background "pale turquoise" :foreground "blue")))) + (italic ((t (:bold t :background "wheat" :foreground "black")))) + (left-margin ((t (:bold t :background "wheat" :foreground "black")))) + (list-mode-item-selected ((t (:bold t :background "gray68" :foreground "black")))) + (message-cited-text ((t (:bold t :background "wheat" :foreground "brown")))) + (message-header-contents ((t (:bold t :background "wheat" :foreground "black")))) + (message-headers ((t (:bold t :background "wheat" :foreground "black")))) + (message-highlighted-header-contents ((t (:bold t :background "wheat" :foreground "blue")))) + (message-url ((t (nil)))) + (modeline ((t (:bold t :background "light salmon" :foreground "dark green")))) + (modeline-buffer-id ((t (:bold t :background "light salmon" :foreground "blue4")))) + (modeline-mousable ((t (:bold t :background "light salmon" :foreground "firebrick")))) + (modeline-mousable-minor-mode ((t (:bold t :background "light salmon" :foreground "green4")))) + (pointer ((t (:bold t :background "wheat" :foreground "red")))) + (primary-selection ((t (:bold t :background "medium sea green")))) + (red ((t (:bold t :foreground "red")))) + (right-margin ((t (:bold t :background "wheat" :foreground "black")))) + (secondary-selection ((t (:bold t :background "paleturquoise" :foreground "black")))) + (shell-input-face ((t (:bold t :background "wheat" :foreground "blue")))) + (shell-option-face ((t (:bold t :background "wheat" :foreground "turquoise4")))) + (shell-output-2-face ((t (:bold t :background "wheat" :foreground "dark goldenrod")))) + (shell-output-3-face ((t (:bold t :background "wheat" :foreground "dark goldenrod")))) + (shell-output-face ((t (:bold t :background "wheat" :foreground "black")))) + (shell-prompt-face ((t (:bold t :background "wheat" :foreground "dark orchid")))) + (text-cursor ((t (:bold t :background "red" :foreground "wheat")))) + (toolbar ((t (:bold t :background "wheat" :foreground "black")))) + (underline ((t (:underline t :bold t :background "wheat" :foreground "black")))) + (vertical-divider ((t (:bold t)))) + (widget-button-face ((t (nil)))) + (widget-button-pressed-face ((t (:bold t :background "wheat" :foreground "red")))) + (widget-documentation-face ((t (:bold t :background "wheat" :foreground "dark green")))) + (widget-field-face ((t (:bold t :background "gray85")))) + (widget-inactive-face ((t (:bold t :background "wheat" :foreground "dim gray")))) + (x-face ((t (:bold t :background "wheat" :foreground "black")))) + (yellow ((t (:bold t :foreground "yellow")))) + (zmacs-region ((t (:bold t :background "lightyellow" :foreground "darkgreen"))))))) + +(defun color-theme-classic () + "Color theme by Frederic Giroud, created 2001-01-18. +AntiqueWhite on darkslategrey scheme. Based on Gnome 2, with my favorit +color foreground-color and fontlock color." + (interactive) + (color-theme-blue-gnus) + (let ((color-theme-is-cumulative t)) + (color-theme-install + '(color-theme-classic + ((foreground-color . "AntiqueWhite") + (background-color . "darkslategrey") + (mouse-color . "Grey") + (cursor-color . "Red") + (border-color . "black") + (background-mode . dark)) + ((apropos-keybinding-face . underline) + (apropos-label-face . italic) + (apropos-match-face . secondary-selection) + (apropos-property-face . bold-italic) + (apropos-symbol-face . info-xref) + (goto-address-mail-face . message-header-to-face) + (goto-address-mail-mouse-face . secondary-selection) + (goto-address-url-face . info-xref) + (goto-address-url-mouse-face . highlight) + (list-matching-lines-face . bold) + (view-highlight-face . highlight)) + (default ((t (nil)))) + (bold ((t (:bold t)))) + (bold-italic ((t (:italic t :bold t :foreground "beige")))) + (calendar-today-face ((t (:underline t)))) + (cperl-array-face ((t (:foreground "Yellow")))) + (cperl-hash-face ((t (:foreground "White")))) + (cperl-nonoverridable-face ((t (:foreground "SkyBlue")))) + (custom-button-face ((t (:underline t :foreground "MediumSlateBlue")))) + (custom-documentation-face ((t (:foreground "Grey")))) + (custom-group-tag-face ((t (:foreground "MediumAquamarine")))) + (custom-state-face ((t (:foreground "LightSalmon")))) + (custom-variable-tag-face ((t (:foreground "Aquamarine")))) + (diary-face ((t (:foreground "IndianRed")))) + (erc-action-face ((t (:bold t)))) + (erc-bold-face ((t (:bold t)))) + (erc-default-face ((t (nil)))) + (erc-direct-msg-face ((t (:foreground "LightSalmon")))) + (erc-error-face ((t (:bold t :foreground "IndianRed")))) + (erc-input-face ((t (:foreground "Beige")))) + (erc-inverse-face ((t (:background "wheat" :foreground "darkslategrey")))) + (erc-notice-face ((t (:foreground "MediumAquamarine")))) + (erc-pal-face ((t (:foreground "pale green")))) + (erc-prompt-face ((t (:foreground "MediumAquamarine")))) + (erc-underline-face ((t (:underline t)))) + (eshell-ls-archive-face ((t (:bold t :foreground "IndianRed")))) + (eshell-ls-backup-face ((t (:foreground "Grey")))) + (eshell-ls-clutter-face ((t (:foreground "DimGray")))) + (eshell-ls-directory-face ((t (:bold t :foreground "MediumSlateBlue")))) + (eshell-ls-executable-face ((t (:foreground "Coral")))) + (eshell-ls-missing-face ((t (:foreground "black")))) + (eshell-ls-picture-face ((t (:foreground "Violet")))) + (eshell-ls-product-face ((t (:foreground "LightSalmon")))) + (eshell-ls-readonly-face ((t (:foreground "Aquamarine")))) + (eshell-ls-special-face ((t (:foreground "Gold")))) + (eshell-ls-symlink-face ((t (:foreground "White")))) + (eshell-ls-unreadable-face ((t (:foreground "DimGray")))) + (eshell-prompt-face ((t (:foreground "MediumAquamarine")))) + (font-lock-builtin-face ((t (:bold t :foreground "PaleGreen")))) + (font-lock-comment-face ((t (:foreground "tomato3")))) + (font-lock-constant-face ((t (:foreground "Aquamarine")))) + (font-lock-doc-string-face ((t (:foreground "LightSalmon3")))) + (font-lock-function-name-face ((t (:foreground "SteelBlue1")))) + (font-lock-keyword-face ((t (:foreground "cyan1")))) + (font-lock-reference-face ((t (:foreground "LightSalmon2")))) + (font-lock-string-face ((t (:foreground "LightSalmon3")))) + (font-lock-type-face ((t (:foreground "PaleGreen3")))) + (font-lock-variable-name-face ((t (:foreground "khaki1")))) + (font-lock-warning-face ((t (:bold t :foreground "IndianRed")))) + (font-lock-preprocessor-face ((t (:foreground "SkyBlue3")))) + (widget-field-face ((t (:background "DarkCyan")))) + (custom-group-tag-face ((t(:foreground "brown" :underline t)))) + (custom-state-face ((t (:foreground "khaki")))) + (highlight ((t (:background "PaleGreen" :foreground "DarkGreen")))) + (highline-face ((t (:background "SeaGreen")))) + (holiday-face ((t (:background "DimGray")))) + (info-menu-5 ((t (:underline t)))) + (info-node ((t (:underline t :bold t :foreground "DodgerBlue1")))) + (info-xref ((t (:underline t :foreground "DodgerBlue1")))) + (isearch ((t (:foreground "red" :background "CornflowerBlue")))) + (italic ((t (:italic t)))) + (modeline ((t (:background "LightSlateGray" :foreground "AntiqueWhite")))) + (modeline-buffer-id ((t (:background "LightSlateGray" :foreground "DarkBlue")))) + (modeline-mousable ((t (:background "LightSlateGray" :foreground "firebrick")))) + (modeline-mousable-minor-mode ((t (:background "LightSlateGray" :foreground "wheat")))) + (region ((t (:background "dark cyan" :foreground "cyan")))) + (secondary-selection ((t (:background "Aquamarine" :foreground "SlateBlue")))) + (show-paren-match-face ((t (:background "Aquamarine" :foreground "SlateBlue")))) + (show-paren-mismatch-face ((t (:background "Red" :foreground "White")))) + (underline ((t (:underline t)))) + (widget-field-face ((t (:foreground "LightBlue")))) + (widget-inactive-face ((t (:foreground "DimGray")))) + (widget-single-line-field-face ((t (:foreground "LightBlue")))) + (woman-bold-face ((t (:bold t)))) + (woman-italic-face ((t (:foreground "beige")))) + (woman-unknown-face ((t (:foreground "LightSalmon")))))))) + +(defun color-theme-scintilla () + "Color theme by Gordon Messmer, created 2001-02-07. +Based on the Scintilla editor. + +If you want to modify the font as well, you should customize variable +`color-theme-legal-frame-parameters' to \"\\(color\\|mode\\|font\\|height\\|width\\)$\". +The default setting will prevent color themes from installing specific +fonts." + (interactive) + (color-theme-install + ;; The light editor style doesn't seem to look right with + ;; the same font that works in the dark editor style. + ;; Dark letters on light background just isn't as visible. + '(color-theme-scintilla + ((font . "-monotype-courier new-bold-r-normal-*-*-140-*-*-m-*-iso8859-1") + (width . 95) + (height . 40) + (background-color . "white") + (foreground-color . "black") + (background-mode . light) + (mouse-color . "grey15") + (cursor-color . "grey15")) + (default ((t nil))) + (font-lock-comment-face ((t (:italic t :foreground "ForestGreen")))) + (font-lock-string-face ((t (:foreground "DarkMagenta")))) + (font-lock-keyword-face ((t (:foreground "NavyBlue")))) + (font-lock-warning-face ((t (:bold t :foreground "VioletRed")))) + (font-lock-constant-face ((t (:foreground "Blue")))) + (font-lock-type-face ((t (:foreground "NavyBlue")))) + (font-lock-variable-name-face ((t (:foreground "DarkCyan")))) + (font-lock-function-name-face ((t (:foreground "DarkCyan")))) + (font-lock-builtin-face ((t (:foreground "NavyBlue")))) + (highline-face ((t (:background "Grey95")))) + (show-paren-match-face ((t (:background "Grey80")))) + (region ((t (:background "Grey80")))) + (highlight ((t (:foreground "ForestGreen")))) + (secondary-selection ((t (:background "NavyBlue" :foreground "white")))) + (widget-field-face ((t (:background "NavyBlue")))) + (widget-single-line-field-face ((t (:background "RoyalBlue")))))) ) + +(defun color-theme-gtk-ide () + "Color theme by Gordon Messmer, created 2001-02-07. +Inspired by a GTK IDE whose name I've forgotten. + +If you want to modify the font as well, you should customize variable +`color-theme-legal-frame-parameters' to \"\\(color\\|mode\\|font\\|height\\|width\\)$\". +The default setting will prevent color themes from installing specific +fonts." + ;; The light editor style doesn't seem to look right with + ;; the same font that works in the dark editor style. + ;; Dark letters on light background just isn't as visible. + (interactive) + (color-theme-install + '(color-theme-gtk-ide + ((font . "-monotype-courier new-medium-r-normal-*-*-120-*-*-m-*-iso8859-15") + (width . 95) + (height . 45) + (background-color . "white") + (foreground-color . "black") + (background-mode . light) + (mouse-color . "grey15") + (cursor-color . "grey15")) + (default ((t nil))) + (font-lock-comment-face ((t (:italic t :foreground "grey55")))) + (font-lock-string-face ((t (:foreground "DarkRed")))) + (font-lock-keyword-face ((t (:foreground "DarkBlue")))) + (font-lock-warning-face ((t (:bold t :foreground "VioletRed")))) + (font-lock-constant-face ((t (:foreground "OliveDrab")))) + (font-lock-type-face ((t (:foreground "SteelBlue4")))) + (font-lock-variable-name-face ((t (:foreground "DarkGoldenrod")))) + (font-lock-function-name-face ((t (:foreground "SlateBlue")))) + (font-lock-builtin-face ((t (:foreground "ForestGreen")))) + (highline-face ((t (:background "grey95")))) + (show-paren-match-face ((t (:background "grey80")))) + (region ((t (:background "grey80")))) + (highlight ((t (:background "LightSkyBlue")))) + (secondary-selection ((t (:background "grey55")))) + (widget-field-face ((t (:background "navy")))) + (widget-single-line-field-face ((t (:background "royalblue")))))) ) + +(defun color-theme-midnight () + "Color theme by Gordon Messmer, created 2001-02-07. +A color theme inspired by a certain IDE for Windows. It's all from memory, +since I only used that software in college. + +If you want to modify the font as well, you should customize variable +`color-theme-legal-frame-parameters' to \"\\(color\\|mode\\|font\\|height\\|width\\)$\". +The default setting will prevent color themes from installing specific +fonts." + (interactive) + (color-theme-install + '(color-theme-midnight + ((font . "fixed") + (width . 130) + (height . 50) + (background-color . "black") + (foreground-color . "grey85") + (background-mode . dark) + (mouse-color . "grey85") + (cursor-color . "grey85")) + (default ((t (nil)))) + (font-lock-comment-face ((t (:italic t :foreground "grey60")))) + (font-lock-string-face ((t (:foreground "Magenta")))) + (font-lock-keyword-face ((t (:foreground "Cyan")))) + (font-lock-warning-face ((t (:bold t :foreground "Pink")))) + (font-lock-constant-face ((t (:foreground "OliveDrab")))) + (font-lock-type-face ((t (:foreground "DarkCyan")))) + (font-lock-variable-name-face ((t (:foreground "DarkGoldenrod")))) + (font-lock-function-name-face ((t (:foreground "SlateBlue")))) + (font-lock-builtin-face ((t (:foreground "SkyBlue")))) + (highline-face ((t (:background "grey12")))) + (setnu-line-number-face ((t (:background "Grey15" :foreground "White" :bold t)))) + (show-paren-match-face ((t (:background "grey30")))) + (region ((t (:background "grey15")))) + (highlight ((t (:background "blue")))) + (secondary-selection ((t (:background "navy")))) + (widget-field-face ((t (:background "navy")))) + (widget-single-line-field-face ((t (:background "royalblue")))))) ) + +(defun color-theme-jedit-grey () + "Color theme by Gordon Messmer, created 2001-02-07. +Based on a screenshot of jedit. + +If you want to modify the font as well, you should customize variable +`color-theme-legal-frame-parameters' to \"\\(color\\|mode\\|font\\|height\\|width\\)$\". +The default setting will prevent color themes from installing specific +fonts." + (interactive) + (color-theme-install + '(color-theme-jedit-grey + ((font . "fixed") + (width . 130) + (height . 50) + (background-color . "grey77") + (foreground-color . "black") + (background-mode . light) + (mouse-color . "black") + (cursor-color . "black")) + (default ((t (nil)))) + (font-lock-comment-face ((t (:italic t :foreground "RoyalBlue4")))) + (font-lock-string-face ((t (:foreground "Gold4")))) + (font-lock-keyword-face ((t (:bold t :foreground "DarkRed")))) + (font-lock-warning-face ((t (:bold t :foreground "Pink")))) + (font-lock-constant-face ((t (:foreground "DarkCyan")))) + (font-lock-type-face ((t (:foreground "DarkRed")))) + (font-lock-function-name-face ((t (:foreground "Green4")))) + (font-lock-builtin-face ((t (:bold t :foreground "DarkRed")))) + (highline-face ((t (:background "grey84")))) + (setnu-line-number-face ((t (:background "White" :foreground "MediumPurple3" :italic t)))) + (show-paren-match-face ((t (:background "grey60")))) + (region ((t (:background "grey70")))) + (highlight ((t (:background "grey90")))) + (secondary-selection ((t (:background "white")))) + (widget-field-face ((t (:background "royalblue")))) + (widget-single-line-field-face ((t (:background "royalblue")))))) ) + +(defun color-theme-snow () + "Color theme by Nicolas Rist, created 2001-03-08. +Black on gainsboro. In Emacs, the text background is a shade darker +than the frame background: Gainsboro instead of snow. This makes the +structure of the text clearer without being too agressive on the eyes. +On XEmacs, this doesn't really work as the frame and the default face +allways use the same foreground and background colors. +The color theme includes gnus, message, font-lock, sgml, and speedbar." + (interactive) + (color-theme-install + '(color-theme-snow + ((background-color . "snow2") + (background-mode . light) + (border-color . "black") + (cursor-color . "RoyalBlue2") + (foreground-color . "black") + (mouse-color . "black")) + ((gnus-mouse-face . highlight) + (list-matching-lines-face . bold) + (view-highlight-face . highlight)) + (default ((t (:background "gainsboro" :foreground "dark slate gray")))) + (bold ((t (:bold t)))) + (bold-italic ((t (:italic t :bold t)))) + (calendar-today-face ((t (:underline t)))) + (custom-button-face ((t (:background "gainsboro" :foreground "dark cyan")))) + (custom-documentation-face ((t (:background "gainsboro")))) + (diary-face ((t (:foreground "red")))) + (fg:black ((t (:foreground "black")))) + (font-lock-builtin-face ((t (:background "gainsboro" :foreground "medium orchid")))) + (font-lock-comment-face ((t (:background "gainsboro" :foreground "SteelBlue3")))) + (font-lock-constant-face ((t (:background "gainsboro" :foreground "orange3")))) + (font-lock-function-name-face ((t (:background "gainsboro" :foreground "blue3")))) + (font-lock-keyword-face ((t (:background "gainsboro" :foreground "red3")))) + (font-lock-string-face ((t (:background "gainsboro" :foreground "SpringGreen3")))) + (font-lock-type-face ((t (:background "gainsboro" :foreground "dark cyan")))) + (font-lock-variable-name-face ((t (:background "gainsboro" :foreground "purple2")))) + (font-lock-warning-face ((t (:bold t :background "gainsboro" :foreground "red")))) + (gnus-group-mail-1-empty-face ((t (:foreground "DeepPink3")))) + (gnus-group-mail-1-face ((t (:bold t :foreground "DeepPink3")))) + (gnus-group-mail-2-empty-face ((t (:foreground "HotPink3")))) + (gnus-group-mail-2-face ((t (:bold t :foreground "HotPink3")))) + (gnus-group-mail-3-empty-face ((t (:foreground "magenta4")))) + (gnus-group-mail-3-face ((t (:bold t :foreground "magenta4")))) + (gnus-group-mail-low-empty-face ((t (:foreground "DeepPink4")))) + (gnus-group-mail-low-face ((t (:bold t :foreground "DeepPink4")))) + (gnus-group-news-1-empty-face ((t (:foreground "ForestGreen")))) + (gnus-group-news-1-face ((t (:bold t :foreground "ForestGreen")))) + (gnus-group-news-2-empty-face ((t (:foreground "CadetBlue4")))) + (gnus-group-news-2-face ((t (:bold t :foreground "CadetBlue4")))) + (gnus-group-news-3-empty-face ((t (nil)))) + (gnus-group-news-3-face ((t (:bold t)))) + (gnus-group-news-low-empty-face ((t (:foreground "DarkGreen")))) + (gnus-group-news-low-face ((t (:bold t :foreground "DarkGreen")))) + (gnus-splash-face ((t (:foreground "ForestGreen")))) + (gnus-summary-cancelled-face ((t (:background "black" :foreground "yellow")))) + (gnus-summary-high-ancient-face ((t (:bold t :foreground "RoyalBlue")))) + (gnus-summary-high-read-face ((t (:bold t :foreground "DarkGreen")))) + (gnus-summary-high-ticked-face ((t (:bold t :foreground "firebrick")))) + (gnus-summary-high-unread-face ((t (:bold t)))) + (gnus-summary-low-ancient-face ((t (:italic t :foreground "RoyalBlue")))) + (gnus-summary-low-read-face ((t (:italic t :foreground "DarkGreen")))) + (gnus-summary-low-ticked-face ((t (:italic t :foreground "firebrick")))) + (gnus-summary-low-unread-face ((t (:italic t)))) + (gnus-summary-normal-ancient-face ((t (:foreground "RoyalBlue")))) + (gnus-summary-normal-read-face ((t (:foreground "DarkGreen")))) + (gnus-summary-normal-ticked-face ((t (:foreground "firebrick")))) + (gnus-summary-normal-unread-face ((t (nil)))) + (gnus-summary-selected-face ((t (:underline t)))) + (gui-button-face ((t (:foreground "light grey")))) + (highlight ((t (:background "LightSteelBlue1")))) + (holiday-face ((t (:background "pink")))) + (ibuffer-marked-face ((t (:foreground "red")))) + (italic ((t (:italic t)))) + (message-cited-text-face ((t (:foreground "red")))) + (message-header-cc-face ((t (:foreground "MidnightBlue")))) + (message-header-name-face ((t (:foreground "cornflower blue")))) + (message-header-newsgroups-face ((t (:italic t :bold t :foreground "blue4")))) + (message-header-other-face ((t (:foreground "steel blue")))) + (message-header-subject-face ((t (:bold t :foreground "navy blue")))) + (message-header-to-face ((t (:bold t :foreground "MidnightBlue")))) + (message-header-xheader-face ((t (:foreground "blue")))) + (message-separator-face ((t (:foreground "brown")))) + (modeline ((t (:background "dark slate gray" :foreground "gainsboro")))) + (modeline-buffer-id ((t (:background "dark slate gray" :foreground "gainsboro")))) + (modeline-mousable ((t (:background "dark slate gray" :foreground "gainsboro")))) + (modeline-mousable-minor-mode ((t (:background "dark slate gray" :foreground "gainsboro")))) + (region ((t (:background "lavender")))) + (secondary-selection ((t (:background "paleturquoise")))) + (sgml-comment-face ((t (:foreground "dark green")))) + (sgml-doctype-face ((t (:foreground "maroon")))) + (sgml-end-tag-face ((t (:foreground "blue2")))) + (sgml-entity-face ((t (:foreground "red2")))) + (sgml-ignored-face ((t (:background "gray90" :foreground "maroon")))) + (sgml-ms-end-face ((t (:foreground "maroon")))) + (sgml-ms-start-face ((t (:foreground "maroon")))) + (sgml-pi-face ((t (:foreground "maroon")))) + (sgml-sgml-face ((t (:foreground "maroon")))) + (sgml-short-ref-face ((t (:foreground "goldenrod")))) + (sgml-start-tag-face ((t (:foreground "blue2")))) + (show-paren-match-face ((t (:background "SlateGray1")))) + (show-paren-mismatch-face ((t (:background "purple" :foreground "white")))) + (speedbar-button-face ((t (:foreground "green4")))) + (speedbar-directory-face ((t (:foreground "blue4")))) + (speedbar-file-face ((t (:foreground "cyan4")))) + (speedbar-highlight-face ((t (:background "dark turquoise" :foreground "white")))) + (speedbar-selected-face ((t (:underline t :foreground "red")))) + (speedbar-tag-face ((t (:foreground "brown")))) + (underline ((t (:underline t))))))) + +(defun color-theme-montz () + "Color theme by Brady Montz, created 2001-03-08. +Black on Gray. +Includes dired, bbdb, font-lock, gnus, message, viper, and widget." + (interactive) + (color-theme-install + '(color-theme-montz + ((background-color . "gray80") + (background-mode . light) + (background-toolbar-color . "#cccccccccccc") + (border-color . "#000000000000") + (bottom-toolbar-shadow-color . "#7a7a7a7a7a7a") + (cursor-color . "Red3") + (foreground-color . "black") + (top-toolbar-shadow-color . "#f5f5f5f5f5f5") + (viper-saved-cursor-color-in-replace-mode . "Red3")) + ((gnus-mouse-face . highlight) + (paren-match-face . paren-face-match) + (paren-mismatch-face . paren-face-mismatch) + (paren-no-match-face . paren-face-no-match) + (smiley-mouse-face . highlight)) + (default ((t (nil)))) + (bbdb-company ((t (:italic t)))) + (bbdb-field-name ((t (:bold t)))) + (bbdb-field-value ((t (nil)))) + (bbdb-name ((t (:underline t)))) + (blue ((t (:foreground "blue")))) + (bold ((t (:bold t)))) + (bold-italic ((t (:italic t :bold t)))) + (border-glyph ((t (nil)))) + (dired-face-boring ((t (:foreground "Gray65")))) + (dired-face-directory ((t (:bold t)))) + (dired-face-executable ((t (:foreground "SeaGreen")))) + (dired-face-flagged ((t (:background "LightSlateGray")))) + (dired-face-marked ((t (:background "PaleVioletRed")))) + (dired-face-permissions ((t (:background "grey75" :foreground "black")))) + (dired-face-setuid ((t (:foreground "Red")))) + (dired-face-socket ((t (:foreground "magenta")))) + (dired-face-symlink ((t (:foreground "cyan")))) + (display-time-mail-balloon-enhance-face ((t (:background "orange")))) + (display-time-mail-balloon-gnus-group-face ((t (:foreground "blue")))) + (display-time-time-balloon-face ((t (:foreground "red")))) + (font-lock-builtin-face ((t (:foreground "red3")))) + (font-lock-comment-face ((t (:foreground "blue")))) + (font-lock-constant-face ((t (:foreground "red3")))) + (font-lock-doc-string-face ((t (:foreground "mediumvioletred")))) + (font-lock-function-name-face ((t (:foreground "firebrick")))) + (font-lock-keyword-face ((t (:bold t :foreground "black")))) + (font-lock-preprocessor-face ((t (:foreground "blue3")))) + (font-lock-reference-face ((t (:foreground "red3")))) + (font-lock-string-face ((t (:foreground "mediumvioletred")))) + (font-lock-type-face ((t (:foreground "darkgreen")))) + (font-lock-variable-name-face ((t (:foreground "black")))) + (font-lock-warning-face ((t (:bold t :foreground "Red")))) + (gnus-cite-attribution-face ((t (:italic t)))) + (gnus-cite-face-1 ((t (:foreground "MidnightBlue")))) + (gnus-cite-face-10 ((t (:foreground "medium purple")))) + (gnus-cite-face-11 ((t (:foreground "turquoise")))) + (gnus-cite-face-2 ((t (:foreground "firebrick")))) + (gnus-cite-face-3 ((t (:foreground "dark green")))) + (gnus-cite-face-4 ((t (:foreground "OrangeRed")))) + (gnus-cite-face-5 ((t (:foreground "dark khaki")))) + (gnus-cite-face-6 ((t (:foreground "dark violet")))) + (gnus-cite-face-7 ((t (:foreground "SteelBlue4")))) + (gnus-cite-face-8 ((t (:foreground "magenta")))) + (gnus-cite-face-9 ((t (:foreground "violet")))) + (gnus-emphasis-bold ((t (:bold t)))) + (gnus-emphasis-bold-italic ((t (:bold t)))) + (gnus-emphasis-highlight-words ((t (:background "black" :foreground "yellow")))) + (gnus-emphasis-italic ((t (:italic t)))) + (gnus-emphasis-underline ((t (:underline t)))) + (gnus-emphasis-underline-bold ((t (:underline t :bold t)))) + (gnus-emphasis-underline-bold-italic ((t (:underline t :bold t)))) + (gnus-emphasis-underline-italic ((t (:underline t :italic t)))) + (gnus-group-mail-1-empty-face ((t (:foreground "DeepPink3")))) + (gnus-group-mail-1-face ((t (:bold t :foreground "DeepPink3")))) + (gnus-group-mail-2-empty-face ((t (:foreground "HotPink3")))) + (gnus-group-mail-2-face ((t (:bold t :foreground "HotPink3")))) + (gnus-group-mail-3-empty-face ((t (:foreground "magenta4")))) + (gnus-group-mail-3-face ((t (:bold t :foreground "magenta4")))) + (gnus-group-mail-low-empty-face ((t (:foreground "DeepPink4")))) + (gnus-group-mail-low-face ((t (:bold t :foreground "DeepPink4")))) + (gnus-group-news-1-empty-face ((t (:foreground "ForestGreen")))) + (gnus-group-news-1-face ((t (:bold t :foreground "ForestGreen")))) + (gnus-group-news-2-empty-face ((t (:foreground "CadetBlue4")))) + (gnus-group-news-2-face ((t (:bold t :foreground "CadetBlue4")))) + (gnus-group-news-3-empty-face ((t (nil)))) + (gnus-group-news-3-face ((t (:bold t)))) + (gnus-group-news-4-empty-face ((t (nil)))) + (gnus-group-news-4-face ((t (:bold t)))) + (gnus-group-news-5-empty-face ((t (nil)))) + (gnus-group-news-5-face ((t (:bold t)))) + (gnus-group-news-6-empty-face ((t (nil)))) + (gnus-group-news-6-face ((t (:bold t)))) + (gnus-group-news-low-empty-face ((t (:foreground "DarkGreen")))) + (gnus-group-news-low-face ((t (:bold t :foreground "DarkGreen")))) + (gnus-header-content-face ((t (:italic t :foreground "indianred4")))) + (gnus-header-from-face ((t (:foreground "red3")))) + (gnus-header-name-face ((t (:foreground "maroon")))) + (gnus-header-newsgroups-face ((t (:italic t :foreground "MidnightBlue")))) + (gnus-header-subject-face ((t (:foreground "red4")))) + (gnus-picons-face ((t (:background "white" :foreground "black")))) + (gnus-picons-xbm-face ((t (:background "white" :foreground "black")))) + (gnus-signature-face ((t (:italic t)))) + (gnus-splash-face ((t (:foreground "Brown")))) + (gnus-summary-cancelled-face ((t (:background "black" :foreground "yellow")))) + (gnus-summary-high-ancient-face ((t (:bold t :foreground "RoyalBlue")))) + (gnus-summary-high-read-face ((t (:bold t :foreground "DarkGreen")))) + (gnus-summary-high-ticked-face ((t (:bold t :foreground "firebrick")))) + (gnus-summary-high-unread-face ((t (:bold t)))) + (gnus-summary-low-ancient-face ((t (:italic t :foreground "RoyalBlue")))) + (gnus-summary-low-read-face ((t (:italic t :foreground "DarkGreen")))) + (gnus-summary-low-ticked-face ((t (:italic t :foreground "firebrick")))) + (gnus-summary-low-unread-face ((t (:italic t)))) + (gnus-summary-normal-ancient-face ((t (:foreground "RoyalBlue")))) + (gnus-summary-normal-read-face ((t (:foreground "DarkGreen")))) + (gnus-summary-normal-ticked-face ((t (:foreground "firebrick")))) + (gnus-summary-normal-unread-face ((t (nil)))) + (gnus-summary-selected-face ((t (:underline t)))) + (gnus-x-face ((t (:background "white" :foreground "black")))) + (green ((t (:foreground "green")))) + (gui-button-face ((t (:background "grey75" :foreground "black")))) + (gui-element ((t (nil)))) + (highlight ((t (:background "darkseagreen2")))) + (info-node ((t (:bold t)))) + (info-xref ((t (:bold t)))) + (isearch ((t (:background "paleturquoise")))) + (italic ((t (:italic t)))) + (left-margin ((t (nil)))) + (list-mode-item-selected ((t (:background "gray68" :foreground "black")))) + (message-cited-text-face ((t (:foreground "red")))) + (message-header-cc-face ((t (:foreground "MidnightBlue")))) + (message-header-name-face ((t (:foreground "cornflower blue")))) + (message-header-newsgroups-face ((t (:bold t :foreground "blue4")))) + (message-header-other-face ((t (:foreground "steel blue")))) + (message-header-subject-face ((t (:bold t :foreground "navy blue")))) + (message-header-to-face ((t (:bold t :foreground "MidnightBlue")))) + (message-header-xheader-face ((t (:foreground "blue")))) + (message-mml-face ((t (:foreground "ForestGreen")))) + (message-separator-face ((t (:foreground "brown")))) + (modeline ((t (nil)))) + (modeline-buffer-id ((t (:background "Gray80" :foreground "blue4")))) + (modeline-mousable ((t (:background "Gray80" :foreground "firebrick")))) + (modeline-mousable-minor-mode ((t (:background "Gray80" :foreground "green4")))) + (paren-face-match ((t (:background "turquoise")))) + (paren-face-mismatch ((t (:background "purple" :foreground "white")))) + (paren-face-no-match ((t (:background "yellow" :foreground "black")))) + (pointer ((t (nil)))) + (primary-selection ((t (:background "gray65")))) + (red ((t (:foreground "red")))) + (right-margin ((t (nil)))) + (secondary-selection ((t (:background "paleturquoise")))) + (text-cursor ((t (:background "Red3" :foreground "gray80")))) + (toolbar ((t (nil)))) + (underline ((t (:underline t)))) + (vertical-divider ((t (nil)))) + (viper-minibuffer-emacs-face ((t (:background "gray80" :foreground "black")))) + (viper-minibuffer-insert-face ((t (:background "gray80" :foreground "black")))) + (viper-minibuffer-vi-face ((t (:background "gray80" :foreground "black")))) + (viper-replace-overlay-face ((t (:background "black" :foreground "white")))) + (viper-search-face ((t (:background "black" :foreground "white")))) + (widget-button-face ((t (:bold t)))) + (widget-button-pressed-face ((t (:foreground "red")))) + (widget-documentation-face ((t (:foreground "dark green")))) + (widget-field-face ((t (:background "gray85")))) + (widget-inactive-face ((t (:foreground "dim gray")))) + (yellow ((t (:foreground "yellow")))) + (zmacs-region ((t (:background "black" :foreground "white"))))))) + +(defun color-theme-aalto-light () + "Color theme by Jari Aalto, created 2001-03-08. +Black on light yellow. +Used for Win32 on a Nokia446Xpro monitor. +Includes cvs, font-lock, gnus, message, sgml, widget" + (interactive) + (color-theme-install + '(color-theme-aalto-light + ((background-color . "#FFFFE0") + (background-mode . light) + (border-color . "black") + (cursor-color . "black") + (foreground-color . "black") + (mouse-color . "LawnGreen")) + ((gnus-mouse-face . highlight) + (list-matching-lines-face . bold) + (tinyreplace-:face . highlight) + (view-highlight-face . highlight)) + (default ((t (nil)))) + (bold ((t (:bold t)))) + (bold-italic ((t (:italic t :bold t)))) + (calendar-today-face ((t (:underline t)))) + (cvs-filename-face ((t (:foreground "blue4")))) + (cvs-handled-face ((t (:foreground "pink")))) + (cvs-header-face ((t (:bold t :foreground "blue4")))) + (cvs-marked-face ((t (:bold t :foreground "green3")))) + (cvs-msg-face ((t (:italic t)))) + (cvs-need-action-face ((t (:foreground "orange")))) + (cvs-unknown-face ((t (:foreground "red")))) + (diary-face ((t (:foreground "red")))) + (eshell-test-failed-face ((t (:bold t :foreground "OrangeRed")))) + (eshell-test-ok-face ((t (:bold t :foreground "Green")))) + (font-lock-builtin-face ((t (:foreground "Orchid")))) + (font-lock-comment-face ((t (:foreground "Firebrick")))) + (font-lock-constant-face ((t (:foreground "CadetBlue")))) + (font-lock-function-name-face ((t (:foreground "Blue")))) + (font-lock-keyword-face ((t (:foreground "Purple")))) + (font-lock-string-face ((t (:foreground "RosyBrown")))) + (font-lock-type-face ((t (:foreground "ForestGreen")))) + (font-lock-variable-name-face ((t (:foreground "DarkGoldenrod")))) + (font-lock-warning-face ((t (:bold t :foreground "Red")))) + (gnus-emphasis-bold ((t (:bold t)))) + (gnus-emphasis-bold-italic ((t (:italic t :bold t)))) + (gnus-emphasis-highlight-words ((t (:background "black" :foreground "yellow")))) + (gnus-emphasis-italic ((t (:italic t)))) + (gnus-emphasis-underline ((t (:underline t)))) + (gnus-emphasis-underline-bold ((t (:underline t :bold t)))) + (gnus-emphasis-underline-bold-italic ((t (:underline t :italic t :bold t)))) + (gnus-emphasis-underline-italic ((t (:underline t :italic t)))) + (gnus-group-mail-1-empty-face ((t (:foreground "DeepPink3")))) + (gnus-group-mail-1-face ((t (:bold t :foreground "DeepPink3")))) + (gnus-group-mail-2-empty-face ((t (:foreground "HotPink3")))) + (gnus-group-mail-2-face ((t (:bold t :foreground "HotPink3")))) + (gnus-group-mail-3-empty-face ((t (:foreground "magenta4")))) + (gnus-group-mail-3-face ((t (:bold t :foreground "magenta4")))) + (gnus-group-mail-low-empty-face ((t (:foreground "DeepPink4")))) + (gnus-group-mail-low-face ((t (:bold t :foreground "DeepPink4")))) + (gnus-group-news-1-empty-face ((t (:foreground "ForestGreen")))) + (gnus-group-news-1-face ((t (:bold t :foreground "ForestGreen")))) + (gnus-group-news-2-empty-face ((t (:foreground "CadetBlue4")))) + (gnus-group-news-2-face ((t (:bold t :foreground "CadetBlue4")))) + (gnus-group-news-3-empty-face ((t (nil)))) + (gnus-group-news-3-face ((t (:bold t)))) + (gnus-group-news-4-empty-face ((t (nil)))) + (gnus-group-news-4-face ((t (:bold t)))) + (gnus-group-news-5-empty-face ((t (nil)))) + (gnus-group-news-5-face ((t (:bold t)))) + (gnus-group-news-6-empty-face ((t (nil)))) + (gnus-group-news-6-face ((t (:bold t)))) + (gnus-group-news-low-empty-face ((t (:foreground "DarkGreen")))) + (gnus-group-news-low-face ((t (:bold t :foreground "DarkGreen")))) + (gnus-header-content-face ((t (:italic t :foreground "indianred4")))) + (gnus-header-from-face ((t (:foreground "red3")))) + (gnus-header-name-face ((t (:foreground "maroon")))) + (gnus-header-newsgroups-face ((t (:italic t :foreground "MidnightBlue")))) + (gnus-header-subject-face ((t (:foreground "red4")))) + (gnus-signature-face ((t (:italic t)))) + (gnus-splash-face ((t (:foreground "Brown")))) + (gnus-summary-cancelled-face ((t (:background "black" :foreground "yellow")))) + (gnus-summary-high-ancient-face ((t (:bold t :foreground "RoyalBlue")))) + (gnus-summary-high-read-face ((t (:bold t :foreground "DarkGreen")))) + (gnus-summary-high-ticked-face ((t (:bold t :foreground "firebrick")))) + (gnus-summary-high-unread-face ((t (:bold t)))) + (gnus-summary-low-ancient-face ((t (:italic t :foreground "RoyalBlue")))) + (gnus-summary-low-read-face ((t (:italic t :foreground "DarkGreen")))) + (gnus-summary-low-ticked-face ((t (:italic t :foreground "firebrick")))) + (gnus-summary-low-unread-face ((t (:italic t)))) + (gnus-summary-normal-ancient-face ((t (:foreground "RoyalBlue")))) + (gnus-summary-normal-read-face ((t (:foreground "DarkGreen")))) + (gnus-summary-normal-ticked-face ((t (:foreground "firebrick")))) + (gnus-summary-normal-unread-face ((t (nil)))) + (gnus-summary-selected-face ((t (:underline t)))) + (highlight ((t (:background "darkseagreen2")))) + (holiday-face ((t (:background "pink")))) + (info-menu-5 ((t (:underline t)))) + (info-node ((t (:italic t :bold t)))) + (info-xref ((t (:bold t)))) + (italic ((t (:italic t)))) + (message-cited-text-face ((t (:foreground "red")))) + (message-header-cc-face ((t (:foreground "MidnightBlue")))) + (message-header-name-face ((t (:foreground "cornflower blue")))) + (message-header-newsgroups-face ((t (:italic t :bold t :foreground "blue4")))) + (message-header-other-face ((t (:foreground "steel blue")))) + (message-header-subject-face ((t (:bold t :foreground "navy blue")))) + (message-header-to-face ((t (:bold t :foreground "MidnightBlue")))) + (message-header-xheader-face ((t (:foreground "blue")))) + (message-mml-face ((t (:foreground "ForestGreen")))) + (message-separator-face ((t (:foreground "brown")))) + (modeline ((t (:background "black" :foreground "white")))) + (modeline-buffer-id ((t (:background "black" :foreground "white")))) + (modeline-mousable ((t (:background "black" :foreground "white")))) + (modeline-mousable-minor-mode ((t (:background "black" :foreground "white")))) + (region ((t (:background "gray")))) + (secondary-selection ((t (:background "paleturquoise")))) + (sgml-comment-face ((t (:foreground "dark turquoise")))) + (sgml-doctype-face ((t (:foreground "red")))) + (sgml-end-tag-face ((t (:foreground "blue")))) + (sgml-entity-face ((t (:foreground "magenta")))) + (sgml-ignored-face ((t (:background "gray60" :foreground "gray40")))) + (sgml-ms-end-face ((t (:foreground "green")))) + (sgml-ms-start-face ((t (:foreground "green")))) + (sgml-pi-face ((t (:foreground "lime green")))) + (sgml-sgml-face ((t (:foreground "brown")))) + (sgml-short-ref-face ((t (:foreground "deep sky blue")))) + (sgml-start-tag-face ((t (:foreground "blue")))) + (show-paren-match-face ((t (:background "turquoise")))) + (show-paren-mismatch-face ((t (:background "purple" :foreground "white")))) + (underline ((t (:underline t)))) + (widget-button-face ((t (:bold t)))) + (widget-button-pressed-face ((t (:foreground "red")))) + (widget-documentation-face ((t (:foreground "dark green")))) + (widget-field-face ((t (:background "gray85")))) + (widget-inactive-face ((t (:foreground "dim gray")))) + (widget-single-line-field-face ((t (:background "gray85"))))))) + +(defun color-theme-aalto-dark () + "Color theme by Jari Aalto, created 2001-03-08. +White on Deep Sky Blue 3. +Used for Unix Exceed on a Nokia446Xpro monitor. +Includes font-lock, info, and message." + (interactive) + (color-theme-install + '(color-theme-aalto-dark + ((background-color . "DeepSkyBlue3") + (background-mode . dark) + (border-color . "black") + (cursor-color . "yellow") + (foreground-color . "white") + (mouse-color . "black")) + ((ispell-highlight-face . highlight) + (list-matching-lines-face . bold) + (tinyreplace-:face . highlight) + (view-highlight-face . highlight)) + (default ((t (nil)))) + (bold ((t (:bold t :background "blue3" :foreground "white")))) + (bold-italic ((t (:italic t :bold t :foreground "blue3")))) + (calendar-today-face ((t (:underline t)))) + (diary-face ((t (:foreground "red")))) + (font-lock-builtin-face ((t (:foreground "LightSteelBlue")))) + (font-lock-comment-face ((t (:foreground "OrangeRed")))) + (font-lock-constant-face ((t (:foreground "Aquamarine")))) + (font-lock-function-name-face ((t (:foreground "LightSkyBlue")))) + (font-lock-keyword-face ((t (:foreground "Cyan")))) + (font-lock-string-face ((t (:foreground "LightSalmon")))) + (font-lock-type-face ((t (:foreground "PaleGreen")))) + (font-lock-variable-name-face ((t (:foreground "LightGoldenrod")))) + (font-lock-warning-face ((t (:bold t :foreground "Pink")))) + (highlight ((t (:background "blue3" :foreground "white")))) + (holiday-face ((t (:background "pink")))) + (info-menu-5 ((t (:underline t)))) + (info-node ((t (:italic t :bold t)))) + (info-xref ((t (:bold t)))) + (italic ((t (:italic t :background "gray")))) + (message-cited-text-face ((t (:foreground "red")))) + (message-header-cc-face ((t (:bold t :foreground "green4")))) + (message-header-name-face ((t (:foreground "DarkGreen")))) + (message-header-newsgroups-face ((t (:italic t :bold t :foreground "yellow")))) + (message-header-other-face ((t (:foreground "#b00000")))) + (message-header-subject-face ((t (:foreground "green3")))) + (message-header-to-face ((t (:bold t :foreground "green2")))) + (message-header-xheader-face ((t (:foreground "blue")))) + (message-mml-face ((t (:foreground "ForestGreen")))) + (message-separator-face ((t (:foreground "blue3")))) + (modeline ((t (:background "white" :foreground "DeepSkyBlue3")))) + (modeline-buffer-id ((t (:background "white" :foreground "DeepSkyBlue3")))) + (modeline-mousable ((t (:background "white" :foreground "DeepSkyBlue3")))) + (modeline-mousable-minor-mode ((t (:background "white" :foreground "DeepSkyBlue3")))) + (region ((t (:background "gray")))) + (secondary-selection ((t (:background "darkslateblue")))) + (show-paren-match-face ((t (:background "turquoise")))) + (show-paren-mismatch-face ((t (:background "purple" :foreground "white")))) + (underline ((t (:underline t))))))) + +(defun color-theme-blippblopp () + "Color theme by Thomas Sicheritz-Ponten, created 2001-03-12. +Used by researchers at Uppsala University and the Center for Biological +Sequence Analysis at the Technical University of Denmark. (As some of my +swedish friends couldn't pronounce Sicheritz - they choose to transform +it to something more \"swedish\": Blippblopp :-) +Includes font-lock and message." + (interactive) + (color-theme-install + '(color-theme-blippblopp + ((background-color . "white") + (background-mode . light) + (background-toolbar-color . "#cf3ccf3ccf3c") + (border-color . "#000000000000") + (bottom-toolbar-shadow-color . "#79e77df779e7") + (cursor-color . "Red3") + (foreground-color . "black") + (mouse-color . "black") + (top-toolbar-shadow-color . "#fffffbeeffff") + (viper-saved-cursor-color-in-replace-mode . "Red3")) + ((ispell-highlight-face . highlight)) + (default ((t (nil)))) + (blue ((t (:foreground "blue")))) + (bold ((t (:bold t)))) + (bold-italic ((t (:italic t :bold t)))) + (excerpt ((t (:italic t)))) + (ff-paths-non-existant-file-face ((t (:bold t :foreground "NavyBlue")))) + (fg:black ((t (:foreground "black")))) + (fixed ((t (:bold t)))) + (font-lock-builtin-face ((t (:foreground "red3")))) + (font-lock-comment-face ((t (:foreground "orange")))) + (font-lock-constant-face ((t (:foreground "red3")))) + (font-lock-doc-string-face ((t (:foreground "darkgreen")))) + (font-lock-exit-face ((t (:foreground "green")))) + (font-lock-function-name-face ((t (:bold t :foreground "red")))) + (font-lock-keyword-face ((t (:bold t :foreground "steelblue")))) + (font-lock-preprocessor-face ((t (:foreground "blue3")))) + (font-lock-reference-face ((t (:foreground "red3")))) + (font-lock-string-face ((t (:foreground "green4")))) + (font-lock-type-face ((t (:bold t :foreground "blue")))) + (font-lock-variable-name-face ((t (:foreground "black")))) + (font-lock-warning-face ((t (:bold t :foreground "Red")))) + (green ((t (:foreground "green")))) + (message-cited-text-face ((t (:foreground "red")))) + (message-header-cc-face ((t (:foreground "MidnightBlue")))) + (message-header-name-face ((t (:foreground "cornflower blue")))) + (message-header-newsgroups-face ((t (:italic t :bold t :foreground "blue4")))) + (message-header-other-face ((t (:foreground "steel blue")))) + (message-header-subject-face ((t (:bold t :foreground "navy blue")))) + (message-header-to-face ((t (:bold t :foreground "MidnightBlue")))) + (message-header-xheader-face ((t (:foreground "blue")))) + (message-mml-face ((t (:foreground "ForestGreen")))) + (message-separator-face ((t (:foreground "brown")))) + (modeline ((t (:background "dimgray" :foreground "lemonchiffon")))) + (modeline-buffer-id ((t (:background "dimgray" :foreground "green3")))) + (modeline-mousable ((t (:background "dimgray" :foreground "orange")))) + (modeline-mousable-minor-mode ((t (:background "dimgray" :foreground "blue4")))) + (primary-selection ((t (:background "gray65")))) + (red ((t (:foreground "red")))) + (region ((t (:background "gray65")))) + (secondary-selection ((t (:background "paleturquoise")))) + (show-paren-match-face ((t (:background "turquoise")))) + (show-paren-mismatch-face ((t (:background "purple" :foreground "white")))) + (text-cursor ((t (:background "Red3" :foreground "white")))) + (toolbar ((t (:background "Gray80")))) + (underline ((t (:underline t)))) + (vcursor ((t (:underline t :background "cyan" :foreground "blue")))) + (vertical-divider ((t (:background "Gray80")))) + (xref-keyword-face ((t (:foreground "blue")))) + (xref-list-pilot-face ((t (:foreground "navy")))) + (xref-list-symbol-face ((t (:foreground "navy")))) + (yellow ((t (:foreground "yellow")))) + (zmacs-region ((t (:background "gray65"))))))) + +(defun color-theme-hober (&optional preview) + "Does all sorts of crazy stuff. +Originally based on color-theme-standard, so I probably still have some +setting that I haven't changed. I also liberally copied settings from +the other themes in this package. The end result isn't much like the +other ones; I hope you like it." + (interactive) + (color-theme-install + '(color-theme-hober + ((foreground-color . "#c0c0c0") + (background-color . "black") + (mouse-color . "black") + (cursor-color . "medium turquoise") + (border-color . "black") + (background-mode . dark)) + (default ((t (nil)))) + (modeline ((t (:foreground "white" :background "darkslateblue")))) + (modeline-buffer-id ((t (:foreground "white" :background "darkslateblue")))) + (modeline-mousable ((t (:foreground "white" :background "darkslateblue")))) + (modeline-mousable-minor-mode ((t (:foreground "white" :background "darkslateblue")))) + (highlight ((t (:foreground "black" :background "#c0c0c0")))) + (bold ((t (:bold t)))) + (italic ((t (:italic t)))) + (bold-italic ((t (:bold t :italic t)))) + (region ((t (:foreground "white" :background "darkslateblue")))) + (zmacs-region ((t (:foreground "white" :background "darkslateblue")))) + (secondary-selection ((t (:background "paleturquoise")))) + (underline ((t (:underline t)))) + (diary-face ((t (:foreground "red")))) + (calendar-today-face ((t (:underline t)))) + (holiday-face ((t (:background "pink")))) + (widget-documentation-face ((t (:foreground "dark green" :background "white")))) + (widget-button-face ((t (:bold t)))) + (widget-button-pressed-face ((t (:foreground "red" :background "black")))) + (widget-field-face ((t (:background "gray85" :foreground "black")))) + (widget-single-line-field-face ((t (:background "gray85" :foreground "black")))) + (widget-inactive-face ((t (:foreground "dim gray" :background "red")))) + (fixed ((t (:bold t)))) + (excerpt ((t (:italic t)))) + (term-default-fg ((t (nil)))) + (term-default-bg ((t (nil)))) + (term-default-fg-inv ((t (nil)))) + (term-default-bg-inv ((t (nil)))) + (term-bold ((t (:bold t)))) + (term-underline ((t (:underline t)))) + (term-invisible ((t (nil)))) + (term-invisible-inv ((t (nil)))) + (term-white ((t (:foreground "#c0c0c0")))) + (term-whitebg ((t (:background "#c0c0c0")))) + (term-black ((t (:foreground "black")))) + (term-blackbg ((t (:background "black")))) + (term-red ((t (:foreground "#ef8171")))) + (term-redbg ((t (:background "#ef8171")))) + (term-green ((t (:foreground "#e5f779")))) + (term-greenbg ((t (:background "#e5f779")))) + (term-yellow ((t (:foreground "#fff796")))) + (term-yellowbg ((t (:background "#fff796")))) + (term-blue ((t (:foreground "#4186be")))) + (term-bluebg ((t (:background "#4186be")))) + (term-magenta ((t (:foreground "#ef9ebe")))) + (term-magentabg ((t (:background "#ef9ebe")))) + (term-cyan ((t (:foreground "#71bebe")))) + (term-cyanbg ((t (:background "#71bebe")))) + (font-lock-keyword-face ((t (:foreground "#00ffff")))) + (font-lock-comment-face ((t (:foreground "Red")))) + (font-lock-string-face ((t (:foreground "#ffff00")))) + (font-lock-constant-face ((t (:foreground "#00ff00")))) + (font-lock-builtin-face ((t (:foreground "#ffaa00")))) + (font-lock-type-face ((t (:foreground "Coral")))) + (font-lock-warning-face ((t (:foreground "Red" :bold t)))) + (font-lock-function-name-face ((t (:foreground "#4186be")))) + (font-lock-variable-name-face ((t (:foreground "white" :bold t)))) + (message-header-to-face ((t (:foreground "#4186be" :bold t)))) + (message-header-cc-face ((t (:foreground "#4186be")))) + (message-header-subject-face ((t (:foreground "#4186be" :bold t)))) + (message-header-newsgroups-face ((t (:foreground "Coral" :bold t)))) + (message-header-other-face ((t (:foreground "steel blue")))) + (message-header-name-face ((t (:foreground "white")))) + (message-header-xheader-face ((t (:foreground "blue")))) + (message-separator-face ((t (:foreground "brown")))) + (message-cited-text-face ((t (:foreground "white")))) + (gnus-header-from-face ((t (:foreground "Coral")))) + (gnus-header-subject-face ((t (:foreground "#4186be")))) + (gnus-header-newsgroups-face ((t (:foreground "#4186be" :italic t)))) + (gnus-header-name-face ((t (:foreground "white")))) + (gnus-header-content-face ((t (:foreground "#4186be" :italic t)))) + (gnus-cite-attribution-face ((t (:italic t)))) + (gnus-cite-face-list ((t (:bold nil :foreground "red")))) + (gnus-group-news-1-face ((t (:foreground "ForestGreen" :bold t)))) + (gnus-group-news-1-empty-face ((t (:foreground "ForestGreen")))) + (gnus-group-news-2-face ((t (:foreground "CadetBlue4" :bold t)))) + (gnus-group-news-2-empty-face ((t (:foreground "CadetBlue4")))) + (gnus-group-news-3-face ((t (:bold t)))) + (gnus-group-news-3-empty-face ((t (nil)))) + (gnus-group-news-low-face ((t (:foreground "DarkGreen" :bold t)))) + (gnus-group-news-low-empty-face ((t (:foreground "DarkGreen")))) + (gnus-group-mail-1-face ((t (:foreground "DeepPink3" :bold t)))) + (gnus-group-mail-1-empty-face ((t (:foreground "DeepPink3")))) + (gnus-group-mail-2-face ((t (:foreground "HotPink3" :bold t)))) + (gnus-group-mail-2-empty-face ((t (:foreground "HotPink3")))) + (gnus-group-mail-3-face ((t (:foreground "magenta4" :bold t)))) + (gnus-group-mail-3-empty-face ((t (:foreground "magenta4")))) + (gnus-group-mail-low-face ((t (:foreground "DeepPink4" :bold t)))) + (gnus-group-mail-low-empty-face ((t (:foreground "DeepPink4")))) + (gnus-summary-selected-face ((t (:underline t)))) + (gnus-summary-cancelled-face ((t (:foreground "yellow" :background "black")))) + (gnus-summary-high-ticked-face ((t (:foreground "firebrick" :bold t)))) + (gnus-summary-low-ticked-face ((t (:foreground "firebrick" :italic t)))) + (gnus-summary-normal-ticked-face ((t (:foreground "firebrick")))) + (gnus-summary-high-ancient-face ((t (:foreground "RoyalBlue" :bold t)))) + (gnus-summary-low-ancient-face ((t (:foreground "RoyalBlue" :italic t)))) + (gnus-summary-normal-ancient-face ((t (:foreground "RoyalBlue")))) + (gnus-summary-high-unread-face ((t (:bold t)))) + (gnus-summary-low-unread-face ((t (:italic t)))) + (gnus-summary-normal-unread-face ((t (nil)))) + (gnus-summary-high-read-face ((t (:foreground "DarkGreen" :bold t)))) + (gnus-summary-low-read-face ((t (:foreground "DarkGreen" :italic t)))) + (gnus-summary-normal-read-face ((t (:foreground "DarkGreen")))) + (gnus-splash-face ((t (:foreground "ForestGreen")))) + (gnus-emphasis-bold ((t (:bold t)))) + (gnus-emphasis-italic ((t (:italic t)))) + (gnus-emphasis-underline ((t (:underline t)))) + (gnus-emphasis-underline-bold ((t (:bold t :underline t)))) + (gnus-emphasis-underline-italic ((t (:italic t :underline t)))) + (gnus-emphasis-bold-italic ((t (:bold t :italic t)))) + (gnus-emphasis-underline-bold-italic ((t (:bold t :italic t :underline t)))) + (gnus-signature-face ((t (:foreground "white")))) + (gnus-cite-face-1 ((t (:foreground "Khaki")))) + (gnus-cite-face-2 ((t (:foreground "Coral")))) + (gnus-cite-face-3 ((t (:foreground "#4186be")))) + (gnus-cite-face-4 ((t (:foreground "yellow green")))) + (gnus-cite-face-5 ((t (:foreground "IndianRed")))) + (highlight-changes-face ((t (:foreground "red")))) + (highlight-changes-delete-face ((t (:foreground "red" :underline t)))) + (show-paren-match-face ((t (:foreground "white" :background "purple")))) + (show-paren-mismatch-face ((t (:foreground "white" :background "red")))) + (cperl-nonoverridable-face ((t (:foreground "chartreuse3")))) + (cperl-array-face ((t (:foreground "Blue" :bold t :background "lightyellow2")))) + (cperl-hash-face ((t (:foreground "Red" :bold t :italic t :background "lightyellow2")))) + (makefile-space-face ((t (:background "hotpink")))) + (sgml-start-tag-face ((t (:foreground "mediumspringgreen")))) + (sgml-ignored-face ((t (:foreground "gray20" :background "gray60")))) + (sgml-doctype-face ((t (:foreground "orange")))) + (sgml-sgml-face ((t (:foreground "yellow")))) + (sgml-end-tag-face ((t (:foreground "greenyellow")))) + (sgml-entity-face ((t (:foreground "gold")))) + (flyspell-incorrect-face ((t (:foreground "OrangeRed" :bold t :underline t)))) + (flyspell-duplicate-face ((t (:foreground "Gold3" :bold t :underline t))))))) + +(defun color-theme-bharadwaj () + "Color theme by Girish Bharadwaj, created 2001-03-28. +Black on gainsboro. Includes BBDB, custom, cperl, cvs, dired, ediff, +erc, eshell, font-latex, font-lock, gnus, info, message, paren, sgml, +shell, speedbar, term, vhdl, viper, widget, woman, xref. Wow!" + (interactive) + (color-theme-install + '(color-theme-bharadwaj + ((background-color . "gainsboro") + (background-mode . light) + (background-toolbar-color . "#cf3ccf3ccf3c") + (border-color . "black") + (bottom-toolbar-shadow-color . "#79e77df779e7") + (cursor-color . "grey15") + (foreground-color . "black") + (mouse-color . "grey15") + (top-toolbar-shadow-color . "#fffffbeeffff") + (viper-saved-cursor-color-in-replace-mode . "Red3")) + ((gnus-mouse-face . highlight) + (smiley-mouse-face . highlight)) + (default ((t (nil)))) + (bbdb-company ((t (nil)))) + (bbdb-field-name ((t (:bold t)))) + (bbdb-field-value ((t (nil)))) + (bbdb-name ((t (:underline t)))) + (blank-space-face ((t (nil)))) + (blank-tab-face ((t (nil)))) + (blue ((t (nil)))) + (bold ((t (:bold t)))) + (bold-italic ((t (:bold t)))) + (border-glyph ((t (nil)))) + (calendar-today-face ((t (:underline t)))) + (comint-input-face ((t (:foreground "deepskyblue")))) + (cperl-array-face ((t (:bold t :background "lightyellow2" :foreground "Blue")))) + (cperl-hash-face ((t (:bold t :background "lightyellow2" :foreground "Red")))) + (cperl-nonoverridable-face ((t (:foreground "chartreuse3")))) + (custom-button-face ((t (:bold t)))) + (custom-changed-face ((t (:background "blue" :foreground "white")))) + (custom-documentation-face ((t (nil)))) + (custom-face-tag-face ((t (:underline t)))) + (custom-group-tag-face ((t (:underline t :bold t :foreground "blue")))) + (custom-group-tag-face-1 ((t (:underline t :foreground "red")))) + (custom-invalid-face ((t (:background "red" :foreground "yellow")))) + (custom-modified-face ((t (:background "blue" :foreground "white")))) + (custom-rogue-face ((t (:background "black" :foreground "pink")))) + (custom-saved-face ((t (:underline t)))) + (custom-set-face ((t (:background "white" :foreground "blue")))) + (custom-state-face ((t (:foreground "dark green")))) + (custom-variable-button-face ((t (:underline t :bold t)))) + (custom-variable-tag-face ((t (:underline t :bold t :foreground "blue")))) + (cvs-filename-face ((t (:foreground "blue4")))) + (cvs-handled-face ((t (:foreground "pink")))) + (cvs-header-face ((t (:bold t :foreground "blue4")))) + (cvs-marked-face ((t (:bold t :foreground "green3")))) + (cvs-msg-face ((t (nil)))) + (cvs-need-action-face ((t (:foreground "orange")))) + (cvs-unknown-face ((t (:foreground "red")))) + (diary-face ((t (:bold t :foreground "red")))) + (dired-face-boring ((t (:foreground "Gray65")))) + (dired-face-directory ((t (:bold t :foreground "forestgreen")))) + (dired-face-executable ((t (:foreground "indianred")))) + (dired-face-flagged ((t (:background "SlateGray")))) + (dired-face-marked ((t (:background "darkblue" :foreground "deepskyblue")))) + (dired-face-permissions ((t (nil)))) + (dired-face-setuid ((t (:foreground "Red")))) + (dired-face-socket ((t (:foreground "magenta")))) + (dired-face-symlink ((t (:foreground "grey95")))) + (display-time-mail-balloon-enhance-face ((t (:background "orange")))) + (display-time-mail-balloon-gnus-group-face ((t (:foreground "blue")))) + (display-time-time-balloon-face ((t (:foreground "red")))) + (ediff-current-diff-face-A ((t (:background "pale green" :foreground "firebrick")))) + (ediff-current-diff-face-Ancestor ((t (:background "VioletRed" :foreground "Black")))) + (ediff-current-diff-face-B ((t (:background "Yellow" :foreground "DarkOrchid")))) + (ediff-current-diff-face-C ((t (:background "Pink" :foreground "Navy")))) + (ediff-even-diff-face-A ((t (:background "light grey" :foreground "Black")))) + (ediff-even-diff-face-Ancestor ((t (:background "Grey" :foreground "White")))) + (ediff-even-diff-face-B ((t (:background "Grey" :foreground "White")))) + (ediff-even-diff-face-C ((t (:background "light grey" :foreground "Black")))) + (ediff-fine-diff-face-A ((t (:background "sky blue" :foreground "Navy")))) + (ediff-fine-diff-face-Ancestor ((t (:background "Green" :foreground "Black")))) + (ediff-fine-diff-face-B ((t (:background "cyan" :foreground "Black")))) + (ediff-fine-diff-face-C ((t (:background "Turquoise" :foreground "Black")))) + (ediff-odd-diff-face-A ((t (:background "Grey" :foreground "White")))) + (ediff-odd-diff-face-Ancestor ((t (:background "light grey" :foreground "Black")))) + (ediff-odd-diff-face-B ((t (:background "light grey" :foreground "Black")))) + (ediff-odd-diff-face-C ((t (:background "Grey" :foreground "White")))) + (erc-action-face ((t (:bold t)))) + (erc-bold-face ((t (:bold t)))) + (erc-default-face ((t (nil)))) + (erc-direct-msg-face ((t (nil)))) + (erc-error-face ((t (:bold t)))) + (erc-input-face ((t (nil)))) + (erc-inverse-face ((t (nil)))) + (erc-notice-face ((t (nil)))) + (erc-pal-face ((t (nil)))) + (erc-prompt-face ((t (nil)))) + (erc-underline-face ((t (nil)))) + (eshell-ls-archive-face ((t (:bold t :foreground "Orchid")))) + (eshell-ls-backup-face ((t (:foreground "OrangeRed")))) + (eshell-ls-clutter-face ((t (:bold t :foreground "OrangeRed")))) + (eshell-ls-directory-face ((t (:bold t :foreground "Blue")))) + (eshell-ls-executable-face ((t (:bold t :foreground "ForestGreen")))) + (eshell-ls-missing-face ((t (:bold t :foreground "Red")))) + (eshell-ls-picture-face ((t (nil)))) + (eshell-ls-product-face ((t (:foreground "OrangeRed")))) + (eshell-ls-readonly-face ((t (:foreground "Brown")))) + (eshell-ls-special-face ((t (:bold t :foreground "Magenta")))) + (eshell-ls-symlink-face ((t (:bold t :foreground "DarkCyan")))) + (eshell-ls-unreadable-face ((t (:foreground "Grey30")))) + (eshell-prompt-face ((t (:bold t :foreground "Red")))) + (eshell-test-failed-face ((t (:bold t :foreground "OrangeRed")))) + (eshell-test-ok-face ((t (:bold t :foreground "Green")))) + (excerpt ((t (nil)))) + (ff-paths-non-existant-file-face ((t (:bold t :foreground "NavyBlue")))) + (fg:black ((t (:foreground "black")))) + (fixed ((t (:bold t)))) + (flyspell-duplicate-face ((t (:underline t :bold t :foreground "Gold3")))) + (flyspell-incorrect-face ((t (:underline t :bold t :foreground "OrangeRed")))) + (font-latex-bold-face ((t (nil)))) + (font-latex-italic-face ((t (nil)))) + (font-latex-math-face ((t (nil)))) + (font-latex-sedate-face ((t (nil)))) + (font-latex-string-face ((t (nil)))) + (font-latex-warning-face ((t (nil)))) + (font-lock-builtin-face ((t (:foreground "ForestGreen")))) + (font-lock-comment-face ((t (:foreground "grey55")))) + (font-lock-constant-face ((t (:foreground "OliveDrab")))) + (font-lock-doc-string-face ((t (:bold t :foreground "blue4")))) + (font-lock-exit-face ((t (nil)))) + (font-lock-function-name-face ((t (:italic t :bold t :foreground "SlateBlue")))) + (font-lock-keyword-face ((t (:foreground "DarkBlue")))) + (font-lock-preprocessor-face ((t (:foreground "blue3")))) + (font-lock-reference-face ((t (:foreground "red3")))) + (font-lock-string-face ((t (:foreground "DarkRed")))) + (font-lock-type-face ((t (:foreground "SteelBlue4")))) + (font-lock-variable-name-face ((t (:foreground "DarkGoldenrod")))) + (font-lock-warning-face ((t (:bold t :foreground "VioletRed")))) + (fringe ((t (:background "grey95")))) + (gnus-cite-attribution-face ((t (:bold t)))) + (gnus-cite-face-1 ((t (:foreground "MidnightBlue")))) + (gnus-cite-face-10 ((t (:foreground "medium purple")))) + (gnus-cite-face-11 ((t (:foreground "turquoise")))) + (gnus-cite-face-2 ((t (:foreground "firebrick")))) + (gnus-cite-face-3 ((t (:foreground "dark green")))) + (gnus-cite-face-4 ((t (:foreground "OrangeRed")))) + (gnus-cite-face-5 ((t (:foreground "dark khaki")))) + (gnus-cite-face-6 ((t (:foreground "dark violet")))) + (gnus-cite-face-7 ((t (:foreground "SteelBlue4")))) + (gnus-cite-face-8 ((t (:foreground "magenta")))) + (gnus-cite-face-9 ((t (:foreground "violet")))) + (gnus-emphasis-bold ((t (:bold t)))) + (gnus-emphasis-bold-italic ((t (:bold t)))) + (gnus-emphasis-highlight-words ((t (nil)))) + (gnus-emphasis-italic ((t (nil)))) + (gnus-emphasis-underline ((t (:underline t)))) + (gnus-emphasis-underline-bold ((t (:underline t :bold t)))) + (gnus-emphasis-underline-bold-italic ((t (:underline t :bold t)))) + (gnus-emphasis-underline-italic ((t (:underline t)))) + (gnus-filterhist-face-1 ((t (nil)))) + (gnus-group-mail-1-empty-face ((t (:foreground "DeepPink3")))) + (gnus-group-mail-1-face ((t (:bold t :foreground "DeepPink3")))) + (gnus-group-mail-2-empty-face ((t (:foreground "HotPink3")))) + (gnus-group-mail-2-face ((t (:bold t :foreground "HotPink3")))) + (gnus-group-mail-3-empty-face ((t (:foreground "magenta4")))) + (gnus-group-mail-3-face ((t (:bold t :foreground "magenta4")))) + (gnus-group-mail-low-empty-face ((t (:foreground "DeepPink4")))) + (gnus-group-mail-low-face ((t (:bold t :foreground "DeepPink4")))) + (gnus-group-news-1-empty-face ((t (:foreground "ForestGreen")))) + (gnus-group-news-1-face ((t (:bold t :foreground "ForestGreen")))) + (gnus-group-news-2-empty-face ((t (:foreground "CadetBlue4")))) + (gnus-group-news-2-face ((t (:bold t :foreground "CadetBlue4")))) + (gnus-group-news-3-empty-face ((t (nil)))) + (gnus-group-news-3-face ((t (:bold t)))) + (gnus-group-news-4-empty-face ((t (nil)))) + (gnus-group-news-4-face ((t (:bold t)))) + (gnus-group-news-5-empty-face ((t (nil)))) + (gnus-group-news-5-face ((t (:bold t)))) + (gnus-group-news-6-empty-face ((t (nil)))) + (gnus-group-news-6-face ((t (:bold t)))) + (gnus-group-news-low-empty-face ((t (:foreground "DarkGreen")))) + (gnus-group-news-low-face ((t (:bold t :foreground "DarkGreen")))) + (gnus-header-content-face ((t (:foreground "indianred4")))) + (gnus-header-from-face ((t (:bold t :foreground "red3")))) + (gnus-header-name-face ((t (:bold t :foreground "maroon")))) + (gnus-header-newsgroups-face ((t (:bold t :foreground "MidnightBlue")))) + (gnus-header-subject-face ((t (:bold t :foreground "red4")))) + (gnus-picons-face ((t (:background "white" :foreground "black")))) + (gnus-picons-xbm-face ((t (:background "white" :foreground "black")))) + (gnus-signature-face ((t (nil)))) + (gnus-splash ((t (nil)))) + (gnus-splash-face ((t (:foreground "ForestGreen")))) + (gnus-summary-cancelled-face ((t (:background "black" :foreground "yellow")))) + (gnus-summary-high-ancient-face ((t (:bold t :foreground "RoyalBlue")))) + (gnus-summary-high-read-face ((t (:bold t :foreground "DarkGreen")))) + (gnus-summary-high-ticked-face ((t (:bold t :foreground "firebrick")))) + (gnus-summary-high-unread-face ((t (:bold t)))) + (gnus-summary-low-ancient-face ((t (:foreground "RoyalBlue")))) + (gnus-summary-low-read-face ((t (:foreground "DarkGreen")))) + (gnus-summary-low-ticked-face ((t (:bold t :foreground "firebrick")))) + (gnus-summary-low-unread-face ((t (nil)))) + (gnus-summary-normal-ancient-face ((t (:foreground "RoyalBlue")))) + (gnus-summary-normal-read-face ((t (:foreground "DarkGreen")))) + (gnus-summary-normal-ticked-face ((t (:bold t :foreground "firebrick")))) + (gnus-summary-normal-unread-face ((t (:bold t)))) + (gnus-summary-selected-face ((t (:underline t)))) + (gnus-x-face ((t (:background "white" :foreground "black")))) + (green ((t (nil)))) + (gui-button-face ((t (:background "grey75")))) + (gui-element ((t (:background "Gray80")))) + (highlight ((t (:background "LightSkyBlue")))) + (highlight-changes-delete-face ((t (:underline t :foreground "red")))) + (highlight-changes-face ((t (:foreground "red")))) + (highline-face ((t (:background "grey95")))) + (holiday-face ((t (:background "pink")))) + (html-helper-italic-face ((t (nil)))) + (info-menu-5 ((t (:underline t)))) + (info-node ((t (:bold t)))) + (info-xref ((t (:bold t)))) + (isearch ((t (:background "yellow")))) + (isearch-secondary ((t (:foreground "red3")))) + (italic ((t (nil)))) + (lazy-highlight-face ((t (:bold t :foreground "dark magenta")))) + (left-margin ((t (nil)))) + (linemenu-face ((t (nil)))) + (list-mode-item-selected ((t (nil)))) + (makefile-space-face ((t (:background "hotpink")))) + (message-cited-text-face ((t (:foreground "red")))) + (message-header-cc-face ((t (:bold t :foreground "MidnightBlue")))) + (message-header-name-face ((t (:foreground "cornflower blue")))) + (message-header-newsgroups-face ((t (:bold t :foreground "blue4")))) + (message-header-other-face ((t (:foreground "steel blue")))) + (message-header-subject-face ((t (:bold t :foreground "navy blue")))) + (message-header-to-face ((t (:bold t :foreground "MidnightBlue")))) + (message-header-xheader-face ((t (:foreground "blue")))) + (message-mml-face ((t (:bold t)))) + (message-separator-face ((t (:foreground "brown")))) + (modeline ((t (:background "white" :foreground "black")))) + (modeline-buffer-id ((t (:background "white" :foreground "black")))) + (modeline-mousable ((t (:background "white" :foreground "black")))) + (modeline-mousable-minor-mode ((t (:background "white" :foreground "black")))) + (paren-blink-off ((t (:foreground "gray80")))) + (paren-face-match ((t (:background "turquoise")))) + (paren-face-mismatch ((t (:background "purple" :foreground "white")))) + (paren-face-no-match ((t (:background "yellow" :foreground "black")))) + (paren-match ((t (:background "darkseagreen2")))) + (paren-mismatch ((t (:background "DeepPink" :foreground "black")))) + (paren-mismatch-face ((t (:bold t)))) + (paren-no-match-face ((t (:bold t)))) + (pointer ((t (nil)))) + (primary-selection ((t (nil)))) + (red ((t (nil)))) + (region ((t (:background "grey80")))) + (right-margin ((t (nil)))) + (secondary-selection ((t (:background "grey55")))) + (sgml-comment-face ((t (:foreground "dark turquoise")))) + (sgml-doctype-face ((t (nil)))) + (sgml-end-tag-face ((t (nil)))) + (sgml-entity-face ((t (nil)))) + (sgml-ignored-face ((t (nil)))) + (sgml-ms-end-face ((t (:foreground "green")))) + (sgml-ms-start-face ((t (:foreground "green")))) + (sgml-pi-face ((t (:foreground "lime green")))) + (sgml-sgml-face ((t (nil)))) + (sgml-short-ref-face ((t (:foreground "deep sky blue")))) + (sgml-start-tag-face ((t (nil)))) + (shell-option-face ((t (:foreground "blue")))) + (shell-output-2-face ((t (:foreground "darkseagreen")))) + (shell-output-3-face ((t (:foreground "slategrey")))) + (shell-output-face ((t (:foreground "palegreen")))) + (shell-prompt-face ((t (:foreground "red")))) + (show-paren-match-face ((t (:background "grey80")))) + (show-paren-mismatch-face ((t (:bold t :background "purple" :foreground "white")))) + (speedbar-button-face ((t (:bold t :foreground "green4")))) + (speedbar-directory-face ((t (:bold t :foreground "blue4")))) + (speedbar-file-face ((t (:bold t :foreground "cyan4")))) + (speedbar-highlight-face ((t (:background "green")))) + (speedbar-selected-face ((t (:underline t :foreground "red")))) + (speedbar-tag-face ((t (:foreground "brown")))) + (swbuff-current-buffer-face ((t (:bold t)))) + (template-message-face ((t (:bold t)))) + (term-black ((t (:foreground "black")))) + (term-blackbg ((t (:background "black")))) + (term-blue ((t (:foreground "blue")))) + (term-bluebg ((t (:background "blue")))) + (term-bold ((t (:bold t)))) + (term-cyan ((t (:foreground "cyan")))) + (term-cyanbg ((t (:background "cyan")))) + (term-default-bg ((t (nil)))) + (term-default-bg-inv ((t (nil)))) + (term-default-fg ((t (nil)))) + (term-default-fg-inv ((t (nil)))) + (term-green ((t (:foreground "green")))) + (term-greenbg ((t (:background "green")))) + (term-invisible ((t (nil)))) + (term-invisible-inv ((t (nil)))) + (term-magenta ((t (:foreground "magenta")))) + (term-magentabg ((t (:background "magenta")))) + (term-red ((t (:foreground "red")))) + (term-redbg ((t (:background "red")))) + (term-underline ((t (:underline t)))) + (term-white ((t (:foreground "white")))) + (term-whitebg ((t (:background "white")))) + (term-yellow ((t (:foreground "yellow")))) + (term-yellowbg ((t (:background "yellow")))) + (text-cursor ((t (:background "grey15" :foreground "gainsboro")))) + (toolbar ((t (nil)))) + (underline ((t (:underline t)))) + (vc-annotate-face-0046FF ((t (nil)))) + (vcursor ((t (:underline t :background "cyan" :foreground "blue")))) + (vertical-divider ((t (nil)))) + (vhdl-font-lock-attribute-face ((t (:foreground "Orchid")))) + (vhdl-font-lock-directive-face ((t (:foreground "CadetBlue")))) + (vhdl-font-lock-enumvalue-face ((t (:foreground "Gold4")))) + (vhdl-font-lock-function-face ((t (:foreground "Orchid4")))) + (vhdl-font-lock-prompt-face ((t (:bold t :foreground "Red")))) + (vhdl-font-lock-reserved-words-face ((t (:bold t :foreground "Orange")))) + (vhdl-font-lock-translate-off-face ((t (:background "LightGray")))) + (vhdl-speedbar-architecture-face ((t (:foreground "Blue")))) + (vhdl-speedbar-architecture-selected-face ((t (:underline t :foreground "Blue")))) + (vhdl-speedbar-configuration-face ((t (:foreground "DarkGoldenrod")))) + (vhdl-speedbar-configuration-selected-face ((t (:underline t :foreground "DarkGoldenrod")))) + (vhdl-speedbar-entity-face ((t (:foreground "ForestGreen")))) + (vhdl-speedbar-entity-selected-face ((t (:underline t :foreground "ForestGreen")))) + (vhdl-speedbar-instantiation-face ((t (:foreground "Brown")))) + (vhdl-speedbar-instantiation-selected-face ((t (:underline t :foreground "Brown")))) + (vhdl-speedbar-package-face ((t (:foreground "Grey50")))) + (vhdl-speedbar-package-selected-face ((t (:underline t :foreground "Grey50")))) + (viper-minibuffer-emacs-face ((t (:background "darkseagreen2" :foreground "Black")))) + (viper-minibuffer-insert-face ((t (:background "pink" :foreground "Black")))) + (viper-minibuffer-vi-face ((t (:background "grey" :foreground "DarkGreen")))) + (viper-replace-overlay-face ((t (:background "darkseagreen2" :foreground "Black")))) + (viper-search-face ((t (:background "khaki" :foreground "Black")))) + (vvb-face ((t (:background "pink" :foreground "black")))) + (widget-button-face ((t (:bold t)))) + (widget-button-pressed-face ((t (:foreground "red")))) + (widget-documentation-face ((t (:foreground "dark green")))) + (widget-field-face ((t (:background "navy" :foreground "white")))) + (widget-inactive-face ((t (:foreground "dim gray")))) + (widget-single-line-field-face ((t (:background "royalblue" :foreground "white")))) + (woman-bold-face ((t (:bold t)))) + (woman-italic-face ((t (nil)))) + (woman-unknown-face ((t (nil)))) + (xref-keyword-face ((t (:foreground "blue")))) + (xref-list-pilot-face ((t (:foreground "navy")))) + (xref-list-symbol-face ((t (:foreground "navy")))) + (yellow ((t (nil)))) + (zmacs-region ((t (:background "royalblue"))))))) + +(defun color-theme-oswald () + "Color theme by Tom Oswald, created 2001-04-18. +Green on black, includes font-lock, show-paren, and ediff." + (interactive) + (color-theme-install + '(color-theme-oswald + ((background-color . "black") + (background-mode . dark) + (border-color . "black") + (cursor-color . "black") + (foreground-color . "green") + (mouse-color . "black")) + ((blank-space-face . blank-space-face) + (blank-tab-face . blank-tab-face) + (list-matching-lines-face . bold) + (view-highlight-face . highlight)) + (default ((t (nil)))) + (blank-space-face ((t (:background "LightGray")))) + (blank-tab-face ((t (:background "green" :foreground "black")))) + (bold ((t (:bold t)))) + (bold-italic ((t (:italic t :bold t)))) + (ediff-current-diff-face-A ((t (:background "pale green" :foreground "firebrick")))) + (ediff-current-diff-face-Ancestor ((t (:background "VioletRed" :foreground "Black")))) + (ediff-current-diff-face-B ((t (:background "Yellow" :foreground "DarkOrchid")))) + (ediff-current-diff-face-C ((t (:background "Pink" :foreground "Navy")))) + (ediff-even-diff-face-A ((t (:background "light grey" :foreground "Black")))) + (ediff-even-diff-face-Ancestor ((t (:background "Grey" :foreground "White")))) + (ediff-even-diff-face-B ((t (:background "Grey" :foreground "White")))) + (ediff-even-diff-face-C ((t (:background "light grey" :foreground "Black")))) + (ediff-fine-diff-face-A ((t (:background "sky blue" :foreground "Navy")))) + (ediff-fine-diff-face-Ancestor ((t (:background "Green" :foreground "Black")))) + (ediff-fine-diff-face-B ((t (:background "cyan" :foreground "Black")))) + (ediff-fine-diff-face-C ((t (:background "Turquoise" :foreground "Black")))) + (ediff-odd-diff-face-A ((t (:background "Grey" :foreground "White")))) + (ediff-odd-diff-face-Ancestor ((t (:background "light grey" :foreground "Black")))) + (ediff-odd-diff-face-B ((t (:background "light grey" :foreground "Black")))) + (ediff-odd-diff-face-C ((t (:background "Grey" :foreground "White")))) + (font-lock-builtin-face ((t (:italic t :bold t :foreground "LightSteelBlue")))) + (font-lock-comment-face ((t (:italic t :foreground "LightGoldenrod4")))) + (font-lock-constant-face ((t (:italic t :foreground "HotPink")))) + (font-lock-doc-string-face ((t (:italic t :foreground "orange")))) + (font-lock-function-name-face ((t (:italic t :bold t :foreground "red")))) + (font-lock-keyword-face ((t (:foreground "red")))) + (font-lock-preprocessor-face ((t (:italic t :foreground "HotPink")))) + (font-lock-string-face ((t (:italic t :foreground "orange")))) + (font-lock-reference-face ((t (:italic t :bold t :foreground "LightSteelBlue")))) + (font-lock-type-face ((t (:italic t :foreground "LightSlateBlue")))) + (font-lock-variable-name-face ((t (:underline t :foreground "LightGoldenrod")))) + (font-lock-warning-face ((t (:bold t :foreground "Pink")))) + (highlight ((t (:background "yellow" :foreground "red")))) + (isearch ((t (:background "dim gray" :foreground "aquamarine")))) + (ispell-face ((t (:bold t :background "#3454b4" :foreground "yellow")))) + (italic ((t (:italic t)))) + (modeline ((t (:background "green" :foreground "black")))) + (modeline-buffer-id ((t (:background "green" :foreground "black")))) + (modeline-mousable ((t (:background "green" :foreground "black")))) + (modeline-mousable-minor-mode ((t (:background "green" :foreground "black")))) + (region ((t (:background "dim gray" :foreground "aquamarine")))) + (secondary-selection ((t (:background "darkslateblue" :foreground "light goldenrod")))) + (show-paren-match-face ((t (:background "turquoise" :foreground "black")))) + (show-paren-mismatch-face ((t (:background "purple" :foreground "white")))) + (underline ((t (:underline t)))) + (zmacs-region ((t (:background "dim gray" :foreground "aquamarine"))))))) + +(defun color-theme-salmon-diff () + "Salmon and aquamarine faces for diff and change-log modes. +This is intended for other color themes to use (eg. `color-theme-gnome2')." + (color-theme-install + '(color-theme-salmon-diff + nil + (change-log-acknowledgement-face ((t (:foreground "LightBlue")))) + (change-log-conditionals-face ((t (:bold t :weight bold :foreground "Aquamarine")))) + (change-log-date-face ((t (:foreground "LightSalmon")))) + (change-log-email-face ((t (:bold t :weight bold :foreground "Aquamarine")))) + (change-log-file-face ((t (:bold t :weight bold :foreground "Aquamarine")))) + (change-log-function-face ((t (:bold t :weight bold :foreground "Aquamarine")))) + (change-log-list-face ((t (:foreground "Salmon")))) + (change-log-name-face ((t (:foreground "Aquamarine")))) + (diff-added-face ((t (nil)))) + (diff-changed-face ((t (nil)))) + (diff-context-face ((t (:foreground "grey70")))) + (diff-file-header-face ((t (:bold t)))) + (diff-function-face ((t (:foreground "grey70")))) + (diff-header-face ((t (:foreground "light salmon")))) + (diff-hunk-header-face ((t (:foreground "light salmon")))) + (diff-index-face ((t (:bold t)))) + (diff-nonexistent-face ((t (:bold t)))) + (diff-removed-face ((t (nil)))) + (log-view-message-face ((t (:foreground "light salmon"))))))) + +(defun color-theme-robin-hood () + "`color-theme-gnome2' with navajo white on green. +This theme tries to avoid underlined and italic faces, because +the fonts either look ugly, or do not exist. The author himself +uses neep, for example." + (interactive) + (color-theme-gnome2) + (let ((color-theme-is-cumulative t)) + (color-theme-install + '(color-theme-robin-hood + ((foreground-color . "navajo white") + (background-color . "#304020")) + ((CUA-mode-read-only-cursor-color . "white") + (help-highlight-face . info-xref) + (list-matching-lines-buffer-name-face . bold)) + (default ((t (nil)))) + (button ((t (:bold t)))) + (calendar-today-face ((t (:foreground "lemon chiffon")))) + (custom-button-face ((t (:bold t :foreground "DodgerBlue1")))) + (diary-face ((t (:bold t :foreground "yellow")))) + (fringe ((t (:background "#003700")))) + (header-line ((t (:background "#030" :foreground "#AA7")))) + (holiday-face ((t (:bold t :foreground "peru")))) + (ido-subdir-face ((t (:foreground "MediumSlateBlue")))) + (isearch ((t (:foreground "pink" :background "red")))) + (isearch-lazy-highlight-face ((t (:foreground "red")))) + (menu ((t (:background "#304020" :foreground "navajo white")))) + (minibuffer-prompt ((t (:foreground "pale green")))) + (modeline ((t (:background "dark olive green" :foreground "wheat" :box (:line-width 1 :style released-button))))) + (mode-line-inactive ((t (:background "dark olive green" :foreground "khaki" :box (:line-width 1 :style released-button))))) + (semantic-dirty-token-face ((t (:background "grey22")))) + (tool-bar ((t (:background "#304020" :foreground "wheat" :box (:line-width 1 :style released-button))))) + (tooltip ((t (:background "lemon chiffon" :foreground "black")))))))) + +(defun color-theme-snowish () + "Color theme by Girish Bharadwaj, created 2001-05-17. +Dark slate gray on snow2, lots of blue colors. +Includes custom, eshell, font-lock, gnus, html-helper, +hyper-apropos, jde, message, paren, semantic, speedbar, +term, widget." + (interactive) + (color-theme-install + '(color-theme-snowish + ((background-color . "snow2") + (background-mode . light) + (cursor-color . "Red3") + (foreground-color . "darkslategray")) + ((buffers-tab-face . buffers-tab) + (gnus-mouse-face . highlight) + (sgml-set-face . t) + (smiley-mouse-face . highlight)) + (default ((t (nil)))) + (blue ((t (:foreground "blue")))) + (bold ((t (:bold t :foreground "peru")))) + (bold-italic ((t (:italic t :bold t)))) + (border-glyph ((t (nil)))) + (buffers-tab ((t (:background "snow2" :foreground "darkslategray")))) + (custom-button-face ((t (:bold t)))) + (custom-changed-face ((t (:background "blue" :foreground "white")))) + (custom-comment-face ((t (:background "gray85")))) + (custom-comment-tag-face ((t (:foreground "blue4")))) + (custom-documentation-face ((t (nil)))) + (custom-face-tag-face ((t (:underline t)))) + (custom-group-tag-face ((t (:underline t :foreground "blue")))) + (custom-group-tag-face-1 ((t (:underline t :foreground "red")))) + (custom-invalid-face ((t (:background "red" :foreground "yellow")))) + (custom-modified-face ((t (:background "blue" :foreground "white")))) + (custom-rogue-face ((t (:background "black" :foreground "pink")))) + (custom-saved-face ((t (:underline t)))) + (custom-set-face ((t (:background "white" :foreground "blue")))) + (custom-state-face ((t (:foreground "dark green")))) + (custom-variable-button-face ((t (:underline t :bold t)))) + (custom-variable-tag-face ((t (:underline t :foreground "blue")))) + (cyan ((t (:foreground "cyan")))) + (display-time-mail-balloon-enhance-face ((t (:background "orange")))) + (display-time-mail-balloon-gnus-group-face ((t (:foreground "blue")))) + (display-time-time-balloon-face ((t (:foreground "red")))) + (eshell-ls-archive-face ((t (:bold t :foreground "Orchid")))) + (eshell-ls-backup-face ((t (:foreground "OrangeRed")))) + (eshell-ls-clutter-face ((t (:bold t :foreground "OrangeRed")))) + (eshell-ls-directory-face ((t (:bold t :foreground "Blue")))) + (eshell-ls-executable-face ((t (:bold t :foreground "ForestGreen")))) + (eshell-ls-missing-face ((t (:bold t :foreground "Red")))) + (eshell-ls-product-face ((t (:foreground "OrangeRed")))) + (eshell-ls-readonly-face ((t (:foreground "Brown")))) + (eshell-ls-special-face ((t (:bold t :foreground "Magenta")))) + (eshell-ls-symlink-face ((t (:bold t :foreground "Dark Cyan")))) + (eshell-ls-unreadable-face ((t (:foreground "Grey30")))) + (eshell-prompt-face ((t (:bold t :foreground "Red")))) + (font-lock-builtin-face ((t (:underline t :foreground "blue")))) + (font-lock-comment-face ((t (:foreground "snow4")))) + (font-lock-constant-face ((t (:foreground "CadetBlue")))) + (font-lock-doc-string-face ((t (:foreground "mediumblue")))) + (font-lock-function-name-face ((t (:bold t :foreground "darkblue")))) + (font-lock-keyword-face ((t (:bold t :foreground "dodgerblue")))) + (font-lock-preprocessor-face ((t (:underline t :foreground "blue3")))) + (font-lock-reference-face ((t (:foreground "red3")))) + (font-lock-string-face ((t (:foreground "darkviolet")))) + (font-lock-type-face ((t (:foreground "goldenrod")))) + (font-lock-variable-name-face ((t (:foreground "tomato")))) + (font-lock-warning-face ((t (:bold t :foreground "Red")))) + (gnus-cite-attribution-face ((t (nil)))) + (gnus-cite-face-1 ((t (:foreground "MidnightBlue")))) + (gnus-cite-face-10 ((t (:foreground "medium purple")))) + (gnus-cite-face-11 ((t (:foreground "turquoise")))) + (gnus-cite-face-2 ((t (:foreground "firebrick")))) + (gnus-cite-face-3 ((t (:foreground "dark green")))) + (gnus-cite-face-4 ((t (:foreground "OrangeRed")))) + (gnus-cite-face-5 ((t (:foreground "dark khaki")))) + (gnus-cite-face-6 ((t (:foreground "dark violet")))) + (gnus-cite-face-7 ((t (:foreground "SteelBlue4")))) + (gnus-cite-face-8 ((t (:foreground "magenta")))) + (gnus-cite-face-9 ((t (:foreground "violet")))) + (gnus-emphasis-bold ((t (:bold t)))) + (gnus-emphasis-bold-italic ((t (nil)))) + (gnus-emphasis-highlight-words ((t (:background "black" :foreground "yellow")))) + (gnus-emphasis-italic ((t (nil)))) + (gnus-emphasis-underline ((t (:underline t)))) + (gnus-emphasis-underline-bold ((t (:underline t :bold t)))) + (gnus-emphasis-underline-bold-italic ((t (:underline t)))) + (gnus-emphasis-underline-italic ((t (:underline t)))) + (gnus-group-mail-1-empty-face ((t (:foreground "DeepPink3")))) + (gnus-group-mail-1-face ((t (:bold t :foreground "DeepPink3")))) + (gnus-group-mail-2-empty-face ((t (:foreground "HotPink3")))) + (gnus-group-mail-2-face ((t (:bold t :foreground "HotPink3")))) + (gnus-group-mail-3-empty-face ((t (:foreground "magenta4")))) + (gnus-group-mail-3-face ((t (:bold t :foreground "magenta4")))) + (gnus-group-mail-low-empty-face ((t (:foreground "DeepPink4")))) + (gnus-group-mail-low-face ((t (:bold t :foreground "DeepPink4")))) + (gnus-group-news-1-empty-face ((t (:foreground "ForestGreen")))) + (gnus-group-news-1-face ((t (:bold t :foreground "ForestGreen")))) + (gnus-group-news-2-empty-face ((t (:foreground "CadetBlue4")))) + (gnus-group-news-2-face ((t (:bold t :foreground "CadetBlue4")))) + (gnus-group-news-3-empty-face ((t (nil)))) + (gnus-group-news-3-face ((t (:bold t)))) + (gnus-group-news-4-empty-face ((t (nil)))) + (gnus-group-news-4-face ((t (:bold t)))) + (gnus-group-news-5-empty-face ((t (nil)))) + (gnus-group-news-5-face ((t (:bold t)))) + (gnus-group-news-6-empty-face ((t (nil)))) + (gnus-group-news-6-face ((t (:bold t)))) + (gnus-group-news-low-empty-face ((t (:foreground "DarkGreen")))) + (gnus-group-news-low-face ((t (:bold t :foreground "DarkGreen")))) + (gnus-header-content-face ((t (:foreground "indianred4")))) + (gnus-header-from-face ((t (:foreground "red3")))) + (gnus-header-name-face ((t (:foreground "maroon")))) + (gnus-header-newsgroups-face ((t (:foreground "MidnightBlue")))) + (gnus-header-subject-face ((t (:foreground "red4")))) + (gnus-picons-face ((t (:background "white" :foreground "black")))) + (gnus-picons-xbm-face ((t (:background "white" :foreground "black")))) + (gnus-signature-face ((t (nil)))) + (gnus-splash-face ((t (:foreground "Brown")))) + (gnus-summary-cancelled-face ((t (:background "black" :foreground "yellow")))) + (gnus-summary-high-ancient-face ((t (:bold t :foreground "RoyalBlue")))) + (gnus-summary-high-read-face ((t (:bold t :foreground "DarkGreen")))) + (gnus-summary-high-ticked-face ((t (:bold t :foreground "firebrick")))) + (gnus-summary-high-unread-face ((t (:bold t)))) + (gnus-summary-low-ancient-face ((t (:foreground "RoyalBlue")))) + (gnus-summary-low-read-face ((t (:foreground "DarkGreen")))) + (gnus-summary-low-ticked-face ((t (:foreground "firebrick")))) + (gnus-summary-low-unread-face ((t (nil)))) + (gnus-summary-normal-ancient-face ((t (:foreground "RoyalBlue")))) + (gnus-summary-normal-read-face ((t (:foreground "DarkGreen")))) + (gnus-summary-normal-ticked-face ((t (:foreground "firebrick")))) + (gnus-summary-normal-unread-face ((t (nil)))) + (gnus-summary-selected-face ((t (:underline t)))) + (gnus-x-face ((t (:background "white" :foreground "black")))) + (green ((t (:foreground "green")))) + (gui-button-face ((t (:background "grey75" :foreground "black")))) + (gui-element ((t (:background "#D4D0C8" :foreground "black")))) + (highlight ((t (:background "darkseagreen2")))) + (html-helper-bold-face ((t (:bold t)))) + (html-helper-bold-italic-face ((t (nil)))) + (html-helper-builtin-face ((t (:underline t :foreground "blue3")))) + (html-helper-italic-face ((t (:foreground "medium sea green")))) + (html-helper-underline-face ((t (:underline t)))) + (html-tag-face ((t (:bold t)))) + (hyper-apropos-documentation ((t (:foreground "darkred")))) + (hyper-apropos-heading ((t (:bold t)))) + (hyper-apropos-hyperlink ((t (:foreground "blue4")))) + (hyper-apropos-major-heading ((t (:bold t)))) + (hyper-apropos-section-heading ((t (nil)))) + (hyper-apropos-warning ((t (:bold t :foreground "red")))) + (info-menu-6 ((t (nil)))) + (isearch ((t (:background "paleturquoise")))) + (isearch-secondary ((t (:foreground "red3")))) + (italic ((t (nil)))) + (jde-bug-breakpoint-cursor ((t (:background "brown" :foreground "cyan")))) + (jde-bug-breakpoint-marker ((t (:background "yellow" :foreground "red")))) + (jde-java-font-lock-link-face ((t (:underline t :foreground "blue")))) + (jde-java-font-lock-number-face ((t (:foreground "RosyBrown")))) + (left-margin ((t (nil)))) + (list-mode-item-selected ((t (:background "gray68" :foreground "darkslategray")))) + (magenta ((t (:foreground "magenta")))) + (message-cited-text-face ((t (:foreground "red")))) + (message-header-cc-face ((t (:foreground "MidnightBlue")))) + (message-header-name-face ((t (:foreground "cornflower blue")))) + (message-header-newsgroups-face ((t (:foreground "blue4")))) + (message-header-other-face ((t (:foreground "steel blue")))) + (message-header-subject-face ((t (:bold t :foreground "navy blue")))) + (message-header-to-face ((t (:bold t :foreground "MidnightBlue")))) + (message-header-xheader-face ((t (:foreground "blue")))) + (message-mml-face ((t (:foreground "ForestGreen")))) + (message-separator-face ((t (:foreground "brown")))) + (modeline ((t (nil)))) + (modeline-buffer-id ((t (:background "#D4D0C8" :foreground "blue4")))) + (modeline-mousable ((t (:background "#D4D0C8" :foreground "firebrick")))) + (modeline-mousable-minor-mode ((t (:background "#D4D0C8" :foreground "green4")))) + (paren-blink-off ((t (:foreground "snow2")))) + (paren-match ((t (:background "darkseagreen2")))) + (paren-mismatch ((t (:background "snow2" :foreground "darkslategray")))) + (pointer ((t (nil)))) + (primary-selection ((t (:background "gray65")))) + (red ((t (:foreground "red")))) + (right-margin ((t (nil)))) + (secondary-selection ((t (:background "paleturquoise")))) + (semantic-intangible-face ((t (:foreground "gray25")))) + (semantic-read-only-face ((t (:background "gray25")))) + (senator-momentary-highlight-face ((t (:background "gray70")))) + (speedbar-button-face ((t (:foreground "green4")))) + (speedbar-directory-face ((t (:foreground "blue4")))) + (speedbar-file-face ((t (:foreground "cyan4")))) + (speedbar-highlight-face ((t (:background "green")))) + (speedbar-selected-face ((t (:underline t :foreground "red")))) + (speedbar-tag-face ((t (:foreground "brown")))) + (template-message-face ((t (:bold t)))) + (term-blue-bold-face ((t (:bold t :background "snow2" :foreground "blue")))) + (term-blue-face ((t (:foreground "blue")))) + (term-blue-inv-face ((t (:background "blue")))) + (term-blue-ul-face ((t (:underline t :background "snow2" :foreground "blue")))) + (term-cyan-bold-face ((t (:bold t :background "snow2" :foreground "cyan")))) + (term-cyan-face ((t (:foreground "cyan")))) + (term-cyan-inv-face ((t (:background "cyan")))) + (term-cyan-ul-face ((t (:underline t :background "snow2" :foreground "cyan")))) + (term-default-bold-face ((t (:bold t :background "snow2" :foreground "darkslategray")))) + (term-default-face ((t (:background "snow2" :foreground "darkslategray")))) + (term-default-inv-face ((t (:background "darkslategray" :foreground "snow2")))) + (term-default-ul-face ((t (:underline t :background "snow2" :foreground "darkslategray")))) + (term-green-bold-face ((t (:bold t :background "snow2" :foreground "green")))) + (term-green-face ((t (:foreground "green")))) + (term-green-inv-face ((t (:background "green")))) + (term-green-ul-face ((t (:underline t :background "snow2" :foreground "green")))) + (term-magenta-bold-face ((t (:bold t :background "snow2" :foreground "magenta")))) + (term-magenta-face ((t (:foreground "magenta")))) + (term-magenta-inv-face ((t (:background "magenta")))) + (term-magenta-ul-face ((t (:underline t :background "snow2" :foreground "magenta")))) + (term-red-bold-face ((t (:bold t :background "snow2" :foreground "red")))) + (term-red-face ((t (:foreground "red")))) + (term-red-inv-face ((t (:background "red")))) + (term-red-ul-face ((t (:underline t :background "snow2" :foreground "red")))) + (term-white-bold-face ((t (:bold t :background "snow2" :foreground "white")))) + (term-white-face ((t (:foreground "white")))) + (term-white-inv-face ((t (:background "snow2")))) + (term-white-ul-face ((t (:underline t :background "snow2" :foreground "white")))) + (term-yellow-bold-face ((t (:bold t :background "snow2" :foreground "yellow")))) + (term-yellow-face ((t (:foreground "yellow")))) + (term-yellow-inv-face ((t (:background "yellow")))) + (term-yellow-ul-face ((t (:underline t :background "snow2" :foreground "yellow")))) + (text-cursor ((t (:background "Red3" :foreground "snow2")))) + (toolbar ((t (nil)))) + (underline ((t (:underline t)))) + (vertical-divider ((t (nil)))) + (white ((t (:foreground "white")))) + (widget ((t (nil)))) + (widget-button-face ((t (:bold t)))) + (widget-button-pressed-face ((t (:foreground "red")))) + (widget-documentation-face ((t (:foreground "dark green")))) + (widget-field-face ((t (:background "gray85")))) + (widget-inactive-face ((t (:foreground "dim gray")))) + (yellow ((t (:foreground "yellow")))) + (zmacs-region ((t (:background "gray65"))))))) + +(defun color-theme-dark-laptop () + "Color theme by Laurent Michel, created 2001-05-24. +Includes custom, fl, font-lock, gnus, message, widget." + (interactive) + (color-theme-install + '(color-theme-dark-laptop + ((background-color . "black") + (background-mode . dark) + (border-color . "black") + (cursor-color . "yellow") + (foreground-color . "white") + (mouse-color . "sienna1")) + ((gnus-mouse-face . highlight) + (list-matching-lines-face . bold) + (view-highlight-face . highlight)) + (default ((t (nil)))) + (bold ((t (:bold t)))) + (bold-italic ((t (:italic t :bold t)))) + (custom-button-face ((t (nil)))) + (custom-changed-face ((t (:background "blue" :foreground "white")))) + (custom-documentation-face ((t (nil)))) + (custom-face-tag-face ((t (:underline t)))) + (custom-group-tag-face ((t (:underline t :foreground "light blue")))) + (custom-group-tag-face-1 ((t (:underline t :foreground "pink")))) + (custom-invalid-face ((t (:background "red" :foreground "yellow")))) + (custom-modified-face ((t (:background "blue" :foreground "white")))) + (custom-rogue-face ((t (:background "black" :foreground "pink")))) + (custom-saved-face ((t (:underline t)))) + (custom-set-face ((t (:background "white" :foreground "blue")))) + (custom-state-face ((t (:foreground "lime green")))) + (custom-variable-button-face ((t (:underline t :bold t)))) + (custom-variable-tag-face ((t (:underline t :foreground "light blue")))) + (fl-comment-face ((t (:foreground "pink")))) + (fl-doc-string-face ((t (:foreground "purple")))) + (fl-function-name-face ((t (:foreground "red")))) + (fl-keyword-face ((t (:foreground "cyan")))) + (fl-string-face ((t (:foreground "green")))) + (fl-type-face ((t (:foreground "yellow")))) + (font-lock-builtin-face ((t (:foreground "LightSteelBlue")))) + (font-lock-comment-face ((t (:foreground "OrangeRed")))) + (font-lock-constant-face ((t (:foreground "Aquamarine")))) + (font-lock-doc-string-face ((t (:foreground "LightSalmon")))) + (font-lock-function-name-face ((t (:foreground "LightSkyBlue")))) + (font-lock-keyword-face ((t (:foreground "Cyan")))) + (font-lock-preprocessor-face ((t (:foreground "Aquamarine")))) + (font-lock-reference-face ((t (:foreground "LightSteelBlue")))) + (font-lock-string-face ((t (:foreground "LightSalmon")))) + (font-lock-type-face ((t (:foreground "PaleGreen")))) + (font-lock-variable-name-face ((t (:foreground "LightGoldenrod")))) + (font-lock-warning-face ((t (:bold t :foreground "Pink")))) + (gnus-cite-attribution-face ((t (:italic t)))) + (gnus-cite-face-1 ((t (:bold t :foreground "deep sky blue")))) + (gnus-cite-face-10 ((t (:foreground "medium purple")))) + (gnus-cite-face-11 ((t (:foreground "turquoise")))) + (gnus-cite-face-2 ((t (:bold t :foreground "cyan")))) + (gnus-cite-face-3 ((t (:bold t :foreground "gold")))) + (gnus-cite-face-4 ((t (:foreground "light pink")))) + (gnus-cite-face-5 ((t (:foreground "pale green")))) + (gnus-cite-face-6 ((t (:bold t :foreground "chocolate")))) + (gnus-cite-face-7 ((t (:foreground "orange")))) + (gnus-cite-face-8 ((t (:foreground "magenta")))) + (gnus-cite-face-9 ((t (:foreground "violet")))) + (gnus-emphasis-bold ((t (:bold t)))) + (gnus-emphasis-bold-italic ((t (:italic t :bold t)))) + (gnus-emphasis-highlight-words ((t (:background "black" :foreground "yellow")))) + (gnus-emphasis-italic ((t (:italic t)))) + (gnus-emphasis-underline ((t (:underline t)))) + (gnus-emphasis-underline-bold ((t (:underline t :bold t)))) + (gnus-emphasis-underline-bold-italic ((t (:underline t :italic t :bold t)))) + (gnus-emphasis-underline-italic ((t (:underline t :italic t)))) + (gnus-group-mail-1-empty-face ((t (:foreground "aquamarine1")))) + (gnus-group-mail-1-face ((t (:bold t :foreground "aquamarine1")))) + (gnus-group-mail-2-empty-face ((t (:foreground "aquamarine2")))) + (gnus-group-mail-2-face ((t (:bold t :foreground "aquamarine2")))) + (gnus-group-mail-3-empty-face ((t (:foreground "aquamarine3")))) + (gnus-group-mail-3-face ((t (:bold t :foreground "aquamarine3")))) + (gnus-group-mail-low-empty-face ((t (:foreground "aquamarine4")))) + (gnus-group-mail-low-face ((t (:bold t :foreground "aquamarine4")))) + (gnus-group-news-1-empty-face ((t (:foreground "PaleTurquoise")))) + (gnus-group-news-1-face ((t (:bold t :foreground "PaleTurquoise")))) + (gnus-group-news-2-empty-face ((t (:foreground "turquoise")))) + (gnus-group-news-2-face ((t (:bold t :foreground "turquoise")))) + (gnus-group-news-3-empty-face ((t (nil)))) + (gnus-group-news-3-face ((t (:bold t)))) + (gnus-group-news-4-empty-face ((t (nil)))) + (gnus-group-news-4-face ((t (:bold t)))) + (gnus-group-news-5-empty-face ((t (nil)))) + (gnus-group-news-5-face ((t (:bold t)))) + (gnus-group-news-6-empty-face ((t (nil)))) + (gnus-group-news-6-face ((t (:bold t)))) + (gnus-group-news-low-empty-face ((t (:foreground "DarkTurquoise")))) + (gnus-group-news-low-face ((t (:bold t :foreground "DarkTurquoise")))) + (gnus-header-content-face ((t (:italic t :foreground "forest green")))) + (gnus-header-from-face ((t (:bold t :foreground "spring green")))) + (gnus-header-name-face ((t (:foreground "deep sky blue")))) + (gnus-header-newsgroups-face ((t (:italic t :bold t :foreground "purple")))) + (gnus-header-subject-face ((t (:bold t :foreground "orange")))) + (gnus-signature-face ((t (:bold t :foreground "khaki")))) + (gnus-splash-face ((t (:foreground "Brown")))) + (gnus-summary-cancelled-face ((t (:background "black" :foreground "yellow")))) + (gnus-summary-high-ancient-face ((t (:bold t :foreground "SkyBlue")))) + (gnus-summary-high-read-face ((t (:bold t :foreground "PaleGreen")))) + (gnus-summary-high-ticked-face ((t (:bold t :foreground "pink")))) + (gnus-summary-high-unread-face ((t (:bold t)))) + (gnus-summary-low-ancient-face ((t (:italic t :foreground "SkyBlue")))) + (gnus-summary-low-read-face ((t (:italic t :foreground "PaleGreen")))) + (gnus-summary-low-ticked-face ((t (:italic t :foreground "pink")))) + (gnus-summary-low-unread-face ((t (:italic t)))) + (gnus-summary-normal-ancient-face ((t (:foreground "SkyBlue")))) + (gnus-summary-normal-read-face ((t (:foreground "PaleGreen")))) + (gnus-summary-normal-ticked-face ((t (:foreground "pink")))) + (gnus-summary-normal-unread-face ((t (nil)))) + (gnus-summary-selected-face ((t (:underline t)))) + (highlight ((t (:background "darkolivegreen")))) + (italic ((t (:italic t)))) + (message-cited-text-face ((t (:bold t :foreground "red")))) + (message-header-cc-face ((t (:bold t :foreground "green4")))) + (message-header-name-face ((t (:bold t :foreground "orange")))) + (message-header-newsgroups-face ((t (:bold t :foreground "violet")))) + (message-header-other-face ((t (:bold t :foreground "chocolate")))) + (message-header-subject-face ((t (:bold t :foreground "yellow")))) + (message-header-to-face ((t (:bold t :foreground "cyan")))) + (message-header-xheader-face ((t (:bold t :foreground "light blue")))) + (message-mml-face ((t (:bold t :background "Green3")))) + (message-separator-face ((t (:foreground "blue3")))) + (modeline ((t (:background "white" :foreground "black")))) + (modeline-buffer-id ((t (:background "white" :foreground "black")))) + (modeline-mousable ((t (:background "white" :foreground "black")))) + (modeline-mousable-minor-mode ((t (:background "white" :foreground "black")))) + (region ((t (:background "blue")))) + (primary-selection ((t (:background "blue")))) + (isearch ((t (:background "blue")))) + (zmacs-region ((t (:background "blue")))) + (secondary-selection ((t (:background "darkslateblue")))) + (underline ((t (:underline t)))) + (widget-button-face ((t (:bold t)))) + (widget-button-pressed-face ((t (:foreground "red")))) + (widget-documentation-face ((t (:foreground "lime green")))) + (widget-field-face ((t (:background "dim gray")))) + (widget-inactive-face ((t (:foreground "light gray")))) + (widget-single-line-field-face ((t (:background "dim gray"))))))) + +(defun color-theme-taming-mr-arneson () + "Color theme by Erik Arneson, created 2001-06-12. +Light sky blue on black. Includes bbdb, cperl, custom, cvs, diff, +dired, font-lock, html-helper, hyper-apropos, info, isearch, man, +message, paren, shell, and widget." + (interactive) + (color-theme-install + '(color-theme-taming-mr-arneson + ((background-color . "black") + (background-mode . light) + (background-toolbar-color . "#cf3ccf3ccf3c") + (border-color . "#000000000000") + (bottom-toolbar-shadow-color . "#79e77df779e7") + (cursor-color . "Red3") + (foreground-color . "LightSkyBlue") + (top-toolbar-shadow-color . "#fffffbeeffff")) + ((buffers-tab-face . buffers-tab) + (cperl-here-face . font-lock-string-face) + (cperl-invalid-face quote default) + (cperl-pod-face . font-lock-comment-face) + (cperl-pod-head-face . font-lock-variable-name-face) + (ispell-highlight-face . highlight) + (vc-mode-face . highlight) + (vm-highlight-url-face . bold-italic) + (vm-highlighted-header-face . bold) + (vm-mime-button-face . gui-button-face) + (vm-summary-highlight-face . bold)) + (default ((t (nil)))) + (bbdb-company ((t (nil)))) + (bbdb-field-name ((t (:bold t)))) + (bbdb-field-value ((t (nil)))) + (bbdb-name ((t (:underline t)))) + (blue ((t (:foreground "blue")))) + (bold ((t (:bold t)))) + (bold-italic ((t (:bold t :foreground "yellow")))) + (border-glyph ((t (nil)))) + (buffers-tab ((t (:background "black" :foreground "LightSkyBlue")))) + (cperl-array-face ((t (:bold t :foreground "SkyBlue2")))) + (cperl-hash-face ((t (:foreground "LightBlue2")))) + (cperl-invalid-face ((t (:foreground "white")))) + (cperl-nonoverridable-face ((t (:foreground "chartreuse3")))) + (custom-button-face ((t (:bold t)))) + (custom-changed-face ((t (:background "blue" :foreground "white")))) + (custom-comment-face ((t (:foreground "white")))) + (custom-comment-tag-face ((t (:foreground "white")))) + (custom-documentation-face ((t (nil)))) + (custom-face-tag-face ((t (:underline t)))) + (custom-group-tag-face ((t (:underline t :foreground "blue")))) + (custom-group-tag-face-1 ((t (:underline t :foreground "red")))) + (custom-invalid-face ((t (:background "red" :foreground "yellow")))) + (custom-modified-face ((t (:background "blue" :foreground "white")))) + (custom-rogue-face ((t (:background "black" :foreground "pink")))) + (custom-saved-face ((t (:underline t)))) + (custom-set-face ((t (:background "white" :foreground "blue")))) + (custom-state-face ((t (:foreground "white")))) + (custom-variable-button-face ((t (:underline t :bold t)))) + (custom-variable-tag-face ((t (:underline t :foreground "blue")))) + (cvs-filename-face ((t (:foreground "white")))) + (cvs-handled-face ((t (:foreground "pink")))) + (cvs-header-face ((t (:foreground "green")))) + (cvs-marked-face ((t (:bold t :foreground "green3")))) + (cvs-msg-face ((t (:foreground "red")))) + (cvs-need-action-face ((t (:foreground "yellow")))) + (cvs-unknown-face ((t (:foreground "grey")))) + (diff-added-face ((t (nil)))) + (diff-changed-face ((t (nil)))) + (diff-file-header-face ((t (:bold t :background "grey70")))) + (diff-hunk-header-face ((t (:background "grey85")))) + (diff-index-face ((t (:bold t :background "grey70")))) + (diff-removed-face ((t (nil)))) + (dired-face-boring ((t (:foreground "Gray65")))) + (dired-face-directory ((t (:bold t :foreground "SkyBlue2")))) + (dired-face-executable ((t (:foreground "Green")))) + (dired-face-flagged ((t (:background "LightSlateGray")))) + (dired-face-header ((t (:background "grey75" :foreground "black")))) + (dired-face-marked ((t (:background "PaleVioletRed")))) + (dired-face-permissions ((t (:background "grey75" :foreground "black")))) + (dired-face-setuid ((t (:foreground "Red")))) + (dired-face-socket ((t (:foreground "magenta")))) + (dired-face-symlink ((t (:foreground "cyan")))) + (excerpt ((t (nil)))) + (fixed ((t (:bold t)))) + (font-lock-builtin-face ((t (:foreground "red3")))) + (font-lock-comment-face ((t (:foreground "red")))) + (font-lock-constant-face ((t (nil)))) + (font-lock-doc-string-face ((t (:foreground "turquoise")))) + (font-lock-function-name-face ((t (:foreground "white")))) + (font-lock-keyword-face ((t (:foreground "green")))) + (font-lock-preprocessor-face ((t (:foreground "green3")))) + (font-lock-reference-face ((t (:foreground "red3")))) + (font-lock-string-face ((t (:foreground "turquoise")))) + (font-lock-type-face ((t (:foreground "steelblue")))) + (font-lock-variable-name-face ((t (:foreground "magenta2")))) + (font-lock-warning-face ((t (:bold t :foreground "Red")))) + (green ((t (:foreground "green")))) + (gui-button-face ((t (:background "grey75" :foreground "black")))) + (gui-element ((t (nil)))) + (highlight ((t (:background "darkseagreen2" :foreground "blue")))) + (html-helper-bold-face ((t (:bold t)))) + (html-helper-italic-face ((t (:bold t :foreground "yellow")))) + (html-helper-underline-face ((t (:underline t)))) + (hyper-apropos-documentation ((t (:foreground "white")))) + (hyper-apropos-heading ((t (:bold t)))) + (hyper-apropos-hyperlink ((t (:foreground "sky blue")))) + (hyper-apropos-major-heading ((t (:bold t)))) + (hyper-apropos-section-heading ((t (:bold t)))) + (hyper-apropos-warning ((t (:bold t :foreground "red")))) + (info-node ((t (:bold t :foreground "yellow")))) + (info-xref ((t (:bold t)))) + (isearch ((t (:background "paleturquoise" :foreground "dark red")))) + (isearch-secondary ((t (:foreground "red3")))) + (italic ((t (:bold t :foreground "yellow")))) + (left-margin ((t (nil)))) + (list-mode-item-selected ((t (:background "gray68" :foreground "dark green")))) + (man-bold ((t (:bold t)))) + (man-heading ((t (:bold t)))) + (man-italic ((t (:foreground "yellow")))) + (man-xref ((t (:underline t)))) + (message-cited-text ((t (:foreground "orange")))) + (message-header-contents ((t (:foreground "white")))) + (message-headers ((t (:bold t :foreground "orange")))) + (message-highlighted-header-contents ((t (:bold t)))) + (message-url ((t (:bold t :foreground "pink")))) + (mmm-face ((t (:background "black" :foreground "green")))) + (modeline ((t (nil)))) + (modeline-buffer-id ((t (:background "Gray80" :foreground "blue4")))) + (modeline-mousable ((t (:background "Gray80" :foreground "firebrick")))) + (modeline-mousable-minor-mode ((t (:background "Gray80" :foreground "green4")))) + (paren-blink-off ((t (:foreground "gray80")))) + (paren-match ((t (:background "dark blue")))) + (paren-mismatch ((t (:background "DeepPink" :foreground "LightSkyBlue")))) + (pointer ((t (nil)))) + (primary-selection ((t (:background "gray65" :foreground "DarkBlue")))) + (red ((t (:foreground "red")))) + (region ((t (:background "gray65" :foreground "DarkBlue")))) + (right-margin ((t (nil)))) + (secondary-selection ((t (:background "paleturquoise" :foreground "black")))) + (shell-option-face ((t (:foreground "blue4")))) + (shell-output-2-face ((t (:foreground "green4")))) + (shell-output-3-face ((t (:foreground "green4")))) + (shell-output-face ((t (:bold t)))) + (shell-prompt-face ((t (:foreground "red4")))) + (text-cursor ((t (:background "Red3" :foreground "black")))) + (toolbar ((t (:background "Gray80" :foreground "black")))) + (underline ((t (:underline t)))) + (vertical-divider ((t (nil)))) + (vm-xface ((t (:background "white" :foreground "black")))) + (vmpc-pre-sig-face ((t (:foreground "forestgreen")))) + (vmpc-sig-face ((t (:foreground "steelblue")))) + (widget ((t (nil)))) + (widget-button-face ((t (:bold t)))) + (widget-button-pressed-face ((t (:foreground "red")))) + (widget-documentation-face ((t (:foreground "dark green")))) + (widget-field-face ((t (:background "gray85" :foreground "black")))) + (widget-inactive-face ((t (:foreground "dim gray")))) + (x-face ((t (:background "white" :foreground "black")))) + (xrdb-option-name-face ((t (:foreground "red")))) + (yellow ((t (:foreground "yellow")))) + (zmacs-region ((t (:background "gray65"))))))) + +(defun color-theme-digital-ofs1 () + "Color theme by Gareth Owen, created 2001-06-13. +This works well on an old, beat-up Digital Unix box with its 256 colour +display, on which other color themes hog too much of the palette. +Black on some shade of dark peach. Includes bbdb, cperl, custom, +cvs, diff, dired, ediff, erc, eshell, font-latex, font-lock, gnus, +highlight, hproperty, html-helper, hyper-apropos, info, jde, man, +message, paren, searchm, semantic, sgml, shell, speedbar, term, +vhdl, viper, w3m, widget, woman, x-symbol, xref." + (interactive) + (color-theme-install + '(color-theme-digital-ofs1 + ((background-color . "#CA94AA469193") + (background-mode . light) + (background-toolbar-color . "#cf3ccf3ccf3c") + (border-color . "black") + (bottom-toolbar-shadow-color . "#79e77df779e7") + (cursor-color . "Black") + (foreground-color . "Black") + (mouse-color . "Black") + (top-toolbar-shadow-color . "#fffffbeeffff") + (viper-saved-cursor-color-in-replace-mode . "Red3")) + ((Man-overstrike-face . bold) + (Man-underline-face . underline) + (gnus-mouse-face . highlight) + (goto-address-mail-face . italic) + (goto-address-mail-mouse-face . secondary-selection) + (goto-address-url-face . bold) + (goto-address-url-mouse-face . highlight) + (ispell-highlight-face . highlight) + (list-matching-lines-face . bold) + (rmail-highlight-face . font-lock-function-name-face) + (view-highlight-face . highlight)) + (default ((t (:bold t)))) + (bbdb-company ((t (:italic t)))) + (bbdb-field-name ((t (:bold t)))) + (bbdb-field-value ((t (nil)))) + (bbdb-name ((t (:underline t)))) + (blank-space-face ((t (nil)))) + (blank-tab-face ((t (nil)))) + (blue ((t (:bold t :foreground "blue")))) + (bold ((t (:bold t)))) + (bold-italic ((t (:italic t :bold t)))) + (border-glyph ((t (:bold t)))) + (buffers-tab ((t (:background "black" :foreground "LightSkyBlue")))) + (calendar-today-face ((t (:underline t :bold t :foreground "white")))) + (comint-input-face ((t (nil)))) + (cperl-array-face ((t (:bold t :background "lightyellow2" :foreground "Blue")))) + (cperl-hash-face ((t (:italic t :bold t :background "lightyellow2" :foreground "Red")))) + (cperl-here-face ((t (nil)))) + (cperl-invalid-face ((t (:foreground "white")))) + (cperl-nonoverridable-face ((t (:foreground "chartreuse3")))) + (cperl-pod-face ((t (nil)))) + (cperl-pod-head-face ((t (nil)))) + (custom-button-face ((t (:bold t)))) + (custom-changed-face ((t (:bold t :background "blue" :foreground "white")))) + (custom-comment-face ((t (:foreground "white")))) + (custom-comment-tag-face ((t (:foreground "white")))) + (custom-documentation-face ((t (:bold t)))) + (custom-face-tag-face ((t (:underline t :bold t)))) + (custom-group-tag-face ((t (:underline t :bold t :foreground "DarkBlue")))) + (custom-group-tag-face-1 ((t (:underline t :bold t :foreground "red")))) + (custom-invalid-face ((t (:bold t :background "red" :foreground "yellow")))) + (custom-modified-face ((t (:bold t :background "blue" :foreground "white")))) + (custom-rogue-face ((t (:bold t :background "black" :foreground "pink")))) + (custom-saved-face ((t (:underline t :bold t)))) + (custom-set-face ((t (:bold t :background "white" :foreground "blue")))) + (custom-state-face ((t (:bold t :foreground "dark green")))) + (custom-variable-button-face ((t (:underline t :bold t)))) + (custom-variable-tag-face ((t (:underline t :bold t :foreground "blue")))) + (cvs-filename-face ((t (:foreground "white")))) + (cvs-handled-face ((t (:foreground "pink")))) + (cvs-header-face ((t (:bold t :foreground "green")))) + (cvs-marked-face ((t (:bold t :foreground "green3")))) + (cvs-msg-face ((t (:italic t :foreground "red")))) + (cvs-need-action-face ((t (:foreground "yellow")))) + (cvs-unknown-face ((t (:foreground "grey")))) + (cyan ((t (:foreground "cyan")))) + (diary-face ((t (:bold t :foreground "red")))) + (diff-added-face ((t (nil)))) + (diff-changed-face ((t (nil)))) + (diff-file-header-face ((t (:bold t :background "grey70")))) + (diff-hunk-header-face ((t (:background "grey85")))) + (diff-index-face ((t (:bold t :background "grey70")))) + (diff-removed-face ((t (nil)))) + (dired-face-boring ((t (:foreground "Gray65")))) + (dired-face-directory ((t (:bold t)))) + (dired-face-executable ((t (:foreground "SeaGreen")))) + (dired-face-flagged ((t (:background "LightSlateGray")))) + (dired-face-header ((t (:background "grey75" :foreground "black")))) + (dired-face-marked ((t (:background "PaleVioletRed")))) + (dired-face-permissions ((t (:background "grey75" :foreground "black")))) + (dired-face-setuid ((t (:foreground "Red")))) + (dired-face-socket ((t (:foreground "magenta")))) + (dired-face-symlink ((t (:foreground "cyan")))) + (display-time-mail-balloon-enhance-face ((t (:bold t :background "orange")))) + (display-time-mail-balloon-gnus-group-face ((t (:bold t :foreground "blue")))) + (display-time-time-balloon-face ((t (:bold t :foreground "red")))) + (ediff-current-diff-face-A ((t (:background "pale green" :foreground "firebrick")))) + (ediff-current-diff-face-Ancestor ((t (:background "VioletRed" :foreground "Black")))) + (ediff-current-diff-face-B ((t (:background "Yellow" :foreground "DarkOrchid")))) + (ediff-current-diff-face-C ((t (:background "Pink" :foreground "Navy")))) + (ediff-even-diff-face-A ((t (:background "light grey" :foreground "Black")))) + (ediff-even-diff-face-Ancestor ((t (:background "Grey" :foreground "White")))) + (ediff-even-diff-face-B ((t (:background "Grey" :foreground "White")))) + (ediff-even-diff-face-C ((t (:background "light grey" :foreground "Black")))) + (ediff-fine-diff-face-A ((t (:background "sky blue" :foreground "Navy")))) + (ediff-fine-diff-face-Ancestor ((t (:background "Green" :foreground "Black")))) + (ediff-fine-diff-face-B ((t (:background "cyan" :foreground "Black")))) + (ediff-fine-diff-face-C ((t (:background "Turquoise" :foreground "Black")))) + (ediff-odd-diff-face-A ((t (:background "Grey" :foreground "White")))) + (ediff-odd-diff-face-Ancestor ((t (:background "light grey" :foreground "Black")))) + (ediff-odd-diff-face-B ((t (:background "light grey" :foreground "Black")))) + (ediff-odd-diff-face-C ((t (:background "Grey" :foreground "White")))) + (erc-action-face ((t (:bold t)))) + (erc-bold-face ((t (:bold t)))) + (erc-default-face ((t (nil)))) + (erc-direct-msg-face ((t (nil)))) + (erc-error-face ((t (:bold t)))) + (erc-input-face ((t (nil)))) + (erc-inverse-face ((t (nil)))) + (erc-notice-face ((t (nil)))) + (erc-pal-face ((t (nil)))) + (erc-prompt-face ((t (nil)))) + (erc-underline-face ((t (nil)))) + (eshell-ls-archive-face ((t (:bold t :foreground "Orchid")))) + (eshell-ls-backup-face ((t (:foreground "OrangeRed")))) + (eshell-ls-clutter-face ((t (:bold t :foreground "OrangeRed")))) + (eshell-ls-directory-face ((t (:bold t :foreground "Blue")))) + (eshell-ls-executable-face ((t (:bold t :foreground "ForestGreen")))) + (eshell-ls-missing-face ((t (:bold t :foreground "Red")))) + (eshell-ls-picture-face ((t (:foreground "Violet")))) + (eshell-ls-product-face ((t (:foreground "OrangeRed")))) + (eshell-ls-readonly-face ((t (:foreground "Brown")))) + (eshell-ls-special-face ((t (:bold t :foreground "Magenta")))) + (eshell-ls-symlink-face ((t (:bold t :foreground "DarkCyan")))) + (eshell-ls-text-face ((t (:foreground "medium aquamarine")))) + (eshell-ls-todo-face ((t (:bold t :foreground "aquamarine")))) + (eshell-ls-unreadable-face ((t (:foreground "Grey30")))) + (eshell-prompt-face ((t (:bold t :foreground "Red")))) + (eshell-test-failed-face ((t (:bold t :foreground "OrangeRed")))) + (eshell-test-ok-face ((t (:bold t :foreground "Green")))) + (excerpt ((t (:italic t)))) + (ff-paths-non-existant-file-face ((t (:bold t :foreground "NavyBlue")))) + (fg:black ((t (:foreground "black")))) + (fixed ((t (:bold t)))) + (fl-comment-face ((t (:foreground "medium purple")))) + (fl-doc-string-face ((t (nil)))) + (fl-function-name-face ((t (:foreground "green")))) + (fl-keyword-face ((t (:foreground "LightGreen")))) + (fl-string-face ((t (:foreground "light coral")))) + (fl-type-face ((t (:foreground "cyan")))) + (flyspell-duplicate-face ((t (:underline t :bold t :foreground "Gold3")))) + (flyspell-incorrect-face ((t (:underline t :bold t :foreground "OrangeRed")))) + (font-latex-bold-face ((t (:bold t)))) + (font-latex-italic-face ((t (:italic t)))) + (font-latex-math-face ((t (nil)))) + (font-latex-sedate-face ((t (nil)))) + (font-latex-string-face ((t (nil)))) + (font-latex-warning-face ((t (nil)))) + (font-lock-builtin-face ((t (:italic t :bold t :foreground "Orchid")))) + (font-lock-comment-face ((t (:bold t :foreground "Firebrick")))) + (font-lock-constant-face ((t (:italic t :bold t :foreground "CadetBlue")))) + (font-lock-doc-string-face ((t (:italic t :bold t :foreground "green4")))) + (font-lock-emphasized-face ((t (:bold t)))) + (font-lock-exit-face ((t (:foreground "green")))) + (font-lock-function-name-face ((t (:italic t :bold t :foreground "Blue")))) + (font-lock-keyword-face ((t (:bold t :foreground "dark olive green")))) + (font-lock-other-emphasized-face ((t (:italic t :bold t)))) + (font-lock-other-type-face ((t (:bold t :foreground "DarkBlue")))) + (font-lock-preprocessor-face ((t (:italic t :bold t :foreground "blue3")))) + (font-lock-reference-face ((t (:italic t :bold t :foreground "red3")))) + (font-lock-special-comment-face ((t (nil)))) + (font-lock-special-keyword-face ((t (nil)))) + (font-lock-string-face ((t (:italic t :bold t :foreground "DarkBlue")))) + (font-lock-type-face ((t (:italic t :bold t :foreground "DarkGreen")))) + (font-lock-variable-name-face ((t (:italic t :bold t :foreground "darkgreen")))) + (font-lock-warning-face ((t (:bold t :foreground "Red")))) + (fringe ((t (:background "grey95")))) + (gdb-arrow-face ((t (:bold t)))) + (gnus-cite-attribution-face ((t (:italic t :bold t)))) + (gnus-cite-face-1 ((t (:bold t :foreground "MidnightBlue")))) + (gnus-cite-face-10 ((t (:foreground "medium purple")))) + (gnus-cite-face-11 ((t (:foreground "turquoise")))) + (gnus-cite-face-2 ((t (:bold t :foreground "firebrick")))) + (gnus-cite-face-3 ((t (:bold t :foreground "dark green")))) + (gnus-cite-face-4 ((t (:foreground "OrangeRed")))) + (gnus-cite-face-5 ((t (:foreground "dark khaki")))) + (gnus-cite-face-6 ((t (:bold t :foreground "dark violet")))) + (gnus-cite-face-7 ((t (:foreground "SteelBlue4")))) + (gnus-cite-face-8 ((t (:foreground "magenta")))) + (gnus-cite-face-9 ((t (:foreground "violet")))) + (gnus-cite-face-list ((t (nil)))) + (gnus-emphasis-bold ((t (:bold t)))) + (gnus-emphasis-bold-italic ((t (:italic t :bold t)))) + (gnus-emphasis-highlight-words ((t (:background "black" :foreground "yellow")))) + (gnus-emphasis-italic ((t (:italic t)))) + (gnus-emphasis-underline ((t (:underline t)))) + (gnus-emphasis-underline-bold ((t (:underline t :bold t)))) + (gnus-emphasis-underline-bold-italic ((t (:underline t :italic t :bold t)))) + (gnus-emphasis-underline-italic ((t (:underline t :italic t)))) + (gnus-filterhist-face-1 ((t (nil)))) + (gnus-group-mail-1-empty-face ((t (:foreground "DeepPink3")))) + (gnus-group-mail-1-face ((t (:bold t :foreground "DeepPink3")))) + (gnus-group-mail-2-empty-face ((t (:foreground "HotPink3")))) + (gnus-group-mail-2-face ((t (:bold t :foreground "HotPink3")))) + (gnus-group-mail-3-empty-face ((t (:foreground "magenta4")))) + (gnus-group-mail-3-face ((t (:bold t :foreground "magenta4")))) + (gnus-group-mail-low-empty-face ((t (:foreground "DeepPink4")))) + (gnus-group-mail-low-face ((t (:bold t :foreground "DeepPink4")))) + (gnus-group-news-1-empty-face ((t (:foreground "ForestGreen")))) + (gnus-group-news-1-face ((t (:bold t :foreground "ForestGreen")))) + (gnus-group-news-2-empty-face ((t (:foreground "CadetBlue4")))) + (gnus-group-news-2-face ((t (:bold t :foreground "CadetBlue4")))) + (gnus-group-news-3-empty-face ((t (nil)))) + (gnus-group-news-3-face ((t (:bold t)))) + (gnus-group-news-4-empty-face ((t (nil)))) + (gnus-group-news-4-face ((t (:bold t)))) + (gnus-group-news-5-empty-face ((t (nil)))) + (gnus-group-news-5-face ((t (:bold t)))) + (gnus-group-news-6-empty-face ((t (nil)))) + (gnus-group-news-6-face ((t (:bold t)))) + (gnus-group-news-low-empty-face ((t (:foreground "DarkGreen")))) + (gnus-group-news-low-face ((t (:bold t :foreground "DarkGreen")))) + (gnus-header-content-face ((t (:italic t :foreground "indianred4")))) + (gnus-header-from-face ((t (:bold t :foreground "red3")))) + (gnus-header-name-face ((t (:bold t :foreground "maroon")))) + (gnus-header-newsgroups-face ((t (:italic t :bold t :foreground "MidnightBlue")))) + (gnus-header-subject-face ((t (:bold t :foreground "red4")))) + (gnus-picons-face ((t (:background "white" :foreground "black")))) + (gnus-picons-xbm-face ((t (:background "white" :foreground "black")))) + (gnus-signature-face ((t (:italic t :bold t)))) + (gnus-splash ((t (nil)))) + (gnus-splash-face ((t (:foreground "Brown")))) + (gnus-summary-cancelled-face ((t (:background "black" :foreground "yellow")))) + (gnus-summary-high-ancient-face ((t (:bold t :foreground "RoyalBlue")))) + (gnus-summary-high-read-face ((t (:bold t :foreground "DarkGreen")))) + (gnus-summary-high-ticked-face ((t (:bold t :foreground "firebrick")))) + (gnus-summary-high-unread-face ((t (:italic t :bold t)))) + (gnus-summary-low-ancient-face ((t (:italic t :foreground "RoyalBlue")))) + (gnus-summary-low-read-face ((t (:italic t :foreground "DarkGreen")))) + (gnus-summary-low-ticked-face ((t (:italic t :bold t :foreground "firebrick")))) + (gnus-summary-low-unread-face ((t (:italic t)))) + (gnus-summary-normal-ancient-face ((t (:foreground "RoyalBlue")))) + (gnus-summary-normal-read-face ((t (:foreground "DarkGreen")))) + (gnus-summary-normal-ticked-face ((t (:bold t :foreground "firebrick")))) + (gnus-summary-normal-unread-face ((t (:bold t)))) + (gnus-summary-selected-face ((t (:underline t)))) + (gnus-x-face ((t (:background "white" :foreground "black")))) + (green ((t (:bold t :foreground "green")))) + (gui-button-face ((t (:bold t :background "grey75" :foreground "black")))) + (gui-element ((t (:bold t :background "Gray80")))) + (highlight ((t (:bold t :background "darkseagreen2")))) + (highlight-changes-delete-face ((t (:underline t :foreground "red")))) + (highlight-changes-face ((t (:foreground "red")))) + (highline-face ((t (:background "black" :foreground "white")))) + (holiday-face ((t (:bold t :background "pink" :foreground "white")))) + (hproperty:but-face ((t (:bold t)))) + (hproperty:flash-face ((t (:bold t)))) + (hproperty:highlight-face ((t (:bold t)))) + (hproperty:item-face ((t (:bold t)))) + (html-helper-bold-face ((t (:bold t)))) + (html-helper-bold-italic-face ((t (nil)))) + (html-helper-builtin-face ((t (:underline t :foreground "blue3")))) + (html-helper-italic-face ((t (:italic t :bold t :foreground "yellow")))) + (html-helper-underline-face ((t (:underline t)))) + (html-tag-face ((t (:bold t)))) + (hyper-apropos-documentation ((t (:foreground "white")))) + (hyper-apropos-heading ((t (:bold t)))) + (hyper-apropos-hyperlink ((t (:foreground "sky blue")))) + (hyper-apropos-major-heading ((t (:bold t)))) + (hyper-apropos-section-heading ((t (:bold t)))) + (hyper-apropos-warning ((t (:bold t :foreground "red")))) + (ibuffer-marked-face ((t (:foreground "red")))) + (info-menu-5 ((t (:underline t :bold t)))) + (info-menu-6 ((t (nil)))) + (info-node ((t (:italic t :bold t)))) + (info-xref ((t (:bold t)))) + (isearch ((t (:bold t :background "paleturquoise")))) + (isearch-secondary ((t (:foreground "red3")))) + (ispell-face ((t (:bold t)))) + (italic ((t (:italic t :bold t)))) + (jde-bug-breakpoint-cursor ((t (:background "brown" :foreground "cyan")))) + (jde-bug-breakpoint-marker ((t (:background "yellow" :foreground "red")))) + (jde-java-font-lock-link-face ((t (:underline t :foreground "blue")))) + (jde-java-font-lock-number-face ((t (:foreground "RosyBrown")))) + (lazy-highlight-face ((t (:bold t :foreground "dark magenta")))) + (left-margin ((t (:bold t)))) + (linemenu-face ((t (nil)))) + (list-mode-item-selected ((t (:bold t :background "gray68")))) + (magenta ((t (:foreground "magenta")))) + (makefile-space-face ((t (:background "hotpink")))) + (man-bold ((t (:bold t)))) + (man-heading ((t (:bold t)))) + (man-italic ((t (:foreground "yellow")))) + (man-xref ((t (:underline t)))) + (message-cited-text ((t (:bold t :foreground "orange")))) + (message-cited-text-face ((t (:bold t :foreground "red")))) + (message-header-cc-face ((t (:bold t :foreground "MidnightBlue")))) + (message-header-contents ((t (:italic t :bold t :foreground "white")))) + (message-header-name-face ((t (:bold t :foreground "cornflower blue")))) + (message-header-newsgroups-face ((t (:italic t :bold t :foreground "blue4")))) + (message-header-other-face ((t (:bold t :foreground "steel blue")))) + (message-header-subject-face ((t (:bold t :foreground "navy blue")))) + (message-header-to-face ((t (:bold t :foreground "MidnightBlue")))) + (message-header-xheader-face ((t (:bold t :foreground "blue")))) + (message-headers ((t (:bold t :foreground "orange")))) + (message-highlighted-header-contents ((t (:bold t)))) + (message-mml-face ((t (:bold t :foreground "ForestGreen")))) + (message-separator-face ((t (:foreground "brown")))) + (message-url ((t (:bold t :foreground "pink")))) + (mmm-face ((t (:background "black" :foreground "green")))) + (modeline ((t (:bold t :background "Black" :foreground "#CA94AA469193")))) + (modeline-buffer-id ((t (:bold t :background "Gray80" :foreground "blue4")))) + (modeline-mousable ((t (:bold t :background "Gray80" :foreground "firebrick")))) + (modeline-mousable-minor-mode ((t (:bold t :background "Gray80" :foreground "green4")))) + (my-tab-face ((t (nil)))) + (nil ((t (nil)))) + (p4-diff-del-face ((t (:bold t)))) + (paren-blink-off ((t (:foreground "gray80")))) + (paren-face ((t (nil)))) + (paren-face-match ((t (nil)))) + (paren-face-mismatch ((t (nil)))) + (paren-face-no-match ((t (nil)))) + (paren-match ((t (:background "darkseagreen2")))) + (paren-mismatch ((t (:background "DeepPink" :foreground "black")))) + (paren-mismatch-face ((t (:bold t :background "DeepPink" :foreground "white")))) + (paren-no-match-face ((t (:bold t :background "yellow" :foreground "white")))) + (pointer ((t (:bold t)))) + (primary-selection ((t (:bold t :background "gray65")))) + (red ((t (:bold t :foreground "red")))) + (region ((t (:bold t :background "gray")))) + (right-margin ((t (:bold t)))) + (searchm-buffer ((t (:bold t)))) + (searchm-button ((t (:bold t)))) + (searchm-field ((t (nil)))) + (searchm-field-label ((t (:bold t)))) + (searchm-highlight ((t (:bold t)))) + (secondary-selection ((t (:bold t :background "paleturquoise")))) + (semantic-intangible-face ((t (:foreground "gray25")))) + (semantic-read-only-face ((t (:background "gray25")))) + (senator-momentary-highlight-face ((t (:background "gray70")))) + (setnu-line-number-face ((t (:italic t :bold t)))) + (sgml-comment-face ((t (:foreground "dark green")))) + (sgml-doctype-face ((t (:foreground "maroon")))) + (sgml-end-tag-face ((t (:foreground "blue2")))) + (sgml-entity-face ((t (:foreground "red2")))) + (sgml-ignored-face ((t (:background "gray90" :foreground "maroon")))) + (sgml-ms-end-face ((t (:foreground "maroon")))) + (sgml-ms-start-face ((t (:foreground "maroon")))) + (sgml-pi-face ((t (:foreground "maroon")))) + (sgml-sgml-face ((t (:foreground "maroon")))) + (sgml-short-ref-face ((t (:foreground "goldenrod")))) + (sgml-start-tag-face ((t (:foreground "blue2")))) + (shell-input-face ((t (:bold t)))) + (shell-option-face ((t (:bold t :foreground "blue4")))) + (shell-output-2-face ((t (:bold t :foreground "green4")))) + (shell-output-3-face ((t (:bold t :foreground "green4")))) + (shell-output-face ((t (:bold t)))) + (shell-prompt-face ((t (:bold t :foreground "red4")))) + (show-paren-match-face ((t (:bold t :background "turquoise")))) + (show-paren-mismatch-face ((t (:bold t :background "purple" :foreground "white")))) + (speedbar-button-face ((t (:bold t :foreground "magenta")))) + (speedbar-directory-face ((t (:bold t :foreground "orchid")))) + (speedbar-file-face ((t (:bold t :foreground "pink")))) + (speedbar-highlight-face ((t (:background "black")))) + (speedbar-selected-face ((t (:underline t :foreground "cyan")))) + (speedbar-tag-face ((t (:foreground "yellow")))) + (swbuff-current-buffer-face ((t (:bold t :foreground "red")))) + (template-message-face ((t (:bold t)))) + (term-black ((t (:foreground "black")))) + (term-blackbg ((t (:background "black")))) + (term-blue ((t (:foreground "blue")))) + (term-blue-bold-face ((t (:bold t :background "snow2" :foreground "blue")))) + (term-blue-face ((t (:foreground "blue")))) + (term-blue-inv-face ((t (:background "blue")))) + (term-blue-ul-face ((t (:underline t :background "snow2" :foreground "blue")))) + (term-bluebg ((t (:background "blue")))) + (term-bold ((t (:bold t)))) + (term-cyan ((t (:foreground "cyan")))) + (term-cyan-bold-face ((t (:bold t :background "snow2" :foreground "cyan")))) + (term-cyan-face ((t (:foreground "cyan")))) + (term-cyan-inv-face ((t (:background "cyan")))) + (term-cyan-ul-face ((t (:underline t :background "snow2" :foreground "cyan")))) + (term-cyanbg ((t (:background "cyan")))) + (term-default-bg ((t (nil)))) + (term-default-bg-inv ((t (nil)))) + (term-default-bold-face ((t (:bold t :background "snow2" :foreground "darkslategray")))) + (term-default-face ((t (:background "snow2" :foreground "darkslategray")))) + (term-default-fg ((t (nil)))) + (term-default-fg-inv ((t (nil)))) + (term-default-inv-face ((t (:background "darkslategray" :foreground "snow2")))) + (term-default-ul-face ((t (:underline t :background "snow2" :foreground "darkslategray")))) + (term-green ((t (:foreground "green")))) + (term-green-bold-face ((t (:bold t :background "snow2" :foreground "green")))) + (term-green-face ((t (:foreground "green")))) + (term-green-inv-face ((t (:background "green")))) + (term-green-ul-face ((t (:underline t :background "snow2" :foreground "green")))) + (term-greenbg ((t (:background "green")))) + (term-invisible ((t (nil)))) + (term-invisible-inv ((t (nil)))) + (term-magenta ((t (:foreground "magenta")))) + (term-magenta-bold-face ((t (:bold t :background "snow2" :foreground "magenta")))) + (term-magenta-face ((t (:foreground "magenta")))) + (term-magenta-inv-face ((t (:background "magenta")))) + (term-magenta-ul-face ((t (:underline t :background "snow2" :foreground "magenta")))) + (term-magentabg ((t (:background "magenta")))) + (term-red ((t (:foreground "red")))) + (term-red-bold-face ((t (:bold t :background "snow2" :foreground "red")))) + (term-red-face ((t (:foreground "red")))) + (term-red-inv-face ((t (:background "red")))) + (term-red-ul-face ((t (:underline t :background "snow2" :foreground "red")))) + (term-redbg ((t (:background "red")))) + (term-underline ((t (:underline t)))) + (term-white ((t (:foreground "white")))) + (term-white-bold-face ((t (:bold t :background "snow2" :foreground "white")))) + (term-white-face ((t (:foreground "white")))) + (term-white-inv-face ((t (:background "snow2")))) + (term-white-ul-face ((t (:underline t :background "snow2" :foreground "white")))) + (term-whitebg ((t (:background "white")))) + (term-yellow ((t (:foreground "yellow")))) + (term-yellow-bold-face ((t (:bold t :background "snow2" :foreground "yellow")))) + (term-yellow-face ((t (:foreground "yellow")))) + (term-yellow-inv-face ((t (:background "yellow")))) + (term-yellow-ul-face ((t (:underline t :background "snow2" :foreground "yellow")))) + (term-yellowbg ((t (:background "yellow")))) + (text-cursor ((t (:bold t :background "Red3" :foreground "gray80")))) + (toolbar ((t (:bold t :background "Gray80")))) + (underline ((t (:underline t :bold t)))) + (vc-annotate-face-0046FF ((t (nil)))) + (vcursor ((t (:underline t :background "cyan" :foreground "blue")))) + (vertical-divider ((t (:bold t :background "Gray80")))) + (vhdl-font-lock-attribute-face ((t (:foreground "Orchid")))) + (vhdl-font-lock-directive-face ((t (:foreground "CadetBlue")))) + (vhdl-font-lock-enumvalue-face ((t (:foreground "Gold4")))) + (vhdl-font-lock-function-face ((t (:foreground "Orchid4")))) + (vhdl-font-lock-generic-/constant-face ((t (nil)))) + (vhdl-font-lock-prompt-face ((t (:bold t :foreground "Red")))) + (vhdl-font-lock-reserved-words-face ((t (:bold t :foreground "Orange")))) + (vhdl-font-lock-translate-off-face ((t (:background "LightGray")))) + (vhdl-font-lock-type-face ((t (nil)))) + (vhdl-font-lock-variable-face ((t (nil)))) + (vhdl-speedbar-architecture-face ((t (:foreground "Blue")))) + (vhdl-speedbar-architecture-selected-face ((t (:underline t :foreground "Blue")))) + (vhdl-speedbar-configuration-face ((t (:foreground "DarkGoldenrod")))) + (vhdl-speedbar-configuration-selected-face ((t (:underline t :foreground "DarkGoldenrod")))) + (vhdl-speedbar-entity-face ((t (:foreground "ForestGreen")))) + (vhdl-speedbar-entity-selected-face ((t (:underline t :foreground "ForestGreen")))) + (vhdl-speedbar-instantiation-face ((t (:foreground "Brown")))) + (vhdl-speedbar-instantiation-selected-face ((t (:underline t :foreground "Brown")))) + (vhdl-speedbar-package-face ((t (:foreground "Grey50")))) + (vhdl-speedbar-package-selected-face ((t (:underline t :foreground "Grey50")))) + (vhdl-speedbar-subprogram-face ((t (nil)))) + (viper-minibuffer-emacs-face ((t (:background "darkseagreen2" :foreground "Black")))) + (viper-minibuffer-insert-face ((t (:background "pink" :foreground "Black")))) + (viper-minibuffer-vi-face ((t (:background "grey" :foreground "DarkGreen")))) + (viper-replace-overlay-face ((t (:background "darkseagreen2" :foreground "Black")))) + (viper-search-face ((t (:background "khaki" :foreground "Black")))) + (vm-xface ((t (:background "white" :foreground "black")))) + (vmpc-pre-sig-face ((t (:foreground "forestgreen")))) + (vmpc-sig-face ((t (:foreground "steelblue")))) + (vvb-face ((t (nil)))) + (w3m-anchor-face ((t (:bold t :foreground "DodgerBlue1")))) + (w3m-arrived-anchor-face ((t (:bold t :foreground "DodgerBlue3")))) + (w3m-header-line-location-content-face ((t (:background "dark olive green" :foreground "wheat")))) + (w3m-header-line-location-title-face ((t (:background "dark olive green" :foreground "beige")))) + (white ((t (:foreground "white")))) + (widget ((t (nil)))) + (widget-button-face ((t (:bold t)))) + (widget-button-pressed-face ((t (:bold t :foreground "red")))) + (widget-documentation-face ((t (:bold t :foreground "dark green")))) + (widget-field-face ((t (:bold t :background "gray85")))) + (widget-inactive-face ((t (:bold t :foreground "dim gray")))) + (widget-single-line-field-face ((t (:background "gray85")))) + (woman-bold-face ((t (:bold t)))) + (woman-italic-face ((t (:foreground "beige")))) + (woman-unknown-face ((t (:foreground "LightSalmon")))) + (x-face ((t (:bold t :background "white" :foreground "black")))) + (x-symbol-adobe-fontspecific-face ((t (nil)))) + (x-symbol-face ((t (nil)))) + (x-symbol-heading-face ((t (:bold t)))) + (x-symbol-info-face ((t (nil)))) + (x-symbol-invisible-face ((t (nil)))) + (x-symbol-revealed-face ((t (nil)))) + (xrdb-option-name-face ((t (:foreground "red")))) + (xref-keyword-face ((t (:foreground "blue")))) + (xref-list-default-face ((t (nil)))) + (xref-list-pilot-face ((t (:foreground "navy")))) + (xref-list-symbol-face ((t (:foreground "navy")))) + (yellow ((t (:bold t :foreground "yellow")))) + (zmacs-region ((t (:bold t :background "gray65"))))))) + +(defun color-theme-mistyday () + "Color theme by K.C. Hari Kumar, created 2001-06-13. +Black on mistyrose. Includes CUA, calendar, diary, font-latex and +font-lock. Uses backgrounds on some font-lock faces." + (interactive) + (color-theme-install + '(color-theme-mistyday + ((background-color . "mistyrose") + (background-mode . light) + (border-color . "black") + (cursor-color . "deep pink") + (foreground-color . "Black") + (mouse-color . "black")) + ((goto-address-mail-face . italic) + (goto-address-mail-mouse-face . secondary-selection) + (goto-address-url-face . bold) + (goto-address-url-mouse-face . highlight) + (list-matching-lines-face . bold) + (paren-match-face . paren-face-match) + (paren-mismatch-face . paren-face-mismatch) + (paren-no-match-face . paren-face-no-match)) + (default ((t (nil)))) + (CUA-global-mark-face ((t (:background "cyan" :foreground "black")))) + (CUA-rectangle-face ((t (:background "maroon" :foreground "white")))) + (CUA-rectangle-noselect-face ((t (:background "dimgray" :foreground "white")))) + (bold ((t (:bold t)))) + (bold-italic ((t (:italic t :bold t)))) + (calendar-today-face ((t (:underline t :background "Spring Green" :foreground "Brown")))) + (custom-button-face ((t (:background "dark slate grey" :foreground "azure")))) + (custom-documentation-face ((t (:background "white" :foreground "blue")))) + (diary-face ((t (:background "navy" :foreground "yellow")))) + (font-latex-bold-face ((t (:bold t :foreground "DarkOliveGreen")))) + (font-latex-italic-face ((t (:italic t :foreground "DarkOliveGreen")))) + (font-latex-math-face ((t (:foreground "navy")))) + (font-latex-sedate-face ((t (:foreground "DimGray")))) + (font-latex-string-face ((t (nil)))) + (font-latex-warning-face ((t (nil)))) + (font-lock-builtin-face ((t (:background "DarkTurquoise" :foreground "Navy")))) + (font-lock-comment-face ((t (:italic t :foreground "royal blue")))) + (font-lock-constant-face ((t (:background "pale green" :foreground "dark slate blue")))) + (font-lock-doc-string-face ((t (:background "medium aquamarine" :foreground "deep pink")))) + (font-lock-function-name-face ((t (:background "SpringGreen" :foreground "MidnightBlue")))) + (font-lock-keyword-face ((t (:foreground "dark magenta")))) + (font-lock-preprocessor-face ((t (:background "pale green" :foreground "dark slate blue")))) + (font-lock-reference-face ((t (:background "DarkTurquoise" :foreground "Navy")))) + (font-lock-string-face ((t (:background "medium aquamarine" :foreground "deep pink")))) + (font-lock-type-face ((t (:background "steel blue" :foreground "khaki")))) + (font-lock-variable-name-face ((t (:background "thistle" :foreground "orange red")))) + (font-lock-warning-face ((t (:background "LemonChiffon" :foreground "Red")))) + (highlight ((t (:background "dark slate grey" :foreground "light cyan")))) + (holiday-face ((t (:background "orangered" :foreground "lightyellow")))) + (ido-first-match-face ((t (:bold t)))) + (ido-only-match-face ((t (:foreground "ForestGreen")))) + (ido-subdir-face ((t (:foreground "red")))) + (italic ((t (:italic t)))) + (isearch ((t (:background "sienna" :foreground "light cyan")))) + (modeline ((t (:background "Royalblue4" :foreground "lawn green")))) + (modeline-buffer-id ((t (:background "Royalblue4" :foreground "lawn green")))) + (modeline-mousable ((t (:background "Royalblue4" :foreground "lawn green")))) + (modeline-mousable-minor-mode ((t (:background "Royalblue4" :foreground "lawn green")))) + (paren-face-match ((t (:background "turquoise")))) + (paren-face-mismatch ((t (:background "purple" :foreground "white")))) + (paren-face-no-match ((t (:background "yellow" :foreground "black")))) + (primary-selection ((t (:background "sienna" :foreground "light cyan")))) + (region ((t (:background "sienna" :foreground "light cyan")))) + (secondary-selection ((t (:background "forest green" :foreground "white smoke")))) + (underline ((t (:underline t)))) + (zmacs-region ((t (:background "sienna" :foreground "light cyan"))))))) + +(defun color-theme-marine () + "Color theme by Girish Bharadwaj, created 2001-06-22. +Matches the MS Windows Marine color theme. +Includes custom, font-lock, paren, widget." + (interactive) + (color-theme-install + '(color-theme-marine + ((background-color . "#9dcec9") + (background-mode . light) + (border-color . "black") + (cursor-color . "yellow") + (foreground-color . "darkslategray") + (mouse-color . "sienna1")) + ((buffers-tab-face . buffers-tab) + (gnus-mouse-face . highlight) + (smiley-mouse-face . highlight)) + (default ((t (nil)))) + (blue ((t (:foreground "blue")))) + (bold ((t (:bold t)))) + (bold-italic ((t (nil)))) + (border-glyph ((t (nil)))) + (buffers-tab ((t (:background "#9dcec9" :foreground "darkslategray")))) + (custom-button-face ((t (nil)))) + (custom-changed-face ((t (:background "blue" :foreground "white")))) + (custom-comment-face ((t (:background "gray85")))) + (custom-comment-tag-face ((t (:foreground "blue4")))) + (custom-documentation-face ((t (nil)))) + (custom-face-tag-face ((t (:underline t)))) + (custom-group-tag-face ((t (:underline t :foreground "blue")))) + (custom-group-tag-face-1 ((t (:underline t :foreground "deeppink")))) + (custom-invalid-face ((t (:background "red" :foreground "yellow")))) + (custom-modified-face ((t (:background "blue" :foreground "white")))) + (custom-rogue-face ((t (:background "black" :foreground "pink")))) + (custom-saved-face ((t (:underline t)))) + (custom-set-face ((t (:background "white" :foreground "blue")))) + (custom-state-face ((t (:foreground "darkgreen")))) + (custom-variable-button-face ((t (:underline t :bold t)))) + (custom-variable-tag-face ((t (:underline t :foreground "blue")))) + (display-time-mail-balloon-enhance-face ((t (:background "orange")))) + (display-time-mail-balloon-gnus-group-face ((t (:foreground "blue")))) + (display-time-time-balloon-face ((t (:foreground "red")))) + (font-lock-builtin-face ((t (:foreground "SteelBlue")))) + (font-lock-comment-face ((t (:foreground "cadetblue")))) + (font-lock-constant-face ((t (:foreground "OrangeRed")))) + (font-lock-doc-string-face ((t (:foreground "Salmon")))) + (font-lock-function-name-face ((t (:bold t :foreground "NavyBlue")))) + (font-lock-keyword-face ((t (:bold t :foreground "purple")))) + (font-lock-preprocessor-face ((t (:foreground "SteelBlue")))) + (font-lock-reference-face ((t (:foreground "SteelBlue")))) + (font-lock-string-face ((t (:foreground "royalblue")))) + (font-lock-type-face ((t (:foreground "darkmagenta")))) + (font-lock-variable-name-face ((t (:foreground "violetred")))) + (font-lock-warning-face ((t (:bold t :foreground "red")))) + (green ((t (:foreground "green")))) + (gui-button-face ((t (:background "grey75" :foreground "black")))) + (gui-element ((t (:background "#489088" :foreground "black")))) + (highlight ((t (:background "darkolivegreen" :foreground "white")))) + (isearch ((t (:background "blue")))) + (isearch-secondary ((t (:foreground "red3")))) + (italic ((t (nil)))) + (left-margin ((t (nil)))) + (list-mode-item-selected ((t (:background "gray68" :foreground "darkslategray")))) + (modeline ((t (:background "black" :foreground "white")))) + (modeline-buffer-id ((t (:background "black" :foreground "white")))) + (modeline-mousable ((t (:background "black" :foreground "white")))) + (modeline-mousable-minor-mode ((t (:background "black" :foreground "white")))) + (paren-blink-off ((t (:foreground "black")))) + (paren-match ((t (:background "darkolivegreen" :foreground "white")))) + (paren-mismatch ((t (:background "#9dcec9" :foreground "darkslategray")))) + (pointer ((t (nil)))) + (primary-selection ((t (:background "blue")))) + (red ((t (:foreground "red")))) + (region ((t (:background "blue")))) + (right-margin ((t (nil)))) + (secondary-selection ((t (:background "darkslateblue" :foreground "white")))) + (template-message-face ((t (:bold t)))) + (text-cursor ((t (:background "yellow" :foreground "#9dcec9")))) + (toolbar ((t (nil)))) + (underline ((t (:underline t)))) + (vertical-divider ((t (nil)))) + (widget ((t (nil)))) + (widget-button-face ((t (:bold t)))) + (widget-button-pressed-face ((t (:foreground "red")))) + (widget-documentation-face ((t (:foreground "forestgreen")))) + (widget-field-face ((t (:background "gray")))) + (widget-inactive-face ((t (:foreground "dimgray")))) + (widget-single-line-field-face ((t (:background "dim gray" :foreground "white")))) + (yellow ((t (:foreground "yellow")))) + (zmacs-region ((t (:background "blue"))))))) + +(defun color-theme-blue-erc () + "Color theme for erc faces only. +This is intended for other color themes to use (eg. `color-theme-gnome2')." + (color-theme-install + '(color-theme-blue-erc + nil + (erc-action-face ((t (nil)))) + (erc-bold-face ((t (:bold t)))) + (erc-current-nick-face ((t (:bold t :foreground "yellow")))) + (erc-default-face ((t (nil)))) + (erc-direct-msg-face ((t (:foreground "pale green")))) + (erc-error-face ((t (:bold t :foreground "IndianRed")))) + (erc-highlight-face ((t (:bold t :foreground "pale green")))) + (erc-input-face ((t (:foreground "light blue")))) + (erc-inverse-face ((t (:background "steel blue")))) + (erc-keyword-face ((t (:foreground "orange" :bold t)))) + (erc-notice-face ((t (:foreground "light salmon")))) + (erc-notice-face ((t (:foreground "MediumAquamarine")))) + (erc-pal-face ((t (:foreground "pale green")))) + (erc-prompt-face ((t (:foreground "light blue" :bold t)))) + (fg:erc-color-face0 ((t (:foreground "white")))) + (fg:erc-color-face1 ((t (:foreground "beige")))) + (fg:erc-color-face2 ((t (:foreground "lemon chiffon")))) + (fg:erc-color-face3 ((t (:foreground "light cyan")))) + (fg:erc-color-face4 ((t (:foreground "powder blue")))) + (fg:erc-color-face5 ((t (:foreground "sky blue")))) + (fg:erc-color-face6 ((t (:foreground "dark sea green")))) + (fg:erc-color-face7 ((t (:foreground "pale green")))) + (fg:erc-color-face8 ((t (:foreground "medium spring green")))) + (fg:erc-color-face9 ((t (:foreground "khaki")))) + (fg:erc-color-face10 ((t (:foreground "pale goldenrod")))) + (fg:erc-color-face11 ((t (:foreground "light goldenrod yellow")))) + (fg:erc-color-face12 ((t (:foreground "light yellow")))) + (fg:erc-color-face13 ((t (:foreground "yellow")))) + (fg:erc-color-face14 ((t (:foreground "light goldenrod")))) + (fg:erc-color-face15 ((t (:foreground "lime green")))) + (bg:erc-color-face0 ((t (nil)))) + (bg:erc-color-face1 ((t (nil)))) + (bg:erc-color-face2 ((t (nil)))) + (bg:erc-color-face3 ((t (nil)))) + (bg:erc-color-face4 ((t (nil)))) + (bg:erc-color-face5 ((t (nil)))) + (bg:erc-color-face6 ((t (nil)))) + (bg:erc-color-face7 ((t (nil)))) + (bg:erc-color-face8 ((t (nil)))) + (bg:erc-color-face9 ((t (nil)))) + (bg:erc-color-face10 ((t (nil)))) + (bg:erc-color-face11 ((t (nil)))) + (bg:erc-color-face12 ((t (nil)))) + (bg:erc-color-face13 ((t (nil)))) + (bg:erc-color-face14 ((t (nil)))) + (bg:erc-color-face15 ((t (nil))))))) + +(defun color-theme-dark-erc () + "Color theme for erc faces only. +This is intended for other color themes to use (eg. `color-theme-late-night')." + (interactive) + (color-theme-install + '(color-theme-dark-erc + nil + (erc-action-face ((t (nil)))) + (erc-bold-face ((t (:bold t)))) + (erc-current-nick-face ((t (:bold t)))) + (erc-default-face ((t (nil)))) + (erc-direct-msg-face ((t (nil)))) + (erc-error-face ((t (:bold t :foreground "IndianRed")))) + (erc-highlight-face ((t (:bold t :foreground "pale green")))) + (erc-input-face ((t (:foreground "#555")))) + (erc-inverse-face ((t (:background "steel blue")))) + (erc-keyword-face ((t (:foreground "#999" :bold t)))) + (erc-nick-msg-face ((t (:foreground "#888")))) + (erc-notice-face ((t (:foreground "#444")))) + (erc-pal-face ((t (:foreground "#888")))) + (erc-prompt-face ((t (:foreground "#777" :bold t)))) + (erc-timestamp-face ((t (:foreground "#777" :bold t)))) + (fg:erc-color-face0 ((t (:foreground "white")))) + (fg:erc-color-face1 ((t (:foreground "beige")))) + (fg:erc-color-face2 ((t (:foreground "lemon chiffon")))) + (fg:erc-color-face3 ((t (:foreground "light cyan")))) + (fg:erc-color-face4 ((t (:foreground "powder blue")))) + (fg:erc-color-face5 ((t (:foreground "sky blue")))) + (fg:erc-color-face6 ((t (:foreground "dark sea green")))) + (fg:erc-color-face7 ((t (:foreground "pale green")))) + (fg:erc-color-face8 ((t (:foreground "medium spring green")))) + (fg:erc-color-face9 ((t (:foreground "khaki")))) + (fg:erc-color-face10 ((t (:foreground "pale goldenrod")))) + (fg:erc-color-face11 ((t (:foreground "light goldenrod yellow")))) + (fg:erc-color-face12 ((t (:foreground "light yellow")))) + (fg:erc-color-face13 ((t (:foreground "yellow")))) + (fg:erc-color-face14 ((t (:foreground "light goldenrod")))) + (fg:erc-color-face15 ((t (:foreground "lime green")))) + (bg:erc-color-face0 ((t (nil)))) + (bg:erc-color-face1 ((t (nil)))) + (bg:erc-color-face2 ((t (nil)))) + (bg:erc-color-face3 ((t (nil)))) + (bg:erc-color-face4 ((t (nil)))) + (bg:erc-color-face5 ((t (nil)))) + (bg:erc-color-face6 ((t (nil)))) + (bg:erc-color-face7 ((t (nil)))) + (bg:erc-color-face8 ((t (nil)))) + (bg:erc-color-face9 ((t (nil)))) + (bg:erc-color-face10 ((t (nil)))) + (bg:erc-color-face11 ((t (nil)))) + (bg:erc-color-face12 ((t (nil)))) + (bg:erc-color-face13 ((t (nil)))) + (bg:erc-color-face14 ((t (nil)))) + (bg:erc-color-face15 ((t (nil))))))) + +(defun color-theme-subtle-blue () + "Color theme by Chris McMahan, created 2001-09-06. +Light blue background. Includes bbdb, comint, cperl, custom, cvs, +diary, dired, display-time, ecb, ediff, erc, eshell, font-lock, +gnus, html-helper, info, isearch, jde, message, paren, semantic, +sgml, speedbar, term, vhdl, viper, vm, widget, woman, xref, xxml." + (interactive) + (color-theme-install + '(color-theme-subtle-blue + ((background-color . "#65889C") + (background-mode . dark) + (background-toolbar-color . "#cf3ccf3ccf3c") + (border-color . "black") + (bottom-toolbar-shadow-color . "#79e77df779e7") + (cursor-color . "white") + (foreground-color . "#eedfcc") + (mouse-color . "Grey") + (top-toolbar-shadow-color . "#fffffbeeffff") + (viper-saved-cursor-color-in-replace-mode . "Red3")) + ((blank-space-face . blank-space-face) + (blank-tab-face . blank-tab-face) + (ecb-source-in-directories-buffer-face . ecb-sources-face) + (gnus-mouse-face . highlight) + (list-matching-lines-face . bold) + (view-highlight-face . highlight) + (vm-highlight-url-face . my-url-face) + (vm-highlighted-header-face . my-url-face) + (vm-mime-button-face . gui-button-face) + (vm-summary-highlight-face . my-summary-highlight-face)) + (default ((t (nil)))) + (bbdb-company ((t (:italic t)))) + (bbdb-field-name ((t (:bold t :foreground "MediumAquamarine")))) + (bbdb-field-value ((t (nil)))) + (bbdb-name ((t (:underline t)))) + (blank-space-face ((t (:background "gray80")))) + (blank-tab-face ((t (:background "LightBlue" :foreground "DarkSlateGray")))) + (blue ((t (:foreground "blue")))) + (bold ((t (:bold t :foreground "MediumAquamarine")))) + (bold-italic ((t (:italic t :bold t :foreground "SkyBlue")))) + (border ((t (:background "black")))) + (border-glyph ((t (nil)))) + (calendar-today-face ((t (:underline t)))) + (comint-highlight-input ((t (:bold t)))) + (comint-highlight-prompt ((t (:foreground "cyan")))) + (comint-input-face ((t (:foreground "deepskyblue")))) + (cperl-array-face ((t (:bold t :foreground "Yellow")))) + (cperl-hash-face ((t (:italic t :bold t :foreground "White")))) + (cperl-nonoverridable-face ((t (:foreground "SkyBlue")))) + (cursor ((t (:background "white")))) + (custom-button-face ((t (:underline t :bold t :foreground "MediumAquaMarine")))) + (custom-button-pressed-face ((t (:background "lightgrey" :foreground "black")))) + (custom-changed-face ((t (:background "blue" :foreground "white")))) + (custom-comment-face ((t (:background "dim gray")))) + (custom-comment-tag-face ((t (:foreground "gray80")))) + (custom-documentation-face ((t (:foreground "Grey")))) + (custom-face-tag-face ((t (:underline t)))) + (custom-group-tag-face ((t (:bold t :foreground "MediumAquamarine")))) + (custom-group-tag-face-1 ((t (:foreground "MediumAquaMarine")))) + (custom-invalid-face ((t (:background "red" :foreground "yellow")))) + (custom-modified-face ((t (:background "blue" :foreground "white")))) + (custom-rogue-face ((t (:background "black" :foreground "pink")))) + (custom-saved-face ((t (:underline t)))) + (custom-set-face ((t (:background "white" :foreground "blue")))) + (custom-state-face ((t (:foreground "yellow")))) + (custom-variable-button-face ((t (:underline t :bold t)))) + (custom-variable-tag-face ((t (:bold t :foreground "Aquamarine")))) + (cvs-filename-face ((t (:foreground "blue4")))) + (cvs-handled-face ((t (:foreground "pink")))) + (cvs-header-face ((t (:bold t :foreground "blue4")))) + (cvs-marked-face ((t (:bold t :foreground "green3")))) + (cvs-msg-face ((t (:italic t)))) + (cvs-need-action-face ((t (:foreground "orange")))) + (cvs-unknown-face ((t (:foreground "red")))) + (diary-face ((t (:bold t :foreground "cyan")))) + (dired-face-boring ((t (:foreground "Gray65")))) + (dired-face-directory ((t (:bold t :foreground "sky blue")))) + (dired-face-executable ((t (:foreground "MediumAquaMarine")))) + (dired-face-flagged ((t (:foreground "Cyan")))) + (dired-face-marked ((t (:foreground "cyan")))) + (dired-face-permissions ((t (:foreground "aquamarine")))) + (dired-face-setuid ((t (:foreground "LightSalmon")))) + (dired-face-socket ((t (:foreground "LightBlue")))) + (dired-face-symlink ((t (:foreground "gray95")))) + (display-time-mail-balloon-enhance-face ((t (:background "orange")))) + (display-time-mail-balloon-gnus-group-face ((t (:foreground "blue")))) + (display-time-time-balloon-face ((t (:foreground "red")))) + (ecb-sources-face ((t (:foreground "LightBlue1")))) + (ediff-current-diff-face-A ((t (:background "pale green" :foreground "firebrick")))) + (ediff-current-diff-face-Ancestor ((t (:background "VioletRed" :foreground "Black")))) + (ediff-current-diff-face-B ((t (:background "Yellow" :foreground "DarkOrchid")))) + (ediff-current-diff-face-C ((t (:background "indianred" :foreground "white")))) + (ediff-even-diff-face-A ((t (:background "light gray" :foreground "Black")))) + (ediff-even-diff-face-Ancestor ((t (:background "Gray" :foreground "White")))) + (ediff-even-diff-face-B ((t (:background "Gray" :foreground "White")))) + (ediff-even-diff-face-C ((t (:background "light gray" :foreground "Black")))) + (ediff-fine-diff-face-A ((t (:background "sky blue" :foreground "Navy")))) + (ediff-fine-diff-face-Ancestor ((t (:background "Green" :foreground "Black")))) + (ediff-fine-diff-face-B ((t (:background "cyan" :foreground "Black")))) + (ediff-fine-diff-face-C ((t (:background "Turquoise" :foreground "Black")))) + (ediff-odd-diff-face-A ((t (:background "Gray" :foreground "White")))) + (ediff-odd-diff-face-Ancestor ((t (:background "light gray" :foreground "Black")))) + (ediff-odd-diff-face-B ((t (:background "light gray" :foreground "Black")))) + (ediff-odd-diff-face-C ((t (:background "Gray" :foreground "White")))) + (erc-action-face ((t (:bold t)))) + (erc-bold-face ((t (:bold t)))) + (erc-default-face ((t (nil)))) + (erc-direct-msg-face ((t (:foreground "LightSalmon")))) + (erc-error-face ((t (:bold t :foreground "yellow")))) + (erc-input-face ((t (:foreground "Beige")))) + (erc-inverse-face ((t (:background "wheat" :foreground "darkslategrey")))) + (erc-notice-face ((t (:foreground "MediumAquamarine")))) + (erc-pal-face ((t (:foreground "PaleGreen")))) + (erc-prompt-face ((t (:foreground "MediumAquamarine")))) + (erc-underline-face ((t (:underline t)))) + (eshell-ls-archive-face ((t (:bold t :foreground "wheat")))) + (eshell-ls-backup-face ((t (:foreground "Grey")))) + (eshell-ls-clutter-face ((t (:bold t :foreground "wheat")))) + (eshell-ls-directory-face ((t (:bold t :foreground "Yellow")))) + (eshell-ls-executable-face ((t (:bold t :foreground "wheat")))) + (eshell-ls-missing-face ((t (:bold t :foreground "wheat")))) + (eshell-ls-picture-face ((t (:foreground "wheat")))) + (eshell-ls-product-face ((t (:foreground "wheat")))) + (eshell-ls-readonly-face ((t (:foreground "wheat")))) + (eshell-ls-special-face ((t (:bold t :foreground "wheat")))) + (eshell-ls-symlink-face ((t (:bold t :foreground "White")))) + (eshell-ls-text-face ((t (:foreground "wheat")))) + (eshell-ls-todo-face ((t (:foreground "wheat")))) + (eshell-ls-unreadable-face ((t (:foreground "wheat3")))) + (eshell-prompt-face ((t (:bold t :foreground "PaleGreen")))) + (eshell-test-failed-face ((t (:bold t :foreground "OrangeRed")))) + (eshell-test-ok-face ((t (:bold t :foreground "Green")))) + (excerpt ((t (:italic t)))) + (ff-paths-non-existant-file-face ((t (:bold t :foreground "NavyBlue")))) + (flyspell-duplicate-face ((t (:underline t :bold t :foreground "Gold3")))) + (flyspell-incorrect-face ((t (:underline t :bold t :foreground "OrangeRed")))) + (font-latex-italic-face ((t (nil)))) + (font-latex-math-face ((t (nil)))) + (font-latex-sedate-face ((t (:foreground "Gray85")))) + (font-latex-string-face ((t (:foreground "orange")))) + (font-latex-warning-face ((t (:foreground "gold")))) + (font-lock-builtin-face ((t (:foreground "PaleGreen")))) + (font-lock-comment-face ((t (:italic t :foreground "Wheat3")))) + (font-lock-constant-face ((t (:foreground "LightBlue")))) + (font-lock-doc-face ((t (:bold t :foreground "DarkSeaGreen")))) + (font-lock-doc-string-face ((t (:bold t :foreground "DarkSeaGreen")))) + (font-lock-exit-face ((t (:foreground "green")))) + (font-lock-function-name-face ((t (:italic t :bold t :foreground "cyan")))) + (font-lock-keyword-face ((t (:bold t :foreground "LightBlue")))) + (font-lock-preprocessor-face ((t (:foreground "blue3")))) + (font-lock-reference-face ((t (:foreground "PaleGreen")))) + (font-lock-string-face ((t (:italic t :foreground "MediumAquamarine")))) + (font-lock-type-face ((t (:bold t :foreground "LightBlue")))) + (font-lock-variable-name-face ((t (:italic t :bold t :foreground "LightBlue")))) + (font-lock-warning-face ((t (:bold t :foreground "LightSalmon")))) + (fringe ((t (:background "darkslategrey")))) + (gnus-cite-attribution-face ((t (:italic t :bold t)))) + (gnus-cite-face-1 ((t (:foreground "LightBlue")))) + (gnus-cite-face-10 ((t (:foreground "LightBlue")))) + (gnus-cite-face-11 ((t (:foreground "LightBlue")))) + (gnus-cite-face-2 ((t (:foreground "LightBlue")))) + (gnus-cite-face-3 ((t (:foreground "LightBlue")))) + (gnus-cite-face-4 ((t (:foreground "LightBlue")))) + (gnus-cite-face-5 ((t (:foreground "LightBlue")))) + (gnus-cite-face-6 ((t (:foreground "LightBlue")))) + (gnus-cite-face-7 ((t (:foreground "LightBlue")))) + (gnus-cite-face-8 ((t (:foreground "LightBlue")))) + (gnus-cite-face-9 ((t (:foreground "LightBlue")))) + (gnus-emphasis-bold ((t (:bold t)))) + (gnus-emphasis-bold-italic ((t (:italic t :bold t)))) + (gnus-emphasis-highlight-words ((t (:background "black" :foreground "yellow")))) + (gnus-emphasis-italic ((t (:italic t)))) + (gnus-emphasis-underline ((t (:underline t)))) + (gnus-emphasis-underline-bold ((t (:underline t :bold t)))) + (gnus-emphasis-underline-bold-italic ((t (:underline t :italic t :bold t)))) + (gnus-emphasis-underline-italic ((t (:underline t :italic t)))) + (gnus-filterhist-face-1 ((t (nil)))) + (gnus-group-mail-1-empty-face ((t (:foreground "gray80")))) + (gnus-group-mail-1-face ((t (:bold t :foreground "light cyan")))) + (gnus-group-mail-2-empty-face ((t (:foreground "gray80")))) + (gnus-group-mail-2-face ((t (:bold t :foreground "turquoise")))) + (gnus-group-mail-3-empty-face ((t (:foreground "gray80")))) + (gnus-group-mail-3-face ((t (:bold t :foreground "LightBlue")))) + (gnus-group-mail-low-empty-face ((t (:foreground "gray80")))) + (gnus-group-mail-low-face ((t (:bold t :foreground "LightBlue")))) + (gnus-group-news-1-empty-face ((t (:foreground "gray80")))) + (gnus-group-news-1-face ((t (:bold t :foreground "green yellow")))) + (gnus-group-news-2-empty-face ((t (:foreground "gray80")))) + (gnus-group-news-2-face ((t (:bold t :foreground "Aquamarine")))) + (gnus-group-news-3-empty-face ((t (:foreground "gray80")))) + (gnus-group-news-3-face ((t (:bold t :foreground "LightBlue")))) + (gnus-group-news-4-empty-face ((t (:foreground "gray80")))) + (gnus-group-news-4-face ((t (:bold t :foreground "Wheat")))) + (gnus-group-news-5-empty-face ((t (:foreground "gray80")))) + (gnus-group-news-5-face ((t (:bold t :foreground "MediumAquamarine")))) + (gnus-group-news-6-empty-face ((t (:foreground "gray80")))) + (gnus-group-news-6-face ((t (:bold t :foreground "MediumAquamarine")))) + (gnus-group-news-low-empty-face ((t (:foreground "gray80")))) + (gnus-group-news-low-face ((t (:bold t :foreground "yellow green")))) + (gnus-header-content-face ((t (:italic t :foreground "LightSkyBlue3")))) + (gnus-header-from-face ((t (:bold t :foreground "light cyan")))) + (gnus-header-name-face ((t (:bold t :foreground "LightBlue")))) + (gnus-header-newsgroups-face ((t (:italic t :bold t :foreground "LightSkyBlue3")))) + (gnus-header-subject-face ((t (:bold t :foreground "light cyan")))) + (gnus-picons-face ((t (:background "white" :foreground "black")))) + (gnus-picons-xbm-face ((t (:background "white" :foreground "black")))) + (gnus-signature-face ((t (:italic t :foreground "LightBlue")))) + (gnus-splash ((t (:foreground "Brown")))) + (gnus-splash-face ((t (:foreground "LightBlue")))) + (gnus-summary-cancelled-face ((t (:background "black" :foreground "gray80")))) + (gnus-summary-high-ancient-face ((t (:bold t :foreground "LightBlue")))) + (gnus-summary-high-read-face ((t (:bold t :foreground "gray80")))) + (gnus-summary-high-ticked-face ((t (:bold t :foreground "burlywood")))) + (gnus-summary-high-unread-face ((t (:italic t :bold t :foreground "wheat")))) + (gnus-summary-low-ancient-face ((t (:italic t :foreground "LightBlue")))) + (gnus-summary-low-read-face ((t (:italic t :foreground "light sea green")))) + (gnus-summary-low-ticked-face ((t (:italic t :bold t :foreground "LightBlue")))) + (gnus-summary-low-unread-face ((t (:italic t :foreground "light sea green")))) + (gnus-summary-normal-ancient-face ((t (:foreground "gray80")))) + (gnus-summary-normal-read-face ((t (:foreground "gray80")))) + (gnus-summary-normal-ticked-face ((t (:bold t :foreground "sandy brown")))) + (gnus-summary-normal-unread-face ((t (:bold t :foreground "wheat")))) + (gnus-summary-selected-face ((t (:underline t)))) + (gnus-x-face ((t (:background "white" :foreground "black")))) + (green ((t (:foreground "green")))) + (gui-button-face ((t (:background "cyan" :foreground "#65889C")))) + (gui-element ((t (:background "Gray")))) + (header-line ((t (:background "grey20" :foreground "grey90")))) + (highlight ((t (:background "PaleGreen" :foreground "DarkGreen")))) + (highlight-changes-delete-face ((t (:underline t :foreground "red")))) + (highlight-changes-face ((t (:foreground "red")))) + (highline-face ((t (:background "SeaGreen")))) + (holiday-face ((t (:background "DimGray")))) + (html-helper-bold-face ((t (:foreground "DarkRed")))) + (html-helper-italic-face ((t (:foreground "DarkBlue")))) + (html-helper-underline-face ((t (:underline t :foreground "Black")))) + (html-tag-face ((t (:foreground "Blue")))) + (info-menu-5 ((t (:underline t)))) + (info-node ((t (:underline t :italic t :bold t :foreground "light blue")))) + (info-xref ((t (:bold t :foreground "light blue")))) + (isearch ((t (:background "Aquamarine" :foreground "SteelBlue")))) + (isearch-lazy-highlight-face ((t (:background "paleturquoise4")))) + (isearch-secondary ((t (:foreground "red3")))) + (italic ((t (:italic t)))) + (jde-bug-breakpoint-cursor ((t (:background "brown" :foreground "cyan")))) + (jde-bug-breakpoint-marker ((t (:background "yellow" :foreground "red")))) + (jde-java-font-lock-api-face ((t (:foreground "LightBlue")))) + (jde-java-font-lock-bold-face ((t (:bold t)))) + (jde-java-font-lock-code-face ((t (nil)))) + (jde-java-font-lock-constant-face ((t (:foreground "LightBlue")))) + (jde-java-font-lock-doc-tag-face ((t (:foreground "LightBlue")))) + (jde-java-font-lock-italic-face ((t (:italic t)))) + (jde-java-font-lock-link-face ((t (:underline t :foreground "LightBlue")))) + (jde-java-font-lock-modifier-face ((t (:foreground "LightBlue")))) + (jde-java-font-lock-number-face ((t (:foreground "LightBlue")))) + (jde-java-font-lock-package-face ((t (:foreground "LightBlue")))) + (jde-java-font-lock-pre-face ((t (nil)))) + (jde-java-font-lock-underline-face ((t (:underline t)))) + (lazy-highlight-face ((t (:bold t :foreground "dark magenta")))) + (left-margin ((t (nil)))) + (linemenu-face ((t (:background "gray30")))) + (list-mode-item-selected ((t (nil)))) + (makefile-space-face ((t (:background "hotpink")))) + (menu ((t (:background "wheat" :foreground "gray30")))) + (message-cited-text-face ((t (:foreground "White")))) + (message-header-cc-face ((t (:bold t :foreground "light cyan")))) + (message-header-name-face ((t (:foreground "LightBlue")))) + (message-header-newsgroups-face ((t (:italic t :bold t :foreground "LightSkyBlue3")))) + (message-header-other-face ((t (:foreground "LightSkyBlue3")))) + (message-header-subject-face ((t (:bold t :foreground "light cyan")))) + (message-header-to-face ((t (:bold t :foreground "light cyan")))) + (message-header-xheader-face ((t (:foreground "LightBlue")))) + (message-mml-face ((t (:bold t :foreground "LightBlue")))) + (message-separator-face ((t (:foreground "LightBlue")))) + (mmm-default-submode-face ((t (:background "#c0c0c5")))) + (modeline ((t (:background "#4f657d" :foreground "gray80")))) + (modeline-buffer-id ((t (:background "#4f657d" :foreground "gray80")))) + (modeline-mousable ((t (:background "#4f657d" :foreground "gray80")))) + (modeline-mousable-minor-mode ((t (:background "#4f657d" :foreground "gray80")))) + (mouse ((t (:background "Grey")))) + (my-summary-highlight-face ((t (:foreground "White")))) + (my-url-face ((t (:foreground "PaleTurquoise")))) + (nil ((t (nil)))) + (paren-blink-off ((t (:foreground "gray")))) + (paren-face-match ((t (:background "turquoise")))) + (paren-face-mismatch ((t (:background "purple" :foreground "white")))) + (paren-face-no-match ((t (:background "yellow" :foreground "black")))) + (paren-match ((t (:background "darkseagreen2")))) + (paren-mismatch ((t (:background "DeepPink" :foreground "black")))) + (paren-mismatch-face ((t (:bold t)))) + (paren-no-match-face ((t (:bold t)))) + (pointer ((t (nil)))) + (primary-selection ((t (:background "gray65")))) + (red ((t (:foreground "red")))) + (region ((t (:background "CadetBlue" :foreground "gray80")))) + (right-margin ((t (nil)))) + (scroll-bar ((t (nil)))) + (secondary-selection ((t (:background "LightBlue" :foreground "#4f657d")))) + (semantic-dirty-token-face ((t (:background "gray10")))) + (semantic-intangible-face ((t (:foreground "gray25")))) + (semantic-read-only-face ((t (:background "gray25")))) + (senator-intangible-face ((t (:foreground "gray75")))) + (senator-momentary-highlight-face ((t (:background "gray80")))) + (senator-read-only-face ((t (:background "#664444")))) + (sgml-comment-face ((t (:foreground "dark turquoise")))) + (sgml-doctype-face ((t (:foreground "red")))) + (sgml-end-tag-face ((t (:foreground "blue")))) + (sgml-entity-face ((t (:foreground "magenta")))) + (sgml-ignored-face ((t (:background "gray60" :foreground "gray40")))) + (sgml-ms-end-face ((t (:foreground "green")))) + (sgml-ms-start-face ((t (:foreground "yellow")))) + (sgml-pi-face ((t (:foreground "lime green")))) + (sgml-sgml-face ((t (:foreground "brown")))) + (sgml-short-ref-face ((t (:foreground "deep sky blue")))) + (sgml-start-tag-face ((t (:foreground "dark green")))) + (shell-option-face ((t (:foreground "blue")))) + (shell-output-2-face ((t (:foreground "darkseagreen")))) + (shell-output-3-face ((t (:foreground "slategray")))) + (shell-output-face ((t (:foreground "palegreen")))) + (shell-prompt-face ((t (:foreground "red")))) + (show-paren-match-face ((t (:background "Aquamarine" :foreground "steel blue")))) + (show-paren-mismatch-face ((t (:bold t :background "IndianRed" :foreground "White")))) + (speedbar-button-face ((t (:bold t :foreground "LightBlue")))) + (speedbar-directory-face ((t (:bold t :foreground "yellow")))) + (speedbar-file-face ((t (:bold t :foreground "wheat")))) + (speedbar-highlight-face ((t (:background "sea green")))) + (speedbar-selected-face ((t (:underline t)))) + (speedbar-tag-face ((t (:foreground "LightBlue")))) + (swbuff-current-buffer-face ((t (:bold t :foreground "red")))) + (template-message-face ((t (:bold t)))) + (term-black ((t (:foreground "black")))) + (term-blackbg ((t (:background "black")))) + (term-blue ((t (:foreground "blue")))) + (term-bluebg ((t (:background "blue")))) + (term-bold ((t (:bold t)))) + (term-cyan ((t (:foreground "cyan")))) + (term-cyanbg ((t (:background "cyan")))) + (term-default-bg ((t (nil)))) + (term-default-bg-inv ((t (nil)))) + (term-default-fg ((t (nil)))) + (term-default-fg-inv ((t (nil)))) + (term-green ((t (:foreground "green")))) + (term-greenbg ((t (:background "green")))) + (term-invisible ((t (nil)))) + (term-invisible-inv ((t (nil)))) + (term-magenta ((t (:foreground "magenta")))) + (term-magentabg ((t (:background "magenta")))) + (term-red ((t (:foreground "red")))) + (term-redbg ((t (:background "red")))) + (term-underline ((t (:underline t)))) + (term-white ((t (:foreground "white")))) + (term-whitebg ((t (:background "white")))) + (term-yellow ((t (:foreground "yellow")))) + (term-yellowbg ((t (:background "yellow")))) + (text-cursor ((t (:background "Red3" :foreground "white")))) + (tool-bar ((t (:background "grey75" :foreground "black")))) + (toolbar ((t (:background "Gray")))) + (trailing-whitespace ((t (:background "red")))) + (underline ((t (:underline t)))) + (variable-pitch ((t (nil)))) + (vc-annotate-face-0046FF ((t (:background "black" :foreground "wheat")))) + (vcursor ((t (:underline t :background "cyan" :foreground "blue")))) + (vertical-divider ((t (:background "Gray")))) + (vhdl-font-lock-attribute-face ((t (:foreground "Orchid")))) + (vhdl-font-lock-directive-face ((t (:foreground "CadetBlue")))) + (vhdl-font-lock-enumvalue-face ((t (:foreground "Gold4")))) + (vhdl-font-lock-function-face ((t (:foreground "Orchid4")))) + (vhdl-font-lock-prompt-face ((t (:bold t :foreground "Red")))) + (vhdl-font-lock-reserved-words-face ((t (:bold t :foreground "Orange")))) + (vhdl-font-lock-translate-off-face ((t (:background "LightGray")))) + (vhdl-speedbar-architecture-face ((t (:foreground "Blue")))) + (vhdl-speedbar-architecture-selected-face ((t (:underline t :foreground "Blue")))) + (vhdl-speedbar-configuration-face ((t (:foreground "DarkGoldenrod")))) + (vhdl-speedbar-configuration-selected-face ((t (:underline t :foreground "DarkGoldenrod")))) + (vhdl-speedbar-entity-face ((t (:foreground "ForestGreen")))) + (vhdl-speedbar-entity-selected-face ((t (:underline t :foreground "ForestGreen")))) + (vhdl-speedbar-instantiation-face ((t (:foreground "Brown")))) + (vhdl-speedbar-instantiation-selected-face ((t (:underline t :foreground "Brown")))) + (vhdl-speedbar-package-face ((t (:foreground "Gray50")))) + (vhdl-speedbar-package-selected-face ((t (:underline t :foreground "Gray50")))) + (viper-minibuffer-emacs-face ((t (:background "darkseagreen2" :foreground "Black")))) + (viper-minibuffer-insert-face ((t (:background "pink" :foreground "Black")))) + (viper-minibuffer-vi-face ((t (:background "gray" :foreground "DarkGreen")))) + (viper-replace-overlay-face ((t (:background "darkseagreen2" :foreground "Black")))) + (viper-search-face ((t (:background "khaki" :foreground "Black")))) + (vm-header-content-face ((t (:italic t :foreground "gray80")))) + (vm-header-from-face ((t (:italic t :background "#65889C" :foreground "cyan")))) + (vm-header-name-face ((t (:foreground "cyan")))) + (vm-header-subject-face ((t (:foreground "cyan")))) + (vm-header-to-face ((t (:italic t :foreground "cyan")))) + (vm-message-cited-face ((t (:foreground "Gray80")))) + (vm-summary-face-1 ((t (:foreground "MediumAquamarine")))) + (vm-summary-face-2 ((t (:foreground "MediumAquamarine")))) + (vm-summary-face-3 ((t (:foreground "MediumAquamarine")))) + (vm-summary-face-4 ((t (:foreground "MediumAquamarine")))) + (vm-summary-highlight-face ((t (:foreground "White")))) + (vmpc-pre-sig-face ((t (:foreground "Aquamarine")))) + (vmpc-sig-face ((t (:foreground "LightBlue")))) + (vvb-face ((t (:background "pink" :foreground "black")))) + (widget-button-face ((t (:bold t)))) + (widget-button-pressed-face ((t (:foreground "cyan")))) + (widget-documentation-face ((t (:foreground "LightBlue")))) + (widget-field-face ((t (:foreground "LightBlue")))) + (widget-inactive-face ((t (:foreground "Wheat3")))) + (widget-single-line-field-face ((t (:foreground "LightBlue")))) + (woman-bold-face ((t (:bold t)))) + (woman-italic-face ((t (:foreground "beige")))) + (woman-unknown-face ((t (:foreground "LightSalmon")))) + (xref-keyword-face ((t (:foreground "Cyan")))) + (xref-list-pilot-face ((t (:foreground "navy")))) + (xref-list-symbol-face ((t (:foreground "navy")))) + (xxml-emph-1-face ((t (:background "lightyellow")))) + (xxml-emph-2-face ((t (:background "lightyellow")))) + (xxml-header-1-face ((t (:background "seashell1" :foreground "MediumAquamarine")))) + (xxml-header-2-face ((t (:background "seashell1" :foreground "SkyBlue")))) + (xxml-header-3-face ((t (:background "seashell1")))) + (xxml-header-4-face ((t (:background "seashell1")))) + (xxml-interaction-face ((t (:background "lightcyan")))) + (xxml-rug-face ((t (:background "cyan")))) + (xxml-sparkle-face ((t (:background "yellow")))) + (xxml-unbreakable-space-face ((t (:underline t :foreground "grey")))) + (yellow ((t (:foreground "yellow")))) + (zmacs-region ((t (:background "#4f657d"))))))) + +(defun color-theme-dark-blue () + "Color theme by Chris McMahan, created 2001-09-09. +Based on `color-theme-subtle-blue' with a slightly darker background." + (interactive) + (color-theme-subtle-blue) + (let ((color-theme-is-cumulative t)) + (color-theme-install + '(color-theme-dark-blue + ((background-color . "#537182") + (foreground-color . "AntiqueWhite2")) + nil + (default ((t (nil)))) + (blank-space-face ((t (:background "LightGray")))) + (blank-tab-face ((t (:background "Wheat" :foreground "DarkSlateGray")))) + (cursor ((t (:background "LightGray")))) + (dired-face-executable ((t (:foreground "green yellow")))) + (dired-face-flagged ((t (:foreground "tomato")))) + (dired-face-marked ((t (:foreground "light salmon")))) + (dired-face-setuid ((t (:foreground "Red")))) + (dired-face-socket ((t (:foreground "magenta")))) + (fixed ((t (:bold t)))) + (font-lock-comment-face ((t (:italic t :foreground "Gray80")))) + (font-lock-doc-face ((t (:bold t)))) + (font-lock-function-name-face ((t (:italic t :bold t :foreground "Yellow")))) + (font-lock-string-face ((t (:italic t :foreground "DarkSeaGreen")))) + (font-lock-type-face ((t (:bold t :foreground "YellowGreen")))) + (gui-button-face ((t (:background "DarkSalmon" :foreground "white")))) + (modeline ((t (:background "#c1ccd9" :foreground "#4f657d")))) + (modeline-buffer-id ((t (:background "#c1ccd9" :foreground "#4f657d")))) + (modeline-mousable ((t (:background "#c1ccd9" :foreground "#4f657d")))) + (modeline-mousable-minor-mode ((t (:background "#c1ccd9" :foreground "#4f657d")))) + (my-url-face ((t (:foreground "LightBlue")))) + (region ((t (:background "PaleTurquoise4" :foreground "gray80")))) + (secondary-selection ((t (:background "sea green" :foreground "yellow")))) + (vm-header-content-face ((t (:italic t :foreground "wheat")))) + (vm-header-from-face ((t (:italic t :foreground "wheat")))) + (widget-button-pressed-face ((t (:foreground "red")))) + (xref-keyword-face ((t (:foreground "blue")))) + (zmacs-region ((t (:background "SlateGray")))))))) + +(defun color-theme-jonadabian-slate () + "Another slate-and-wheat color theme by Jonadab the Unsightly One. +Updated 2001-10-12." + (interactive) + (color-theme-install + '(color-theme-jonadabian-slate + ((background-color . "#305050") + (background-mode . dark) + (border-color . "black") + (cursor-color . "medium turquoise") + (foreground-color . "#CCBB77") + (mouse-color . "black")) + ((list-matching-lines-face . bold) + (ued-mode-keyname-face . modeline) + (view-highlight-face . highlight)) + (default ((t (nil)))) + (fringe ((t (:background "#007080")))) + (bold ((t (:bold t :foreground "#EEDDAA")))) + (gnus-emphasis-bold ((t (:bold t :foreground "#EEDDAA")))) + (gnus-emphasis-underline-bold ((t (:underline t :bold t :foreground "#EEDDAA")))) + (bold-italic ((t (:italic t :bold t :foreground "#AA0000")))) + (gnus-emphasis-bold-italic ((t (:italic t :bold t :foreground "#AA0000")))) + (gnus-emphasis-underline-bold-italic ((t (:underline t :italic t :bold t :foreground "#AA0000")))) + (gnus-emphasis-underline-italic ((t (:underline t :italic t :bold t :foreground "#AA0000")))) + (calendar-today-face ((t (:underline t :background "darkslategrey")))) + (cperl-array-face ((t (:background "#004060")))) + (cperl-hash-face ((t (:background "#004400")))) + (custom-button-face ((t (:background "dark blue" :foreground "rgbi:1.00/1.00/0.00")))) + (custom-documentation-face ((t (:foreground "#10D010")))) + (custom-face-tag-face ((t (:underline t :foreground "goldenrod")))) + (custom-group-tag-face ((t (:underline t :foreground "light blue")))) + (custom-group-tag-face-1 ((t (:underline t :foreground "pink")))) + (custom-invalid-face ((t (:background "red" :foreground "yellow")))) + (custom-modified-face ((t (:background "blue" :foreground "white")))) + (custom-rogue-face ((t (:background "black" :foreground "pink")))) + (custom-saved-face ((t (:underline t)))) + (custom-set-face ((t (:foreground "#6666dd")))) + (custom-state-face ((t (:foreground "mediumaquamarine")))) + (custom-variable-button-face ((t (:underline t :bold t)))) + (custom-variable-tag-face ((t (:underline t :foreground "light blue")))) + (diary-face ((t (:foreground "red")))) + (eshell-ls-archive-face ((t (:foreground "green")))) + (eshell-ls-backup-face ((t (:foreground "grey60")))) + (eshell-ls-clutter-face ((t (:bold t :foreground "OrangeRed")))) + (eshell-ls-directory-face ((t (:bold t :foreground "SkyBlue")))) + (eshell-ls-executable-face ((t (:foreground "white")))) + (eshell-ls-missing-face ((t (:foreground "red")))) + (eshell-ls-product-face ((t (:foreground "LightSalmon")))) + (eshell-ls-readonly-face ((t (:foreground "indian red")))) + (eshell-ls-special-face ((t (:foreground "yellow")))) + (eshell-ls-symlink-face ((t (:foreground "#6666dd")))) + (eshell-ls-unreadable-face ((t (:foreground "red")))) + (eshell-prompt-face ((t (:bold t :background "#305050" :foreground "#EEDD99")))) + (font-lock-builtin-face ((t (:foreground "LightSteelBlue")))) + (font-lock-comment-face ((t (:italic t :bold t :foreground "grey66")))) + (font-lock-constant-face ((t (:foreground "indian red")))) + (font-lock-function-name-face ((t (:foreground "#D0D000")))) + (font-lock-keyword-face ((t (:foreground "#00BBBB")))) + (font-lock-string-face ((t (:foreground "#10D010")))) + (font-lock-type-face ((t (:bold t :foreground "#ff7788")))) + (font-lock-variable-name-face ((t (:foreground "#eeddaa")))) + (font-lock-warning-face ((t (:bold t :foreground "Pink")))) + (header-line ((t (:box (:line-width 1 :style released-button))))) + (highlight ((t (:background "#226644")))) + (highlight-changes-delete-face ((t (:background "navy" :foreground "red")))) + (highlight-changes-face ((t (:background "navy")))) + (holiday-face ((t (:foreground "#ff7744")))) + (italic ((t (:italic t :foreground "#AA0000")))) + (gnus-emphasis-italic ((t (:italic t :foreground "#AA0000")))) + (modeline ((t (:background "#007080" :foreground "cyan")))) + (modeline-buffer-id ((t (:background "#007080" :foreground "cyan")))) + (modeline-mousable ((t (:background "#007080" :foreground "cyan")))) + (modeline-mousable-minor-mode ((t (:background "#007080" :foreground "cyan")))) + (region ((t (:background "#226644")))) + (secondary-selection ((t (:background "darkslategrey")))) + (sgml-comment-face ((t (:foreground "grey60")))) + (sgml-doctype-face ((t (:foreground "red")))) + (sgml-end-tag-face ((t (:foreground "#00D0D0")))) + (sgml-entity-face ((t (:foreground "indian red")))) + (sgml-ignored-face ((t (:background "gray60" :foreground "gray40")))) + (sgml-ms-end-face ((t (:foreground "green")))) + (sgml-ms-start-face ((t (:foreground "green")))) + (sgml-pi-face ((t (:foreground "lime green")))) + (sgml-sgml-face ((t (:foreground "brown")))) + (sgml-short-ref-face ((t (:foreground "deep sky blue")))) + (sgml-start-tag-face ((t (:foreground "#D0D000")))) + (show-paren-match-face ((t (:background "#400055" :foreground "cyan")))) + (show-paren-mismatch-face ((t (:background "red")))) + (special-string-face ((t (:foreground "light green")))) + (term-black ((t (:background "#000055" :foreground "black")))) + (term-blackbg ((t (:background "black" :foreground "#CCBB77")))) + (term-blue ((t (:background "#000055" :foreground "blue")))) + (term-bluebg ((t (:background "blue" :foreground "#CCBB77")))) + (term-bold ((t (:bold t :background "#000055" :foreground "#CCBB77")))) + (term-cyan ((t (:background "#000055" :foreground "cyan")))) + (term-cyanbg ((t (:background "darkcyan")))) + (term-default-bg ((t (:foreground "#CCBB77")))) + (term-default-bg-inv ((t (:foreground "#CCBB77")))) + (term-default-fg ((t (:background "#000055")))) + (term-default-fg-inv ((t (:background "#000055")))) + (term-green ((t (:background "#000055" :foreground "green")))) + (term-greenbg ((t (:background "darkgreen")))) + (term-invisible ((t (:foreground "#CCBB77")))) + (term-invisible-inv ((t (:foreground "#CCBB77")))) + (term-magenta ((t (:background "#000055" :foreground "magenta")))) + (term-magentabg ((t (:background "darkmagenta")))) + (term-red ((t (:background "#000055" :foreground "red")))) + (term-redbg ((t (:background "darkred")))) + (term-underline ((t (:underline t :background "#000055" :foreground "#CCBB77")))) + (term-white ((t (:background "#000055" :foreground "white")))) + (term-whitebg ((t (:background "grey50")))) + (term-yellow ((t (:background "#000055" :foreground "yellow")))) + (term-yellowbg ((t (:background "#997700")))) + (trailing-whitespace ((t (:background "#23415A")))) + (underline ((t (:underline t)))) + (gnus-emphasis-underline ((t (:underline t)))) + (widget-button-face ((t (:bold t)))) + (widget-button-pressed-face ((t (:foreground "red")))) + (widget-documentation-face ((t (:foreground "green")))) + (widget-field-face ((t (:background "grey35" :foreground "black")))) + (widget-inactive-face ((t (:foreground "gray")))) + (widget-single-line-field-face ((t (:background "dim gray"))))))) + +(defun color-theme-gray1 () + "Color theme by Paul Pulli, created 2001-10-19." + (interactive) + (color-theme-install + '(color-theme-gray1 + ((background-color . "darkgray") + (background-mode . light) + (background-toolbar-color . "#949494949494") + (border-color . "#000000000000") + (bottom-toolbar-shadow-color . "#595959595959") + (cursor-color . "Yellow") + (foreground-color . "black") + (top-toolbar-shadow-color . "#b2b2b2b2b2b2")) + nil + (default ((t (nil)))) + (blue ((t (:foreground "blue")))) + (bold ((t (:bold t)))) + (bold-italic ((t (:italic t :bold t)))) + (border-glyph ((t (nil)))) + (cperl-here-face ((t (:background "gray68" :foreground "DeepPink")))) + (font-lock-builtin-face ((t (:bold t :foreground "red3")))) + (font-lock-comment-face ((t (:foreground "gray50")))) + (font-lock-constant-face ((t (:bold t :foreground "blue3")))) + (font-lock-doc-string-face ((t (:foreground "black")))) + (font-lock-function-name-face ((t (:bold t :foreground "DeepPink3")))) + (font-lock-keyword-face ((t (:bold t :foreground "red")))) + (font-lock-other-type-face ((t (:bold t :foreground "green4")))) + (font-lock-preprocessor-face ((t (:bold t :foreground "blue3")))) + (font-lock-reference-face ((t (:bold t :foreground "red3")))) + (font-lock-string-face ((t (:foreground "red")))) + (font-lock-type-face ((t (:bold t :foreground "white")))) + (font-lock-variable-name-face ((t (:bold t :foreground "blue3")))) + (font-lock-warning-face ((t (:bold t :foreground "Red")))) + (green ((t (:foreground "green4")))) + (gui-button-face ((t (:background "black" :foreground "red")))) + (gui-element ((t (:background "gray58")))) + (highlight ((t (:background "magenta" :foreground "yellow")))) + (isearch ((t (:background "red" :foreground "yellow")))) + (italic ((t (:italic t)))) + (left-margin ((t (nil)))) + (list-mode-item-selected ((t (:background "gray90" :foreground "purple")))) + (m4-face ((t (:background "gray90" :foreground "orange3")))) + (message-cited-text ((t (nil)))) + (message-header-contents ((t (nil)))) + (message-headers ((t (nil)))) + (message-highlighted-header-contents ((t (nil)))) + (modeline ((t (:background "#aa80aa" :foreground "White")))) + (modeline-buffer-id ((t (:background "#aa80aa" :foreground "linen")))) + (modeline-mousable ((t (:background "#aa80aa" :foreground "cyan")))) + (modeline-mousable-minor-mode ((t (:background "#aa80aa" :foreground "yellow")))) + (paren-blink-off ((t (:foreground "gray58")))) + (paren-blink-on ((t (:foreground "purple")))) + (paren-match ((t (:background "gray68" :foreground "white")))) + (paren-mismatch ((t (:background "DeepPink" :foreground "black")))) + (pointer ((t (nil)))) + (primary-selection ((t (:background "gray")))) + (red ((t (:foreground "red")))) + (right-margin ((t (nil)))) + (secondary-selection ((t (:background "paleturquoise")))) + (text-cursor ((t (:background "Yellow" :foreground "darkgray")))) + (toolbar ((t (:background "#aa80aa" :foreground "linen")))) + (underline ((t (:underline t)))) + (vertical-divider ((t (nil)))) + (x-face ((t (:background "black" :foreground "lavenderblush")))) + (yellow ((t (:foreground "yellow3")))) + (zmacs-region ((t (:background "paleturquoise" :foreground "black"))))))) + +(defun color-theme-word-perfect () + "White on blue background, based on WordPerfect 5.1. +Color theme by Thomas Gehrlein, created 2001-10-21." + (interactive) + (color-theme-install + '(color-theme-word-perfect + ((background-color . "blue4") + (background-mode . dark) + (border-color . "black") + (cursor-color . "gold") + (foreground-color . "white") + (mouse-color . "black")) + ((ecb-source-in-directories-buffer-face . ecb-sources-face) + (gnus-mouse-face . highlight) + (goto-address-mail-face . italic) + (goto-address-mail-mouse-face . secondary-selection) + (goto-address-url-face . bold) + (goto-address-url-mouse-face . highlight) + (list-matching-lines-face . bold) + (view-highlight-face . highlight)) + (default ((t (nil)))) + (bbdb-field-name ((t (:foreground "lime green")))) + (bbdb-field-value ((t (:foreground "white")))) + (bbdb-name ((t (:underline t :foreground "lime green")))) + (bold ((t (:bold t :foreground "white")))) + (bold-italic ((t (:italic t :bold t :foreground "yellow")))) + (calendar-today-face ((t (:underline t :foreground "deep sky blue")))) + (diary-face ((t (:foreground "gold")))) + (ecb-sources-face ((t (:foreground "LightBlue1")))) + (edb-inter-field-face ((t (:foreground "deep sky blue")))) + (edb-normal-summary-face ((t (:foreground "gold")))) + (emacs-wiki-bad-link-face ((t (:underline "coral" :bold t :foreground "coral")))) + (emacs-wiki-link-face ((t (:underline "cyan" :bold t :foreground "cyan")))) + (font-lock-builtin-face ((t (:foreground "LightSteelBlue")))) + (font-lock-comment-face ((t (:foreground "deep sky blue")))) + (font-lock-constant-face ((t (:foreground "lime green")))) + (font-lock-doc-face ((t (:foreground "gold")))) + (font-lock-doc-string-face ((t (:foreground "gold")))) + (font-lock-function-name-face ((t (:background "blue4" :foreground "IndianRed")))) + (font-lock-keyword-face ((t (:foreground "lime green")))) + (font-lock-preprocessor-face ((t (:foreground "lime green")))) + (font-lock-reference-face ((t (:foreground "LightSteelBlue")))) + (font-lock-string-face ((t (:foreground "gold")))) + (font-lock-type-face ((t (:foreground "lime green")))) + (font-lock-variable-name-face ((t (:foreground "LightGoldenrod")))) + (font-lock-warning-face ((t (:bold t :foreground "firebrick")))) + (gnus-emphasis-bold ((t (:foreground "yellow2")))) + (gnus-emphasis-bold-italic ((t (:foreground "yellow2")))) + (gnus-emphasis-italic ((t (:foreground "yellow2")))) + (gnus-emphasis-underline ((t (:foreground "yellow2")))) + (gnus-emphasis-underline-bold ((t (:foreground "yellow2")))) + (gnus-emphasis-underline-bold-italic ((t (:foreground "yellow2")))) + (gnus-emphasis-underline-italic ((t (:foreground "yellow2")))) + (gnus-group-mail-1-empty-face ((t (:foreground "aquamarine1")))) + (gnus-group-mail-1-face ((t (:bold t :foreground "aquamarine1")))) + (gnus-group-mail-2-empty-face ((t (:foreground "aquamarine2")))) + (gnus-group-mail-2-face ((t (:bold t :foreground "aquamarine2")))) + (gnus-group-mail-3-empty-face ((t (:foreground "aquamarine3")))) + (gnus-group-mail-3-face ((t (:bold t :foreground "aquamarine3")))) + (gnus-group-mail-low-empty-face ((t (:foreground "aquamarine4")))) + (gnus-group-mail-low-face ((t (:bold t :foreground "aquamarine4")))) + (gnus-group-news-1-empty-face ((t (:foreground "PaleTurquoise")))) + (gnus-group-news-1-face ((t (:bold t :foreground "PaleTurquoise")))) + (gnus-group-news-2-empty-face ((t (:foreground "turquoise")))) + (gnus-group-news-2-face ((t (:bold t :foreground "turquoise")))) + (gnus-group-news-3-empty-face ((t (:foreground "deep sky blue")))) + (gnus-group-news-3-face ((t (:bold t :foreground "deep sky blue")))) + (gnus-group-news-low-empty-face ((t (:foreground "DarkTurquoise")))) + (gnus-group-news-low-face ((t (:bold t :foreground "DarkTurquoise")))) + (gnus-header-content-face ((t (:foreground "gold")))) + (gnus-header-from-face ((t (:foreground "gold")))) + (gnus-header-name-face ((t (:foreground "deep sky blue")))) + (gnus-header-newsgroups-face ((t (:foreground "gold")))) + (gnus-header-subject-face ((t (:foreground "gold")))) + (gnus-signature-face ((t (:foreground "gold")))) + (gnus-splash-face ((t (:foreground "firebrick")))) + (gnus-summary-cancelled-face ((t (:background "black" :foreground "deep sky blue")))) + (gnus-summary-high-ancient-face ((t (:bold t :foreground "deep sky blue")))) + (gnus-summary-high-read-face ((t (:bold t :foreground "deep sky blue")))) + (gnus-summary-high-ticked-face ((t (:bold t :foreground "deep sky blue")))) + (gnus-summary-high-unread-face ((t (:bold t :foreground "lime green")))) + (gnus-summary-low-ancient-face ((t (:italic t :foreground "deep sky blue")))) + (gnus-summary-low-read-face ((t (:italic t :foreground "deep sky blue")))) + (gnus-summary-low-ticked-face ((t (:italic t :foreground "deep sky blue")))) + (gnus-summary-low-unread-face ((t (:italic t :foreground "lime green")))) + (gnus-summary-normal-ancient-face ((t (:foreground "deep sky blue")))) + (gnus-summary-normal-read-face ((t (:foreground "deep sky blue")))) + (gnus-summary-normal-ticked-face ((t (:foreground "deep sky blue")))) + (gnus-summary-normal-unread-face ((t (:foreground "lime green")))) + (gnus-summary-selected-face ((t (:underline t :foreground "gold")))) + (highlight ((t (:background "steel blue" :foreground "black")))) + (holiday-face ((t (:background "blue4" :foreground "IndianRed1")))) + (info-menu-5 ((t (:underline t :foreground "gold")))) + (info-node ((t (:italic t :bold t :foreground "gold")))) + (info-xref ((t (:bold t :foreground "gold")))) + (isearch ((t (:background "firebrick" :foreground "white")))) + (italic ((t (:italic t :foreground "yellow2")))) + (message-cited-text-face ((t (:foreground "gold")))) + (message-header-cc-face ((t (:bold t :foreground "green4")))) + (message-header-name-face ((t (:foreground "deep sky blue")))) + (message-header-newsgroups-face ((t (:italic t :bold t :foreground "gold")))) + (message-header-other-face ((t (:foreground "gold")))) + (message-header-subject-face ((t (:foreground "gold")))) + (message-header-to-face ((t (:bold t :foreground "gold")))) + (message-header-xheader-face ((t (:foreground "blue")))) + (message-separator-face ((t (:foreground "lime green")))) + (modeline ((t (:foreground "white" :background "black")))) + (modeline-buffer-id ((t (:foreground "white" :background "black")))) + (modeline-mousable ((t (:foreground "white" :background "black")))) + (modeline-mousable-minor-mode ((t (:foreground "white" :background "black")))) + (overlay-empty-face ((t (nil)))) + (primary-selection ((t (:background "firebrick" :foreground "white")))) + (region ((t (:background "firebrick" :foreground "white")))) + (secondary-selection ((t (:background "yellow2" :foreground "black")))) + (semantic-dirty-token-face ((t (:background "gray10")))) + (show-paren-match-face ((t (:background "deep sky blue" :foreground "black")))) + (show-paren-mismatch-face ((t (:background "firebrick" :foreground "white")))) + (underline ((t (:underline t :background "blue4" :foreground "white"))))))) + +;; In order to produce this, follow these steps: +;; +;; 0. Make sure .Xresources and .Xdefaults don't have any Emacs related +;; entries. +;; +;; 1. cd into the Emacs lisp directory and run the following command: +;; ( for d in `find -type d`; \ +;; do grep --files-with-matches 'defface[ ]' $d/*.el; \ +;; done ) | sort | uniq +;; Put the result in a lisp block, using load-library calls. +;; +;; Repeat this for any directories on your load path which you want to +;; include in the standard. This might include W3, eshell, etc. +;; +;; Add some of the libraries that don't use defface: +;; +;; 2. Start emacs using the --no-init-file and --no-site-file command line +;; arguments. Evaluate the lisp block you prepared. +;; 3. Load color-theme and run color-theme-print. Save the output and use it +;; to define color-theme-standard. +;; +;; (progn +;; (load-library "add-log") +;; (load-library "calendar") +;; (load-library "comint") +;; (load-library "cus-edit") +;; (load-library "cus-face") +;; (load-library "custom") +;; (load-library "diff-mode") +;; (load-library "ediff-init") +;; (load-library "re-builder") +;; (load-library "viper-init") +;; (load-library "enriched") +;; (load-library "em-ls") +;; (load-library "em-prompt") +;; (load-library "esh-test") +;; (load-library "faces") +;; (load-library "font-lock") +;; (load-library "generic-x") +;; (load-library "gnus-art") +;; (load-library "gnus-cite") +;; (load-library "gnus") +;; (load-library "message") +;; (load-library "hilit-chg") +;; (load-library "hi-lock") +;; (load-library "info") +;; (load-library "isearch") +;; (load-library "log-view") +;; (load-library "paren") +;; (load-library "pcvs-info") +;; (load-library "antlr-mode") +;; (load-library "cperl-mode") +;; (load-library "ebrowse") +;; (load-library "idlwave") +;; (load-library "idlw-shell") +;; (load-library "make-mode") +;; (load-library "sh-script") +;; (load-library "vhdl-mode") +;; (load-library "smerge-mode") +;; (load-library "speedbar") +;; (load-library "strokes") +;; (load-library "artist") +;; (load-library "flyspell") +;; (load-library "texinfo") +;; (load-library "tex-mode") +;; (load-library "tooltip") +;; (load-library "vcursor") +;; (load-library "wid-edit") +;; (load-library "woman") +;; (load-library "term") +;; (load-library "man") +;; (load-file "/home/alex/elisp/color-theme.el") +;; (color-theme-print)) +;; +;; 4. Make the color theme usable on Xemacs (add more faces, resolve +;; :inherit attributes) +;; +(defun color-theme-emacs-21 () + "Color theme used by Emacs 21.1. +Added and adapted for XEmacs by Alex Schroeder. Adaptation mostly +consisted of resolving :inherit attributes and adding missing faces. +This theme includes faces from the following Emacs libraries: add-log +calendar comint cus-edit cus-face custom diff-mode ediff-init re-builder +viper-init enriched em-ls em-prompt esh-test faces font-lock generic-x +gnus-art gnus-cite gnus message hilit-chg hi-lock info isearch log-view +paren pcvs-info antlr-mode cperl-mode ebrowse idlwave idlw-shell +make-mode sh-script vhdl-mode smerge-mode speedbar strokes artist +flyspell texinfo tex-mode tooltip vcursor wid-edit woman term man" + (interactive) + (color-theme-install + '(color-theme-emacs-21 + ((background-color . "white") + (background-mode . light) + (border-color . "black") + (cursor-color . "black") + (foreground-color . "black") + (mouse-color . "black")) + ((Man-overstrike-face . bold) + (Man-underline-face . underline) + (cperl-here-face . font-lock-string-face) + (cperl-invalid-face . underline) + (cperl-pod-face . font-lock-comment-face) + (cperl-pod-head-face . font-lock-variable-name-face) + (gnus-article-button-face . bold) + (gnus-article-mouse-face . highlight) + (gnus-cite-attribution-face . gnus-cite-attribution-face) + (gnus-mouse-face . highlight) + (gnus-signature-face . gnus-signature-face) + (gnus-summary-selected-face . gnus-summary-selected-face) + (help-highlight-face . underline) + (idlwave-class-arrow-face . bold) + (idlwave-shell-breakpoint-face . idlwave-shell-bp-face) + (idlwave-shell-expression-face . secondary-selection) + (idlwave-shell-stop-line-face . highlight) + (ispell-highlight-face . highlight) + (list-matching-lines-face . bold) + (view-highlight-face . highlight) + (viper-insert-state-cursor-color . "Green") + (viper-replace-overlay-cursor-color . "Red") + (widget-mouse-face . highlight)) + (default ((t (:stipple nil :background "white" :foreground "black" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :width normal :family "adobe-courier")))) + (Info-title-1-face ((t (:bold t :weight bold :family "helv" :height 1.728)))) + (Info-title-2-face ((t (:bold t :family "helv" :weight bold :height 1.44)))) + (Info-title-3-face ((t (:bold t :weight bold :family "helv" :height 1.2)))) + (Info-title-4-face ((t (:bold t :family "helv" :weight bold)))) + (antlr-font-lock-keyword-face ((t (:bold t :foreground "black" :weight bold)))) + (antlr-font-lock-literal-face ((t (:bold t :foreground "brown4" :weight bold)))) + (antlr-font-lock-ruledef-face ((t (:bold t :foreground "blue" :weight bold)))) + (antlr-font-lock-ruleref-face ((t (:foreground "blue4")))) + (antlr-font-lock-tokendef-face ((t (:bold t :foreground "blue" :weight bold)))) + (antlr-font-lock-tokenref-face ((t (:foreground "orange4")))) + (bold ((t (:bold t :weight bold)))) + (bold-italic ((t (:italic t :bold t :slant italic :weight bold)))) + (border ((t (:background "black")))) + (calendar-today-face ((t (:underline t)))) + (change-log-acknowledgement-face ((t (:foreground "Firebrick")))) + (change-log-conditionals-face ((t (:foreground "DarkGoldenrod")))) + (change-log-date-face ((t (:foreground "RosyBrown")))) + (change-log-email-face ((t (:foreground "DarkGoldenrod")))) + (change-log-file-face ((t (:foreground "Blue")))) + (change-log-function-face ((t (:foreground "DarkGoldenrod")))) + (change-log-list-face ((t (:foreground "Purple")))) + (change-log-name-face ((t (:foreground "CadetBlue")))) + (comint-highlight-input ((t (:bold t :weight bold)))) + (comint-highlight-prompt ((t (:foreground "dark blue")))) + (cperl-array-face ((t (:bold t :background "lightyellow2" :foreground "Blue" :weight bold)))) + (cperl-hash-face ((t (:italic t :bold t :background "lightyellow2" :foreground "Red" :slant italic :weight bold)))) + (cperl-nonoverridable-face ((t (:foreground "chartreuse3")))) + (cursor ((t (:background "black")))) + (custom-button-face ((t (:background "lightgrey" :foreground "black" :box (:line-width 2 :style released-button))))) + (custom-button-pressed-face ((t (:background "lightgrey" :foreground "black" :box (:line-width 2 :style pressed-button))))) + (custom-changed-face ((t (:background "blue" :foreground "white")))) + (custom-comment-face ((t (:background "gray85")))) + (custom-comment-tag-face ((t (:foreground "blue4")))) + (custom-documentation-face ((t (nil)))) + (custom-face-tag-face ((t (:bold t :family "helv" :weight bold :height 1.2)))) + (custom-group-tag-face ((t (:bold t :foreground "blue" :weight bold :height 1.2)))) + (custom-group-tag-face-1 ((t (:bold t :family "helv" :foreground "red" :weight bold :height 1.2)))) + (custom-invalid-face ((t (:background "red" :foreground "yellow")))) + (custom-modified-face ((t (:background "blue" :foreground "white")))) + (custom-rogue-face ((t (:background "black" :foreground "pink")))) + (custom-saved-face ((t (:underline t)))) + (custom-set-face ((t (:background "white" :foreground "blue")))) + (custom-state-face ((t (:foreground "dark green")))) + (custom-variable-button-face ((t (:bold t :underline t :weight bold)))) + (custom-variable-tag-face ((t (:bold t :family "helv" :foreground "blue" :weight bold :height 1.2)))) + (cvs-filename-face ((t (:foreground "blue4")))) + (cvs-handled-face ((t (:foreground "pink")))) + (cvs-header-face ((t (:bold t :foreground "blue4" :weight bold)))) + (cvs-marked-face ((t (:bold t :foreground "green3" :weight bold)))) + (cvs-msg-face ((t (:italic t :slant italic)))) + (cvs-need-action-face ((t (:foreground "orange")))) + (cvs-unknown-face ((t (:foreground "red")))) + (diary-face ((t (:foreground "red")))) + (diff-added-face ((t (nil)))) + (diff-changed-face ((t (nil)))) + (diff-context-face ((t (:foreground "grey50")))) + (diff-file-header-face ((t (:bold t :background "grey70" :weight bold)))) + (diff-function-face ((t (:foreground "grey50")))) + (diff-header-face ((t (:background "grey85")))) + (diff-hunk-header-face ((t (:background "grey85")))) + (diff-index-face ((t (:bold t :weight bold :background "grey70")))) + (diff-nonexistent-face ((t (:bold t :weight bold :background "grey70")))) + (diff-removed-face ((t (nil)))) + (dired-face-boring ((t (:foreground "RosyBrown")))) + (dired-face-directory ((t (:foreground "Blue")))) + (dired-face-executable ((t (nil)))) + (dired-face-flagged ((t (:foreground "Red" :weight bold)))) + (dired-face-marked ((t (:foreground "Red" :weight bold)))) + (dired-face-permissions ((t (nil)))) + (dired-face-setuid ((t (nil)))) + (dired-face-socket ((t (nil)))) + (dired-face-symlink ((t (:foreground "Purple")))) + (ebrowse-default-face ((t (nil)))) + (ebrowse-file-name-face ((t (:italic t :slant italic)))) + (ebrowse-member-attribute-face ((t (:foreground "red")))) + (ebrowse-member-class-face ((t (:foreground "purple")))) + (ebrowse-progress-face ((t (:background "blue")))) + (ebrowse-root-class-face ((t (:bold t :foreground "blue" :weight bold)))) + (ebrowse-tree-mark-face ((t (:foreground "red")))) + (ediff-current-diff-face-A ((t (:background "pale green" :foreground "firebrick")))) + (ediff-current-diff-face-Ancestor ((t (:background "VioletRed" :foreground "Black")))) + (ediff-current-diff-face-B ((t (:background "Yellow" :foreground "DarkOrchid")))) + (ediff-current-diff-face-C ((t (:background "Pink" :foreground "Navy")))) + (ediff-even-diff-face-A ((t (:background "light grey" :foreground "Black")))) + (ediff-even-diff-face-Ancestor ((t (:background "Grey" :foreground "White")))) + (ediff-even-diff-face-B ((t (:background "Grey" :foreground "White")))) + (ediff-even-diff-face-C ((t (:background "light grey" :foreground "Black")))) + (ediff-fine-diff-face-A ((t (:background "sky blue" :foreground "Navy")))) + (ediff-fine-diff-face-Ancestor ((t (:background "Green" :foreground "Black")))) + (ediff-fine-diff-face-B ((t (:background "cyan" :foreground "Black")))) + (ediff-fine-diff-face-C ((t (:background "Turquoise" :foreground "Black")))) + (ediff-odd-diff-face-A ((t (:background "Grey" :foreground "White")))) + (ediff-odd-diff-face-Ancestor ((t (:background "light grey" :foreground "Black")))) + (ediff-odd-diff-face-B ((t (:background "light grey" :foreground "Black")))) + (ediff-odd-diff-face-C ((t (:background "Grey" :foreground "White")))) + (eshell-ls-archive-face ((t (:bold t :foreground "Orchid" :weight bold)))) + (eshell-ls-backup-face ((t (:foreground "OrangeRed")))) + (eshell-ls-clutter-face ((t (:bold t :foreground "OrangeRed" :weight bold)))) + (eshell-ls-directory-face ((t (:bold t :foreground "Blue" :weight bold)))) + (eshell-ls-executable-face ((t (:bold t :foreground "ForestGreen" :weight bold)))) + (eshell-ls-missing-face ((t (:bold t :foreground "Red" :weight bold)))) + (eshell-ls-product-face ((t (:foreground "OrangeRed")))) + (eshell-ls-readonly-face ((t (:foreground "Brown")))) + (eshell-ls-special-face ((t (:bold t :foreground "Magenta" :weight bold)))) + (eshell-ls-symlink-face ((t (:bold t :foreground "Dark Cyan" :weight bold)))) + (eshell-ls-unreadable-face ((t (:foreground "Grey30")))) + (eshell-prompt-face ((t (:bold t :foreground "Red" :weight bold)))) + (eshell-test-failed-face ((t (:bold t :foreground "OrangeRed" :weight bold)))) + (eshell-test-ok-face ((t (:bold t :foreground "Green" :weight bold)))) + (excerpt ((t (:italic t :slant italic)))) + (fixed ((t (:bold t :weight bold)))) + (fixed-pitch ((t (:family "courier")))) + (flyspell-duplicate-face ((t (:bold t :foreground "Gold3" :underline t :weight bold)))) + (flyspell-incorrect-face ((t (:bold t :foreground "OrangeRed" :underline t :weight bold)))) + (font-lock-builtin-face ((t (:foreground "Orchid")))) + (font-lock-comment-face ((t (:foreground "Firebrick")))) + (font-lock-constant-face ((t (:foreground "CadetBlue")))) + (font-lock-doc-face ((t (:foreground "RosyBrown")))) + (font-lock-doc-string-face ((t (:foreground "RosyBrown")))) + (font-lock-function-name-face ((t (:foreground "Blue")))) + (font-lock-keyword-face ((t (:foreground "Purple")))) + (font-lock-preprocessor-face ((t (:foreground "CadetBlue")))) + (font-lock-reference-face ((t (:foreground "Orchid")))) + (font-lock-string-face ((t (:foreground "RosyBrown")))) + (font-lock-type-face ((t (:foreground "ForestGreen")))) + (font-lock-variable-name-face ((t (:foreground "DarkGoldenrod")))) + (font-lock-warning-face ((t (:bold t :foreground "Red" :weight bold)))) + (fringe ((t (:background "grey95")))) + (gnus-cite-attribution-face ((t (:italic t :slant italic)))) + (gnus-cite-face-1 ((t (:foreground "MidnightBlue")))) + (gnus-cite-face-10 ((t (:foreground "medium purple")))) + (gnus-cite-face-11 ((t (:foreground "turquoise")))) + (gnus-cite-face-2 ((t (:foreground "firebrick")))) + (gnus-cite-face-3 ((t (:foreground "dark green")))) + (gnus-cite-face-4 ((t (:foreground "OrangeRed")))) + (gnus-cite-face-5 ((t (:foreground "dark khaki")))) + (gnus-cite-face-6 ((t (:foreground "dark violet")))) + (gnus-cite-face-7 ((t (:foreground "SteelBlue4")))) + (gnus-cite-face-8 ((t (:foreground "magenta")))) + (gnus-cite-face-9 ((t (:foreground "violet")))) + (gnus-emphasis-bold ((t (:bold t :weight bold)))) + (gnus-emphasis-bold-italic ((t (:italic t :bold t :slant italic :weight bold)))) + (gnus-emphasis-highlight-words ((t (:background "black" :foreground "yellow")))) + (gnus-emphasis-italic ((t (:italic t :slant italic)))) + (gnus-emphasis-underline ((t (:underline t)))) + (gnus-emphasis-underline-bold ((t (:bold t :underline t :weight bold)))) + (gnus-emphasis-underline-bold-italic ((t (:italic t :bold t :underline t :slant italic :weight bold)))) + (gnus-emphasis-underline-italic ((t (:italic t :underline t :slant italic)))) + (gnus-group-mail-1-empty-face ((t (:foreground "DeepPink3")))) + (gnus-group-mail-1-face ((t (:bold t :foreground "DeepPink3" :weight bold)))) + (gnus-group-mail-2-empty-face ((t (:foreground "HotPink3")))) + (gnus-group-mail-2-face ((t (:bold t :foreground "HotPink3" :weight bold)))) + (gnus-group-mail-3-empty-face ((t (:foreground "magenta4")))) + (gnus-group-mail-3-face ((t (:bold t :foreground "magenta4" :weight bold)))) + (gnus-group-mail-low-empty-face ((t (:foreground "DeepPink4")))) + (gnus-group-mail-low-face ((t (:bold t :foreground "DeepPink4" :weight bold)))) + (gnus-group-news-1-empty-face ((t (:foreground "ForestGreen")))) + (gnus-group-news-1-face ((t (:bold t :foreground "ForestGreen" :weight bold)))) + (gnus-group-news-2-empty-face ((t (:foreground "CadetBlue4")))) + (gnus-group-news-2-face ((t (:bold t :foreground "CadetBlue4" :weight bold)))) + (gnus-group-news-3-empty-face ((t (nil)))) + (gnus-group-news-3-face ((t (:bold t :weight bold)))) + (gnus-group-news-4-empty-face ((t (nil)))) + (gnus-group-news-4-face ((t (:bold t :weight bold)))) + (gnus-group-news-5-empty-face ((t (nil)))) + (gnus-group-news-5-face ((t (:bold t :weight bold)))) + (gnus-group-news-6-empty-face ((t (nil)))) + (gnus-group-news-6-face ((t (:bold t :weight bold)))) + (gnus-group-news-low-empty-face ((t (:foreground "DarkGreen")))) + (gnus-group-news-low-face ((t (:bold t :foreground "DarkGreen" :weight bold)))) + (gnus-header-content-face ((t (:italic t :foreground "indianred4" :slant italic)))) + (gnus-header-from-face ((t (:foreground "red3")))) + (gnus-header-name-face ((t (:foreground "maroon")))) + (gnus-header-newsgroups-face ((t (:italic t :foreground "MidnightBlue" :slant italic)))) + (gnus-header-subject-face ((t (:foreground "red4")))) + (gnus-signature-face ((t (:italic t :slant italic)))) + (gnus-splash-face ((t (:foreground "Brown")))) + (gnus-summary-cancelled-face ((t (:background "black" :foreground "yellow")))) + (gnus-summary-high-ancient-face ((t (:bold t :foreground "RoyalBlue" :weight bold)))) + (gnus-summary-high-read-face ((t (:bold t :foreground "DarkGreen" :weight bold)))) + (gnus-summary-high-ticked-face ((t (:bold t :foreground "firebrick" :weight bold)))) + (gnus-summary-high-unread-face ((t (:bold t :weight bold)))) + (gnus-summary-low-ancient-face ((t (:italic t :foreground "RoyalBlue" :slant italic)))) + (gnus-summary-low-read-face ((t (:italic t :foreground "DarkGreen" :slant italic)))) + (gnus-summary-low-ticked-face ((t (:italic t :foreground "firebrick" :slant italic)))) + (gnus-summary-low-unread-face ((t (:italic t :slant italic)))) + (gnus-summary-normal-ancient-face ((t (:foreground "RoyalBlue")))) + (gnus-summary-normal-read-face ((t (:foreground "DarkGreen")))) + (gnus-summary-normal-ticked-face ((t (:foreground "firebrick")))) + (gnus-summary-normal-unread-face ((t (nil)))) + (gnus-summary-selected-face ((t (:underline t)))) + (header-line ((t (:box (:line-width -1 :style released-button) :background "grey90" :foreground "grey20" :box nil)))) + (hi-black-b ((t (:bold t :weight bold)))) + (hi-black-hb ((t (:bold t :family "helv" :weight bold :height 1.67)))) + (hi-blue ((t (:background "light blue")))) + (hi-blue-b ((t (:bold t :foreground "blue" :weight bold)))) + (hi-green ((t (:background "green")))) + (hi-green-b ((t (:bold t :foreground "green" :weight bold)))) + (hi-pink ((t (:background "pink")))) + (hi-red-b ((t (:bold t :foreground "red" :weight bold)))) + (hi-yellow ((t (:background "yellow")))) + (highlight ((t (:background "darkseagreen2")))) + (highlight-changes-delete-face ((t (:foreground "red" :underline t)))) + (highlight-changes-face ((t (:foreground "red")))) + (holiday-face ((t (:background "pink")))) + (idlwave-help-link-face ((t (:foreground "Blue")))) + (idlwave-shell-bp-face ((t (:background "Pink" :foreground "Black")))) + (info-header-node ((t (:italic t :bold t :weight bold :slant italic :foreground "brown")))) + (info-header-xref ((t (:bold t :weight bold :foreground "magenta4")))) + (info-menu-5 ((t (:foreground "red1")))) + (info-menu-header ((t (:bold t :family "helv" :weight bold)))) + (info-node ((t (:italic t :bold t :foreground "brown" :slant italic :weight bold)))) + (info-xref ((t (:bold t :foreground "magenta4" :weight bold)))) + (isearch ((t (:background "magenta4" :foreground "lightskyblue1")))) + (isearch-lazy-highlight-face ((t (:background "paleturquoise")))) + (italic ((t (:italic t :slant italic)))) + (log-view-file-face ((t (:bold t :background "grey70" :weight bold)))) + (log-view-message-face ((t (:background "grey85")))) + (makefile-space-face ((t (:background "hotpink")))) + (menu ((t (nil)))) + (message-cited-text-face ((t (:foreground "red")))) + (message-header-cc-face ((t (:foreground "MidnightBlue")))) + (message-header-name-face ((t (:foreground "cornflower blue")))) + (message-header-newsgroups-face ((t (:italic t :bold t :foreground "blue4" :slant italic :weight bold)))) + (message-header-other-face ((t (:foreground "steel blue")))) + (message-header-subject-face ((t (:bold t :foreground "navy blue" :weight bold)))) + (message-header-to-face ((t (:bold t :foreground "MidnightBlue" :weight bold)))) + (message-header-xheader-face ((t (:foreground "blue")))) + (message-mml-face ((t (:foreground "ForestGreen")))) + (message-separator-face ((t (:foreground "brown")))) + (modeline ((t (:background "grey75" :foreground "black" :box (:line-width -1 :style released-button))))) + (modeline-buffer-id ((t (:bold t :background "grey75" :foreground "black" :box (:line-width -1 :style released-button))))) + (modeline-mousable ((t (:background "grey75" :foreground "black" :box (:line-width -1 :style released-button))))) + (modeline-mousable-minor-mode ((t (:background "grey75" :foreground "black" :box (:line-width -1 :style released-button))))) + (mouse ((t (:background "black")))) + (primary-selection ((t (:background "lightgoldenrod2")))) + (reb-match-0 ((t (:background "lightblue")))) + (reb-match-1 ((t (:background "aquamarine")))) + (reb-match-2 ((t (:background "springgreen")))) + (reb-match-3 ((t (:background "yellow")))) + (region ((t (:background "lightgoldenrod2")))) + (scroll-bar ((t (:background "grey75")))) + (secondary-selection ((t (:background "yellow")))) + (sh-heredoc-face ((t (:foreground "tan")))) + (show-paren-match-face ((t (:background "turquoise")))) + (show-paren-mismatch-face ((t (:background "purple" :foreground "white")))) + (show-tabs-space-face ((t (:foreground "yellow")))) + (show-tabs-tab-face ((t (:foreground "red")))) + (smerge-base-face ((t (:foreground "red")))) + (smerge-markers-face ((t (:background "grey85")))) + (smerge-mine-face ((t (:foreground "blue")))) + (smerge-other-face ((t (:foreground "darkgreen")))) + (speedbar-button-face ((t (:foreground "green4")))) + (speedbar-directory-face ((t (:foreground "blue4")))) + (speedbar-file-face ((t (:foreground "cyan4")))) + (speedbar-highlight-face ((t (:background "green")))) + (speedbar-selected-face ((t (:foreground "red" :underline t)))) + (speedbar-tag-face ((t (:foreground "brown")))) + (strokes-char-face ((t (:background "lightgray")))) + (term-black ((t (:stipple nil :background "white" :foreground "black" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :width normal :family "adobe-courier")))) + (term-blackbg ((t (:stipple nil :background "black" :foreground "black" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :width normal :family "adobe-courier")))) + (term-blue ((t (:stipple nil :background "white" :foreground "blue" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :width normal :family "adobe-courier")))) + (term-bluebg ((t (:stipple nil :background "blue" :foreground "black" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :width normal :family "adobe-courier")))) + (term-bold ((t (:bold t :stipple nil :background "white" :foreground "black" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight bold :width normal :family "adobe-courier")))) + (term-cyan ((t (:stipple nil :background "white" :foreground "cyan" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :width normal :family "adobe-courier")))) + (term-cyanbg ((t (:stipple nil :background "cyan" :foreground "black" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :width normal :family "adobe-courier")))) + (term-default ((t (:stipple nil :background "white" :foreground "black" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :width normal :family "adobe-courier")))) + (term-default-bg ((t (:stipple nil :foreground "black" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :width normal :family "adobe-courier")))) + (term-default-bg-inv ((t (:stipple nil :foreground "black" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :width normal :family "adobe-courier")))) + (term-default-fg ((t (:stipple nil :background "white" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :width normal :family "adobe-courier")))) + (term-default-fg-inv ((t (:stipple nil :background "white" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :width normal :family "adobe-courier")))) + (term-green ((t (:stipple nil :background "white" :foreground "green" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :width normal :family "adobe-courier")))) + (term-greenbg ((t (:stipple nil :background "green" :foreground "black" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :width normal :family "adobe-courier")))) + (term-invisible ((t (:stipple nil :foreground "black" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :width normal :family "adobe-courier")))) + (term-invisible-inv ((t (:stipple nil :foreground "black" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :width normal :family "adobe-courier")))) + (term-magenta ((t (:stipple nil :background "white" :foreground "magenta" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :width normal :family "adobe-courier")))) + (term-magentabg ((t (:stipple nil :background "magenta" :foreground "black" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :width normal :family "adobe-courier")))) + (term-red ((t (:stipple nil :background "white" :foreground "red" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :width normal :family "adobe-courier")))) + (term-redbg ((t (:stipple nil :background "red" :foreground "black" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :width normal :family "adobe-courier")))) + (term-underline ((t (:stipple nil :background "white" :foreground "black" :inverse-video nil :box nil :strike-through nil :overline nil :underline t :slant normal :weight normal :width normal :family "adobe-courier")))) + (term-white ((t (:stipple nil :background "white" :foreground "white" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :width normal :family "adobe-courier")))) + (term-whitebg ((t (:stipple nil :background "white" :foreground "black" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :width normal :family "adobe-courier")))) + (term-yellow ((t (:stipple nil :background "white" :foreground "yellow" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :width normal :family "adobe-courier")))) + (term-yellowbg ((t (:stipple nil :background "yellow" :foreground "black" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :width normal :family "adobe-courier")))) + (tex-math-face ((t (:foreground "RosyBrown")))) + (texinfo-heading-face ((t (:foreground "Blue")))) + (tool-bar ((t (:background "grey75" :foreground "black" :box (:line-width 1 :style released-button))))) + (tooltip ((t (:background "lightyellow" :foreground "black")))) + (trailing-whitespace ((t (:background "red")))) + (underline ((t (:underline t)))) + (variable-pitch ((t (:family "helv")))) + (vcursor ((t (:background "cyan" :foreground "blue" :underline t)))) + (vhdl-font-lock-attribute-face ((t (:foreground "Orchid")))) + (vhdl-font-lock-directive-face ((t (:foreground "CadetBlue")))) + (vhdl-font-lock-enumvalue-face ((t (:foreground "Gold4")))) + (vhdl-font-lock-function-face ((t (:foreground "Orchid4")))) + (vhdl-font-lock-prompt-face ((t (:bold t :foreground "Red" :weight bold)))) + (vhdl-font-lock-reserved-words-face ((t (:bold t :foreground "Orange" :weight bold)))) + (vhdl-font-lock-translate-off-face ((t (:background "LightGray")))) + (vhdl-speedbar-architecture-face ((t (:foreground "Blue")))) + (vhdl-speedbar-architecture-selected-face ((t (:foreground "Blue" :underline t)))) + (vhdl-speedbar-configuration-face ((t (:foreground "DarkGoldenrod")))) + (vhdl-speedbar-configuration-selected-face ((t (:foreground "DarkGoldenrod" :underline t)))) + (vhdl-speedbar-entity-face ((t (:foreground "ForestGreen")))) + (vhdl-speedbar-entity-selected-face ((t (:foreground "ForestGreen" :underline t)))) + (vhdl-speedbar-instantiation-face ((t (:foreground "Brown")))) + (vhdl-speedbar-instantiation-selected-face ((t (:foreground "Brown" :underline t)))) + (vhdl-speedbar-package-face ((t (:foreground "Grey50")))) + (vhdl-speedbar-package-selected-face ((t (:foreground "Grey50" :underline t)))) + (viper-minibuffer-emacs-face ((t (:background "darkseagreen2" :foreground "Black")))) + (viper-minibuffer-insert-face ((t (:background "pink" :foreground "Black")))) + (viper-minibuffer-vi-face ((t (:background "grey" :foreground "DarkGreen")))) + (viper-replace-overlay-face ((t (:background "darkseagreen2" :foreground "Black")))) + (viper-search-face ((t (:background "khaki" :foreground "Black")))) + (widget-button-face ((t (:bold t :weight bold)))) + (widget-button-pressed-face ((t (:foreground "red")))) + (widget-documentation-face ((t (:foreground "dark green")))) + (widget-field-face ((t (:background "gray85")))) + (widget-inactive-face ((t (:foreground "dim gray")))) + (widget-single-line-field-face ((t (:background "gray85")))) + (woman-addition-face ((t (:foreground "orange")))) + (woman-bold-face ((t (:bold t :foreground "blue" :weight bold)))) + (woman-italic-face ((t (:italic t :foreground "red" :underline t :slant italic)))) + (woman-unknown-face ((t (:foreground "brown")))) + (zmacs-region ((t (:background "lightgoldenrod2"))))))) + +(defun color-theme-jsc-light2 () + "Color theme by John S Cooper, created 2001-10-29. +This builds on `color-theme-jsc-light'." + (interactive) + (color-theme-jsc-light) + (let ((color-theme-is-cumulative t)) + (color-theme-install + '(color-theme-jsc-light2 + ((vc-annotate-very-old-color . "#0046FF") + (senator-eldoc-use-color . t)) + nil + (bold ((t (:bold t :weight bold)))) + (bold-italic ((t (:italic t :bold t :slant italic :weight bold)))) + (change-log-file-face ((t (:foreground "Blue")))) + (change-log-name-face ((t (:foreground "Maroon")))) + (comint-highlight-prompt ((t (:foreground "dark blue")))) + (custom-button-face ((t (:background "lightgrey" :foreground "black" :box (:line-width 2 :style released-button))))) + (custom-face-tag-face ((t (:bold t :family "helv" :weight bold :height 1.2)))) + (custom-group-tag-face ((t (:bold t :foreground "blue" :weight bold :height 1.2)))) + (custom-group-tag-face-1 ((t (:bold t :family "helv" :foreground "red" :weight bold :height 1.2)))) + (custom-variable-tag-face ((t (:bold t :family "helv" :foreground "blue" :weight bold :height 1.2)))) + (font-lock-constant-face ((t (:foreground "Maroon")))) + (font-lock-function-name-face ((t (:foreground "Blue")))) + (font-lock-type-face ((t (:italic t :foreground "Navy" :slant italic)))) + (fringe ((t (:background "grey88")))) + (gnus-group-mail-1-empty-face ((t (:foreground "Blue2")))) + (gnus-group-news-1-empty-face ((t (:foreground "ForestGreen")))) + (gnus-group-news-1-face ((t (:bold t :foreground "ForestGreen" :weight bold)))) + (gnus-header-content-face ((t (:italic t :foreground "indianred4" :slant italic)))) + (gnus-header-name-face ((t (:bold t :foreground "maroon" :weight bold)))) + (gnus-header-subject-face ((t (:foreground "red4")))) + (gnus-signature-face ((t (:italic t :slant italic)))) + (gnus-summary-high-read-face ((t (:bold t :foreground "DarkGreen" :weight bold)))) + (gnus-summary-high-unread-face ((t (:bold t :weight bold)))) + (gnus-summary-normal-read-face ((t (:foreground "DarkGreen")))) + (gnus-summary-normal-ticked-face ((t (:foreground "Navy")))) + (gnus-summary-normal-unread-face ((t (:bold t :foreground "DarkGreen" :weight bold)))) + (header-line ((t (:background "grey90" :foreground "grey20" :box nil)))) + (highlight ((t (:background "darkseagreen2")))) + (ido-subdir-face ((t (:foreground "red")))) + (isearch ((t (:background "magenta4" :foreground "lightskyblue1")))) + (mode-line ((t (:background "grey88" :foreground "black" :box (:line-width -1 :style released-button))))) + (region ((t (:background "lightgoldenrod2")))) + (scroll-bar ((t (nil)))) + (secondary-selection ((t (:background "yellow")))) + (show-paren-match-face ((t (:background "turquoise")))) + (show-paren-mismatch-face ((t (:background "purple" :foreground "white")))) + (tooltip ((t (:background "lightyellow" :foreground "black")))))))) + +(defun color-theme-ld-dark () + "Dark Color theme by Linh Dang, created 2001-11-06." + (interactive) + (color-theme-install + '(color-theme-ld-dark + ((background-color . "black") + (background-mode . dark) + (border-color . "black") + (cursor-color . "yellow") + (foreground-color . "white") + (mouse-color . "white")) + ((align-highlight-change-face . highlight) + (align-highlight-nochange-face . secondary-selection) + (apropos-keybinding-face . underline) + (apropos-label-face . italic) + (apropos-match-face . secondary-selection) + (apropos-property-face . bold-italic) + (apropos-symbol-face . bold) + (ebnf-except-border-color . "Black") + (ebnf-line-color . "Black") + (ebnf-non-terminal-border-color . "Black") + (ebnf-repeat-border-color . "Black") + (ebnf-special-border-color . "Black") + (ebnf-terminal-border-color . "Black") + (gnus-article-button-face . bold) + (gnus-article-mouse-face . highlight) + (gnus-carpal-button-face . bold) + (gnus-carpal-header-face . bold-italic) + (gnus-cite-attribution-face . gnus-cite-attribution-face) + (gnus-mouse-face . highlight) + (gnus-selected-tree-face . modeline) + (gnus-signature-face . gnus-signature-face) + (gnus-summary-selected-face . gnus-summary-selected-face) + (help-highlight-face . underline) + (list-matching-lines-face . bold) + (ps-line-number-color . "black") + (ps-zebra-color . 0.95) + (tags-tag-face . default) + (vc-annotate-very-old-color . "#0046FF") + (view-highlight-face . highlight) + (widget-mouse-face . highlight)) + (default ((t (:stipple nil :background "black" :foreground "white" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :width normal :family "outline-courier new")))) + (Info-title-1-face ((t (:bold t :weight bold :family "helv" :height 1.728)))) + (Info-title-2-face ((t (:bold t :family "helv" :weight bold :height 1.44)))) + (Info-title-3-face ((t (:bold t :weight bold :family "helv" :height 1.2)))) + (Info-title-4-face ((t (:bold t :family "helv" :weight bold)))) + (bbdb-company ((t (:italic t :slant italic)))) + (bbdb-field-name ((t (:bold t :weight bold)))) + (bbdb-field-value ((t (nil)))) + (bbdb-name ((t (:underline t)))) + (bold ((t (:bold t :weight bold)))) + (bold-italic ((t (:italic t :bold t :slant italic :weight bold)))) + (border ((t (:background "black")))) + (change-log-acknowledgement-face ((t (:italic t :slant oblique :foreground "AntiqueWhite3")))) + (change-log-conditionals-face ((t (:foreground "Aquamarine")))) + (change-log-date-face ((t (:italic t :slant oblique :foreground "BurlyWood")))) + (change-log-email-face ((t (:foreground "Aquamarine")))) + (change-log-file-face ((t (:bold t :family "Verdana" :weight bold :foreground "LightSkyBlue" :height 0.9)))) + (change-log-function-face ((t (:foreground "Aquamarine")))) + (change-log-list-face ((t (:foreground "LightSkyBlue")))) + (change-log-name-face ((t (:bold t :weight bold :foreground "Gold")))) + (clear-case-mode-string-face ((t (:bold t :family "Arial" :box (:line-width 2 :color "grey" :style released-button) :foreground "black" :background "grey" :weight bold :height 0.9)))) + (comint-highlight-input ((t (:bold t :weight bold)))) + (comint-highlight-prompt ((t (:foreground "cyan")))) + (cursor ((t (:background "yellow")))) + (custom-button-face ((t (:background "lightgrey" :foreground "black" :box (:line-width 2 :style released-button))))) + (custom-button-pressed-face ((t (:background "lightgrey" :foreground "black" :box (:line-width 2 :style pressed-button))))) + (custom-changed-face ((t (:background "blue" :foreground "white")))) + (custom-comment-face ((t (:background "dim gray")))) + (custom-comment-tag-face ((t (:foreground "gray80")))) + (custom-documentation-face ((t (nil)))) + (custom-face-tag-face ((t (:bold t :family "helv" :weight bold :height 1.1)))) + (custom-group-tag-face ((t (:bold t :family "helv" :foreground "light blue" :weight bold :height 1.1)))) + (custom-group-tag-face-1 ((t (:bold t :family "helv" :foreground "pink" :weight bold :height 1.1)))) + (custom-invalid-face ((t (:background "red" :foreground "yellow")))) + (custom-modified-face ((t (:background "blue" :foreground "white")))) + (custom-rogue-face ((t (:background "black" :foreground "pink")))) + (custom-saved-face ((t (:underline t)))) + (custom-set-face ((t (:background "white" :foreground "blue")))) + (custom-state-face ((t (:foreground "lime green")))) + (custom-variable-button-face ((t (:bold t :underline t :weight bold)))) + (custom-variable-tag-face ((t (:bold t :family "helv" :foreground "light blue" :weight bold :height 1.2)))) + (diff-added-face ((t (nil)))) + (diff-changed-face ((t (nil)))) + (diff-context-face ((t (:foreground "grey70")))) + (diff-file-header-face ((t (:bold t :background "grey60" :weight bold)))) + (diff-function-face ((t (:foreground "grey70")))) + (diff-header-face ((t (:background "grey45")))) + (diff-hunk-header-face ((t (:background "grey45")))) + (diff-index-face ((t (:bold t :weight bold :background "grey60")))) + (diff-nonexistent-face ((t (:bold t :weight bold :background "grey60")))) + (diff-removed-face ((t (nil)))) + (fixed-pitch ((t (:family "courier")))) + (font-lock-builtin-face ((t (:foreground "SteelBlue")))) + (font-lock-comment-face ((t (:italic t :foreground "AntiqueWhite3" :slant oblique)))) + (font-lock-constant-face ((t (:bold t :foreground "Gold" :weight bold)))) + (font-lock-doc-face ((t (:italic t :slant oblique :foreground "BurlyWood")))) + (font-lock-doc-string-face ((t (:italic t :slant oblique :foreground "BurlyWood")))) + (font-lock-function-name-face ((t (:bold t :foreground "LightSkyBlue" :weight bold :height 0.9 :family "Verdana")))) + (font-lock-keyword-face ((t (:foreground "LightSkyBlue")))) + (font-lock-preprocessor-face ((t (:bold t :foreground "Gold" :weight bold)))) + (font-lock-reference-face ((t (:foreground "SteelBlue")))) + (font-lock-string-face ((t (:italic t :foreground "BurlyWood" :slant oblique)))) + (font-lock-type-face ((t (:bold t :foreground "PaleGreen" :weight bold :height 0.9 :family "Verdana")))) + (font-lock-variable-name-face ((t (:foreground "Aquamarine")))) + (font-lock-warning-face ((t (:bold t :foreground "chocolate" :weight bold)))) + (fringe ((t (:family "outline-courier new" :width normal :weight normal :slant normal :underline nil :overline nil :strike-through nil :box nil :inverse-video nil :stipple nil :background "grey4" :foreground "Wheat")))) + (gnus-cite-attribution-face ((t (:italic t :slant italic)))) + (gnus-cite-face-1 ((t (:foreground "light blue")))) + (gnus-cite-face-10 ((t (:foreground "medium purple")))) + (gnus-cite-face-11 ((t (:foreground "turquoise")))) + (gnus-cite-face-2 ((t (:foreground "light cyan")))) + (gnus-cite-face-3 ((t (:foreground "light yellow")))) + (gnus-cite-face-4 ((t (:foreground "light pink")))) + (gnus-cite-face-5 ((t (:foreground "pale green")))) + (gnus-cite-face-6 ((t (:foreground "beige")))) + (gnus-cite-face-7 ((t (:foreground "orange")))) + (gnus-cite-face-8 ((t (:foreground "magenta")))) + (gnus-cite-face-9 ((t (:foreground "violet")))) + (gnus-emphasis-bold ((t (:bold t :weight bold)))) + (gnus-emphasis-bold-italic ((t (:italic t :bold t :slant italic :weight bold)))) + (gnus-emphasis-highlight-words ((t (:background "black" :foreground "yellow")))) + (gnus-emphasis-italic ((t (:italic t :slant italic)))) + (gnus-emphasis-underline ((t (:underline t)))) + (gnus-emphasis-underline-bold ((t (:bold t :underline t :weight bold)))) + (gnus-emphasis-underline-bold-italic ((t (:italic t :bold t :underline t :slant italic :weight bold)))) + (gnus-emphasis-underline-italic ((t (:italic t :underline t :slant italic)))) + (gnus-group-mail-1-empty-face ((t (:foreground "aquamarine1")))) + (gnus-group-mail-1-face ((t (:bold t :foreground "aquamarine1" :weight bold)))) + (gnus-group-mail-2-empty-face ((t (:foreground "aquamarine2")))) + (gnus-group-mail-2-face ((t (:bold t :foreground "aquamarine2" :weight bold)))) + (gnus-group-mail-3-empty-face ((t (:foreground "aquamarine3")))) + (gnus-group-mail-3-face ((t (:bold t :foreground "aquamarine3" :weight bold)))) + (gnus-group-mail-low-empty-face ((t (:foreground "aquamarine4")))) + (gnus-group-mail-low-face ((t (:bold t :foreground "aquamarine4" :weight bold)))) + (gnus-group-news-1-empty-face ((t (:foreground "PaleTurquoise")))) + (gnus-group-news-1-face ((t (:bold t :foreground "PaleTurquoise" :weight bold)))) + (gnus-group-news-2-empty-face ((t (:foreground "turquoise")))) + (gnus-group-news-2-face ((t (:bold t :foreground "turquoise" :weight bold)))) + (gnus-group-news-3-empty-face ((t (nil)))) + (gnus-group-news-3-face ((t (:bold t :weight bold)))) + (gnus-group-news-4-empty-face ((t (nil)))) + (gnus-group-news-4-face ((t (:bold t :weight bold)))) + (gnus-group-news-5-empty-face ((t (nil)))) + (gnus-group-news-5-face ((t (:bold t :weight bold)))) + (gnus-group-news-6-empty-face ((t (nil)))) + (gnus-group-news-6-face ((t (:bold t :weight bold)))) + (gnus-group-news-low-empty-face ((t (:foreground "DarkTurquoise")))) + (gnus-group-news-low-face ((t (:bold t :foreground "DarkTurquoise" :weight bold)))) + (gnus-header-content-face ((t (:italic t :foreground "forest green" :slant italic)))) + (gnus-header-from-face ((t (:foreground "spring green")))) + (gnus-header-name-face ((t (:foreground "SeaGreen")))) + (gnus-header-newsgroups-face ((t (:italic t :foreground "yellow" :slant italic)))) + (gnus-header-subject-face ((t (:foreground "SeaGreen3")))) + (gnus-signature-face ((t (:italic t :slant italic)))) + (gnus-splash-face ((t (:foreground "Brown")))) + (gnus-summary-cancelled-face ((t (:background "black" :foreground "yellow")))) + (gnus-summary-high-ancient-face ((t (:bold t :foreground "SkyBlue" :weight bold)))) + (gnus-summary-high-read-face ((t (:bold t :foreground "PaleGreen" :weight bold)))) + (gnus-summary-high-ticked-face ((t (:bold t :foreground "pink" :weight bold)))) + (gnus-summary-high-unread-face ((t (:bold t :weight bold)))) + (gnus-summary-low-ancient-face ((t (:italic t :foreground "SkyBlue" :slant italic)))) + (gnus-summary-low-read-face ((t (:italic t :foreground "PaleGreen" :slant italic)))) + (gnus-summary-low-ticked-face ((t (:italic t :foreground "pink" :slant italic)))) + (gnus-summary-low-unread-face ((t (:italic t :slant italic)))) + (gnus-summary-normal-ancient-face ((t (:foreground "SkyBlue")))) + (gnus-summary-normal-read-face ((t (:foreground "PaleGreen")))) + (gnus-summary-normal-ticked-face ((t (:foreground "pink")))) + (gnus-summary-normal-unread-face ((t (nil)))) + (gnus-summary-selected-face ((t (:underline t)))) + (header-line ((t (:family "Arial" :background "grey20" :foreground "grey75" :box (:line-width 3 :color "grey20" :style released-button) :height 0.9)))) + (highlight ((t (:background "darkolivegreen")))) + (info-header-node ((t (:italic t :bold t :weight bold :slant italic :foreground "white")))) + (info-header-xref ((t (:bold t :weight bold :foreground "cyan")))) + (info-menu-5 ((t (:foreground "red1")))) + (info-menu-header ((t (:bold t :family "helv" :weight bold)))) + (info-node ((t (:italic t :bold t :foreground "white" :slant italic :weight bold)))) + (info-xref ((t (:bold t :foreground "cyan" :weight bold)))) + (isearch ((t (:background "palevioletred2")))) + (isearch-lazy-highlight-face ((t (:background "paleturquoise4")))) + (italic ((t (:italic t :slant italic)))) + (makefile-space-face ((t (:background "hotpink")))) + (menu ((t (nil)))) + (message-cited-text-face ((t (:foreground "red")))) + (message-header-cc-face ((t (:bold t :foreground "green4" :weight bold)))) + (message-header-name-face ((t (:foreground "DarkGreen")))) + (message-header-newsgroups-face ((t (:italic t :bold t :foreground "yellow" :slant italic :weight bold)))) + (message-header-other-face ((t (:foreground "#b00000")))) + (message-header-subject-face ((t (:foreground "green3")))) + (message-header-to-face ((t (:bold t :foreground "green2" :weight bold)))) + (message-header-xheader-face ((t (:foreground "blue")))) + (message-mml-face ((t (:foreground "ForestGreen")))) + (message-separator-face ((t (:foreground "blue3")))) + (modeline ((t (:background "grey" :foreground "black" :box (:line-width 2 :color "grey" :style released-button) :height 0.9 :family "Arial")))) + (modeline-mousable-minor-mode ((t (:background "grey" :foreground "black" :box (:line-width 2 :color "grey" :style released-button) :height 0.9 :family "Arial")))) + (modeline-mousable ((t (:background "grey" :foreground "black" :box (:line-width 2 :color "grey" :style released-button) :height 0.9 :family "Arial")))) + (modeline-buffer-id ((t (:background "grey" :foreground "black" :box (:line-width 2 :color "grey" :style released-button) :height 0.9 :family "Arial")))) + (mouse ((t (:background "white")))) + (primary-selection ((t (:background "DarkSlateGray")))) + (region ((t (:background "DarkSlateGray")))) + (scroll-bar ((t (nil)))) + (secondary-selection ((t (:background "SkyBlue4")))) + (tool-bar ((t (:background "grey75" :foreground "black" :box (:line-width 1 :style released-button))))) + (trailing-whitespace ((t (:background "white")))) + (underline ((t (:underline t)))) + (variable-pitch ((t (:family "helv")))) + (widget-button-face ((t (:bold t :weight bold)))) + (widget-button-pressed-face ((t (:foreground "red")))) + (widget-documentation-face ((t (:foreground "lime green")))) + (widget-field-face ((t (:background "dim gray")))) + (widget-inactive-face ((t (:foreground "light gray")))) + (widget-single-line-field-face ((t (:background "dim gray")))) + (zmacs-region ((t (:background "DarkSlateGray"))))))) + +(defun color-theme-deep-blue () + "Color theme by Tomas Cerha, created 2001-11-13." + (interactive) + (color-theme-install + '(color-theme-deep-blue + ((background-color . "#102e4e") + (background-mode . dark) + (border-color . "black") + (cursor-color . "green") + (foreground-color . "#eeeeee") + (mouse-color . "white")) + ((browse-kill-ring-separator-face . bold) + (display-time-mail-face . mode-line) + (help-highlight-face . underline) + (list-matching-lines-face . secondary-selection) + (vc-annotate-very-old-color . "#0046FF") + (view-highlight-face . highlight) + (widget-mouse-face . highlight)) + (default ((t (:stipple nil :background "#102e4e" :foreground "#eeeeee" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :width normal :family "misc-fixed")))) + (Info-title-1-face ((t (:bold t :weight bold :family "helv" :height 1.728)))) + (Info-title-2-face ((t (:bold t :family "helv" :weight bold :height 1.44)))) + (Info-title-3-face ((t (:bold t :weight bold :family "helv" :height 1.2)))) + (Info-title-4-face ((t (:bold t :family "helv" :weight bold)))) + (bold ((t (:bold t :weight bold)))) + (bold-italic ((t (:italic t :bold t :slant italic :weight bold)))) + (border ((t (:background "black")))) + (calendar-today-face ((t (:background "blue")))) + (change-log-acknowledgement-face ((t (:italic t :slant italic :foreground "CadetBlue")))) + (change-log-conditionals-face ((t (:foreground "SeaGreen2")))) + (change-log-date-face ((t (:foreground "burlywood")))) + (change-log-email-face ((t (:foreground "SeaGreen2")))) + (change-log-file-face ((t (:bold t :weight bold :foreground "goldenrod")))) + (change-log-function-face ((t (:foreground "SeaGreen2")))) + (change-log-list-face ((t (:bold t :weight bold :foreground "DeepSkyBlue1")))) + (change-log-name-face ((t (:foreground "gold")))) + (comint-highlight-input ((t (:bold t :weight bold)))) + (comint-highlight-prompt ((t (:foreground "cyan")))) + (cursor ((t (:background "green" :foreground "black")))) + (cvs-filename-face ((t (:foreground "lightblue")))) + (cvs-handled-face ((t (:foreground "pink")))) + (cvs-header-face ((t (:bold t :foreground "lightyellow" :weight bold)))) + (cvs-marked-face ((t (:bold t :foreground "green" :weight bold)))) + (cvs-msg-face ((t (:italic t :slant italic)))) + (cvs-need-action-face ((t (:foreground "orange")))) + (cvs-unknown-face ((t (:foreground "red")))) + (diary-face ((t (:foreground "orange red")))) + (diff-added-face ((t (nil)))) + (diff-changed-face ((t (nil)))) + (diff-context-face ((t (:foreground "grey70")))) + (diff-file-header-face ((t (:bold t :background "grey60" :weight bold)))) + (diff-function-face ((t (:foreground "grey70")))) + (diff-header-face ((t (:background "grey45")))) + (diff-hunk-header-face ((t (:background "grey45")))) + (diff-index-face ((t (:bold t :weight bold :background "grey60")))) + (diff-nonexistent-face ((t (:bold t :weight bold :background "grey60")))) + (diff-removed-face ((t (nil)))) + (fixed-pitch ((t (:family "fixed")))) + (font-latex-bold-face ((t (:bold t :foreground "OliveDrab" :weight bold)))) + (font-latex-italic-face ((t (:italic t :foreground "OliveDrab" :slant italic)))) + (font-latex-math-face ((t (:foreground "burlywood")))) + (font-latex-sedate-face ((t (:foreground "LightGray")))) + (font-latex-string-face ((t (:foreground "LightSalmon")))) + (font-latex-warning-face ((t (:bold t :foreground "Pink" :weight bold)))) + (font-lock-builtin-face ((t (:foreground "LightCoral")))) + (font-lock-comment-face ((t (:italic t :foreground "CadetBlue" :slant italic)))) + (font-lock-constant-face ((t (:foreground "gold")))) + (font-lock-doc-face ((t (:foreground "BlanchedAlmond")))) + (font-lock-doc-string-face ((t (:foreground "BlanchedAlmond")))) + (font-lock-function-name-face ((t (:bold t :foreground "goldenrod" :weight bold)))) + (font-lock-keyword-face ((t (:bold t :foreground "DeepSkyBlue1" :weight bold)))) + (font-lock-preprocessor-face ((t (:foreground "gold")))) + (font-lock-reference-face ((t (:foreground "LightCoral")))) + (font-lock-string-face ((t (:foreground "burlywood")))) + (font-lock-type-face ((t (:foreground "CadetBlue1")))) + (font-lock-variable-name-face ((t (:foreground "SeaGreen2")))) + (font-lock-warning-face ((t (:foreground "yellow")))) + (fringe ((t (:background "#405060")))) + (header-line ((t (:box (:line-width 2 :style released-button) :background "grey20" :foreground "grey90" :box nil)))) + (highlight ((t (:background "darkgreen")))) + (holiday-face ((t (:foreground "green")))) + (info-header-node ((t (:foreground "DeepSkyBlue1")))) + (info-header-xref ((t (:bold t :weight bold :foreground "SeaGreen2")))) + (info-menu-5 ((t (:foreground "wheat")))) + (info-menu-header ((t (:bold t :family "helv" :weight bold)))) + (info-node ((t (:foreground "DeepSkyBlue1")))) + (info-xref ((t (:bold t :foreground "SeaGreen2" :weight bold)))) + (isearch ((t (:background "palevioletred2" :foreground "brown4")))) + (isearch-lazy-highlight-face ((t (:background "paleturquoise4")))) + (italic ((t (:italic t :slant italic)))) + (menu ((t (:background "gray" :foreground "black" :family "helvetica")))) + (modeline ((t (:background "gray" :foreground "black" :box (:line-width 2 :style released-button))))) + (modeline-buffer-id ((t (:background "gray" :foreground "black" :box (:line-width 2 :style released-button))))) + (modeline-mousable ((t (:background "gray" :foreground "black" :box (:line-width 2 :style released-button))))) + (modeline-mousable-minor-mode ((t (:background "gray" :foreground "black" :box (:line-width 2 :style released-button))))) + (mouse ((t (:background "white")))) + (region ((t (:background "DarkCyan")))) + (scroll-bar ((t (:background "gray" :foreground "#506070")))) + (secondary-selection ((t (:background "yellow" :foreground "gray10")))) + (show-paren-match-face ((t (:bold t :foreground "yellow" :weight bold)))) + (show-paren-mismatch-face ((t (:bold t :foreground "red" :weight bold)))) + (tool-bar ((t (:background "grey75" :foreground "black" :box (:line-width 1 :style released-button))))) + (tooltip ((t (:background "lightyellow" :foreground "black")))) + (trailing-whitespace ((t (:background "#102e4e")))) + (underline ((t (:underline t)))) + (variable-pitch ((t (:family "helv")))) + (widget-button-face ((t (:bold t :weight bold)))) + (widget-button-pressed-face ((t (:foreground "red")))) + (widget-documentation-face ((t (:foreground "lime green")))) + (widget-field-face ((t (:background "dim gray")))) + (widget-inactive-face ((t (:foreground "light gray")))) + (widget-single-line-field-face ((t (:background "dim gray"))))))) + +(defun color-theme-kingsajz () + "Color theme by Olgierd \"Kingsajz\" Ziolko, created 2001-12-04. +Another theme with wheat on DarkSlatGrey. Based on Subtle Hacker. +Used on Emacs 21.1 @ WinMe. Not tested on any other systems. + +Some faces uses Andale mono font (nice fixed-width font). +It is available at: http://www.microsoft.com/typography/downloads/andale32.exe + +Hail Eris! All hail Discordia!" + (interactive) + (color-theme-install + '(color-theme-kingsajz + ((background-color . "darkslategrey") + (background-mode . dark) + (border-color . "black") + (cursor-color . "LightGray") + (foreground-color . "wheat") + (mouse-color . "Grey")) + ((apropos-keybinding-face . underline) + (apropos-label-face face italic mouse-face highlight) + (apropos-match-face . secondary-selection) + (apropos-property-face . bold-italic) + (apropos-symbol-face . info-xref) + (display-time-mail-face . mode-line) + (gnus-article-button-face . bold) + (gnus-article-mouse-face . highlight) + (gnus-carpal-button-face . bold) + (gnus-carpal-header-face . bold-italic) + (gnus-cite-attribution-face . gnus-cite-attribution-face) + (gnus-mouse-face . highlight) + (gnus-selected-tree-face . modeline) + (gnus-signature-face . gnus-signature-face) + (gnus-summary-selected-face . gnus-summary-selected-face) + (gnus-treat-display-xface . head) + (help-highlight-face . underline) + (list-matching-lines-face . bold) + (view-highlight-face . highlight) + (widget-mouse-face . highlight)) + (default ((t (:stipple nil :background "darkslategrey" :foreground "wheat" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :width normal :family "outline-andale mono")))) + (bbdb-field-name ((t (:foreground "green")))) + (bg:erc-color-face0 ((t (:background "White")))) + (bg:erc-color-face1 ((t (:background "black")))) + (bg:erc-color-face10 ((t (:background "lightblue1")))) + (bg:erc-color-face11 ((t (:background "cyan")))) + (bg:erc-color-face12 ((t (:background "blue")))) + (bg:erc-color-face13 ((t (:background "deeppink")))) + (bg:erc-color-face14 ((t (:background "gray50")))) + (bg:erc-color-face15 ((t (:background "gray90")))) + (bg:erc-color-face2 ((t (:background "blue4")))) + (bg:erc-color-face3 ((t (:background "green4")))) + (bg:erc-color-face4 ((t (:background "red")))) + (bg:erc-color-face5 ((t (:background "brown")))) + (bg:erc-color-face6 ((t (:background "purple")))) + (bg:erc-color-face7 ((t (:background "orange")))) + (bg:erc-color-face8 ((t (:background "yellow")))) + (bg:erc-color-face9 ((t (:background "green")))) + (blue ((t (:foreground "cyan")))) + (bold ((t (:bold t :foreground "OrangeRed" :weight bold :family "Arial")))) + (bold-italic ((t (:italic t :bold t :slant italic :weight bold :family "Arial")))) + (border ((t (:background "black")))) + (calendar-today-face ((t (:underline t)))) + (comint-highlight-input ((t (:bold t :weight bold)))) + (comint-highlight-prompt ((t (:foreground "cyan")))) + (cperl-array-face ((t (:foreground "Yellow")))) + (cperl-hash-face ((t (:foreground "White")))) + (cperl-nonoverridable-face ((t (:foreground "SkyBlue")))) + (cursor ((t (:background "LightGray")))) + (custom-button-face ((t (:foreground "MediumSlateBlue" :underline t)))) + (custom-button-pressed-face ((t (:background "lightgrey" :foreground "black" :box (:line-width 2 :style pressed-button))))) + (custom-changed-face ((t (:background "blue" :foreground "white")))) + (custom-comment-face ((t (:background "dim gray")))) + (custom-comment-tag-face ((t (:foreground "gray80")))) + (custom-documentation-face ((t (:foreground "Grey")))) + (custom-face-tag-face ((t (:bold t :family "Arial" :weight bold :height 1.2)))) + (custom-group-tag-face ((t (:foreground "MediumAquamarine")))) + (custom-group-tag-face-1 ((t (:bold t :family "Arial" :foreground "pink" :weight bold :height 1.2)))) + (custom-invalid-face ((t (:background "red" :foreground "yellow")))) + (custom-modified-face ((t (:background "blue" :foreground "white")))) + (custom-rogue-face ((t (:background "black" :foreground "pink")))) + (custom-saved-face ((t (:underline t)))) + (custom-set-face ((t (:background "white" :foreground "blue")))) + (custom-state-face ((t (:foreground "Coral")))) + (custom-variable-button-face ((t (:underline t)))) + (custom-variable-tag-face ((t (:foreground "Aquamarine")))) + (date ((t (:foreground "green")))) + (diary-face ((t (:bold t :foreground "IndianRed" :weight bold)))) + (dired-face-directory ((t (:bold t :foreground "sky blue" :weight bold)))) + (dired-face-executable ((t (:foreground "green yellow")))) + (dired-face-flagged ((t (:foreground "tomato")))) + (dired-face-marked ((t (:foreground "light salmon")))) + (dired-face-permissions ((t (:foreground "aquamarine")))) + (erc-action-face ((t (:bold t :weight bold)))) + (erc-bold-face ((t (:bold t :weight bold)))) + (erc-default-face ((t (nil)))) + (erc-direct-msg-face ((t (:foreground "pale green")))) + (erc-error-face ((t (:bold t :foreground "IndianRed" :weight bold)))) + (erc-highlight-face ((t (:bold t :foreground "pale green" :weight bold)))) + (erc-host-danger-face ((t (:foreground "red")))) + (erc-input-face ((t (:foreground "light blue")))) + (erc-inverse-face ((t (:background "steel blue")))) + (erc-notice-face ((t (:foreground "light salmon")))) + (erc-pal-face ((t (:foreground "pale green")))) + (erc-prompt-face ((t (:bold t :foreground "light blue" :weight bold)))) + (erc-underline-face ((t (:underline t)))) + (eshell-ls-archive-face ((t (:bold t :foreground "IndianRed" :weight bold)))) + (eshell-ls-backup-face ((t (:foreground "Grey")))) + (eshell-ls-clutter-face ((t (:bold t :foreground "DimGray" :weight bold)))) + (eshell-ls-directory-face ((t (:bold t :foreground "MediumSlateBlue" :weight bold)))) + (eshell-ls-executable-face ((t (:bold t :foreground "Coral" :weight bold)))) + (eshell-ls-missing-face ((t (:bold t :foreground "black" :weight bold)))) + (eshell-ls-picture-face ((t (:foreground "Violet")))) + (eshell-ls-product-face ((t (:foreground "LightSalmon")))) + (eshell-ls-readonly-face ((t (:foreground "Aquamarine")))) + (eshell-ls-special-face ((t (:bold t :foreground "Gold" :weight bold)))) + (eshell-ls-symlink-face ((t (:bold t :foreground "White" :weight bold)))) + (eshell-ls-text-face ((t (:foreground "medium aquamarine")))) + (eshell-ls-todo-face ((t (:bold t :foreground "aquamarine" :weight bold)))) + (eshell-ls-unreadable-face ((t (:foreground "DimGray")))) + (eshell-prompt-face ((t (:foreground "powder blue")))) + (face-1 ((t (:stipple nil :foreground "royal blue" :family "andale mono")))) + (face-2 ((t (:stipple nil :foreground "DeepSkyBlue1" :overline nil :underline nil :slant normal :family "outline-andale mono")))) + (face-3 ((t (:stipple nil :foreground "NavajoWhite3")))) + (fg:erc-color-face0 ((t (:foreground "white")))) + (fg:erc-color-face1 ((t (:foreground "beige")))) + (fg:erc-color-face10 ((t (:foreground "pale goldenrod")))) + (fg:erc-color-face11 ((t (:foreground "light goldenrod yellow")))) + (fg:erc-color-face12 ((t (:foreground "light yellow")))) + (fg:erc-color-face13 ((t (:foreground "yellow")))) + (fg:erc-color-face14 ((t (:foreground "light goldenrod")))) + (fg:erc-color-face15 ((t (:foreground "lime green")))) + (fg:erc-color-face2 ((t (:foreground "lemon chiffon")))) + (fg:erc-color-face3 ((t (:foreground "light cyan")))) + (fg:erc-color-face4 ((t (:foreground "powder blue")))) + (fg:erc-color-face5 ((t (:foreground "sky blue")))) + (fg:erc-color-face6 ((t (:foreground "dark sea green")))) + (fg:erc-color-face7 ((t (:foreground "pale green")))) + (fg:erc-color-face8 ((t (:foreground "medium spring green")))) + (fg:erc-color-face9 ((t (:foreground "khaki")))) + (fixed-pitch ((t (:family "courier")))) + (font-lock-builtin-face ((t (:bold t :foreground "PaleGreen" :weight bold)))) + (font-lock-comment-face ((t (:foreground "White")))) + (font-lock-constant-face ((t (:bold t :foreground "Aquamarine" :weight bold)))) + (font-lock-doc-face ((t (:italic t :slant italic :foreground "LightSalmon")))) + (font-lock-doc-string-face ((t (:foreground "LightSalmon")))) + (font-lock-function-name-face ((t (:bold t :foreground "MediumSlateBlue" :weight bold)))) + (font-lock-keyword-face ((t (:foreground "Salmon")))) + (font-lock-preprocessor-face ((t (:foreground "Salmon")))) + (font-lock-reference-face ((t (:foreground "pale green")))) + (font-lock-string-face ((t (:italic t :foreground "LightSalmon" :slant italic)))) + (font-lock-type-face ((t (:bold t :foreground "YellowGreen" :weight bold)))) + (font-lock-variable-name-face ((t (:italic t :bold t :foreground "Aquamarine" :slant italic :weight bold)))) + (font-lock-warning-face ((t (:bold t :foreground "IndianRed" :weight bold)))) + (fringe ((t (:background "darkslategrey")))) + (gnus-cite-attribution-face ((t (:family "arial")))) + (gnus-cite-face-1 ((t (:foreground "DarkGoldenrod3")))) + (gnus-cite-face-10 ((t (nil)))) + (gnus-cite-face-11 ((t (nil)))) + (gnus-cite-face-2 ((t (:foreground "IndianRed3")))) + (gnus-cite-face-3 ((t (:foreground "tomato")))) + (gnus-cite-face-4 ((t (:foreground "yellow green")))) + (gnus-cite-face-5 ((t (:foreground "SteelBlue3")))) + (gnus-cite-face-6 ((t (:foreground "Azure3")))) + (gnus-cite-face-7 ((t (:foreground "Azure4")))) + (gnus-cite-face-8 ((t (:foreground "SpringGreen4")))) + (gnus-cite-face-9 ((t (:foreground "SlateGray4")))) + (gnus-emphasis-bold ((t (:bold t :foreground "greenyellow" :weight bold :family "Arial")))) + (gnus-emphasis-bold-italic ((t (:italic t :bold t :foreground "OrangeRed1" :slant italic :weight bold :family "arial")))) + (gnus-emphasis-highlight-words ((t (:background "black" :foreground "khaki")))) + (gnus-emphasis-italic ((t (:italic t :bold t :foreground "orange" :slant italic :weight bold :family "Arial")))) + (gnus-emphasis-underline ((t (:foreground "greenyellow" :underline t)))) + (gnus-emphasis-underline-bold ((t (:bold t :foreground "khaki" :underline t :weight bold :family "Arial")))) + (gnus-emphasis-underline-bold-italic ((t (:italic t :bold t :underline t :slant italic :weight bold :family "Arial")))) + (gnus-emphasis-underline-italic ((t (:italic t :foreground "orange" :underline t :slant italic :family "Arial")))) + (gnus-group-mail-1-empty-face ((t (:foreground "Salmon4")))) + (gnus-group-mail-1-face ((t (:bold t :foreground "firebrick1" :weight bold)))) + (gnus-group-mail-2-empty-face ((t (:foreground "turquoise4")))) + (gnus-group-mail-2-face ((t (:bold t :foreground "turquoise" :weight bold)))) + (gnus-group-mail-3-empty-face ((t (:foreground "LightCyan4")))) + (gnus-group-mail-3-face ((t (:bold t :foreground "LightCyan1" :weight bold)))) + (gnus-group-mail-low-empty-face ((t (:foreground "SteelBlue4")))) + (gnus-group-mail-low-face ((t (:bold t :foreground "SteelBlue2" :weight bold)))) + (gnus-group-news-1-empty-face ((t (:foreground "Salmon4")))) + (gnus-group-news-1-face ((t (:bold t :foreground "FireBrick1" :weight bold)))) + (gnus-group-news-2-empty-face ((t (:foreground "darkorange3")))) + (gnus-group-news-2-face ((t (:bold t :foreground "dark orange" :weight bold)))) + (gnus-group-news-3-empty-face ((t (:foreground "turquoise4")))) + (gnus-group-news-3-face ((t (:bold t :foreground "Aquamarine" :weight bold)))) + (gnus-group-news-4-empty-face ((t (:foreground "SpringGreen4")))) + (gnus-group-news-4-face ((t (:bold t :foreground "SpringGreen2" :weight bold)))) + (gnus-group-news-5-empty-face ((t (:foreground "OliveDrab4")))) + (gnus-group-news-5-face ((t (:bold t :foreground "OliveDrab2" :weight bold)))) + (gnus-group-news-6-empty-face ((t (:foreground "DarkGoldenrod4")))) + (gnus-group-news-6-face ((t (:bold t :foreground "DarkGoldenrod3" :weight bold)))) + (gnus-group-news-low-empty-face ((t (:foreground "wheat4")))) + (gnus-group-news-low-face ((t (:bold t :foreground "tan4" :weight bold)))) + (gnus-header-content-face ((t (:foreground "LightSkyBlue3")))) + (gnus-header-from-face ((t (:bold t :foreground "light cyan" :weight bold)))) + (gnus-header-name-face ((t (:bold t :foreground "DodgerBlue1" :weight bold)))) + (gnus-header-newsgroups-face ((t (:italic t :bold t :foreground "LightSkyBlue3" :slant italic :weight bold)))) + (gnus-header-subject-face ((t (:bold t :foreground "light cyan" :weight bold)))) + (gnus-signature-face ((t (:italic t :foreground "salmon" :slant italic)))) + (gnus-splash-face ((t (:foreground "Firebrick1")))) + (gnus-summary-cancelled-face ((t (:background "black" :foreground "yellow")))) + (gnus-summary-high-ancient-face ((t (:bold t :foreground "MistyRose4" :weight bold)))) + (gnus-summary-high-read-face ((t (:bold t :foreground "tomato3" :weight bold)))) + (gnus-summary-high-ticked-face ((t (:bold t :foreground "coral" :weight bold)))) + (gnus-summary-high-unread-face ((t (:italic t :bold t :foreground "red1" :slant italic :weight bold)))) + (gnus-summary-low-ancient-face ((t (:italic t :foreground "DarkSeaGreen4" :slant italic)))) + (gnus-summary-low-read-face ((t (:foreground "SeaGreen4")))) + (gnus-summary-low-ticked-face ((t (:italic t :foreground "Green4" :slant italic)))) + (gnus-summary-low-unread-face ((t (:italic t :foreground "green3" :slant italic)))) + (gnus-summary-normal-ancient-face ((t (:foreground "RoyalBlue")))) + (gnus-summary-normal-read-face ((t (:foreground "khaki4")))) + (gnus-summary-normal-ticked-face ((t (:foreground "khaki3")))) + (gnus-summary-normal-unread-face ((t (:foreground "khaki")))) + (gnus-summary-selected-face ((t (:foreground "gold" :underline t)))) + (green ((t (:foreground "green")))) + (gui-button-face ((t (:foreground "red" :background "black")))) + (gui-element ((t (:bold t :background "#ffffff" :foreground "#000000" :weight bold)))) + (header-line ((t (:box (:line-width -1 :style released-button) :background "grey20" :foreground "grey90" :box nil)))) + (highlight ((t (:background "PaleGreen" :foreground "DarkGreen")))) + (highline-face ((t (:background "SeaGreen")))) + (holiday-face ((t (:background "DimGray")))) + (info-menu-5 ((t (:underline t)))) + (info-node ((t (:bold t :foreground "DodgerBlue1" :underline t :weight bold)))) + (info-xref ((t (:bold t :foreground "DodgerBlue3" :weight bold)))) + (isearch ((t (:background "sea green" :foreground "black")))) + (isearch-lazy-highlight-face ((t (:background "paleturquoise4")))) + (italic ((t (:italic t :foreground "chocolate3" :slant italic)))) + (menu ((t (nil)))) + (message-cited-text-face ((t (:foreground "White")))) + (message-header-cc-face ((t (:foreground "light cyan")))) + (message-header-name-face ((t (:foreground "DodgerBlue1")))) + (message-header-newsgroups-face ((t (:italic t :bold t :foreground "LightSkyBlue3" :slant italic :weight bold)))) + (message-header-other-face ((t (:foreground "LightSkyBlue3")))) + (message-header-subject-face ((t (:bold t :foreground "light cyan" :weight bold)))) + (message-header-to-face ((t (:bold t :foreground "light cyan" :weight bold)))) + (message-header-xheader-face ((t (:foreground "DodgerBlue3")))) + (message-mml-face ((t (:foreground "ForestGreen")))) + (message-separator-face ((t (:background "cornflower blue" :foreground "chocolate")))) + (modeline ((t (:background "dark olive green" :foreground "wheat" :box (:line-width -1 :style released-button))))) + (modeline-buffer-id ((t (:bold t :background "dark olive green" :foreground "beige" :weight bold :family "arial")))) + (modeline-mousable ((t (:bold t :background "dark olive green" :foreground "yellow green" :weight bold :family "arial")))) + (modeline-mousable-minor-mode ((t (:bold t :background "dark olive green" :foreground "wheat" :weight bold :family "arial")))) + (mouse ((t (:background "Grey")))) + (paren-blink-off ((t (:foreground "brown")))) + (region ((t (:background "dark cyan" :foreground "cyan")))) + (ruler-mode-column-number-face ((t (:box (:color "grey76" :line-width 1 :style released-button) :background "grey76" :stipple nil :inverse-video nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :width normal :family "outline-andale mono" :foreground "black")))) + (ruler-mode-current-column-face ((t (:bold t :box (:color "grey76" :line-width 1 :style released-button) :background "grey76" :stipple nil :inverse-video nil :strike-through nil :overline nil :underline nil :slant normal :width normal :family "outline-andale mono" :foreground "yellow" :weight bold)))) + (ruler-mode-default-face ((t (:family "outline-andale mono" :width normal :weight normal :slant normal :underline nil :overline nil :strike-through nil :inverse-video nil :stipple nil :background "grey76" :foreground "grey64" :box (:color "grey76" :line-width 1 :style released-button))))) + (ruler-mode-fill-column-face ((t (:box (:color "grey76" :line-width 1 :style released-button) :background "grey76" :stipple nil :inverse-video nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :width normal :family "outline-andale mono" :foreground "red")))) + (ruler-mode-margins-face ((t (:box (:color "grey76" :line-width 1 :style released-button) :foreground "grey64" :stipple nil :inverse-video nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :width normal :family "outline-andale mono" :background "grey64")))) + (ruler-mode-tab-stop-face ((t (:box (:color "grey76" :line-width 1 :style released-button) :background "grey76" :stipple nil :inverse-video nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :width normal :family "outline-andale mono" :foreground "steelblue")))) + (scroll-bar ((t (nil)))) + (secondary-selection ((t (:background "Aquamarine" :foreground "SlateBlue")))) + (show-paren-match-face ((t (:bold t :background "Aquamarine" :foreground "steel blue" :weight bold)))) + (show-paren-mismatch-face ((t (:background "Red" :foreground "White")))) + (swbuff-current-buffer-face ((t (:bold t :foreground "red" :weight bold)))) + (text-cursor ((t (:background "Red" :foreground "white")))) + (tool-bar ((t (:background "grey75" :foreground "black" :box (:line-width 1 :style released-button))))) + (trailing-whitespace ((t (:background "red")))) + (underline ((t (:underline t)))) + (variable-pitch ((t (:family "Arial")))) + (w3m-anchor-face ((t (:bold t :foreground "DodgerBlue1" :weight bold)))) + (w3m-arrived-anchor-face ((t (:bold t :foreground "DodgerBlue3" :weight bold)))) + (w3m-header-line-location-content-face ((t (:background "dark olive green" :foreground "wheat")))) + (w3m-header-line-location-title-face ((t (:background "dark olive green" :foreground "beige")))) + (widget-button-face ((t (:bold t :foreground "green" :weight bold :family "courier")))) + (widget-button-pressed-face ((t (:foreground "red")))) + (widget-documentation-face ((t (:foreground "lime green")))) + (widget-field-face ((t (:foreground "LightBlue")))) + (widget-inactive-face ((t (:foreground "DimGray")))) + (widget-single-line-field-face ((t (:foreground "LightBlue")))) + (woman-bold-face ((t (:bold t :weight bold :family "Arial")))) + (woman-italic-face ((t (:italic t :foreground "beige" :slant italic :family "Arial")))) + (woman-unknown-face ((t (:foreground "LightSalmon")))) + (zmacs-region ((t (:background "dark cyan" :foreground "cyan"))))))) + +(defun color-theme-comidia () + "Color theme by Marcelo Dias de Toledo, created 2001-12-17. +Steel blue on black." + (interactive) + (color-theme-install + '(color-theme-comidia + ((background-color . "Black") + (background-mode . dark) + (border-color . "black") + (cursor-color . "SteelBlue") + (foreground-color . "SteelBlue") + (mouse-color . "SteelBlue")) + ((display-time-mail-face . mode-line) + (gnus-mouse-face . highlight) + (gnus-summary-selected-face . gnus-summary-selected-face) + (help-highlight-face . underline) + (ispell-highlight-face . highlight) + (list-matching-lines-face . bold) + (view-highlight-face . highlight) + (widget-mouse-face . highlight)) + (default ((t (:stipple nil :background "Black" :foreground "SteelBlue" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :width semi-condensed :family "misc-fixed")))) + (bg:erc-color-face0 ((t (:background "White")))) + (bg:erc-color-face1 ((t (:background "black")))) + (bg:erc-color-face10 ((t (:background "lightblue1")))) + (bg:erc-color-face11 ((t (:background "cyan")))) + (bg:erc-color-face12 ((t (:background "blue")))) + (bg:erc-color-face13 ((t (:background "deeppink")))) + (bg:erc-color-face14 ((t (:background "gray50")))) + (bg:erc-color-face15 ((t (:background "gray90")))) + (bg:erc-color-face2 ((t (:background "blue4")))) + (bg:erc-color-face3 ((t (:background "green4")))) + (bg:erc-color-face4 ((t (:background "red")))) + (bg:erc-color-face5 ((t (:background "brown")))) + (bg:erc-color-face6 ((t (:background "purple")))) + (bg:erc-color-face7 ((t (:background "orange")))) + (bg:erc-color-face8 ((t (:background "yellow")))) + (bg:erc-color-face9 ((t (:background "green")))) + (bold ((t (:bold t :weight bold)))) + (bold-italic ((t (:italic t :bold t :slant italic :weight bold)))) + (border ((t (:background "black")))) + (comint-highlight-input ((t (:bold t :weight bold)))) + (comint-highlight-prompt ((t (:foreground "cyan")))) + (cursor ((t (:background "SteelBlue")))) + (erc-action-face ((t (:bold t :weight bold)))) + (erc-bold-face ((t (:bold t :weight bold)))) + (erc-dangerous-host-face ((t (:foreground "red")))) + (erc-default-face ((t (nil)))) + (erc-direct-msg-face ((t (:foreground "IndianRed")))) + (erc-error-face ((t (:background "Red" :foreground "White")))) + (erc-fool-face ((t (:foreground "dim gray")))) + (erc-input-face ((t (:foreground "brown")))) + (erc-inverse-face ((t (:background "Black" :foreground "White")))) + (erc-keyword-face ((t (:bold t :foreground "pale green" :weight bold)))) + (erc-notice-face ((t (:bold t :foreground "SlateBlue" :weight bold)))) + (erc-pal-face ((t (:bold t :foreground "Magenta" :weight bold)))) + (erc-prompt-face ((t (:bold t :background "lightBlue2" :foreground "Black" :weight bold)))) + (erc-timestamp-face ((t (:bold t :foreground "green" :weight bold)))) + (erc-underline-face ((t (:underline t)))) + (fg:erc-color-face0 ((t (:foreground "White")))) + (fg:erc-color-face1 ((t (:foreground "black")))) + (fg:erc-color-face10 ((t (:foreground "lightblue1")))) + (fg:erc-color-face11 ((t (:foreground "cyan")))) + (fg:erc-color-face12 ((t (:foreground "blue")))) + (fg:erc-color-face13 ((t (:foreground "deeppink")))) + (fg:erc-color-face14 ((t (:foreground "gray50")))) + (fg:erc-color-face15 ((t (:foreground "gray90")))) + (fg:erc-color-face2 ((t (:foreground "blue4")))) + (fg:erc-color-face3 ((t (:foreground "green4")))) + (fg:erc-color-face4 ((t (:foreground "red")))) + (fg:erc-color-face5 ((t (:foreground "brown")))) + (fg:erc-color-face6 ((t (:foreground "purple")))) + (fg:erc-color-face7 ((t (:foreground "orange")))) + (fg:erc-color-face8 ((t (:foreground "yellow")))) + (fg:erc-color-face9 ((t (:foreground "green")))) + (fixed-pitch ((t (:family "courier")))) + (font-lock-builtin-face ((t (:foreground "LightSteelBlue")))) + (font-lock-comment-face ((t (:foreground "chocolate1")))) + (font-lock-constant-face ((t (:foreground "Aquamarine")))) + (font-lock-doc-face ((t (:foreground "LightSalmon")))) + (font-lock-doc-string-face ((t (:foreground "LightSalmon")))) + (font-lock-function-name-face ((t (:foreground "LightSkyBlue")))) + (font-lock-keyword-face ((t (:foreground "Cyan")))) + (font-lock-preprocessor-face ((t (:foreground "Aquamarine")))) + (font-lock-reference-face ((t (:foreground "LightSteelBlue")))) + (font-lock-string-face ((t (:foreground "LightSalmon")))) + (font-lock-type-face ((t (:foreground "PaleGreen")))) + (font-lock-variable-name-face ((t (:foreground "LightGoldenrod")))) + (font-lock-warning-face ((t (:bold t :foreground "Pink" :weight bold)))) + (fringe ((t (:background "grey10")))) + (gnus-group-mail-1-empty-face ((t (:foreground "aquamarine1")))) + (gnus-group-mail-1-face ((t (:bold t :foreground "aquamarine1" :weight bold)))) + (gnus-group-mail-2-empty-face ((t (:foreground "aquamarine2")))) + (gnus-group-mail-2-face ((t (:bold t :foreground "aquamarine2" :weight bold)))) + (gnus-group-mail-3-empty-face ((t (:foreground "aquamarine3")))) + (gnus-group-mail-3-face ((t (:bold t :foreground "aquamarine3" :weight bold)))) + (gnus-group-mail-low-empty-face ((t (:foreground "aquamarine4")))) + (gnus-group-mail-low-face ((t (:bold t :foreground "aquamarine4" :weight bold)))) + (gnus-group-news-1-empty-face ((t (:foreground "PaleTurquoise")))) + (gnus-group-news-1-face ((t (:bold t :foreground "PaleTurquoise" :weight bold)))) + (gnus-group-news-2-empty-face ((t (:foreground "turquoise")))) + (gnus-group-news-2-face ((t (:bold t :foreground "turquoise" :weight bold)))) + (gnus-group-news-3-empty-face ((t (nil)))) + (gnus-group-news-3-face ((t (:bold t :weight bold)))) + (gnus-group-news-4-empty-face ((t (nil)))) + (gnus-group-news-4-face ((t (:bold t :weight bold)))) + (gnus-group-news-5-empty-face ((t (nil)))) + (gnus-group-news-5-face ((t (:bold t :weight bold)))) + (gnus-group-news-6-empty-face ((t (nil)))) + (gnus-group-news-6-face ((t (:bold t :weight bold)))) + (gnus-group-news-low-empty-face ((t (:foreground "DarkTurquoise")))) + (gnus-group-news-low-face ((t (:bold t :foreground "DarkTurquoise" :weight bold)))) + (gnus-splash-face ((t (:foreground "Brown")))) + (gnus-summary-cancelled-face ((t (:background "black" :foreground "yellow")))) + (gnus-summary-high-ancient-face ((t (:bold t :foreground "SkyBlue" :weight bold)))) + (gnus-summary-high-read-face ((t (:bold t :foreground "PaleGreen" :weight bold)))) + (gnus-summary-high-ticked-face ((t (:bold t :foreground "pink" :weight bold)))) + (gnus-summary-high-unread-face ((t (:bold t :weight bold)))) + (gnus-summary-low-ancient-face ((t (:italic t :foreground "SkyBlue" :slant italic)))) + (gnus-summary-low-read-face ((t (:italic t :foreground "PaleGreen" :slant italic)))) + (gnus-summary-low-ticked-face ((t (:italic t :foreground "pink" :slant italic)))) + (gnus-summary-low-unread-face ((t (:italic t :slant italic)))) + (gnus-summary-normal-ancient-face ((t (:foreground "SkyBlue")))) + (gnus-summary-normal-read-face ((t (:foreground "PaleGreen")))) + (gnus-summary-normal-ticked-face ((t (:foreground "pink")))) + (gnus-summary-normal-unread-face ((t (nil)))) + (gnus-summary-selected-face ((t (:underline t)))) + (header-line ((t (:family "neep" :width condensed :box (:line-width 1 :style none) :background "grey20" :foreground "grey90" :box nil)))) + (highlight ((t (:background "darkolivegreen")))) + (isearch ((t (:background "palevioletred2" :foreground "brown4")))) + (isearch-lazy-highlight-face ((t (:background "paleturquoise4")))) + (italic ((t (:italic t :slant italic)))) + (menu ((t (nil)))) + (message-cited-text-face ((t (:foreground "red")))) + (message-header-cc-face ((t (:bold t :foreground "green4" :weight bold)))) + (message-header-name-face ((t (:foreground "DarkGreen")))) + (message-header-newsgroups-face ((t (:italic t :bold t :foreground "yellow" :slant italic :weight bold)))) + (message-header-other-face ((t (:foreground "#b00000")))) + (message-header-subject-face ((t (:foreground "green3")))) + (message-header-to-face ((t (:bold t :foreground "green2" :weight bold)))) + (message-header-xheader-face ((t (:foreground "blue")))) + (message-mml-face ((t (:foreground "ForestGreen")))) + (message-separator-face ((t (:foreground "blue3")))) + (modeline ((t (:background "Gray10" :foreground "SteelBlue" :box (:line-width 1 :style none) :width condensed :family "neep")))) + (modeline-buffer-id ((t (:background "Gray10" :foreground "SteelBlue" :box (:line-width 1 :style none) :width condensed :family "neep")))) + (modeline-mousable-minor-mode ((t (:background "Gray10" :foreground "SteelBlue" :box (:line-width 1 :style none) :width condensed :family "neep")))) + (modeline-mousable ((t (:background "Gray10" :foreground "SteelBlue" :box (:line-width 1 :style none) :width condensed :family "neep")))) + (mouse ((t (:background "SteelBlue")))) + (primary-selection ((t (:background "blue3")))) + (region ((t (:background "blue3")))) + (scroll-bar ((t (:background "grey75")))) + (secondary-selection ((t (:background "SkyBlue4")))) + (speedbar-button-face ((t (:foreground "green3")))) + (speedbar-directory-face ((t (:foreground "light blue")))) + (speedbar-file-face ((t (:foreground "cyan")))) + (speedbar-highlight-face ((t (:background "sea green")))) + (speedbar-selected-face ((t (:foreground "red" :underline t)))) + (speedbar-tag-face ((t (:foreground "yellow")))) + (tool-bar ((t (:background "grey75" :foreground "black" :box (:line-width 1 :style released-button))))) + (tooltip ((t (:background "lightyellow" :foreground "black")))) + (trailing-whitespace ((t (:background "red")))) + (underline ((t (:underline t)))) + (variable-pitch ((t (:family "helv")))) + (widget-button-face ((t (:bold t :weight bold)))) + (widget-button-pressed-face ((t (:foreground "red")))) + (widget-documentation-face ((t (:foreground "lime green")))) + (widget-field-face ((t (:background "dim gray")))) + (widget-inactive-face ((t (:foreground "light gray")))) + (widget-single-line-field-face ((t (:background "dim gray")))) + (zmacs-region ((t (:background "blue3"))))))) + +(defun color-theme-katester () + "Color theme by walterh@rocketmail.com, created 2001-12-12. +A pastelly-mac like color-theme." + (interactive) + (color-theme-standard) + (let ((color-theme-is-cumulative t)) + (color-theme-install + '(color-theme-katester + ((background-color . "ivory") + (cursor-color . "slateblue") + (foreground-color . "black") + (mouse-color . "slateblue")) + (default ((t ((:background "ivory" :foreground "black"))))) + (bold ((t (:bold t)))) + (font-lock-string-face ((t (:foreground "maroon")))) + (font-lock-keyword-face ((t (:foreground "blue")))) + (font-lock-constant-face ((t (:foreground "darkblue")))) + (font-lock-type-face ((t (:foreground "black")))) + (font-lock-variable-name-face ((t (:foreground "black")))) + (font-lock-function-name-face ((t (:bold t :underline t)))) + (font-lock-comment-face ((t (:background "seashell")))) + (highlight ((t (:background "lavender")))) + (italic ((t (:italic t)))) + (modeline ((t (:background "moccasin" :foreground "black")))) + (region ((t (:background "lavender" )))) + (underline ((t (:underline t)))))))) + +(defun color-theme-arjen () + "Color theme by awiersma, created 2001-08-27." + (interactive) + (color-theme-install + '(color-theme-arjen + ((background-color . "black") + (background-mode . dark) + (border-color . "black") + (cursor-color . "yellow") + (foreground-color . "White") + (mouse-color . "sienna1")) + ((buffers-tab-face . buffers-tab) + (cperl-here-face . font-lock-string-face) + (cperl-invalid-face quote underline) + (cperl-pod-face . font-lock-comment-face) + (cperl-pod-head-face . font-lock-variable-name-face) + (vc-mode-face . highlight)) + (default ((t (:background "black" :foreground "white")))) + (blue ((t (:foreground "blue")))) + (bold ((t (:bold t)))) + (bold-italic ((t (:bold t)))) + (border-glyph ((t (nil)))) + (buffers-tab ((t (:background "black" :foreground "white")))) + (calendar-today-face ((t (:underline t)))) + (cperl-array-face ((t (:foreground "darkseagreen")))) + (cperl-hash-face ((t (:foreground "darkseagreen")))) + (cperl-nonoverridable-face ((t (:foreground "SkyBlue")))) + (custom-button-face ((t (nil)))) + (custom-changed-face ((t (:background "blue" :foreground "white")))) + (custom-documentation-face ((t (nil)))) + (custom-face-tag-face ((t (:underline t)))) + (custom-group-tag-face ((t (:underline t :foreground "light blue")))) + (custom-group-tag-face-1 ((t (:underline t :foreground "pink")))) + (custom-invalid-face ((t (:background "red" :foreground "yellow")))) + (custom-modified-face ((t (:background "blue" :foreground "white")))) + (custom-rogue-face ((t (:background "black" :foreground "pink")))) + (custom-saved-face ((t (:underline t)))) + (custom-set-face ((t (:background "white" :foreground "blue")))) + (custom-state-face ((t (:foreground "lime green")))) + (custom-variable-button-face ((t (:underline t :bold t)))) + (custom-variable-tag-face ((t (:underline t :foreground "light blue")))) + (diary-face ((t (:foreground "IndianRed")))) + (erc-action-face ((t (:bold t)))) + (erc-bold-face ((t (:bold t)))) + (erc-default-face ((t (nil)))) + (erc-direct-msg-face ((t (:foreground "sandybrown")))) + (erc-error-face ((t (:bold t :foreground "IndianRed")))) + (erc-input-face ((t (:foreground "Beige")))) + (erc-inverse-face ((t (:background "wheat" :foreground "darkslategrey")))) + (erc-notice-face ((t (:foreground "MediumAquamarine")))) + (erc-pal-face ((t (:foreground "pale green")))) + (erc-prompt-face ((t (:foreground "MediumAquamarine")))) + (erc-underline-face ((t (:underline t)))) + (eshell-ls-archive-face ((t (:bold t :foreground "IndianRed")))) + (eshell-ls-backup-face ((t (:foreground "Grey")))) + (eshell-ls-clutter-face ((t (:foreground "DimGray")))) + (eshell-ls-directory-face ((t (:bold t :foreground "MediumSlateBlue")))) + (eshell-ls-executable-face ((t (:foreground "Coral")))) + (eshell-ls-missing-face ((t (:foreground "black")))) + (eshell-ls-picture-face ((t (:foreground "Violet")))) + (eshell-ls-product-face ((t (:foreground "sandybrown")))) + (eshell-ls-readonly-face ((t (:foreground "Aquamarine")))) + (eshell-ls-special-face ((t (:foreground "Gold")))) + (eshell-ls-symlink-face ((t (:foreground "White")))) + (eshell-ls-unreadable-face ((t (:foreground "DimGray")))) + (eshell-prompt-face ((t (:foreground "MediumAquamarine")))) + (fl-comment-face ((t (:foreground "pink")))) + (fl-doc-string-face ((t (:foreground "purple")))) + (fl-function-name-face ((t (:foreground "red")))) + (fl-keyword-face ((t (:foreground "cadetblue")))) + (fl-string-face ((t (:foreground "green")))) + (fl-type-face ((t (:foreground "yellow")))) + (font-lock-builtin-face ((t (:foreground "LightSteelBlue")))) + (font-lock-comment-face ((t (:foreground "IndianRed")))) + (font-lock-constant-face ((t (:foreground "Aquamarine")))) + (font-lock-doc-string-face ((t (:foreground "DarkOrange")))) + (font-lock-function-name-face ((t (:foreground "YellowGreen")))) + (font-lock-keyword-face ((t (:foreground "PaleYellow")))) + (font-lock-preprocessor-face ((t (:foreground "Aquamarine")))) + (font-lock-reference-face ((t (:foreground "SlateBlue")))) + (font-lock-string-face ((t (:foreground "Orange")))) + (font-lock-type-face ((t (:foreground "Green")))) + (font-lock-variable-name-face ((t (:foreground "darkseagreen")))) + (font-lock-warning-face ((t (:bold t :foreground "Pink")))) + (qt-classes-face ((t (:foreground "Red")))) + (gnus-cite-attribution-face ((t (nil)))) + (gnus-cite-face-1 ((t (:bold nil :foreground "deep sky blue")))) + (gnus-cite-face-10 ((t (:foreground "medium purple")))) + (gnus-cite-face-11 ((t (:foreground "turquoise")))) + (gnus-cite-face-2 ((t (:bold nil :foreground "cadetblue")))) + (gnus-cite-face-3 ((t (:bold nil :foreground "gold")))) + (gnus-cite-face-4 ((t (:foreground "light pink")))) + (gnus-cite-face-5 ((t (:foreground "pale green")))) + (gnus-cite-face-6 ((t (:bold nil :foreground "chocolate")))) + (gnus-cite-face-7 ((t (:foreground "orange")))) + (gnus-cite-face-8 ((t (:foreground "magenta")))) + (gnus-cite-face-9 ((t (:foreground "violet")))) + (gnus-emphasis-bold ((t (:bold nil)))) + (gnus-emphasis-bold-italic ((t (:bold nil)))) + (gnus-emphasis-highlight-words ((t (:background "black" :foreground "yellow")))) + (gnus-emphasis-italic ((t (nil)))) + (gnus-emphasis-underline ((t (:underline t)))) + (gnus-emphasis-underline-bold ((t (:underline t :bold nil)))) + (gnus-emphasis-underline-bold-italic ((t (:underline t :bold nil)))) + (gnus-emphasis-underline-italic ((t (:underline t)))) + (gnus-group-mail-1-empty-face ((t (:foreground "aquamarine1")))) + (gnus-group-mail-1-face ((t (:bold nil :foreground "aquamarine1")))) + (gnus-group-mail-2-empty-face ((t (:foreground "aquamarine2")))) + (gnus-group-mail-2-face ((t (:bold nil :foreground "aquamarine2")))) + (gnus-group-mail-3-empty-face ((t (:foreground "aquamarine3")))) + (gnus-group-mail-3-face ((t (:bold nil :foreground "aquamarine3")))) + (gnus-group-mail-low-empty-face ((t (:foreground "aquamarine4")))) + (gnus-group-mail-low-face ((t (:bold nil :foreground "aquamarine4")))) + (gnus-group-news-1-empty-face ((t (:foreground "PaleTurquoise")))) + (gnus-group-news-1-face ((t (:bold nil :foreground "PaleTurquoise")))) + (gnus-group-news-2-empty-face ((t (:foreground "turquoise")))) + (gnus-group-news-2-face ((t (:bold nil :foreground "turquoise")))) + (gnus-group-news-3-empty-face ((t (nil)))) + (gnus-group-news-3-face ((t (:bold nil)))) + (gnus-group-news-4-empty-face ((t (nil)))) + (gnus-group-news-4-face ((t (:bold nil)))) + (gnus-group-news-5-empty-face ((t (nil)))) + (gnus-group-news-5-face ((t (:bold nil)))) + (gnus-group-news-6-empty-face ((t (nil)))) + (gnus-group-news-6-face ((t (:bold nil)))) + (gnus-group-news-low-empty-face ((t (:foreground "DarkTurquoise")))) + (gnus-group-news-low-face ((t (:bold nil :foreground "DarkTurquoise")))) + (gnus-header-content-face ((t (:foreground "forest green")))) + (gnus-header-from-face ((t (:bold nil :foreground "spring green")))) + (gnus-header-name-face ((t (:foreground "deep sky blue")))) + (gnus-header-newsgroups-face ((t (:bold nil :foreground "purple")))) + (gnus-header-subject-face ((t (:bold nil :foreground "orange")))) + (gnus-signature-face ((t (:bold nil :foreground "khaki")))) + (gnus-splash-face ((t (:foreground "Brown")))) + (gnus-summary-cancelled-face ((t (:background "black" :foreground "yellow")))) + (gnus-summary-high-ancient-face ((t (:bold nil :foreground "SkyBlue")))) + (gnus-summary-high-read-face ((t (:bold nil :foreground "PaleGreen")))) + (gnus-summary-high-ticked-face ((t (:bold nil :foreground "pink")))) + (gnus-summary-high-unread-face ((t (:bold nil)))) + (gnus-summary-low-ancient-face ((t (:foreground "SkyBlue")))) + (gnus-summary-low-read-face ((t (:foreground "PaleGreen")))) + (gnus-summary-low-ticked-face ((t (:foreground "pink")))) + (gnus-summary-low-unread-face ((t (nil)))) + (gnus-summary-normal-ancient-face ((t (:foreground "SkyBlue")))) + (gnus-summary-normal-read-face ((t (:foreground "PaleGreen")))) + (gnus-summary-normal-ticked-face ((t (:foreground "pink")))) + (gnus-summary-normal-unread-face ((t (nil)))) + (gnus-summary-selected-face ((t (:underline t)))) + (green ((t (:foreground "green")))) + (gui-button-face ((t (:background "grey75" :foreground "black")))) + (gui-element ((t (:background "#D4D0C8" :foreground "black")))) + (highlight ((t (:background "darkolivegreen")))) + (highline-face ((t (:background "SeaGreen")))) + (holiday-face ((t (:background "DimGray")))) + (info-menu-5 ((t (:underline t)))) + (info-node ((t (:underline t :bold t :foreground "DodgerBlue1")))) + (info-xref ((t (:underline t :foreground "DodgerBlue1")))) + (isearch ((t (:background "blue")))) + (isearch-secondary ((t (:foreground "red3")))) + (italic ((t (nil)))) + (left-margin ((t (nil)))) + (list-mode-item-selected ((t (:background "gray68" :foreground "white")))) + (message-cited-text-face ((t (:bold t :foreground "green")))) + (message-header-cc-face ((t (:bold t :foreground "green4")))) + (message-header-name-face ((t (:bold t :foreground "orange")))) + (message-header-newsgroups-face ((t (:bold t :foreground "violet")))) + (message-header-other-face ((t (:bold t :foreground "chocolate")))) + (message-header-subject-face ((t (:bold t :foreground "yellow")))) + (message-header-to-face ((t (:bold t :foreground "cadetblue")))) + (message-header-xheader-face ((t (:bold t :foreground "light blue")))) + (message-mml-face ((t (:bold t :foreground "Green3")))) + (message-separator-face ((t (:foreground "blue3")))) + (modeline ((t (:background "DarkRed" :foreground "white" :box (:line-width 1 :style released-button))))) + (modeline-buffer-id ((t (:background "DarkRed" :foreground "white")))) + (modeline-mousable ((t (:background "DarkRed" :foreground "white")))) + (modeline-mousable-minor-mode ((t (:background "DarkRed" :foreground "white")))) + (p4-depot-added-face ((t (:foreground "blue")))) + (p4-depot-deleted-face ((t (:foreground "red")))) + (p4-depot-unmapped-face ((t (:foreground "grey30")))) + (p4-diff-change-face ((t (:foreground "dark green")))) + (p4-diff-del-face ((t (:foreground "red")))) + (p4-diff-file-face ((t (:background "gray90")))) + (p4-diff-head-face ((t (:background "gray95")))) + (p4-diff-ins-face ((t (:foreground "blue")))) + (pointer ((t (nil)))) + (primary-selection ((t (:background "blue")))) + (red ((t (:foreground "red")))) + (region ((t (:background "blue")))) + (right-margin ((t (nil)))) + (secondary-selection ((t (:background "darkslateblue")))) + (show-paren-match-face ((t (:background "Aquamarine" :foreground "SlateBlue")))) + (show-paren-mismatch-face ((t (:background "Red" :foreground "White")))) + (text-cursor ((t (:background "yellow" :foreground "black")))) + (toolbar ((t (nil)))) + (underline ((nil (:underline nil)))) + (vertical-divider ((t (nil)))) + (widget ((t (nil)))) + (widget-button-face ((t (:bold t)))) + (widget-button-pressed-face ((t (:foreground "red")))) + (widget-documentation-face ((t (:foreground "lime green")))) + (widget-field-face ((t (:background "dim gray")))) + (widget-inactive-face ((t (:foreground "light gray")))) + (widget-single-line-field-face ((t (:background "dim gray")))) + (woman-bold-face ((t (:bold t)))) + (woman-italic-face ((t (:foreground "beige")))) + (woman-unknown-face ((t (:foreground "LightSalmon")))) + (yellow ((t (:foreground "yellow")))) + (zmacs-region ((t (:background "snow" :foreground "blue"))))))) + +(defun color-theme-tty-dark () + "Color theme by Oivvio Polite, created 2002-02-01. Good for tty display." + (interactive) + (color-theme-install + '(color-theme-tty-dark + ((background-color . "black") + (background-mode . dark) + (border-color . "blue") + (cursor-color . "red") + (foreground-color . "white") + (mouse-color . "black")) + ((ispell-highlight-face . highlight) + (list-matching-lines-face . bold) + (tinyreplace-:face . highlight) + (view-highlight-face . highlight)) + (default ((t (nil)))) + (bold ((t (:underline t :background "black" :foreground "white")))) + (bold-italic ((t (:underline t :foreground "white")))) + (calendar-today-face ((t (:underline t)))) + (diary-face ((t (:foreground "red")))) + (font-lock-builtin-face ((t (:foreground "blue")))) + (font-lock-comment-face ((t (:foreground "cyan")))) + (font-lock-constant-face ((t (:foreground "magenta")))) + (font-lock-function-name-face ((t (:foreground "cyan")))) + (font-lock-keyword-face ((t (:foreground "red")))) + (font-lock-string-face ((t (:foreground "green")))) + (font-lock-type-face ((t (:foreground "yellow")))) + (font-lock-variable-name-face ((t (:foreground "blue")))) + (font-lock-warning-face ((t (:bold t :foreground "magenta")))) + (highlight ((t (:background "blue" :foreground "yellow")))) + (holiday-face ((t (:background "cyan")))) + (info-menu-5 ((t (:underline t)))) + (info-node ((t (:italic t :bold t)))) + (info-xref ((t (:bold t)))) + (italic ((t (:underline t :background "red")))) + (message-cited-text-face ((t (:foreground "red")))) + (message-header-cc-face ((t (:bold t :foreground "green")))) + (message-header-name-face ((t (:foreground "green")))) + (message-header-newsgroups-face ((t (:italic t :bold t :foreground "yellow")))) + (message-header-other-face ((t (:foreground "#b00000")))) + (message-header-subject-face ((t (:foreground "green")))) + (message-header-to-face ((t (:bold t :foreground "green")))) + (message-header-xheader-face ((t (:foreground "blue")))) + (message-mml-face ((t (:foreground "green")))) + (message-separator-face ((t (:foreground "blue")))) + + (modeline ((t (:background "white" :foreground "blue")))) + (modeline-buffer-id ((t (:background "white" :foreground "red")))) + (modeline-mousable ((t (:background "white" :foreground "magenta")))) + (modeline-mousable-minor-mode ((t (:background "white" :foreground "yellow")))) + (region ((t (:background "white" :foreground "black")))) + (zmacs-region ((t (:background "cyan" :foreground "black")))) + (secondary-selection ((t (:background "blue")))) + (show-paren-match-face ((t (:background "red")))) + (show-paren-mismatch-face ((t (:background "magenta" :foreground "white")))) + (underline ((t (:underline t))))))) + +(defun color-theme-aliceblue () + "Color theme by Girish Bharadwaj, created 2002-03-27. +Includes comint prompt, custom, font-lock, isearch, +jde, senator, speedbar, and widget." + (interactive) + (color-theme-install + '(color-theme-aliceblue + ((background-color . "AliceBlue") + (background-mode . light) + (border-color . "black") + (cursor-color . "black") + (foreground-color . "DarkSlateGray4") + (mouse-color . "black")) + ((help-highlight-face . underline) + (list-matching-lines-face . bold) + (semantic-which-function-use-color . t) + (senator-eldoc-use-color . t) + (view-highlight-face . highlight) + (widget-mouse-face . highlight)) + (default ((t (:stipple nil :background "AliceBlue" :foreground "DarkSlateGray4" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :width normal :family "outline-courier new")))) + (bold ((t (:bold t :weight bold)))) + (bold-italic ((t (:italic t :bold t :slant italic :weight bold)))) + (border ((t (:background "black")))) + (comint-highlight-input ((t (:bold t :weight bold)))) + (comint-highlight-prompt ((t (:foreground "dark blue")))) + (cursor ((t (:background "black")))) + (custom-button-face ((t (:background "lightgrey" :foreground "black" :box (:line-width 2 :style released-button))))) + (custom-button-pressed-face ((t (:background "lightgrey" :foreground "black" :box (:line-width 2 :style pressed-button))))) + (custom-changed-face ((t (:background "blue" :foreground "white")))) + (custom-comment-face ((t (:background "gray85")))) + (custom-comment-tag-face ((t (:foreground "blue4")))) + (custom-documentation-face ((t (nil)))) + (custom-face-tag-face ((t (:bold t :family "helv" :weight bold :height 1.2)))) + (custom-group-tag-face ((t (:bold t :foreground "blue" :weight bold :height 1.2)))) + (custom-group-tag-face-1 ((t (:bold t :family "helv" :foreground "red" :weight bold :height 1.2)))) + (custom-invalid-face ((t (:background "red" :foreground "yellow")))) + (custom-modified-face ((t (:background "blue" :foreground "white")))) + (custom-rogue-face ((t (:background "black" :foreground "pink")))) + (custom-saved-face ((t (:underline t)))) + (custom-set-face ((t (:background "white" :foreground "blue")))) + (custom-state-face ((t (:foreground "dark green")))) + (custom-variable-button-face ((t (:bold t :underline t :weight bold)))) + (custom-variable-tag-face ((t (:bold t :family "helv" :foreground "blue" :weight bold :height 1.2)))) + (fixed-pitch ((t (:family "courier")))) + (font-lock-builtin-face ((t (:foreground "Orchid")))) + (font-lock-comment-face ((t (:italic t :foreground "Firebrick" :slant oblique)))) + (font-lock-constant-face ((t (:foreground "CadetBlue")))) + (font-lock-function-name-face ((t (:bold t :foreground "Blue" :weight extra-bold :family "outline-verdana")))) + (font-lock-keyword-face ((t (:bold t :foreground "Purple" :weight semi-bold :family "outline-verdana")))) + (font-lock-preprocessor-face ((t (:foreground "CadetBlue")))) + (font-lock-reference-face ((t (:foreground "Orchid")))) + (font-lock-string-face ((t (:foreground "RosyBrown")))) + (font-lock-type-face ((t (:italic t :foreground "ForestGreen" :slant italic)))) + (font-lock-variable-name-face ((t (:foreground "DarkGoldenrod" :width condensed)))) + (font-lock-warning-face ((t (:bold t :foreground "Red" :weight bold)))) + (fringe ((t (:background "DarkSlateBlue")))) + (header-line ((t (:box (:line-width -1 :style released-button) :background "grey90" :foreground "grey20" :box nil)))) + (highlight ((t (:background "darkseagreen2")))) + (isearch ((t (:background "magenta4" :foreground "lightskyblue1")))) + (isearch-lazy-highlight-face ((t (:background "paleturquoise")))) + (italic ((t (:italic t :slant italic)))) + (jde-bug-breakpoint-cursor ((t (:background "brown" :foreground "cyan")))) + (jde-db-active-breakpoint-face ((t (:background "red" :foreground "black")))) + (jde-db-requested-breakpoint-face ((t (:background "yellow" :foreground "black")))) + (jde-db-spec-breakpoint-face ((t (:background "green" :foreground "black")))) + (jde-java-font-lock-api-face ((t (:foreground "dark goldenrod")))) + (jde-java-font-lock-bold-face ((t (:bold t :weight bold)))) + (jde-java-font-lock-code-face ((t (nil)))) + (jde-java-font-lock-constant-face ((t (:foreground "CadetBlue")))) + (jde-java-font-lock-doc-tag-face ((t (:foreground "green4")))) + (jde-java-font-lock-italic-face ((t (:italic t :slant italic)))) + (jde-java-font-lock-link-face ((t (:foreground "blue" :underline t :slant normal)))) + (jde-java-font-lock-modifier-face ((t (:foreground "Orchid")))) + (jde-java-font-lock-number-face ((t (:foreground "RosyBrown")))) + (jde-java-font-lock-operator-face ((t (:foreground "medium blue")))) + (jde-java-font-lock-package-face ((t (:foreground "blue3")))) + (jde-java-font-lock-pre-face ((t (nil)))) + (jde-java-font-lock-underline-face ((t (:underline t)))) + (menu ((t (nil)))) + (modeline ((t (:background "grey75" :foreground "black" :box (:line-width -1 :style released-button))))) + (modeline-buffer-id ((t (:background "grey75" :foreground "black")))) + (modeline-mousable ((t (:background "grey75" :foreground "black")))) + (modeline-mousable-minor-mode ((t (:background "grey75" :foreground "black")))) + (mouse ((t (:background "black")))) + (primary-selection ((t (:background "lightgoldenrod2")))) + (region ((t (:background "lightgoldenrod2")))) + (scroll-bar ((t (nil)))) + (secondary-selection ((t (:background "yellow")))) + (semantic-dirty-token-face ((t (:background "lightyellow")))) + (semantic-unmatched-syntax-face ((t (:underline "red")))) + (senator-intangible-face ((t (:foreground "gray25")))) + (senator-momentary-highlight-face ((t (:background "gray70")))) + (senator-read-only-face ((t (:background "#CCBBBB")))) + (show-paren-match-face ((t (:background "turquoise")))) + (show-paren-mismatch-face ((t (:background "purple" :foreground "white")))) + (speedbar-button-face ((t (:foreground "green4")))) + (speedbar-directory-face ((t (:foreground "blue4")))) + (speedbar-file-face ((t (:foreground "cyan4")))) + (speedbar-highlight-face ((t (:background "green")))) + (speedbar-selected-face ((t (:foreground "red" :underline t)))) + (speedbar-tag-face ((t (:foreground "brown")))) + (template-message-face ((t (:bold t :weight bold)))) + (tool-bar ((t (:background "grey75" :foreground "black" :box (:line-width 1 :style released-button))))) + (trailing-whitespace ((t (:background "red")))) + (underline ((t (:underline t)))) + (variable-pitch ((t (:family "helv")))) + (widget-button-face ((t (:bold t :weight bold)))) + (widget-button-pressed-face ((t (:foreground "red")))) + (widget-documentation-face ((t (:foreground "dark green")))) + (widget-field-face ((t (:background "gray85")))) + (widget-inactive-face ((t (:foreground "dim gray")))) + (widget-single-line-field-face ((t (:background "gray85")))) + (trailing-whitespace ((t (:background "red")))) + (underline ((t (:underline t)))) + (variable-pitch ((t (:family "helv")))) + (widget-button-face ((t (:bold t :weight bold)))) + (widget-button-pressed-face ((t (:foreground "red")))) + (widget-documentation-face ((t (:foreground "dark green")))) + (widget-field-face ((t (:background "gray85")))) + (widget-inactive-face ((t (:foreground "dim gray")))) + (widget-single-line-field-face ((t (:background "gray85")))) + (zmacs-region ((t (:background "lightgoldenrod2"))))))) + +(defun color-theme-black-on-gray () + "Color theme by sbhojwani, created 2002-04-03. +Includes ecb, font-lock, paren, semantic, and widget faces. +Some of the font-lock faces are disabled, ie. they look just +like the default face. This is for people that don't like +the look of \"angry fruit salad\" when editing." + (interactive) + (color-theme-install + '(color-theme-black-on-gray + ((background-color . "white") + (background-mode . light) + (border-color . "blue") + (foreground-color . "black")) + ((buffers-tab-face . buffers-tab) + (ecb-directories-general-face . ecb-default-general-face) + (ecb-directory-face . ecb-default-highlight-face) + (ecb-history-face . ecb-default-highlight-face) + (ecb-history-general-face . ecb-default-general-face) + (ecb-method-face . ecb-default-highlight-face) + (ecb-methods-general-face . ecb-default-general-face) + (ecb-source-face . ecb-default-highlight-face) + (ecb-source-in-directories-buffer-face . ecb-source-in-directories-buffer-face) + (ecb-sources-general-face . ecb-default-general-face) + (ecb-token-header-face . ecb-token-header-face)) + (default ((t (nil)))) + (blue ((t (:foreground "blue")))) + (bold ((t (:bold t :size "10pt")))) + (bold-italic ((t (:italic t :bold t :size "10pt")))) + (border-glyph ((t (:size "11pt")))) + (buffers-tab ((t (:background "gray75")))) + (display-time-mail-balloon-enhance-face ((t (:background "orange")))) + (display-time-mail-balloon-gnus-group-face ((t (:foreground "blue")))) + (display-time-time-balloon-face ((t (:foreground "red")))) + (ecb-bucket-token-face ((t (:bold t :size "10pt")))) + (ecb-default-general-face ((t (nil)))) + (ecb-default-highlight-face ((t (:background "cornflower blue" :foreground "yellow")))) + (ecb-directories-general-face ((t (nil)))) + (ecb-directory-face ((t (:background "cornflower blue" :foreground "yellow")))) + (ecb-history-face ((t (:background "cornflower blue" :foreground "yellow")))) + (ecb-history-general-face ((t (nil)))) + (ecb-method-face ((t (:background "cornflower blue" :foreground "yellow")))) + (ecb-methods-general-face ((t (nil)))) + (ecb-source-face ((t (:background "cornflower blue" :foreground "yellow")))) + (ecb-source-in-directories-buffer-face ((t (:foreground "medium blue")))) + (ecb-sources-general-face ((t (nil)))) + (ecb-token-header-face ((t (:background "SeaGreen1")))) + (ecb-type-token-class-face ((t (:bold t :size "10pt")))) + (ecb-type-token-enum-face ((t (:bold t :size "10pt")))) + (ecb-type-token-group-face ((t (:bold t :size "10pt" :foreground "dimgray")))) + (ecb-type-token-interface-face ((t (:bold t :size "10pt")))) + (ecb-type-token-struct-face ((t (:bold t :size "10pt")))) + (ecb-type-token-typedef-face ((t (:bold t :size "10pt")))) + (font-lock-builtin-face ((t (:foreground "red3")))) + (font-lock-constant-face ((t (:foreground "blue3")))) + (font-lock-comment-face ((t (:foreground "blue")))) + (font-lock-doc-face ((t (:foreground "green4")))) + (font-lock-doc-string-face ((t (:foreground "green4")))) + (font-lock-function-name-face ((t (nil)))) + (font-lock-keyword-face ((t (nil)))) + (font-lock-preprocessor-face ((t (:foreground "blue3")))) + (font-lock-reference-face ((t (:foreground "red3")))) + (font-lock-string-face ((t (nil)))) + (font-lock-type-face ((t (nil)))) + (font-lock-variable-name-face ((t (nil)))) + (font-lock-warning-face ((t (nil)))) + (green ((t (:foreground "green")))) + (gui-button-face ((t (:background "grey75")))) + (gui-element ((t (:size "8pt" :background "gray75")))) + (highlight ((t (:background "darkseagreen2")))) + (isearch ((t (:background "paleturquoise")))) + (isearch-secondary ((t (:foreground "red3")))) + (italic ((t (:size "10pt")))) + (left-margin ((t (nil)))) + (list-mode-item-selected ((t (:background "gray68")))) + (modeline ((t (:background "gray75")))) + (modeline-buffer-id ((t (:background "gray75" :foreground "blue4")))) + (modeline-mousable ((t (:background "gray75" :foreground "firebrick")))) + (modeline-mousable-minor-mode ((t (:background "gray75" :foreground "green4")))) + (paren-blink-off ((t (:foreground "gray")))) + (paren-match ((t (:background "darkseagreen2")))) + (paren-mismatch ((t (nil)))) + (pointer ((t (nil)))) + (primary-selection ((t (:background "gray65")))) + (red ((t (:foreground "red")))) + (region ((t (:background "gray65")))) + (right-margin ((t (nil)))) + (secondary-selection ((t (:background "paleturquoise")))) + (semantic-dirty-token-face ((t (nil)))) + (semantic-unmatched-syntax-face ((t (nil)))) + (text-cursor ((t (:background "red" :foreground "gray")))) + (toolbar ((t (:background "gray75")))) + (underline ((t (:underline t)))) + (vertical-divider ((t (:background "gray75")))) + (widget ((t (:size "8pt" :background "gray75")))) + (widget-button-face ((t (:bold t)))) + (widget-button-pressed-face ((t (:foreground "red")))) + (widget-documentation-face ((t (:foreground "dark green")))) + (widget-field-face ((t (:background "gray85")))) + (widget-inactive-face ((t (nil)))) + (yellow ((t (:foreground "yellow")))) + (zmacs-region ((t (:background "gray65"))))))) + +(defun color-theme-dark-blue2 () + "Color theme by Chris McMahan, created 2002-04-12. +Includes antlr, bbdb, change-log, comint, cperl, custom cvs, diff, +dired, display-time, ebrowse, ecb, ediff, erc, eshell, fl, font-lock, +gnus, hi, highlight, html-helper, hyper-apropos, info, isearch, jde, +message, mmm, paren, semantic, senator, sgml, smerge, speedbar, +strokes, term, vhdl, viper, vm, widget, xref, xsl, xxml. Yes, it is +a large theme." + (interactive) + (color-theme-install + '(color-theme-dark-blue2 + ((background-color . "#233b5a") + (background-mode . dark) + (background-toolbar-color . "#cf3ccf3ccf3c") + (border-color . "black") + (bottom-toolbar-shadow-color . "#79e77df779e7") + (cursor-color . "Yellow") + (foreground-color . "#fff8dc") + (mouse-color . "Grey") + (top-toolbar-shadow-color . "#fffffbeeffff") + (viper-saved-cursor-color-in-replace-mode . "Red3")) + ((blank-space-face . blank-space-face) + (blank-tab-face . blank-tab-face) + (cperl-invalid-face . underline) + (ecb-directories-general-face . ecb-directories-general-face) + (ecb-directory-face . ecb-directory-face) + (ecb-history-face . ecb-history-face) + (ecb-history-general-face . ecb-history-general-face) + (ecb-method-face . ecb-method-face) + (ecb-methods-general-face . ecb-methods-general-face) + (ecb-source-face . ecb-source-face) + (ecb-source-in-directories-buffer-face . ecb-sources-face) + (ecb-sources-general-face . ecb-sources-general-face) + (ecb-token-header-face . ecb-token-header-face) + (gnus-article-button-face . bold) + (gnus-article-mouse-face . highlight) + (gnus-cite-attribution-face . gnus-cite-attribution-face) + (gnus-signature-face . gnus-signature-face) + (gnus-summary-selected-face . gnus-summary-selected-face) + (help-highlight-face . underline) + (highline-face . highline-face) + (highline-vertical-face . highline-vertical-face) + (list-matching-lines-face . bold) + (ps-zebra-color . 0.95) + (senator-eldoc-use-color . t) + (sgml-set-face . t) + (tags-tag-face . default) + (view-highlight-face . highlight) + (vm-highlight-url-face . bold-italic) + (vm-highlighted-header-face . bold) + (vm-mime-button-face . gui-button-face) + (vm-summary-highlight-face . bold) + (widget-mouse-face . highlight)) + (default ((t (:stipple nil :background "#233b5a" :foreground "#fff8dc" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :width normal :family "outline-lucida console")))) + (Info-title-1-face ((t (:bold t :weight bold :height 1.728 :family "helv")))) + (Info-title-2-face ((t (:bold t :weight bold :height 1.44 :family "helv")))) + (Info-title-3-face ((t (:bold t :weight bold :height 1.2 :family "helv")))) + (Info-title-4-face ((t (:bold t :weight bold :family "helv")))) + (antlr-font-lock-keyword-face ((t (:bold t :foreground "Gray85" :weight bold)))) + (antlr-font-lock-literal-face ((t (:bold t :foreground "Gray85" :weight bold)))) + (antlr-font-lock-ruledef-face ((t (:bold t :foreground "Gray85" :weight bold)))) + (antlr-font-lock-ruleref-face ((t (:foreground "Gray85")))) + (antlr-font-lock-tokendef-face ((t (:bold t :foreground "Gray85" :weight bold)))) + (antlr-font-lock-tokenref-face ((t (:foreground "Gray85")))) + (bbdb-company ((t (:italic t :slant italic)))) + (bbdb-field-name ((t (:bold t :weight bold)))) + (bbdb-field-value ((t (nil)))) + (bbdb-name ((t (:underline t)))) + (bg:erc-color-face0 ((t (:background "White")))) + (bg:erc-color-face1 ((t (:background "black")))) + (bg:erc-color-face10 ((t (:background "lightblue1")))) + (bg:erc-color-face11 ((t (:background "cyan")))) + (bg:erc-color-face12 ((t (:background "blue")))) + (bg:erc-color-face13 ((t (:background "deeppink")))) + (bg:erc-color-face14 ((t (:background "gray50")))) + (bg:erc-color-face15 ((t (:background "gray90")))) + (bg:erc-color-face2 ((t (:background "blue4")))) + (bg:erc-color-face3 ((t (:background "green4")))) + (bg:erc-color-face4 ((t (:background "red")))) + (bg:erc-color-face5 ((t (:background "brown")))) + (bg:erc-color-face6 ((t (:background "purple")))) + (bg:erc-color-face7 ((t (:background "orange")))) + (bg:erc-color-face8 ((t (:background "yellow")))) + (bg:erc-color-face9 ((t (:background "green")))) + (blank-space-face ((t (:background "LightGray")))) + (blank-tab-face ((t (:background "Wheat")))) + (blue ((t (:foreground "blue")))) + (bold ((t (:bold t :foreground "cyan" :weight bold)))) + (bold-italic ((t (:italic t :bold t :foreground "cyan2" :slant italic :weight bold)))) + (border ((t (:background "black")))) + (border-glyph ((t (nil)))) + (buffers-tab ((t (:background "gray30" :foreground "LightSkyBlue")))) + (calendar-today-face ((t (:underline t)))) + (change-log-acknowledgement-face ((t (:foreground "firebrick")))) + (change-log-conditionals-face ((t (:background "sienna" :foreground "khaki")))) + (change-log-date-face ((t (:foreground "gold")))) + (change-log-email-face ((t (:foreground "khaki" :underline t)))) + (change-log-file-face ((t (:bold t :foreground "lemon chiffon" :weight bold)))) + (change-log-function-face ((t (:background "sienna" :foreground "khaki")))) + (change-log-list-face ((t (:foreground "wheat")))) + (change-log-name-face ((t (:bold t :foreground "light goldenrod" :weight bold)))) + (comint-highlight-input ((t (:bold t :weight bold)))) + (comint-highlight-prompt ((t (:foreground "cyan")))) + (comint-input-face ((t (:foreground "deepskyblue")))) + (cperl-array-face ((t (:bold t :background "lightyellow2" :foreground "Blue" :weight bold)))) + (cperl-hash-face ((t (:italic t :bold t :background "lightyellow2" :foreground "Red" :slant italic :weight bold)))) + (cperl-invalid-face ((t (:foreground "white")))) + (cperl-nonoverridable-face ((t (:foreground "chartreuse3")))) + (cursor ((t (:background "Yellow")))) + (custom-button-face ((t (:bold t :weight bold)))) + (custom-button-pressed-face ((t (:background "lightgrey" :foreground "gray30")))) + (custom-changed-face ((t (:background "blue" :foreground "white")))) + (custom-comment-face ((t (:foreground "white")))) + (custom-comment-tag-face ((t (:foreground "white")))) + (custom-documentation-face ((t (:foreground "light blue")))) + (custom-face-tag-face ((t (:underline t)))) + (custom-group-tag-face ((t (:bold t :foreground "gray85" :underline t :weight bold)))) + (custom-group-tag-face-1 ((t (:foreground "gray85" :underline t)))) + (custom-invalid-face ((t (:background "red" :foreground "yellow")))) + (custom-modified-face ((t (:background "blue" :foreground "white")))) + (custom-rogue-face ((t (:background "gray30" :foreground "pink")))) + (custom-saved-face ((t (:underline t)))) + (custom-set-face ((t (:background "white" :foreground "blue")))) + (custom-state-face ((t (:foreground "gray85")))) + (custom-variable-button-face ((t (:bold t :underline t :weight bold)))) + (custom-variable-tag-face ((t (:bold t :foreground "gray85" :underline t :weight bold)))) + (cvs-filename-face ((t (:foreground "white")))) + (cvs-handled-face ((t (:foreground "pink")))) + (cvs-header-face ((t (:foreground "green")))) + (cvs-marked-face ((t (:bold t :foreground "green3" :weight bold)))) + (cvs-msg-face ((t (:foreground "gray85")))) + (cvs-need-action-face ((t (:foreground "yellow")))) + (cvs-unknown-face ((t (:foreground "grey")))) + (cyan ((t (:foreground "cyan")))) + (diary-face ((t (:bold t :foreground "gray85" :weight bold)))) + (diff-added-face ((t (nil)))) + (diff-changed-face ((t (nil)))) + (diff-context-face ((t (:foreground "grey50")))) + (diff-file-header-face ((t (:bold t :background "grey70" :weight bold)))) + (diff-function-face ((t (:foreground "grey50")))) + (diff-header-face ((t (:foreground "lemon chiffon")))) + (diff-hunk-header-face ((t (:background "grey85")))) + (diff-index-face ((t (:bold t :background "grey70" :weight bold)))) + (diff-nonexistent-face ((t (:bold t :background "grey70" :weight bold)))) + (diff-removed-face ((t (nil)))) + (dired-face-boring ((t (:foreground "Gray65")))) + (dired-face-directory ((t (:bold t :weight bold)))) + (dired-face-executable ((t (:foreground "gray85")))) + (dired-face-flagged ((t (:background "LightSlateGray")))) + (dired-face-header ((t (:background "grey75" :foreground "gray30")))) + (dired-face-marked ((t (:background "PaleVioletRed")))) + (dired-face-permissions ((t (:background "grey75" :foreground "gray30")))) + (dired-face-setuid ((t (:foreground "gray85")))) + (dired-face-socket ((t (:foreground "gray85")))) + (dired-face-symlink ((t (:foreground "cyan")))) + (display-time-mail-balloon-enhance-face ((t (:background "orange")))) + (display-time-mail-balloon-gnus-group-face ((t (:foreground "blue")))) + (display-time-time-balloon-face ((t (:foreground "gray85")))) + (ebrowse-default-face ((t (nil)))) + (ebrowse-file-name-face ((t (:italic t :slant italic)))) + (ebrowse-member-attribute-face ((t (:foreground "red")))) + (ebrowse-member-class-face ((t (:foreground "Gray85")))) + (ebrowse-progress-face ((t (:background "blue")))) + (ebrowse-root-class-face ((t (:bold t :foreground "Gray85" :weight bold)))) + (ebrowse-tree-mark-face ((t (:foreground "Gray85")))) + (ecb-bucket-token-face ((t (:bold t :weight bold)))) + (ecb-default-general-face ((t (:height 1.0)))) + (ecb-default-highlight-face ((t (:background "magenta" :height 1.0)))) + (ecb-directories-general-face ((t (:height 0.9)))) + (ecb-directory-face ((t (:background "Cyan4")))) + (ecb-history-face ((t (:background "Cyan4")))) + (ecb-history-general-face ((t (:height 0.9)))) + (ecb-method-face ((t (:background "Cyan4" :slant normal :weight normal)))) + (ecb-methods-general-face ((t (:slant normal)))) + (ecb-source-face ((t (:background "Cyan4")))) + (ecb-source-in-directories-buffer-face ((t (:foreground "LightBlue1")))) + (ecb-sources-face ((t (:foreground "LightBlue1")))) + (ecb-sources-general-face ((t (:height 0.9)))) + (ecb-token-header-face ((t (:background "Steelblue4")))) + (ecb-type-token-class-face ((t (:bold t :weight bold)))) + (ecb-type-token-enum-face ((t (:bold t :weight bold)))) + (ecb-type-token-group-face ((t (:bold t :foreground "dim gray" :weight bold)))) + (ecb-type-token-interface-face ((t (:bold t :weight bold)))) + (ecb-type-token-struct-face ((t (:bold t :weight bold)))) + (ecb-type-token-typedef-face ((t (:bold t :weight bold)))) + (ediff-current-diff-face-A ((t (:background "pale green" :foreground "firebrick")))) + (ediff-current-diff-face-Ancestor ((t (:background "VioletRed" :foreground "Gray30")))) + (ediff-current-diff-face-B ((t (:background "Yellow" :foreground "DarkOrchid")))) + (ediff-current-diff-face-C ((t (:background "Pink" :foreground "Navy")))) + (ediff-even-diff-face-A ((t (:background "light grey" :foreground "Gray30")))) + (ediff-even-diff-face-Ancestor ((t (:background "Grey" :foreground "White")))) + (ediff-even-diff-face-B ((t (:background "Grey" :foreground "White")))) + (ediff-even-diff-face-C ((t (:background "light grey" :foreground "Gray30")))) + (ediff-fine-diff-face-A ((t (:background "sky blue" :foreground "Navy")))) + (ediff-fine-diff-face-Ancestor ((t (:background "Green" :foreground "Gray30")))) + (ediff-fine-diff-face-B ((t (:background "cyan" :foreground "Gray30")))) + (ediff-fine-diff-face-C ((t (:background "Turquoise" :foreground "Gray30")))) + (ediff-odd-diff-face-A ((t (:background "Grey" :foreground "White")))) + (ediff-odd-diff-face-Ancestor ((t (:background "light grey" :foreground "Gray30")))) + (ediff-odd-diff-face-B ((t (:background "light grey" :foreground "Gray30")))) + (ediff-odd-diff-face-C ((t (:background "Grey" :foreground "White")))) + (erc-action-face ((t (:bold t :weight bold)))) + (erc-bold-face ((t (:bold t :weight bold)))) + (erc-dangerous-host-face ((t (:foreground "red")))) + (erc-default-face ((t (nil)))) + (erc-direct-msg-face ((t (:foreground "pale green")))) + (erc-error-face ((t (:bold t :foreground "gray85" :weight bold)))) + (erc-fool-face ((t (:foreground "Gray85")))) + (erc-highlight-face ((t (:bold t :foreground "pale green" :weight bold)))) + (erc-input-face ((t (:foreground "light blue")))) + (erc-inverse-face ((t (:background "Black" :foreground "White")))) + (erc-keyword-face ((t (:bold t :foreground "pale green" :weight bold)))) + (erc-notice-face ((t (:foreground "light salmon")))) + (erc-pal-face ((t (:foreground "pale green")))) + (erc-prompt-face ((t (:bold t :foreground "light blue" :weight bold)))) + (erc-timestamp-face ((t (:bold t :foreground "green" :weight bold)))) + (erc-underline-face ((t (:underline t)))) + (eshell-ls-archive-face ((t (:bold t :weight bold)))) + (eshell-ls-backup-face ((t (:foreground "gray85")))) + (eshell-ls-clutter-face ((t (:bold t :foreground "gray85" :weight bold)))) + (eshell-ls-directory-face ((t (:bold t :foreground "Cyan" :weight bold)))) + (eshell-ls-executable-face ((t (:bold t :weight bold)))) + (eshell-ls-missing-face ((t (:bold t :weight bold)))) + (eshell-ls-picture-face ((t (:foreground "gray85")))) + (eshell-ls-product-face ((t (:foreground "gray85")))) + (eshell-ls-readonly-face ((t (:foreground "gray70")))) + (eshell-ls-special-face ((t (:bold t :weight bold)))) + (eshell-ls-symlink-face ((t (:bold t :weight bold)))) + (eshell-ls-text-face ((t (:foreground "gray85")))) + (eshell-ls-todo-face ((t (:bold t :weight bold)))) + (eshell-ls-unreadable-face ((t (:foreground "gray85")))) + (eshell-prompt-face ((t (:bold t :foreground "Yellow" :weight bold)))) + (eshell-test-failed-face ((t (:bold t :weight bold)))) + (eshell-test-ok-face ((t (:bold t :weight bold)))) + (excerpt ((t (:italic t :slant italic)))) + (ff-paths-non-existant-file-face ((t (:bold t :foreground "gray85" :weight bold)))) + (fg:black ((t (:foreground "black")))) + (fg:erc-color-face0 ((t (:foreground "White")))) + (fg:erc-color-face1 ((t (:foreground "black")))) + (fg:erc-color-face10 ((t (:foreground "lightblue1")))) + (fg:erc-color-face11 ((t (:foreground "cyan")))) + (fg:erc-color-face12 ((t (:foreground "blue")))) + (fg:erc-color-face13 ((t (:foreground "deeppink")))) + (fg:erc-color-face14 ((t (:foreground "gray50")))) + (fg:erc-color-face15 ((t (:foreground "gray90")))) + (fg:erc-color-face2 ((t (:foreground "blue4")))) + (fg:erc-color-face3 ((t (:foreground "green4")))) + (fg:erc-color-face4 ((t (:foreground "red")))) + (fg:erc-color-face5 ((t (:foreground "brown")))) + (fg:erc-color-face6 ((t (:foreground "purple")))) + (fg:erc-color-face7 ((t (:foreground "orange")))) + (fg:erc-color-face8 ((t (:foreground "yellow")))) + (fg:erc-color-face9 ((t (:foreground "green")))) + (fixed ((t (:bold t :weight bold)))) + (fixed-pitch ((t (:family "outline-lucida console")))) + (fl-comment-face ((t (:foreground "gray85")))) + (fl-function-name-face ((t (:foreground "green")))) + (fl-keyword-face ((t (:foreground "LightGreen")))) + (fl-string-face ((t (:foreground "light coral")))) + (fl-type-face ((t (:foreground "cyan")))) + (flyspell-duplicate-face ((t (:bold t :foreground "Gold3" :underline t :weight bold)))) + (flyspell-incorrect-face ((t (:bold t :foreground "OrangeRed" :underline t :weight bold)))) + (font-latex-bold-face ((t (nil)))) + (font-latex-italic-face ((t (nil)))) + (font-latex-math-face ((t (nil)))) + (font-latex-sedate-face ((t (:foreground "Gray85")))) + (font-latex-string-face ((t (:foreground "orange")))) + (font-latex-warning-face ((t (:foreground "gold")))) + (font-lock-builtin-face ((t (:bold t :foreground "LightSteelBlue" :weight bold)))) + (font-lock-comment-face ((t (:italic t :foreground "medium aquamarine" :slant italic)))) + (font-lock-constant-face ((t (:bold t :foreground "Aquamarine" :weight bold)))) + (font-lock-doc-face ((t (:bold t :weight bold)))) + (font-lock-doc-string-face ((t (:bold t :foreground "aquamarine" :weight bold)))) + (font-lock-exit-face ((t (:foreground "green")))) + (font-lock-function-name-face ((t (:italic t :bold t :foreground "LightSkyBlue" :slant italic :weight bold)))) + (font-lock-keyword-face ((t (:bold t :foreground "Cyan" :weight bold)))) + (font-lock-preprocessor-face ((t (:foreground "Gray85")))) + (font-lock-reference-face ((t (:foreground "cyan")))) + (font-lock-string-face ((t (:italic t :foreground "aquamarine" :slant italic)))) + (font-lock-type-face ((t (:bold t :foreground "PaleGreen" :weight bold)))) + (font-lock-variable-name-face ((t (:italic t :bold t :foreground "LightGoldenrod" :slant italic :weight bold)))) + (font-lock-warning-face ((t (:bold t :foreground "Salmon" :weight bold)))) + (fringe ((t (:background "#3c5473")))) + (gnus-cite-attribution-face ((t (:italic t :bold t :foreground "beige" :underline t :slant italic :weight bold)))) + (gnus-cite-face-1 ((t (:foreground "gold")))) + (gnus-cite-face-10 ((t (:foreground "coral")))) + (gnus-cite-face-11 ((t (:foreground "turquoise")))) + (gnus-cite-face-2 ((t (:foreground "wheat")))) + (gnus-cite-face-3 ((t (:foreground "light pink")))) + (gnus-cite-face-4 ((t (:foreground "khaki")))) + (gnus-cite-face-5 ((t (:foreground "pale green")))) + (gnus-cite-face-6 ((t (:foreground "beige")))) + (gnus-cite-face-7 ((t (:foreground "orange")))) + (gnus-cite-face-8 ((t (:foreground "magenta")))) + (gnus-cite-face-9 ((t (:foreground "violet")))) + (gnus-emphasis-bold ((t (:bold t :foreground "light gray" :weight bold)))) + (gnus-emphasis-bold-italic ((t (:italic t :bold t :foreground "cyan" :slant italic :weight bold)))) + (gnus-emphasis-highlight-words ((t (:background "gray30" :foreground "gold")))) + (gnus-emphasis-italic ((t (:italic t :foreground "cyan" :slant italic)))) + (gnus-emphasis-underline ((t (:foreground "white" :underline t)))) + (gnus-emphasis-underline-bold ((t (:bold t :foreground "white" :underline t :weight bold)))) + (gnus-emphasis-underline-bold-italic ((t (:italic t :bold t :foreground "white" :underline t :slant italic :weight bold)))) + (gnus-emphasis-underline-italic ((t (:italic t :foreground "white" :underline t :slant italic)))) + (gnus-filterhist-face-1 ((t (nil)))) + (gnus-group-mail-1-empty-face ((t (:foreground "Magenta")))) + (gnus-group-mail-1-face ((t (:bold t :foreground "Magenta" :weight bold)))) + (gnus-group-mail-2-empty-face ((t (:foreground "aquamarine2")))) + (gnus-group-mail-2-face ((t (:bold t :foreground "aquamarine2" :weight bold)))) + (gnus-group-mail-3-empty-face ((t (:foreground "Cyan")))) + (gnus-group-mail-3-face ((t (:bold t :foreground "Cyan" :weight bold)))) + (gnus-group-mail-low-empty-face ((t (:foreground "Wheat")))) + (gnus-group-mail-low-face ((t (:bold t :foreground "Gray85" :weight bold)))) + (gnus-group-news-1-empty-face ((t (:foreground "PaleTurquoise")))) + (gnus-group-news-1-face ((t (:bold t :foreground "PaleTurquoise" :weight bold)))) + (gnus-group-news-2-empty-face ((t (:foreground "turquoise")))) + (gnus-group-news-2-face ((t (:bold t :foreground "turquoise" :weight bold)))) + (gnus-group-news-3-empty-face ((t (:foreground "wheat")))) + (gnus-group-news-3-face ((t (:bold t :foreground "Wheat" :weight bold)))) + (gnus-group-news-4-empty-face ((t (:foreground "Aquamarine")))) + (gnus-group-news-4-face ((t (:bold t :weight bold)))) + (gnus-group-news-5-empty-face ((t (:foreground "MediumAquamarine")))) + (gnus-group-news-5-face ((t (:bold t :weight bold)))) + (gnus-group-news-6-empty-face ((t (:foreground "MediumAquamarine")))) + (gnus-group-news-6-face ((t (:bold t :weight bold)))) + (gnus-group-news-low-empty-face ((t (:foreground "MediumAquamarine")))) + (gnus-group-news-low-face ((t (:bold t :foreground "MediumAquamarine" :weight bold)))) + (gnus-header-content-face ((t (:italic t :foreground "Wheat" :slant italic)))) + (gnus-header-from-face ((t (:bold t :foreground "light yellow" :weight bold)))) + (gnus-header-name-face ((t (:bold t :foreground "Wheat" :weight bold)))) + (gnus-header-newsgroups-face ((t (:italic t :bold t :foreground "gold" :slant italic :weight bold)))) + (gnus-header-subject-face ((t (:bold t :foreground "Gold" :weight bold)))) + (gnus-picons-face ((t (:background "white" :foreground "gray30")))) + (gnus-picons-xbm-face ((t (:background "white" :foreground "gray30")))) + (gnus-signature-face ((t (:italic t :foreground "white" :slant italic)))) + (gnus-splash ((t (:foreground "Brown")))) + (gnus-splash-face ((t (:foreground "orange")))) + (gnus-summary-cancelled-face ((t (:background "gray30" :foreground "orange")))) + (gnus-summary-high-ancient-face ((t (:bold t :foreground "SkyBlue" :weight bold)))) + (gnus-summary-high-read-face ((t (:bold t :foreground "gray85" :weight bold)))) + (gnus-summary-high-ticked-face ((t (:bold t :foreground "coral" :weight bold)))) + (gnus-summary-high-unread-face ((t (:italic t :bold t :foreground "gold" :slant italic :weight bold)))) + (gnus-summary-low-ancient-face ((t (:italic t :foreground "SkyBlue" :slant italic)))) + (gnus-summary-low-read-face ((t (:italic t :foreground "gray85" :slant italic)))) + (gnus-summary-low-ticked-face ((t (:italic t :bold t :foreground "coral" :slant italic :weight bold)))) + (gnus-summary-low-unread-face ((t (:italic t :foreground "white" :slant italic)))) + (gnus-summary-normal-ancient-face ((t (:foreground "SkyBlue")))) + (gnus-summary-normal-read-face ((t (:foreground "gray70")))) + (gnus-summary-normal-ticked-face ((t (:bold t :foreground "pink" :weight bold)))) + (gnus-summary-normal-unread-face ((t (:bold t :foreground "gray85" :weight bold)))) + (gnus-summary-selected-face ((t (:foreground "white" :underline t)))) + (gnus-x-face ((t (:background "white" :foreground "gray30")))) + (green ((t (:foreground "green")))) + (gui-button-face ((t (:background "grey75" :foreground "gray30")))) + (gui-element ((t (:background "Gray80")))) + (header-line ((t (:background "grey20" :foreground "grey90")))) + (hi-black-b ((t (:bold t :weight bold)))) + (hi-black-hb ((t (:bold t :weight bold :height 1.67 :family "helv")))) + (hi-blue ((t (:background "light blue")))) + (hi-blue-b ((t (:bold t :foreground "blue" :weight bold)))) + (hi-green ((t (:background "green")))) + (hi-green-b ((t (:bold t :foreground "green" :weight bold)))) + (hi-pink ((t (:background "pink")))) + (hi-red-b ((t (:bold t :foreground "red" :weight bold)))) + (hi-yellow ((t (:background "yellow")))) + (highlight ((t (:background "SkyBlue3")))) + (highlight-changes-delete-face ((t (:foreground "gray85" :underline t)))) + (highlight-changes-face ((t (:foreground "gray85")))) + (highline-face ((t (:background "#3c5473")))) + (highline-vertical-face ((t (:background "lightcyan")))) + (holiday-face ((t (:background "pink" :foreground "gray30")))) + (html-helper-bold-face ((t (:bold t :weight bold)))) + (html-helper-bold-italic-face ((t (nil)))) + (html-helper-builtin-face ((t (:foreground "gray85" :underline t)))) + (html-helper-italic-face ((t (:bold t :foreground "yellow" :weight bold)))) + (html-helper-underline-face ((t (:underline t)))) + (html-tag-face ((t (:bold t :weight bold)))) + (hyper-apropos-documentation ((t (:foreground "white")))) + (hyper-apropos-heading ((t (:bold t :weight bold)))) + (hyper-apropos-hyperlink ((t (:foreground "sky blue")))) + (hyper-apropos-major-heading ((t (:bold t :weight bold)))) + (hyper-apropos-section-heading ((t (:bold t :weight bold)))) + (hyper-apropos-warning ((t (:bold t :foreground "gray85" :weight bold)))) + (ibuffer-marked-face ((t (:foreground "gray85")))) + (idlwave-help-link-face ((t (:foreground "Blue")))) + (idlwave-shell-bp-face ((t (:background "Pink" :foreground "Black")))) + (info-header-node ((t (:italic t :bold t :foreground "brown" :slant italic :weight bold)))) + (info-header-xref ((t (:bold t :foreground "magenta4" :weight bold)))) + (info-menu-5 ((t (:underline t)))) + (info-menu-6 ((t (nil)))) + (info-menu-header ((t (:bold t :weight bold :family "helv")))) + (info-node ((t (:italic t :bold t :slant italic :weight bold)))) + (info-xref ((t (:bold t :weight bold)))) + (isearch ((t (:background "LightSeaGreen")))) + (isearch-lazy-highlight-face ((t (:background "cyan4")))) + (isearch-secondary ((t (:foreground "red3")))) + (italic ((t (:italic t :bold t :slant italic :weight bold)))) + (jde-bug-breakpoint-cursor ((t (:background "brown" :foreground "cyan")))) + (jde-bug-breakpoint-marker ((t (:background "yellow" :foreground "red")))) + (jde-java-font-lock-api-face ((t (:foreground "LightBlue")))) + (jde-java-font-lock-bold-face ((t (:bold t :weight bold)))) + (jde-java-font-lock-code-face ((t (nil)))) + (jde-java-font-lock-constant-face ((t (:foreground "LightBlue")))) + (jde-java-font-lock-doc-tag-face ((t (:foreground "LightBlue")))) + (jde-java-font-lock-italic-face ((t (:italic t :slant italic)))) + (jde-java-font-lock-link-face ((t (:foreground "cyan3" :underline t)))) + (jde-java-font-lock-modifier-face ((t (:foreground "LightBlue")))) + (jde-java-font-lock-number-face ((t (:foreground "RosyBrown")))) + (jde-java-font-lock-operator-face ((t (:foreground "cyan3")))) + (jde-java-font-lock-package-face ((t (:foreground "LightBlue")))) + (jde-java-font-lock-pre-face ((t (nil)))) + (jde-java-font-lock-underline-face ((t (:underline t)))) + (lazy-highlight-face ((t (:bold t :foreground "yellow" :weight bold)))) + (left-margin ((t (nil)))) + (linemenu-face ((t (:background "gray30")))) + (list-mode-item-selected ((t (:background "gray68")))) + (log-view-file-face ((t (:bold t :background "grey70" :weight bold)))) + (log-view-message-face ((t (:background "grey85")))) + (magenta ((t (:foreground "gray85")))) + (makefile-space-face ((t (:background "hotpink" :foreground "white")))) + (man-bold ((t (:bold t :weight bold)))) + (man-heading ((t (:bold t :weight bold)))) + (man-italic ((t (:foreground "yellow")))) + (man-xref ((t (:underline t)))) + (menu ((t (:background "wheat" :foreground "gray30")))) + (message-cited-text ((t (:foreground "orange")))) + (message-cited-text-face ((t (:foreground "medium aquamarine")))) + (message-header-cc-face ((t (:bold t :foreground "gray85" :weight bold)))) + (message-header-contents ((t (:foreground "white")))) + (message-header-name-face ((t (:foreground "gray85")))) + (message-header-newsgroups-face ((t (:italic t :bold t :foreground "yellow" :slant italic :weight bold)))) + (message-header-other-face ((t (:foreground "gray85")))) + (message-header-subject-face ((t (:bold t :foreground "green3" :weight bold)))) + (message-header-to-face ((t (:bold t :foreground "green2" :weight bold)))) + (message-header-xheader-face ((t (:foreground "blue")))) + (message-headers ((t (:bold t :foreground "orange" :weight bold)))) + (message-highlighted-header-contents ((t (:bold t :weight bold)))) + (message-mml-face ((t (:bold t :foreground "gray85" :weight bold)))) + (message-separator-face ((t (:foreground "gray85")))) + (message-url ((t (:bold t :foreground "pink" :weight bold)))) + (mmm-default-submode-face ((t (:background "#c0c0c5")))) + (mmm-face ((t (:background "black" :foreground "green")))) + (modeline ((t (:background "#3c5473" :foreground "lightgray" :box (:line-width -1 :style released-button :family "helv"))))) + (modeline-buffer-id ((t (:background "white" :foreground "DeepSkyBlue3" :slant normal :weight normal :width normal :family "outline-verdana")))) + (modeline-mousable ((t (:background "white" :foreground "DeepSkyBlue3")))) + (modeline-mousable-minor-mode ((t (:background "white" :foreground "DeepSkyBlue3")))) + (mouse ((t (:background "Grey")))) + (my-summary-highlight-face ((t (:background "PaleTurquoise4" :foreground "White")))) + (my-url-face ((t (:foreground "LightBlue")))) + (nil ((t (nil)))) + (paren-blink-off ((t (:foreground "gray80")))) + (paren-face-match ((t (:background "turquoise")))) + (paren-face-mismatch ((t (:background "purple" :foreground "white")))) + (paren-face-no-match ((t (:background "yellow" :foreground "gray30")))) + (paren-match ((t (:background "darkseagreen2")))) + (paren-mismatch ((t (:background "RosyBrown" :foreground "gray30")))) + (paren-mismatch-face ((t (:bold t :background "white" :foreground "red" :weight bold)))) + (paren-no-match-face ((t (:bold t :background "white" :foreground "red" :weight bold)))) + (pointer ((t (nil)))) + (primary-selection ((t (:background "gray40")))) + (reb-match-0 ((t (:background "lightblue")))) + (reb-match-1 ((t (:background "aquamarine")))) + (reb-match-2 ((t (:background "springgreen")))) + (reb-match-3 ((t (:background "yellow")))) + (red ((t (:foreground "red")))) + (region ((t (:background "Cyan4")))) + (right-margin ((t (nil)))) + (scroll-bar ((t (:background "grey75")))) + (secondary-selection ((t (:background "gray60")))) + (semantic-dirty-token-face ((t (:background "gray10")))) + (semantic-intangible-face ((t (:foreground "gray25")))) + (semantic-read-only-face ((t (:background "gray25")))) + (semantic-unmatched-syntax-face ((t (:underline "red")))) + (senator-intangible-face ((t (:foreground "gray75")))) + (senator-momentary-highlight-face ((t (:background "gray70")))) + (senator-read-only-face ((t (:background "#664444")))) + (sgml-comment-face ((t (:foreground "dark turquoise")))) + (sgml-doctype-face ((t (:foreground "turquoise")))) + (sgml-end-tag-face ((t (:foreground "aquamarine")))) + (sgml-entity-face ((t (:foreground "gray85")))) + (sgml-ignored-face ((t (:background "gray60" :foreground "gray40")))) + (sgml-ms-end-face ((t (:foreground "green")))) + (sgml-ms-start-face ((t (:foreground "yellow")))) + (sgml-pi-face ((t (:foreground "lime green")))) + (sgml-sgml-face ((t (:foreground "brown")))) + (sgml-short-ref-face ((t (:foreground "deep sky blue")))) + (sgml-start-tag-face ((t (:foreground "aquamarine")))) + (sh-heredoc-face ((t (:foreground "tan")))) + (shell-option-face ((t (:foreground "gray85")))) + (shell-output-2-face ((t (:foreground "gray85")))) + (shell-output-3-face ((t (:foreground "gray85")))) + (shell-output-face ((t (:bold t :weight bold)))) + (shell-prompt-face ((t (:foreground "yellow")))) + (show-paren-match-face ((t (:bold t :background "turquoise" :weight bold)))) + (show-paren-mismatch-face ((t (:bold t :background "RosyBrown" :foreground "white" :weight bold)))) + (show-tabs-space-face ((t (:foreground "yellow")))) + (show-tabs-tab-face ((t (:foreground "red")))) + (smerge-base-face ((t (:foreground "red")))) + (smerge-markers-face ((t (:background "grey85")))) + (smerge-mine-face ((t (:foreground "Gray85")))) + (smerge-other-face ((t (:foreground "darkgreen")))) + (speedbar-button-face ((t (:bold t :weight bold)))) + (speedbar-directory-face ((t (:bold t :weight bold)))) + (speedbar-file-face ((t (:bold t :weight bold)))) + (speedbar-highlight-face ((t (:background "sea green")))) + (speedbar-selected-face ((t (:underline t)))) + (speedbar-tag-face ((t (:foreground "yellow")))) + (strokes-char-face ((t (:background "lightgray")))) + (swbuff-current-buffer-face ((t (:bold t :foreground "gray85" :weight bold)))) + (template-message-face ((t (:bold t :weight bold)))) + (term-black ((t (:foreground "black")))) + (term-blackbg ((t (:background "black")))) + (term-blue ((t (:foreground "blue")))) + (term-bluebg ((t (:background "blue")))) + (term-bold ((t (:bold t :weight bold)))) + (term-cyan ((t (:foreground "cyan")))) + (term-cyanbg ((t (:background "cyan")))) + (term-default ((t (:background "gray80" :foreground "gray30" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :width normal :family "outline-lucida console")))) + (term-default-bg ((t (nil)))) + (term-default-bg-inv ((t (nil)))) + (term-default-fg ((t (nil)))) + (term-default-fg-inv ((t (nil)))) + (term-green ((t (:foreground "green")))) + (term-greenbg ((t (:background "green")))) + (term-invisible ((t (nil)))) + (term-invisible-inv ((t (nil)))) + (term-magenta ((t (:foreground "magenta")))) + (term-magentabg ((t (:background "magenta")))) + (term-red ((t (:foreground "red")))) + (term-redbg ((t (:background "red")))) + (term-underline ((t (:underline t)))) + (term-white ((t (:foreground "white")))) + (term-whitebg ((t (:background "white")))) + (term-yellow ((t (:foreground "yellow")))) + (term-yellowbg ((t (:background "yellow")))) + (tex-math-face ((t (:foreground "RosyBrown")))) + (texinfo-heading-face ((t (:foreground "Blue")))) + (text-cursor ((t (:background "Red3" :foreground "gray80")))) + (tool-bar ((t (:background "grey75" :foreground "black")))) + (toolbar ((t (:background "Gray80")))) + (tooltip ((t (:background "lightyellow" :foreground "black")))) + (trailing-whitespace ((t (:background "red")))) + (underline ((t (:underline t)))) + (variable-pitch ((t (:family "helv")))) + (vc-annotate-face-0046FF ((t (:background "black" :foreground "wheat")))) + (vcursor ((t (:background "cyan" :foreground "blue" :underline t)))) + (vertical-divider ((t (:background "Gray80")))) + (vhdl-font-lock-attribute-face ((t (:foreground "gray85")))) + (vhdl-font-lock-directive-face ((t (:foreground "gray85")))) + (vhdl-font-lock-enumvalue-face ((t (:foreground "gray85")))) + (vhdl-font-lock-function-face ((t (:foreground "gray85")))) + (vhdl-font-lock-prompt-face ((t (:bold t :foreground "gray85" :weight bold)))) + (vhdl-font-lock-reserved-words-face ((t (:bold t :foreground "gray85" :weight bold)))) + (vhdl-font-lock-translate-off-face ((t (:background "LightGray")))) + (vhdl-speedbar-architecture-face ((t (:foreground "gray85")))) + (vhdl-speedbar-architecture-selected-face ((t (:foreground "gray85" :underline t)))) + (vhdl-speedbar-configuration-face ((t (:foreground "gray85")))) + (vhdl-speedbar-configuration-selected-face ((t (:foreground "gray85" :underline t)))) + (vhdl-speedbar-entity-face ((t (:foreground "gray85")))) + (vhdl-speedbar-entity-selected-face ((t (:foreground "gray85" :underline t)))) + (vhdl-speedbar-instantiation-face ((t (:foreground "gray85")))) + (vhdl-speedbar-instantiation-selected-face ((t (:foreground "gray85" :underline t)))) + (vhdl-speedbar-package-face ((t (:foreground "gray85")))) + (vhdl-speedbar-package-selected-face ((t (:foreground "gray85" :underline t)))) + (viper-minibuffer-emacs-face ((t (:background "darkseagreen2" :foreground "Black")))) + (viper-minibuffer-insert-face ((t (:background "pink" :foreground "Black")))) + (viper-minibuffer-vi-face ((t (:background "grey" :foreground "DarkGreen")))) + (viper-replace-overlay-face ((t (:background "darkseagreen2" :foreground "Black")))) + (viper-search-face ((t (:background "khaki" :foreground "Black")))) + (vm-header-content-face ((t (:italic t :foreground "wheat" :slant italic)))) + (vm-header-from-face ((t (:italic t :foreground "wheat" :slant italic)))) + (vm-header-name-face ((t (:foreground "cyan")))) + (vm-header-subject-face ((t (:foreground "cyan")))) + (vm-header-to-face ((t (:italic t :foreground "cyan" :slant italic)))) + (vm-message-cited-face ((t (:foreground "Gray80")))) + (vm-monochrome-image ((t (:background "white" :foreground "gray30")))) + (vm-summary-face-1 ((t (:foreground "MediumAquamarine")))) + (vm-summary-face-2 ((t (:foreground "MediumAquamarine")))) + (vm-summary-face-3 ((t (:foreground "MediumAquamarine")))) + (vm-summary-face-4 ((t (:foreground "MediumAquamarine")))) + (vm-summary-highlight-face ((t (:foreground "White")))) + (vm-xface ((t (:background "white" :foreground "gray30")))) + (vmpc-pre-sig-face ((t (:foreground "gray85")))) + (vmpc-sig-face ((t (:foreground "gray85")))) + (vvb-face ((t (:background "pink" :foreground "gray30")))) + (w3m-anchor-face ((t (:bold t :foreground "gray85" :weight bold)))) + (w3m-arrived-anchor-face ((t (:bold t :foreground "gray85" :weight bold)))) + (w3m-header-line-location-content-face ((t (:background "dark olive green" :foreground "wheat")))) + (w3m-header-line-location-title-face ((t (:background "dark olive green" :foreground "beige")))) + (white ((t (:foreground "white")))) + (widget ((t (nil)))) + (widget-button-face ((t (:bold t :weight bold)))) + (widget-button-pressed-face ((t (:foreground "gray85")))) + (widget-documentation-face ((t (:foreground "dark green")))) + (widget-field-face ((t (:background "gray85" :foreground "gray30")))) + (widget-inactive-face ((t (:foreground "dim gray")))) + (widget-single-line-field-face ((t (:background "dim gray" :foreground "white")))) + (woman-addition-face ((t (:foreground "orange")))) + (woman-bold-face ((t (:bold t :weight bold)))) + (woman-italic-face ((t (:foreground "beige")))) + (woman-unknown-face ((t (:foreground "LightSalmon")))) + (x-face ((t (:background "white" :foreground "gray30")))) + (xrdb-option-name-face ((t (:foreground "gray85")))) + (xref-keyword-face ((t (:foreground "gray85")))) + (xref-list-default-face ((t (nil)))) + (xref-list-pilot-face ((t (:foreground "gray85")))) + (xref-list-symbol-face ((t (:foreground "navy")))) + (xsl-fo-alternate-face ((t (:foreground "Yellow")))) + (xsl-fo-main-face ((t (:foreground "PaleGreen")))) + (xsl-other-element-face ((t (:foreground "Coral")))) + (xsl-xslt-alternate-face ((t (:foreground "LightGray")))) + (xsl-xslt-main-face ((t (:foreground "Wheat")))) + (xxml-emph-1-face ((t (:background "lightyellow")))) + (xxml-emph-2-face ((t (:background "lightyellow")))) + (xxml-header-1-face ((t (:background "seashell1" :foreground "MediumAquamarine")))) + (xxml-header-2-face ((t (:background "seashell1" :foreground "SkyBlue")))) + (xxml-header-3-face ((t (:background "seashell1")))) + (xxml-header-4-face ((t (:background "seashell1")))) + (xxml-interaction-face ((t (:background "lightcyan")))) + (xxml-rug-face ((t (:background "cyan")))) + (xxml-sparkle-face ((t (:background "yellow")))) + (xxml-unbreakable-space-face ((t (:foreground "grey" :underline t)))) + (yellow ((t (:foreground "yellow")))) + (zmacs-region ((t (:background "Cyan4"))))))) + +(defun color-theme-blue-mood () + "Color theme by Nelson Loyola, created 2002-04-15. +Includes cperl, custom, font-lock, p4, speedbar, widget." + (interactive) + (color-theme-install + '(color-theme-blue-mood + ((background-color . "DodgerBlue4") + (background-mode . dark) + (background-toolbar-color . "#bfbfbfbfbfbf") + (border-color . "Blue") + (border-color . "#000000000000") + (bottom-toolbar-shadow-color . "#6c6c68686868") + (cursor-color . "DarkGoldenrod1") + (foreground-color . "white smoke") + (mouse-color . "black") + (top-toolbar-shadow-color . "#e5e5e0e0e1e1")) + ((vc-annotate-very-old-color . "#0046FF")) + (default ((t (nil)))) + (blue ((t (:foreground "blue")))) + (bold ((t (:bold t)))) + (bold-italic ((t (nil)))) + (border-glyph ((t (nil)))) + (cmode-bracket-face ((t (:bold t)))) + (cperl-array-face ((t (:bold t :foreground "wheat")))) + (cperl-hash-face ((t (:bold t :foreground "chartreuse")))) + (custom-button-face ((t (nil)))) + (custom-changed-face ((t (:background "blue" :foreground "white")))) + (custom-documentation-face ((t (nil)))) + (custom-face-tag-face ((t (:underline t)))) + (custom-group-tag-face ((t (:underline t :foreground "blue")))) + (custom-group-tag-face-1 ((t (:underline t :foreground "red")))) + (custom-invalid-face ((t (:background "red" :foreground "yellow")))) + (custom-modified-face ((t (:background "blue" :foreground "white")))) + (custom-rogue-face ((t (:background "black" :foreground "pink")))) + (custom-saved-face ((t (:underline t)))) + (custom-set-face ((t (:background "white" :foreground "blue")))) + (custom-state-face ((t (:bold t :foreground "cyan")))) + (custom-variable-button-face ((t (:underline t :bold t)))) + (custom-variable-tag-face ((t (:underline t :foreground "blue")))) + (ff-paths-non-existant-file-face ((t (:bold t :foreground "NavyBlue")))) + (font-lock-builtin-face ((t (:bold t :foreground "wheat")))) + (font-lock-comment-face ((t (:bold t :foreground "gray72")))) + (font-lock-constant-face ((t (:bold t :foreground "cyan3")))) + (font-lock-doc-string-face ((t (:foreground "#00C000")))) + (font-lock-function-name-face ((t (:bold t :foreground "chartreuse")))) + (font-lock-keyword-face ((t (:bold t :foreground "gold1")))) + (font-lock-other-emphasized-face ((t (:bold t :foreground "gold1")))) + (font-lock-other-type-face ((t (:bold t :foreground "gold1")))) + (font-lock-preprocessor-face ((t (:foreground "plum")))) + (font-lock-reference-face ((t (:bold t :foreground "orangered")))) + (font-lock-string-face ((t (:foreground "tomato")))) + (font-lock-type-face ((t (:bold t :foreground "gold1")))) + (font-lock-variable-name-face ((t (:foreground "light yellow")))) + (font-lock-warning-face ((t (:foreground "tomato")))) + (green ((t (:foreground "green")))) + (gui-button-face ((t (:background "grey75" :foreground "black")))) + (gui-element ((t (:size "nil" :background "#e7e3d6" :foreground" #000000")))) + (highlight ((t (:background "red" :foreground "yellow")))) + (isearch ((t (:bold t :background "pale turquoise" :foreground "blue")))) + (italic ((t (nil)))) + (lazy-highlight-face ((t (:bold t :foreground "dark magenta")))) + (left-margin ((t (nil)))) + (list-mode-item-selected ((t (:bold t :background "gray68" :foreground "yellow")))) + (modeline ((t (:background "goldenrod" :foreground "darkblue")))) + (modeline-buffer-id ((t (:background "goldenrod" :foreground "darkblue")))) + (modeline-mousable ((t (:background "goldenrod" :foreground "darkblue")))) + (modeline-mousable-minor-mode ((t (:background "goldenrod" :foreground "darkblue")))) + (my-tab-face ((t (:background "SlateBlue1")))) + (p4-depot-added-face ((t (:foreground "steelblue1")))) + (p4-depot-deleted-face ((t (:foreground "red")))) + (p4-depot-unmapped-face ((t (:foreground "grey90")))) + (p4-diff-change-face ((t (:foreground "dark green")))) + (p4-diff-del-face ((t (:bold t :foreground "salmon")))) + (p4-diff-file-face ((t (:background "blue")))) + (p4-diff-head-face ((t (:background "blue")))) + (p4-diff-ins-face ((t (:foreground "steelblue1")))) + (paren-blink-off ((t (:foreground "DodgerBlue4")))) + (paren-match ((t (:background "red" :foreground "yellow")))) + (paren-mismatch ((t (:background "DeepPink")))) + (pointer ((t (:background "white")))) + (primary-selection ((t (:bold t :background "medium sea green")))) + (red ((t (:foreground "red")))) + (region ((t (:background "red" :foreground "yellow")))) + (right-margin ((t (nil)))) + (secondary-selection ((t (:background "gray91" :foreground "sienna3")))) + (show-paren-match-face ((t (:background "cyan3" :foreground "blue")))) + (show-paren-mismatch-face ((t (:background "red" :foreground "blue")))) + (show-trailing-whitespace ((t (:background "red" :foreground "blue")))) + (speedbar-button-face ((t (:foreground "white")))) + (speedbar-directory-face ((t (:foreground "gray")))) + (speedbar-file-face ((t (:foreground "gold1")))) + (speedbar-highlight-face ((t (:background "lightslateblue" :foreground "gold1")))) + (speedbar-selected-face ((t (:underline t :foreground "red")))) + (speedbar-tag-face ((t (:foreground "chartreuse")))) + (text-cursor ((t (:background "DarkGoldenrod1" :foreground "DodgerBlue4")))) + (toolbar ((t (:background "#e7e3d6" :foreground "#000000")))) + (underline ((t (:underline t)))) + (vertical-divider ((t (:background "#e7e3d6" :foreground "#000000")))) + (widget-button-face ((t (:bold t)))) + (widget-button-pressed-face ((t (:foreground "red")))) + (widget-documentation-face ((t (:foreground "dark green")))) + (widget-field-face ((t (:background "gray85")))) + (widget-inactive-face ((t (:foreground "dim gray")))) + (widget-single-line-field-face ((t (:background "gray85")))) + (yellow ((t (:foreground "yellow")))) + (zmacs-region ((t (:background "white" :foreground "midnightblue"))))))) + +(defun color-theme-euphoria () + "Color theme by oGLOWo, created 2000-04-19. +Green on black theme including font-lock, speedbar, and widget." + (interactive) + (color-theme-install + '(color-theme-euphoria + ((background-color . "black") + (background-mode . dark) + (border-color . "black") + (cursor-color . "yellow") + (foreground-color . "#00ff00") + (mouse-color . "yellow")) + ((help-highlight-face . underline) + (list-matching-lines-face . bold) + (widget-mouse-face . highlight)) + (default ((t (:stipple nil :background "black" :foreground "#00ff00" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :width normal :family "misc-fixed")))) + (bold ((t (:bold t :weight bold)))) + (bold-italic ((t (:italic t :bold t :slant italic :weight bold)))) + (border ((t (:background "black")))) + (comint-highlight-input ((t (:bold t :weight bold)))) + (comint-highlight-prompt ((t (:foreground "cyan")))) + (cursor ((t (:background "yellow")))) + (fixed-pitch ((t (:family "courier")))) + (font-lock-builtin-face ((t (:foreground "magenta")))) + (font-lock-comment-face ((t (:foreground "deeppink")))) + (font-lock-constant-face ((t (:foreground "blue")))) + (font-lock-doc-face ((t (:foreground "cyan")))) + (font-lock-doc-string-face ((t (:foreground "cyan")))) + (font-lock-function-name-face ((t (:foreground "purple")))) + (font-lock-keyword-face ((t (:foreground "red")))) + (font-lock-preprocessor-face ((t (:foreground "blue1")))) + (font-lock-reference-face ((t (nil)))) + (font-lock-string-face ((t (:foreground "cyan")))) + (font-lock-type-face ((t (:foreground "yellow")))) + (font-lock-variable-name-face ((t (:foreground "violet")))) + (font-lock-warning-face ((t (:bold t :foreground "red" :weight bold)))) + (fringe ((t (:background "gray16" :foreground "#00ff00")))) + (header-line ((t (:box (:line-width -1 :style released-button) :background "grey20" :foreground "grey90" :box nil)))) + (highlight ((t (:background "darkolivegreen")))) + (horizontal-divider ((t (:background "gray16" :foreground "#00ff00")))) + (isearch ((t (:background "palevioletred2" :foreground "brown4")))) + (isearch-lazy-highlight-face ((t (:background "paleturquoise4")))) + (italic ((t (:italic t :slant italic)))) + (menu ((t (:background "gray16" :foreground "green")))) + (modeline ((t (:background "gray16" :foreground "#00ff00" :box (:line-width -1 :style released-button))))) + (modeline-buffer-id ((t (:background "gray16" :foreground "#00ff00")))) + (modeline-mousable ((t (:background "gray16" :foreground "#00ff00")))) + (modeline-mousable-minor-mode ((t (:background "gray16" :foreground "#00ff00")))) + (mouse ((t (:background "yellow")))) + (primary-selection ((t (:background "#00ff00" :foreground "black")))) + (region ((t (:background "steelblue" :foreground "white")))) + (scroll-bar ((t (:background "gray16" :foreground "#00ff00")))) + (secondary-selection ((t (:background "#00ff00" :foreground "black")))) + (show-paren-match-face ((t (:background "turquoise")))) + (show-paren-mismatch-face ((t (:background "purple" :foreground "white")))) + (speedbar-button-face ((t (:foreground "#00ff00")))) + (speedbar-directory-face ((t (:foreground "#00ff00")))) + (speedbar-file-face ((t (:foreground "cyan")))) + (speedbar-highlight-face ((t (:background "#00ff00" :foreground "purple")))) + (speedbar-selected-face ((t (:foreground "deeppink" :underline t)))) + (speedbar-tag-face ((t (:foreground "yellow")))) + (tool-bar ((t (:background "gray16" :foreground "green" :box (:line-width 1 :style released-button))))) + (tooltip ((t (:background "gray16" :foreground "#00ff00")))) + (trailing-whitespace ((t (:background "red")))) + (underline ((t (:underline t)))) + (variable-pitch ((t (:family "helv")))) + (vertical-divider ((t (:background "gray16" :foreground "#00ff00")))) + (widget-button-face ((t (:bold t :weight bold)))) + (widget-button-pressed-face ((t (:foreground "red")))) + (widget-documentation-face ((t (:foreground "lime green")))) + (widget-field-face ((t (:background "dim gray")))) + (widget-inactive-face ((t (:foreground "light gray")))) + (widget-single-line-field-face ((t (:background "dim gray")))) + (zmacs-region ((t (:background "steelblue" :foreground "white"))))))) + +(defun color-theme-resolve () + "Color theme by Damien Elmes, created 2002-04-24. +A white smoke on blue color theme." + (interactive) + (color-theme-install + '(color-theme-resolve + ((background-color . "#00457f") + (background-mode . dark) + (border-color . "black") + (cursor-color . "DarkGoldenrod1") + (foreground-color . "white smoke") + (mouse-color . "white")) + ((display-time-mail-face . mode-line) + (help-highlight-face . underline) + (list-matching-lines-face . bold) + (view-highlight-face . highlight) + (widget-mouse-face . highlight)) + (default ((t (:stipple nil :background "#00457f" :foreground "white smoke" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :width normal :family "b&h-lucidatypewriter")))) + (bold ((t (:bold t :foreground "snow2" :weight bold)))) + (bold-italic ((t (:italic t :bold t :slant italic :weight bold)))) + (border ((t (:background "black")))) + (calendar-today-face ((t (:underline t)))) + (comint-highlight-input ((t (:bold t :weight bold)))) + (comint-highlight-prompt ((t (:foreground "cyan")))) + (cperl-array-face ((t (:bold t :foreground "wheat" :weight bold)))) + (cperl-hash-face ((t (:bold t :foreground "chartreuse" :weight bold)))) + (cursor ((t (:background "DarkGoldenrod1")))) + (diary-face ((t (:foreground "yellow")))) + (erc-input-face ((t (:foreground "lightblue2")))) + (erc-notice-face ((t (:foreground "lightyellow3")))) + (fixed-pitch ((t (:family "courier")))) + (font-latex-bold-face ((t (:bold t :foreground "DarkOliveGreen" :weight bold)))) + (font-latex-italic-face ((t (:italic t :foreground "DarkOliveGreen" :slant italic)))) + (font-latex-math-face ((t (:foreground "burlywood")))) + (font-latex-sedate-face ((t (:foreground "LightGray")))) + (font-latex-string-face ((t (:foreground "RosyBrown")))) + (font-latex-warning-face ((t (:bold t :foreground "Red" :weight bold)))) + (font-lock-builtin-face ((t (:foreground "wheat")))) + (font-lock-comment-face ((t (:foreground "light steel blue")))) + (font-lock-constant-face ((t (:foreground "seashell3")))) + (font-lock-doc-face ((t (:foreground "plum")))) + (font-lock-doc-string-face ((t (:foreground "#008000")))) + (font-lock-function-name-face ((t (:foreground "thistle1")))) + (font-lock-keyword-face ((t (:foreground "wheat")))) + (font-lock-other-emphasized-face ((t (:bold t :foreground "gold1" :weight bold)))) + (font-lock-other-type-face ((t (:bold t :foreground "gold1" :weight bold)))) + (font-lock-preprocessor-face ((t (:foreground "#800080")))) + (font-lock-reference-face ((t (:foreground "wheat")))) + (font-lock-string-face ((t (:foreground "plum")))) + (font-lock-type-face ((t (:foreground "lawn green")))) + (font-lock-variable-name-face ((t (:foreground "light yellow")))) + (font-lock-warning-face ((t (:foreground "plum")))) + (fringe ((t (:background "#000000")))) + (gnus-cite-attribution-face ((t (:italic t :slant italic)))) + (gnus-cite-face-1 ((t (:foreground "light blue")))) + (gnus-cite-face-10 ((t (:foreground "medium purple")))) + (gnus-cite-face-11 ((t (:foreground "turquoise")))) + (gnus-cite-face-2 ((t (:foreground "light cyan")))) + (gnus-cite-face-3 ((t (:foreground "light yellow")))) + (gnus-cite-face-4 ((t (:foreground "light pink")))) + (gnus-cite-face-5 ((t (:foreground "pale green")))) + (gnus-cite-face-6 ((t (:foreground "beige")))) + (gnus-cite-face-7 ((t (:foreground "orange")))) + (gnus-cite-face-8 ((t (:foreground "magenta")))) + (gnus-cite-face-9 ((t (:foreground "violet")))) + (gnus-emphasis-bold ((t (:bold t :weight bold)))) + (gnus-emphasis-bold-italic ((t (:italic t :bold t :slant italic :weight bold)))) + (gnus-emphasis-highlight-words ((t (:background "black" :foreground "yellow")))) + (gnus-emphasis-italic ((t (:italic t :slant italic)))) + (gnus-emphasis-underline ((t (:underline t)))) + (gnus-emphasis-underline-bold ((t (:bold t :underline t :weight bold)))) + (gnus-emphasis-underline-bold-italic ((t (:italic t :bold t :underline t :slant italic :weight bold)))) + (gnus-emphasis-underline-italic ((t (:italic t :underline t :slant italic)))) + (gnus-group-mail-1-empty-face ((t (:foreground "aquamarine1")))) + (gnus-group-mail-1-face ((t (:bold t :foreground "aquamarine1" :weight bold)))) + (gnus-group-mail-2-empty-face ((t (:foreground "aquamarine2")))) + (gnus-group-mail-2-face ((t (:bold t :foreground "aquamarine2" :weight bold)))) + (gnus-group-mail-3-empty-face ((t (:foreground "aquamarine3")))) + (gnus-group-mail-3-face ((t (:bold t :foreground "aquamarine3" :weight bold)))) + (gnus-group-mail-low-empty-face ((t (:foreground "aquamarine4")))) + (gnus-group-mail-low-face ((t (:bold t :foreground "aquamarine4" :weight bold)))) + (gnus-group-news-1-empty-face ((t (:foreground "PaleTurquoise")))) + (gnus-group-news-1-face ((t (:bold t :foreground "PaleTurquoise" :weight bold)))) + (gnus-group-news-2-empty-face ((t (:foreground "turquoise")))) + (gnus-group-news-2-face ((t (:bold t :foreground "turquoise" :weight bold)))) + (gnus-group-news-3-empty-face ((t (nil)))) + (gnus-group-news-3-face ((t (:bold t :weight bold)))) + (gnus-group-news-4-empty-face ((t (nil)))) + (gnus-group-news-4-face ((t (:bold t :weight bold)))) + (gnus-group-news-5-empty-face ((t (nil)))) + (gnus-group-news-5-face ((t (:bold t :weight bold)))) + (gnus-group-news-6-empty-face ((t (nil)))) + (gnus-group-news-6-face ((t (:bold t :weight bold)))) + (gnus-group-news-low-empty-face ((t (:foreground "DarkTurquoise")))) + (gnus-group-news-low-face ((t (:bold t :foreground "DarkTurquoise" :weight bold)))) + (gnus-header-content-face ((t (:italic t :foreground "snow2" :slant italic)))) + (gnus-header-from-face ((t (:foreground "spring green")))) + (gnus-header-name-face ((t (:bold t :foreground "snow2" :weight bold)))) + (gnus-header-newsgroups-face ((t (:italic t :foreground "yellow" :slant italic)))) + (gnus-header-subject-face ((t (:bold t :foreground "peach puff" :weight bold)))) + (gnus-signature-face ((t (:italic t :slant italic)))) + (gnus-splash-face ((t (:foreground "Brown")))) + (gnus-summary-cancelled-face ((t (:background "black" :foreground "yellow")))) + (gnus-summary-high-ancient-face ((t (:bold t :foreground "SkyBlue" :weight bold)))) + (gnus-summary-high-read-face ((t (:bold t :foreground "PaleGreen" :weight bold)))) + (gnus-summary-high-ticked-face ((t (:bold t :foreground "pink" :weight bold)))) + (gnus-summary-high-unread-face ((t (:bold t :weight bold)))) + (gnus-summary-low-ancient-face ((t (:italic t :foreground "SkyBlue" :slant italic)))) + (gnus-summary-low-read-face ((t (:italic t :foreground "PaleGreen" :slant italic)))) + (gnus-summary-low-ticked-face ((t (:italic t :foreground "pink" :slant italic)))) + (gnus-summary-low-unread-face ((t (:italic t :slant italic)))) + (gnus-summary-normal-ancient-face ((t (:foreground "SkyBlue")))) + (gnus-summary-normal-read-face ((t (:foreground "PaleGreen")))) + (gnus-summary-normal-ticked-face ((t (:foreground "pink")))) + (gnus-summary-normal-unread-face ((t (nil)))) + (gnus-summary-selected-face ((t (:underline t)))) + (header-line ((t (:background "grey20" :foreground "grey90")))) + (highlight ((t (:background "gray91" :foreground "firebrick")))) + (highline-face ((t (:background "paleturquoise" :foreground "black")))) + (holiday-face ((t (:background "chocolate4")))) + (isearch ((t (:background "palevioletred2" :foreground "brown4")))) + (isearch-lazy-highlight-face ((t (:background "paleturquoise4")))) + (italic ((t (:italic t :slant italic)))) + (menu ((t (nil)))) + (message-cited-text-face ((t (:foreground "seashell3")))) + (message-header-cc-face ((t (:bold t :foreground "snow2" :weight bold)))) + (message-header-name-face ((t (:bold t :foreground "snow1" :weight bold)))) + (message-header-newsgroups-face ((t (:italic t :bold t :foreground "blue4" :slant italic :weight bold)))) + (message-header-other-face ((t (:foreground "snow2")))) + (message-header-subject-face ((t (:bold t :foreground "snow2" :weight bold)))) + (message-header-to-face ((t (:bold t :foreground "snow2" :weight bold)))) + (message-header-xheader-face ((t (:foreground "blue")))) + (message-mml-face ((t (:foreground "ForestGreen")))) + (message-separator-face ((t (:foreground "misty rose")))) + (modeline ((t (:foreground "white" :background "#001040" :box (:line-width -1 :style released-button))))) + (modeline-buffer-id ((t (:foreground "white" :background "#001040")))) + (modeline-mousable ((t (:foreground "white" :background "#001040")))) + (modeline-mousable-minor-mode ((t (:foreground "white" :background "#001040")))) + (mouse ((t (:background "white")))) + (my-tab-face ((t (:background "SlateBlue1")))) + (p4-diff-del-face ((t (:bold t :foreground "salmon" :weight bold)))) + (primary-selection ((t (:background "gray91" :foreground "DodgerBlue4")))) + (region ((t (:background "gray91" :foreground "DodgerBlue4")))) + (scroll-bar ((t (:background "grey75")))) + (secondary-selection ((t (:background "gray91" :foreground "sienna3")))) + (show-paren-match-face ((t (:background "cyan3" :foreground "blue")))) + (show-paren-mismatch-face ((t (:background "red" :foreground "blue")))) + (tool-bar ((t (:background "grey75" :foreground "black")))) + (tooltip ((t (:background "lightyellow" :foreground "black")))) + (trailing-whitespace ((t (:background "red")))) + (underline ((t (:underline t)))) + (variable-pitch ((t (:family "helv")))) + (widget-button-face ((t (:bold t :weight bold)))) + (widget-button-pressed-face ((t (:foreground "red")))) + (widget-documentation-face ((t (:foreground "dark green")))) + (widget-field-face ((t (:background "steel blue")))) + (widget-inactive-face ((t (:foreground "grey")))) + (widget-single-line-field-face ((t (:background "gray85")))) + (zmacs-region ((t (:background "gray91" :foreground "DodgerBlue4"))))))) + +(defun color-theme-xp () + "Color theme by Girish Bharadwaj, created 2002-04-25. +Includes custom, erc, font-lock, jde, semantic, speedbar, widget." + (interactive) + (color-theme-install + '(color-theme-xp + ((background-color . "lightyellow2") + (background-mode . light) + (border-color . "black") + (cursor-color . "black") + (foreground-color . "gray20") + (mouse-color . "black")) + ((help-highlight-face . underline) + (list-matching-lines-face . bold) + (semantic-which-function-use-color . t) + (senator-eldoc-use-color . t) + (view-highlight-face . highlight) + (widget-mouse-face . highlight)) + (default ((t (:stipple nil :background "lightyellow2" :foreground "gray20" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :width normal :family "outline-courier new")))) + (bg:erc-color-face0 ((t (:background "White")))) + (bg:erc-color-face1 ((t (:background "black")))) + (bg:erc-color-face10 ((t (:background "lightblue1")))) + (bg:erc-color-face11 ((t (:background "cyan")))) + (bg:erc-color-face12 ((t (:background "blue")))) + (bg:erc-color-face13 ((t (:background "deeppink")))) + (bg:erc-color-face14 ((t (:background "gray50")))) + (bg:erc-color-face15 ((t (:background "gray90")))) + (bg:erc-color-face2 ((t (:background "blue4")))) + (bg:erc-color-face3 ((t (:background "green4")))) + (bg:erc-color-face4 ((t (:background "red")))) + (bg:erc-color-face5 ((t (:background "brown")))) + (bg:erc-color-face6 ((t (:background "purple")))) + (bg:erc-color-face7 ((t (:background "orange")))) + (bg:erc-color-face8 ((t (:background "yellow")))) + (bg:erc-color-face9 ((t (:background "green")))) + (bold ((t (:bold t :weight bold)))) + (bold-italic ((t (:italic t :bold t :slant italic :weight bold)))) + (border ((t (:background "black")))) + (button ((t (:underline t)))) + (comint-highlight-input ((t (:bold t :weight bold)))) + (comint-highlight-prompt ((t (:foreground "dark blue")))) + (cursor ((t (:background "black")))) + (custom-button-face ((t (:background "lightgrey" :foreground "black" :box (:line-width 2 :style released-button))))) + (custom-button-pressed-face ((t (:background "lightgrey" :foreground "black" :box (:line-width 2 :style pressed-button))))) + (custom-changed-face ((t (:background "blue" :foreground "white")))) + (custom-comment-face ((t (:background "gray85")))) + (custom-comment-tag-face ((t (:foreground "blue4")))) + (custom-documentation-face ((t (nil)))) + (custom-face-tag-face ((t (:bold t :family "helv" :weight bold :height 1.2)))) + (custom-group-tag-face ((t (:bold t :foreground "blue" :weight bold :height 1.2)))) + (custom-group-tag-face-1 ((t (:bold t :family "helv" :foreground "red" :weight bold :height 1.2)))) + (custom-invalid-face ((t (:background "red" :foreground "yellow")))) + (custom-modified-face ((t (:background "blue" :foreground "white")))) + (custom-rogue-face ((t (:background "black" :foreground "pink")))) + (custom-saved-face ((t (:underline t)))) + (custom-set-face ((t (:background "white" :foreground "blue")))) + (custom-state-face ((t (:foreground "dark green")))) + (custom-variable-button-face ((t (:bold t :underline t :weight bold)))) + (custom-variable-tag-face ((t (:bold t :family "helv" :foreground "blue" :weight bold :height 1.2)))) + (erc-action-face ((t (:bold t :weight bold)))) + (erc-bold-face ((t (:bold t :weight bold)))) + (erc-default-face ((t (nil)))) + (erc-direct-msg-face ((t (:foreground "IndianRed")))) + (erc-error-face ((t (:background "Red" :foreground "White")))) + (erc-input-face ((t (:foreground "brown")))) + (erc-inverse-face ((t (:background "Black" :foreground "White")))) + (erc-notice-face ((t (:bold t :foreground "SlateBlue" :weight bold)))) + (erc-prompt-face ((t (:bold t :background "lightBlue2" :foreground "Black" :weight bold)))) + (erc-timestamp-face ((t (:bold t :foreground "green" :weight bold)))) + (erc-underline-face ((t (:underline t)))) + (fg:erc-color-face0 ((t (:foreground "White")))) + (fg:erc-color-face1 ((t (:foreground "black")))) + (fg:erc-color-face10 ((t (:foreground "lightblue1")))) + (fg:erc-color-face11 ((t (:foreground "cyan")))) + (fg:erc-color-face12 ((t (:foreground "blue")))) + (fg:erc-color-face13 ((t (:foreground "deeppink")))) + (fg:erc-color-face14 ((t (:foreground "gray50")))) + (fg:erc-color-face15 ((t (:foreground "gray90")))) + (fg:erc-color-face2 ((t (:foreground "blue4")))) + (fg:erc-color-face3 ((t (:foreground "green4")))) + (fg:erc-color-face4 ((t (:foreground "red")))) + (fg:erc-color-face5 ((t (:foreground "brown")))) + (fg:erc-color-face6 ((t (:foreground "purple")))) + (fg:erc-color-face7 ((t (:foreground "orange")))) + (fg:erc-color-face8 ((t (:foreground "yellow")))) + (fg:erc-color-face9 ((t (:foreground "green")))) + (fixed-pitch ((t (:family "courier")))) + (font-lock-builtin-face ((t (:foreground "magenta3" :underline t :height 0.9)))) + (font-lock-comment-face ((t (:italic t :foreground "gray60" :slant oblique :height 0.9)))) + (font-lock-constant-face ((t (:bold t :foreground "medium purple" :weight bold :height 0.9)))) + (font-lock-function-name-face ((t (:bold t :foreground "black" :weight bold)))) + (font-lock-keyword-face ((t (:bold t :foreground "blue" :weight bold)))) + (font-lock-string-face ((t (:foreground "red" :height 0.9)))) + (font-lock-type-face ((t (:foreground "Royalblue")))) + (font-lock-variable-name-face ((t (:bold t :foreground "maroon" :weight bold :height 0.9)))) + (font-lock-warning-face ((t (:bold t :foreground "Red" :weight bold)))) + (fringe ((t (:background "dodgerblue")))) + (header-line ((t (:underline "red" :overline "red" :background "grey90" :foreground "grey20" :box nil)))) + (highlight ((t (:background "darkseagreen2")))) + (isearch ((t (:background "magenta2" :foreground "lightskyblue1")))) + (isearch-lazy-highlight-face ((t (:background "paleturquoise")))) + (italic ((t (:italic t :slant italic)))) + (jde-bug-breakpoint-cursor ((t (:background "brown" :foreground "cyan")))) + (jde-db-active-breakpoint-face ((t (:background "red" :foreground "black")))) + (jde-db-requested-breakpoint-face ((t (:background "yellow" :foreground "black")))) + (jde-db-spec-breakpoint-face ((t (:background "green" :foreground "black")))) + (jde-java-font-lock-api-face ((t (:foreground "dark goldenrod")))) + (jde-java-font-lock-bold-face ((t (:bold t :weight bold)))) + (jde-java-font-lock-code-face ((t (nil)))) + (jde-java-font-lock-constant-face ((t (:foreground "CadetBlue")))) + (jde-java-font-lock-doc-tag-face ((t (:foreground "green4")))) + (jde-java-font-lock-italic-face ((t (:italic t :slant italic)))) + (jde-java-font-lock-link-face ((t (:foreground "cadetblue" :underline t :slant normal)))) + (jde-java-font-lock-modifier-face ((t (:foreground "Orchid")))) + (jde-java-font-lock-number-face ((t (:foreground "RosyBrown")))) + (jde-java-font-lock-operator-face ((t (:foreground "medium blue")))) + (jde-java-font-lock-package-face ((t (:foreground "blue3")))) + (jde-java-font-lock-pre-face ((t (nil)))) + (jde-java-font-lock-underline-face ((t (:underline t)))) + (menu ((t (nil)))) + (minibuffer-prompt ((t (:foreground "dark blue")))) + (modeline ((t (:background "dodgerblue" :foreground "black" :overline "red" :underline "red")))) + (modeline-buffer-id ((t (:background "dodgerblue" :foreground "black")))) + (modeline-mousable ((t (:background "dodgerblue" :foreground "black")))) + (modeline-mousable-minor-mode ((t (:background "dodgerblue" :foreground "black")))) + (mode-line-inactive ((t (:italic t :underline "red" :overline "red" :background "white" :foreground "cadetblue" :box (:line-width -1 :color "grey75") :slant oblique :weight light)))) + (mouse ((t (:background "black")))) + (primary-selection ((t (:background "lightgoldenrod2")))) + (region ((t (:background "lightgoldenrod2")))) + (scroll-bar ((t (nil)))) + (secondary-selection ((t (:background "yellow")))) + (semantic-dirty-token-face ((t (:background "lightyellow")))) + (semantic-unmatched-syntax-face ((t (:underline "red")))) + (senator-intangible-face ((t (:foreground "gray25")))) + (senator-momentary-highlight-face ((t (:background "gray70")))) + (senator-read-only-face ((t (:background "#CCBBBB")))) + (show-paren-match-face ((t (:background "turquoise")))) + (show-paren-mismatch-face ((t (:background "purple" :foreground "white")))) + (speedbar-button-face ((t (:foreground "green4")))) + (speedbar-directory-face ((t (:foreground "blue4")))) + (speedbar-file-face ((t (:foreground "cyan4")))) + (speedbar-highlight-face ((t (:background "green")))) + (speedbar-selected-face ((t (:foreground "red" :underline t)))) + (speedbar-tag-face ((t (:foreground "brown")))) + (template-message-face ((t (:bold t :weight bold)))) + (tool-bar ((t (:background "grey75" :foreground "black" :box (:line-width 1 :style released-button))))) + (tooltip ((t (:background "lightyellow" :foreground "black")))) + (trailing-whitespace ((t (:background "red")))) + (underline ((t (:underline t)))) + (variable-pitch ((t (:family "helv")))) + (widget-button-face ((t (:bold t :weight bold)))) + (widget-button-pressed-face ((t (:foreground "red")))) + (widget-documentation-face ((t (:foreground "dark green")))) + (widget-field-face ((t (:background "gray85")))) + (widget-inactive-face ((t (:foreground "dim gray")))) + (widget-single-line-field-face ((t (:background "gray85")))) + (zmacs-region ((t (:background "lightgoldenrod2"))))))) + +(defun color-theme-gray30 () + "Color theme by Girish Bharadwaj, created 2002-04-22." + (interactive) + (color-theme-install + '(color-theme-gray30 + ((background-color . "grey30") + (background-mode . dark) + (border-color . "black") + (cursor-color . "black") + (foreground-color . "gainsboro") + (mouse-color . "black")) + ((help-highlight-face . underline) + (list-matching-lines-face . bold) + (semantic-which-function-use-color . t) + (senator-eldoc-use-color . t) + (widget-mouse-face . highlight)) + (default ((t (:stipple nil :background "grey30" :foreground "gainsboro" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :width normal :family "outline-courier new")))) + (bg:erc-color-face0 ((t (:background "White")))) + (bg:erc-color-face1 ((t (:background "black")))) + (bg:erc-color-face10 ((t (:background "lightblue1")))) + (bg:erc-color-face11 ((t (:background "cyan")))) + (bg:erc-color-face12 ((t (:background "blue")))) + (bg:erc-color-face13 ((t (:background "deeppink")))) + (bg:erc-color-face14 ((t (:background "gray50")))) + (bg:erc-color-face15 ((t (:background "gray90")))) + (bg:erc-color-face2 ((t (:background "blue4")))) + (bg:erc-color-face3 ((t (:background "green4")))) + (bg:erc-color-face4 ((t (:background "red")))) + (bg:erc-color-face5 ((t (:background "brown")))) + (bg:erc-color-face6 ((t (:background "purple")))) + (bg:erc-color-face7 ((t (:background "orange")))) + (bg:erc-color-face8 ((t (:background "yellow")))) + (bg:erc-color-face9 ((t (:background "green")))) + (bold ((t (:bold t :weight bold)))) + (bold-italic ((t (:italic t :bold t :slant italic :weight bold)))) + (border ((t (:background "black")))) + (button ((t (:underline t)))) + (comint-highlight-input ((t (:bold t :weight bold)))) + (comint-highlight-prompt ((t (:foreground "cyan")))) + (cursor ((t (:background "black")))) + (custom-button-face ((t (:background "lightgrey" :foreground "black" :box (:line-width 2 :style released-button))))) + (custom-button-pressed-face ((t (:background "lightgrey" :foreground "black" :box (:line-width 2 :style pressed-button))))) + (custom-changed-face ((t (:background "blue" :foreground "white")))) + (custom-comment-face ((t (:background "dim gray")))) + (custom-comment-tag-face ((t (:foreground "gray80")))) + (custom-documentation-face ((t (nil)))) + (custom-face-tag-face ((t (:bold t :family "helv" :weight bold :height 1.2)))) + (custom-group-tag-face ((t (:bold t :foreground "light blue" :weight bold :height 1.2)))) + (custom-group-tag-face-1 ((t (:bold t :family "helv" :foreground "pink" :weight bold :height 1.2)))) + (custom-invalid-face ((t (:background "red" :foreground "yellow")))) + (custom-modified-face ((t (:background "blue" :foreground "white")))) + (custom-rogue-face ((t (:background "black" :foreground "pink")))) + (custom-saved-face ((t (:underline t)))) + (custom-set-face ((t (:background "white" :foreground "blue")))) + (custom-state-face ((t (:foreground "lime green")))) + (custom-variable-button-face ((t (:bold t :underline t :weight bold)))) + (custom-variable-tag-face ((t (:bold t :family "helv" :foreground "light blue" :weight bold :height 1.2)))) + (erc-action-face ((t (:bold t :weight bold)))) + (erc-bold-face ((t (:bold t :weight bold)))) + (erc-default-face ((t (nil)))) + (erc-direct-msg-face ((t (:foreground "IndianRed")))) + (erc-error-face ((t (:background "Red" :foreground "White")))) + (erc-input-face ((t (:foreground "brown")))) + (erc-inverse-face ((t (:background "Black" :foreground "White")))) + (erc-notice-face ((t (:bold t :foreground "SlateBlue" :weight bold)))) + (erc-prompt-face ((t (:bold t :background "lightBlue2" :foreground "Black" :weight bold)))) + (erc-timestamp-face ((t (:bold t :foreground "green" :weight bold)))) + (erc-underline-face ((t (:underline t)))) + (eshell-ls-archive-face ((t (:bold t :foreground "Orchid" :weight bold)))) + (eshell-ls-backup-face ((t (:foreground "LightSalmon")))) + (eshell-ls-clutter-face ((t (:bold t :foreground "OrangeRed" :weight bold)))) + (eshell-ls-directory-face ((t (:bold t :foreground "SkyBlue" :weight bold)))) + (eshell-ls-executable-face ((t (:bold t :foreground "Green" :weight bold)))) + (eshell-ls-missing-face ((t (:bold t :foreground "Red" :weight bold)))) + (eshell-ls-product-face ((t (:foreground "LightSalmon")))) + (eshell-ls-readonly-face ((t (:foreground "Pink")))) + (eshell-ls-special-face ((t (:bold t :foreground "Magenta" :weight bold)))) + (eshell-ls-symlink-face ((t (:bold t :foreground "Cyan" :weight bold)))) + (eshell-ls-unreadable-face ((t (:foreground "DarkGrey")))) + (fg:erc-color-face0 ((t (:foreground "White")))) + (fg:erc-color-face1 ((t (:foreground "black")))) + (fg:erc-color-face10 ((t (:foreground "lightblue1")))) + (fg:erc-color-face11 ((t (:foreground "cyan")))) + (fg:erc-color-face12 ((t (:foreground "blue")))) + (fg:erc-color-face13 ((t (:foreground "deeppink")))) + (fg:erc-color-face14 ((t (:foreground "gray50")))) + (fg:erc-color-face15 ((t (:foreground "gray90")))) + (fg:erc-color-face2 ((t (:foreground "blue4")))) + (fg:erc-color-face3 ((t (:foreground "green4")))) + (fg:erc-color-face4 ((t (:foreground "red")))) + (fg:erc-color-face5 ((t (:foreground "brown")))) + (fg:erc-color-face6 ((t (:foreground "purple")))) + (fg:erc-color-face7 ((t (:foreground "orange")))) + (fg:erc-color-face8 ((t (:foreground "yellow")))) + (fg:erc-color-face9 ((t (:foreground "green")))) + (fixed-pitch ((t (:family "courier")))) + (font-lock-builtin-face ((t (:foreground "LightSkyBlue" :underline t)))) + (font-lock-comment-face ((t (:italic t :foreground "lightgreen" :slant oblique)))) + (font-lock-constant-face ((t (:foreground "Aquamarine")))) + (font-lock-function-name-face ((t (:bold t :foreground "DodgerBlue" :weight bold :height 1.05)))) + (font-lock-keyword-face ((t (:foreground "LightPink" :height 1.05)))) + (font-lock-string-face ((t (:foreground "LightSalmon")))) + (font-lock-type-face ((t (:foreground "yellow" :height 1.05)))) + (font-lock-variable-name-face ((t (:foreground "gold")))) + (font-lock-warning-face ((t (:bold t :foreground "Pink" :weight bold)))) + (fringe ((t (:background "grey10")))) + (header-line ((t (:box (:line-width -1 :style released-button) :background "grey20" :foreground "grey90" :box nil)))) + (highlight ((t (:background "darkolivegreen")))) + (isearch ((t (:background "palevioletred2" :foreground "brown4")))) + (isearch-lazy-highlight-face ((t (:background "paleturquoise4")))) + (italic ((t (:italic t :slant italic)))) + (jde-bug-breakpoint-cursor ((t (:background "brown" :foreground "cyan")))) + (jde-db-active-breakpoint-face ((t (:background "red" :foreground "black")))) + (jde-db-requested-breakpoint-face ((t (:background "yellow" :foreground "black")))) + (jde-db-spec-breakpoint-face ((t (:background "green" :foreground "black")))) + (jde-java-font-lock-api-face ((t (:foreground "light goldenrod")))) + (jde-java-font-lock-bold-face ((t (:bold t :weight bold)))) + (jde-java-font-lock-code-face ((t (nil)))) + (jde-java-font-lock-constant-face ((t (:foreground "Aquamarine")))) + (jde-java-font-lock-doc-tag-face ((t (:foreground "light coral")))) + (jde-java-font-lock-italic-face ((t (:italic t :slant italic)))) + (jde-java-font-lock-link-face ((t (:foreground "cadetblue" :underline t :slant normal)))) + (jde-java-font-lock-modifier-face ((t (:foreground "LightSteelBlue")))) + (jde-java-font-lock-number-face ((t (:foreground "LightSalmon")))) + (jde-java-font-lock-operator-face ((t (:foreground "medium blue")))) + (jde-java-font-lock-package-face ((t (:foreground "steelblue1")))) + (jde-java-font-lock-pre-face ((t (nil)))) + (jde-java-font-lock-underline-face ((t (:underline t)))) + (menu ((t (nil)))) + (minibuffer-prompt ((t (:foreground "cyan")))) + (mode-line ((t (:background "grey75" :foreground "black" :box (:line-width -1 :style released-button))))) + (mode-line-inactive ((t (:background "grey30" :foreground "grey80" :box (:line-width -1 :color "grey40" :style nil) :weight light)))) + (mouse ((t (:background "black")))) + (primary-selection ((t (:background "blue3")))) + (region ((t (:background "blue3")))) + (scroll-bar ((t (nil)))) + (secondary-selection ((t (:background "SkyBlue4")))) + (semantic-dirty-token-face ((t (:background "lightyellow")))) + (semantic-unmatched-syntax-face ((t (:underline "red")))) + (senator-intangible-face ((t (:foreground "gray75")))) + (senator-momentary-highlight-face ((t (:background "gray30")))) + (senator-read-only-face ((t (:background "#664444")))) + (show-paren-match-face ((t (:background "steelblue3")))) + (show-paren-mismatch-face ((t (:background "purple" :foreground "white")))) + (speedbar-button-face ((t (:foreground "green3")))) + (speedbar-directory-face ((t (:foreground "light blue")))) + (speedbar-file-face ((t (:foreground "cyan")))) + (speedbar-highlight-face ((t (:background "sea green")))) + (speedbar-selected-face ((t (:foreground "red" :underline t)))) + (speedbar-tag-face ((t (:foreground "yellow")))) + (template-message-face ((t (:bold t :weight bold)))) + (tool-bar ((t (:background "grey75" :foreground "black" :box (:line-width 1 :style released-button))))) + (tooltip ((t (:background "lightyellow" :foreground "black")))) + (trailing-whitespace ((t (:background "red")))) + (underline ((t (:underline t)))) + (variable-pitch ((t (:family "helv")))) + (widget-button-face ((t (:bold t :weight bold)))) + (widget-button-pressed-face ((t (:foreground "red")))) + (widget-documentation-face ((t (:foreground "lime green")))) + (widget-field-face ((t (:background "dim gray")))) + (widget-inactive-face ((t (:foreground "light gray")))) + (widget-single-line-field-face ((t (:background "dim gray")))) + (zmacs-region ((t (:background "blue3"))))))) + +(defun color-theme-dark-green () + "Color theme by ces93, created 2002-03-30." + (interactive) + (color-theme-install + '(color-theme-dark-green + ((background-mode . light) + (background-toolbar-color . "#e79ddf7ddf7d") + (border-color . "#000000000000") + (bottom-toolbar-shadow-color . "#8e3886178617") + (top-toolbar-shadow-color . "#ffffffffffff")) + nil + (default ((t (nil)))) + (blue ((t (:foreground "blue")))) + (bold ((t (:bold t)))) + (bold-italic ((t (:italic t :bold t)))) + (border-glyph ((t (nil)))) + (fringe ((t (nil)))) + (green ((t (:foreground "green")))) + (gui-button-face ((t (:background "grey75" :foreground "black")))) + (gui-element ((t (:background "#ffffff" :foreground "#000000")))) + (highlight ((t (:background "gray" :foreground "darkred")))) + (isearch ((t (:background "LightSlateGray" :foreground "red")))) + (italic ((t (:italic t)))) + (left-margin ((t (nil)))) + (list-mode-item-selected ((t (:background "gray68")))) + (mode-line ((t (:background "LightSlateGray" :foreground "black")))) + (modeline ((t (:background "LightSlateGray" :foreground "black")))) + (modeline-buffer-id ((t (:background "LightSlateGray" :foreground "blue4")))) + (modeline-mousable ((t (:background "LightSlateGray" :foreground "firebrick")))) + (modeline-mousable-minor-mode ((t (:background "LightSlateGray" :foreground "green4")))) + (pointer ((t (:background "#ffffff" :foreground "#000000")))) + (primary-selection ((t (:background "gray65")))) + (red ((t (:foreground "red")))) + (region ((t (:background "gray65")))) + (right-margin ((t (nil)))) + (rpm-spec-dir-face ((t (:foreground "green")))) + (rpm-spec-doc-face ((t (:foreground "magenta")))) + (rpm-spec-ghost-face ((t (:foreground "red")))) + (rpm-spec-macro-face ((t (:foreground "purple")))) + (rpm-spec-package-face ((t (:foreground "red")))) + (rpm-spec-tag-face ((t (:foreground "blue")))) + (secondary-selection ((t (:background "paleturquoise")))) + (text-cursor ((t (:background "Red3" :foreground "DarkSlateGray")))) + (tool-bar ((t (nil)))) + (toolbar ((t (:background "#ffffff" :foreground "#000000")))) + (underline ((t (:underline t)))) + (vertical-divider ((t (:background "#ffffff" :foreground "#000000")))) + (widget-button-face ((t (:bold t)))) + (widget-button-pressed-face ((t (:foreground "red")))) + (widget-documentation-face ((t (:foreground "dark green")))) + (widget-field-face ((t (:background "gray85")))) + (widget-inactive-face ((t (:foreground "dim gray")))) + (yellow ((t (:foreground "yellow")))) + (zmacs-region ((t (:background "darkorange" :foreground "black"))))))) + +(defun color-theme-whateveryouwant () + "Color theme by Fabien Penso, created 2002-05-02." + (interactive) + (color-theme-install + '(color-theme-whateveryouwant + ((background-color . "white") + (background-mode . light) + (border-color . "black") + (cursor-color . "black") + (foreground-color . "black") + (mouse-color . "black")) + ((cperl-here-face . font-lock-string-face) + (cperl-invalid-face . underline) + (cperl-pod-face . font-lock-comment-face) + (cperl-pod-head-face . font-lock-variable-name-face) + (display-time-mail-face . mode-line) + (gnus-article-button-face . bold) + (gnus-article-mouse-face . highlight) + (gnus-carpal-button-face . bold) + (gnus-carpal-header-face . bold-italic) + (gnus-cite-attribution-face . gnus-cite-attribution-face) + (gnus-mouse-face . highlight) + (gnus-selected-tree-face . modeline) + (gnus-signature-face . gnus-signature-face) + (gnus-summary-selected-face . gnus-summary-selected-face) + (gnus-treat-display-xface . head) + (help-highlight-face . underline) + (ispell-highlight-face . flyspell-incorrect-face) + (list-matching-lines-face . bold) + (sgml-set-face . t) + (view-highlight-face . highlight) + (widget-mouse-face . highlight) + (x-face-mouse-face . highlight)) + (default ((t (:stipple nil :background "white" :foreground "black" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height 116 :width normal :family "monotype-courier new")))) + (Info-title-1-face ((t (:bold t :weight bold :height 1.728 :family "helv")))) + (Info-title-2-face ((t (:bold t :weight bold :height 1.44 :family "helv")))) + (Info-title-3-face ((t (:bold t :weight bold :height 1.2 :family "helv")))) + (Info-title-4-face ((t (:bold t :weight bold :family "helv")))) + (antlr-font-lock-keyword-face ((t (:bold t :foreground "black" :weight bold)))) + (antlr-font-lock-literal-face ((t (:bold t :foreground "brown4" :weight bold)))) + (antlr-font-lock-ruledef-face ((t (:bold t :foreground "blue" :weight bold)))) + (antlr-font-lock-ruleref-face ((t (:foreground "blue4")))) + (antlr-font-lock-tokendef-face ((t (:bold t :foreground "blue" :weight bold)))) + (antlr-font-lock-tokenref-face ((t (:foreground "orange4")))) + (bbdb-company ((t (:italic t :slant italic)))) + (bbdb-field-name ((t (:bold t :foreground "gray40" :weight bold)))) + (bbdb-field-value ((t (nil)))) + (bbdb-name ((t (:underline t)))) + (bold ((t (:bold t :foreground "gray40" :weight bold)))) + (bold-italic ((t (:italic t :bold t :slant italic :weight bold)))) + (border ((t (:background "black")))) + (calendar-today-face ((t (:underline t)))) + (change-log-acknowledgement-face ((t (:foreground "Firebrick")))) + (change-log-conditionals-face ((t (:foreground "DarkGoldenrod")))) + (change-log-date-face ((t (:foreground "RosyBrown")))) + (change-log-email-face ((t (:foreground "DarkGoldenrod")))) + (change-log-file-face ((t (:foreground "Blue")))) + (change-log-function-face ((t (:foreground "DarkGoldenrod")))) + (change-log-list-face ((t (:foreground "Purple")))) + (change-log-name-face ((t (:foreground "CadetBlue")))) + (comint-highlight-input ((t (:bold t :weight bold)))) + (comint-highlight-prompt ((t (:foreground "dark blue")))) + (cperl-array-face ((t (:bold t :background "lightyellow2" :foreground "Blue" :weight bold)))) + (cperl-hash-face ((t (:italic t :bold t :background "lightyellow2" :foreground "Red" :slant italic :weight bold)))) + (cperl-nonoverridable-face ((t (:foreground "chartreuse3")))) + (cursor ((t (:background "black")))) + (custom-button-face ((t (:background "lightgrey" :foreground "black" :box (:line-width 2 :style released-button))))) + (custom-button-pressed-face ((t (:background "lightgrey" :foreground "black" :box (:line-width 2 :style pressed-button))))) + (custom-changed-face ((t (:background "blue" :foreground "white")))) + (custom-comment-face ((t (:background "gray85")))) + (custom-comment-tag-face ((t (:foreground "blue4")))) + (custom-documentation-face ((t (nil)))) + (custom-face-tag-face ((t (:bold t :weight bold :height 1.2 :family "helv")))) + (custom-group-tag-face ((t (:bold t :foreground "blue" :weight bold :height 1.2)))) + (custom-group-tag-face-1 ((t (:bold t :foreground "red" :weight bold :height 1.2 :family "helv")))) + (custom-invalid-face ((t (:background "red" :foreground "yellow")))) + (custom-modified-face ((t (:background "blue" :foreground "white")))) + (custom-rogue-face ((t (:background "black" :foreground "pink")))) + (custom-saved-face ((t (:underline t)))) + (custom-set-face ((t (:background "white" :foreground "blue")))) + (custom-state-face ((t (:foreground "dark green")))) + (custom-variable-button-face ((t (:bold t :underline t :weight bold)))) + (custom-variable-tag-face ((t (:bold t :foreground "blue" :weight bold :height 1.2 :family "helv")))) + (cvs-filename-face ((t (:foreground "blue4")))) + (cvs-handled-face ((t (:foreground "pink")))) + (cvs-header-face ((t (:bold t :foreground "blue4" :weight bold)))) + (cvs-marked-face ((t (:bold t :foreground "green3" :weight bold)))) + (cvs-msg-face ((t (:italic t :slant italic)))) + (cvs-need-action-face ((t (:foreground "orange")))) + (cvs-unknown-face ((t (:foreground "red")))) + (diary-face ((t (:foreground "red")))) + (diff-added-face ((t (nil)))) + (diff-changed-face ((t (nil)))) + (diff-context-face ((t (:foreground "grey50")))) + (diff-file-header-face ((t (:bold t :background "grey70" :weight bold)))) + (diff-function-face ((t (:foreground "grey50")))) + (diff-header-face ((t (:background "grey85")))) + (diff-hunk-header-face ((t (:background "grey85")))) + (diff-index-face ((t (:bold t :background "grey70" :weight bold)))) + (diff-nonexistent-face ((t (:bold t :background "grey70" :weight bold)))) + (diff-removed-face ((t (nil)))) + (dired-face-boring ((t (:foreground "RosyBrown")))) + (dired-face-directory ((t (:foreground "Blue")))) + (dired-face-executable ((t (nil)))) + (dired-face-flagged ((t (:bold t :foreground "Red" :weight bold)))) + (dired-face-marked ((t (:bold t :foreground "Red" :weight bold)))) + (dired-face-permissions ((t (nil)))) + (dired-face-setuid ((t (nil)))) + (dired-face-socket ((t (nil)))) + (dired-face-symlink ((t (:foreground "Purple")))) + (ebrowse-default-face ((t (nil)))) + (ebrowse-file-name-face ((t (:italic t :slant italic)))) + (ebrowse-member-attribute-face ((t (:foreground "red")))) + (ebrowse-member-class-face ((t (:foreground "purple")))) + (ebrowse-progress-face ((t (:background "blue")))) + (ebrowse-root-class-face ((t (:bold t :foreground "blue" :weight bold)))) + (ebrowse-tree-mark-face ((t (:foreground "red")))) + (ediff-current-diff-face-A ((t (:background "pale green" :foreground "firebrick")))) + (ediff-current-diff-face-Ancestor ((t (:background "VioletRed" :foreground "Black")))) + (ediff-current-diff-face-B ((t (:background "Yellow" :foreground "DarkOrchid")))) + (ediff-current-diff-face-C ((t (:background "Pink" :foreground "Navy")))) + (ediff-even-diff-face-A ((t (:background "light grey" :foreground "Black")))) + (ediff-even-diff-face-Ancestor ((t (:background "Grey" :foreground "White")))) + (ediff-even-diff-face-B ((t (:background "Grey" :foreground "White")))) + (ediff-even-diff-face-C ((t (:background "light grey" :foreground "Black")))) + (ediff-fine-diff-face-A ((t (:background "sky blue" :foreground "Navy")))) + (ediff-fine-diff-face-Ancestor ((t (:background "Green" :foreground "Black")))) + (ediff-fine-diff-face-B ((t (:background "cyan" :foreground "Black")))) + (ediff-fine-diff-face-C ((t (:background "Turquoise" :foreground "Black")))) + (ediff-odd-diff-face-A ((t (:background "Grey" :foreground "White")))) + (ediff-odd-diff-face-Ancestor ((t (:background "light grey" :foreground "Black")))) + (ediff-odd-diff-face-B ((t (:background "light grey" :foreground "Black")))) + (ediff-odd-diff-face-C ((t (:background "Grey" :foreground "White")))) + (erc-action-face ((t (:bold t :weight bold)))) + (erc-bold-face ((t (:bold t :weight bold)))) + (erc-default-face ((t (nil)))) + (erc-direct-msg-face ((t (:foreground "LightSalmon")))) + (erc-error-face ((t (:bold t :foreground "IndianRed" :weight bold)))) + (erc-input-face ((t (:foreground "Beige")))) + (erc-inverse-face ((t (:background "wheat" :foreground "darkslategrey")))) + (erc-notice-face ((t (:foreground "MediumAquamarine")))) + (erc-pal-face ((t (:foreground "pale green")))) + (erc-prompt-face ((t (:foreground "MediumAquamarine")))) + (erc-underline-face ((t (:underline t)))) + (eshell-ls-archive-face ((t (:bold t :foreground "Orchid" :weight bold)))) + (eshell-ls-backup-face ((t (:foreground "OrangeRed")))) + (eshell-ls-clutter-face ((t (:bold t :foreground "OrangeRed" :weight bold)))) + (eshell-ls-directory-face ((t (:bold t :foreground "Blue" :weight bold)))) + (eshell-ls-executable-face ((t (:bold t :foreground "ForestGreen" :weight bold)))) + (eshell-ls-missing-face ((t (:bold t :foreground "Red" :weight bold)))) + (eshell-ls-picture-face ((t (:foreground "Violet")))) + (eshell-ls-product-face ((t (:foreground "OrangeRed")))) + (eshell-ls-readonly-face ((t (:foreground "Brown")))) + (eshell-ls-special-face ((t (:bold t :foreground "Magenta" :weight bold)))) + (eshell-ls-symlink-face ((t (:bold t :foreground "Dark Cyan" :weight bold)))) + (eshell-ls-unreadable-face ((t (:foreground "Grey30")))) + (eshell-prompt-face ((t (:bold t :foreground "#aa0000" :weight bold :width condensed :family "neep-alt")))) + (eshell-test-failed-face ((t (:bold t :foreground "OrangeRed" :weight bold)))) + (eshell-test-ok-face ((t (:bold t :foreground "Green" :weight bold)))) + (excerpt ((t (:italic t :slant italic)))) + (fixed ((t (:bold t :weight bold)))) + (fixed-pitch ((t (:family "courier")))) + (flyspell-duplicate-face ((t (:bold t :foreground "Gold3" :underline t :weight bold)))) + (flyspell-incorrect-face ((t (:bold t :foreground "OrangeRed" :underline t :weight bold)))) + (font-latex-bold-face ((t (:bold t :foreground "DarkOliveGreen" :weight bold)))) + (font-latex-italic-face ((t (:italic t :foreground "DarkOliveGreen" :slant italic)))) + (font-latex-math-face ((t (:foreground "SaddleBrown")))) + (font-latex-sedate-face ((t (:foreground "DimGray")))) + (font-latex-string-face ((t (:foreground "RosyBrown")))) + (font-latex-warning-face ((t (:bold t :foreground "Red" :weight bold)))) + (font-lock-builtin-face ((t (:foreground "dodgerblue3")))) + (font-lock-comment-face ((t (:foreground "#cc0000" :width semi-condensed :family "helvetica")))) + (font-lock-constant-face ((t (:foreground "CadetBlue")))) + (font-lock-doc-face ((t (:foreground "RosyBrown")))) + (font-lock-doc-string-face ((t (:foreground "RosyBrown")))) + (font-lock-function-name-face ((t (:bold t :foreground "navy" :weight bold :height 100)))) + (font-lock-keyword-face ((t (:bold t :foreground "red4" :weight bold)))) + (font-lock-preprocessor-face ((t (:foreground "CadetBlue")))) + (font-lock-reference-face ((t (:foreground "Orchid")))) + (font-lock-string-face ((t (:foreground "navy")))) + (font-lock-type-face ((t (:bold t :foreground "black" :weight bold)))) + (font-lock-variable-name-face ((t (:foreground "black")))) + (font-lock-warning-face ((t (:foreground "orange2")))) + (fringe ((t (:background "white")))) + (gnus-cite-attribution-face ((t (:italic t :slant italic)))) + (gnus-cite-face-1 ((t (:foreground "MidnightBlue")))) + (gnus-cite-face-10 ((t (:foreground "medium purple")))) + (gnus-cite-face-11 ((t (:foreground "turquoise")))) + (gnus-cite-face-2 ((t (:foreground "firebrick")))) + (gnus-cite-face-3 ((t (:foreground "dark green")))) + (gnus-cite-face-4 ((t (:foreground "OrangeRed")))) + (gnus-cite-face-5 ((t (:foreground "dark khaki")))) + (gnus-cite-face-6 ((t (:foreground "dark violet")))) + (gnus-cite-face-7 ((t (:foreground "SteelBlue4")))) + (gnus-cite-face-8 ((t (:foreground "magenta")))) + (gnus-cite-face-9 ((t (:foreground "violet")))) + (gnus-emphasis-bold ((t (:bold t :weight bold)))) + (gnus-emphasis-bold-italic ((t (:italic t :bold t :slant italic :weight bold)))) + (gnus-emphasis-highlight-words ((t (:background "black" :foreground "yellow")))) + (gnus-emphasis-italic ((t (:italic t :slant italic)))) + (gnus-emphasis-underline ((t (:underline t)))) + (gnus-emphasis-underline-bold ((t (:bold t :underline t :weight bold)))) + (gnus-emphasis-underline-bold-italic ((t (:italic t :bold t :underline t :slant italic :weight bold)))) + (gnus-emphasis-underline-italic ((t (:italic t :underline t :slant italic)))) + (gnus-group-mail-1-empty-face ((t (:foreground "DeepPink3")))) + (gnus-group-mail-1-face ((t (:bold t :foreground "DeepPink3" :weight bold)))) + (gnus-group-mail-2-empty-face ((t (:foreground "HotPink3")))) + (gnus-group-mail-2-face ((t (:bold t :foreground "HotPink3" :weight bold)))) + (gnus-group-mail-3-empty-face ((t (:foreground "magenta4")))) + (gnus-group-mail-3-face ((t (:bold t :foreground "magenta4" :weight bold)))) + (gnus-group-mail-low-empty-face ((t (:foreground "DeepPink4")))) + (gnus-group-mail-low-face ((t (:bold t :foreground "DeepPink4" :weight bold)))) + (gnus-group-news-1-empty-face ((t (:foreground "red" :weight normal :height 120 :family "courier")))) + (gnus-group-news-1-face ((t (:foreground "red" :weight normal :height 120 :family "courier")))) + (gnus-group-news-2-empty-face ((t (:foreground "CadetBlue4")))) + (gnus-group-news-2-face ((t (:bold t :foreground "CadetBlue4" :weight bold)))) + (gnus-group-news-3-empty-face ((t (nil)))) + (gnus-group-news-3-face ((t (:bold t :weight bold)))) + (gnus-group-news-4-empty-face ((t (nil)))) + (gnus-group-news-4-face ((t (:bold t :weight bold)))) + (gnus-group-news-5-empty-face ((t (nil)))) + (gnus-group-news-5-face ((t (:bold t :weight bold)))) + (gnus-group-news-6-empty-face ((t (nil)))) + (gnus-group-news-6-face ((t (:bold t :weight bold)))) + (gnus-group-news-low-empty-face ((t (:foreground "DarkGreen")))) + (gnus-group-news-low-face ((t (:bold t :foreground "DarkGreen" :weight bold)))) + (gnus-header-content-face ((t (:foreground "goldenrod" :slant normal :family "helvetica")))) + (gnus-header-from-face ((t (:bold t :foreground "grey75" :weight bold :height 140 :family "helvetica")))) + (gnus-header-name-face ((t (:foreground "grey75" :height 120 :family "helvetica")))) + (gnus-header-newsgroups-face ((t (:italic t :foreground "MidnightBlue" :slant italic)))) + (gnus-header-subject-face ((t (:bold t :foreground "firebrick" :weight bold :height 160 :family "helvetica")))) + (gnus-picon-face ((t (:background "white" :foreground "black")))) + (gnus-picon-xbm-face ((t (:background "white" :foreground "black")))) + (gnus-signature-face ((t (:italic t :slant italic)))) + (gnus-splash-face ((t (:foreground "Brown")))) + (gnus-summary-cancelled-face ((t (:background "black" :foreground "yellow")))) + (gnus-summary-high-ancient-face ((t (:bold t :foreground "RoyalBlue" :weight bold)))) + (gnus-summary-high-read-face ((t (:bold t :foreground "DarkGreen" :weight bold)))) + (gnus-summary-high-ticked-face ((t (:bold t :foreground "firebrick" :weight bold)))) + (gnus-summary-high-unread-face ((t (:bold t :weight bold)))) + (gnus-summary-low-ancient-face ((t (:italic t :foreground "RoyalBlue" :slant italic)))) + (gnus-summary-low-read-face ((t (:italic t :foreground "DarkGreen" :slant italic)))) + (gnus-summary-low-ticked-face ((t (:italic t :foreground "firebrick" :slant italic)))) + (gnus-summary-low-unread-face ((t (:italic t :slant italic)))) + (gnus-summary-normal-ancient-face ((t (:foreground "grey65" :height 110 :width condensed :family "neep")))) + (gnus-summary-normal-read-face ((t (:foreground "grey75" :height 110 :width condensed :family "neep")))) + (gnus-summary-normal-ticked-face ((t (:bold t :foreground "firebrick" :weight bold :height 110 :width condensed :family "neep")))) + (gnus-summary-normal-unread-face ((t (:foreground "firebrick" :height 110 :width condensed :family "neep")))) + (gnus-summary-selected-face ((t (:background "gold" :foreground "black" :box (:line-width 1 :color "yellow" :style released-button) :height 140 :width condensed :family "neep")))) + (header-line ((t (:background "grey90" :foreground "grey20" :box nil)))) + (hi-black-b ((t (:bold t :weight bold)))) + (hi-black-hb ((t (:bold t :weight bold :height 1.67 :family "helv")))) + (hi-blue ((t (:background "light blue")))) + (hi-blue-b ((t (:bold t :foreground "blue" :weight bold)))) + (hi-green ((t (:background "green")))) + (hi-green-b ((t (:bold t :foreground "green" :weight bold)))) + (hi-pink ((t (:background "pink")))) + (hi-red-b ((t (:bold t :foreground "red" :weight bold)))) + (hi-yellow ((t (:background "yellow")))) + (highlight ((t (:background "black" :foreground "white")))) + (highlight-changes-delete-face ((t (:foreground "red" :underline t)))) + (highlight-changes-face ((t (:foreground "red")))) + (highline-face ((t (:background "gray80")))) + (holiday-face ((t (:background "pink")))) + (idlwave-help-link-face ((t (:foreground "Blue")))) + (idlwave-shell-bp-face ((t (:background "Pink" :foreground "Black")))) + (info-header-node ((t (:italic t :bold t :foreground "brown" :slant italic :weight bold)))) + (info-header-xref ((t (:bold t :foreground "magenta4" :weight bold)))) + (info-menu-5 ((t (:foreground "red1")))) + (info-menu-header ((t (:bold t :weight bold :family "helv")))) + (info-node ((t (:italic t :bold t :foreground "brown" :slant italic :weight bold)))) + (info-xref ((t (:bold t :foreground "magenta4" :weight bold)))) + (isearch ((t (:background "magenta4" :foreground "lightskyblue1")))) + (isearch-lazy-highlight-face ((t (:background "paleturquoise")))) + (italic ((t (:italic t :slant italic)))) + (log-view-file-face ((t (:bold t :background "grey70" :weight bold)))) + (log-view-message-face ((t (:background "grey85")))) + (makefile-space-face ((t (:background "hotpink")))) + (menu ((t (nil)))) + (message-cited-text-face ((t (:foreground "red")))) + (message-header-cc-face ((t (:foreground "grey45" :weight normal :family "helvetica")))) + (message-header-name-face ((t (:foreground "cornflower blue")))) + (message-header-newsgroups-face ((t (:italic t :bold t :foreground "blue4" :slant italic :weight bold)))) + (message-header-other-face ((t (:foreground "steel blue")))) + (message-header-subject-face ((t (:bold t :foreground "navy blue" :weight bold)))) + (message-header-to-face ((t (:bold t :foreground "grey60" :weight bold :height 120 :family "helvetica")))) + (message-header-xheader-face ((t (:foreground "blue")))) + (message-mml-face ((t (:foreground "ForestGreen")))) + (message-separator-face ((t (:foreground "brown")))) + (mode-line ((t (:background "grey90" :foreground "black" :box (:line-width 1 :style none) :width condensed :family "neep")))) + (modeline-buffer-id ((t (:bold t :background "grey75" :foreground "black" :box (:line-width -1 :style released-button) :weight bold)))) + (modeline-mousable ((t (:background "grey75" :foreground "black" :box (:line-width -1 :style released-button))))) + (modeline-mousable-minor-mode ((t (:background "grey75" :foreground "black" :box (:line-width -1 :style released-button))))) + (mouse ((t (:background "black")))) + (mpg123-face-cur ((t (:background "#004080" :foreground "yellow")))) + (mpg123-face-slider ((t (:background "yellow" :foreground "black")))) + (primary-selection ((t (:background "lightgoldenrod2")))) + (reb-match-0 ((t (:background "lightblue")))) + (reb-match-1 ((t (:background "aquamarine")))) + (reb-match-2 ((t (:background "springgreen")))) + (reb-match-3 ((t (:background "yellow")))) + (region ((t (:background "#aa0000" :foreground "white")))) + (scroll-bar ((t (:background "grey75")))) + (secondary-selection ((t (:background "yellow")))) + (sgml-comment-face ((t (:italic t :foreground "SeaGreen" :slant italic)))) + (sgml-doctype-face ((t (:bold t :foreground "FireBrick" :weight bold)))) + (sgml-end-tag-face ((t (:stipple nil :background "white" :foreground "SlateBlue" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height 116 :width normal :family "monotype-courier new")))) + (sgml-entity-face ((t (:stipple nil :background "SlateBlue" :foreground "Red" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height 116 :width normal :family "monotype-courier new")))) + (sgml-ignored-face ((t (nil)))) + (sgml-ms-end-face ((t (nil)))) + (sgml-ms-start-face ((t (nil)))) + (sgml-pi-face ((t (:bold t :foreground "gray40" :weight bold)))) + (sgml-sgml-face ((t (:bold t :foreground "gray40" :weight bold)))) + (sgml-short-ref-face ((t (nil)))) + (sgml-shortref-face ((t (:bold t :foreground "gray40" :weight bold)))) + (sgml-start-tag-face ((t (:stipple nil :background "white" :foreground "SlateBlue" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height 116 :width normal :family "monotype-courier new")))) + (sh-heredoc-face ((t (:foreground "tan")))) + (show-paren-match-face ((t (:background "gray80" :foreground "black")))) + (show-paren-mismatch-face ((t (:background "red" :foreground "yellow")))) + (show-tabs-space-face ((t (:foreground "yellow")))) + (show-tabs-tab-face ((t (:foreground "red")))) + (smerge-base-face ((t (:foreground "red")))) + (smerge-markers-face ((t (:background "grey85")))) + (smerge-mine-face ((t (:foreground "blue")))) + (smerge-other-face ((t (:foreground "darkgreen")))) + (speedbar-button-face ((t (:foreground "green4")))) + (speedbar-directory-face ((t (:foreground "blue4")))) + (speedbar-file-face ((t (:foreground "cyan4")))) + (speedbar-highlight-face ((t (:background "green")))) + (speedbar-selected-face ((t (:foreground "red" :underline t)))) + (speedbar-tag-face ((t (:foreground "brown")))) + (strokes-char-face ((t (:background "lightgray")))) + (term-black ((t (:stipple nil :background "white" :foreground "black" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :width normal :family "adobe-courier")))) + (term-blackbg ((t (:stipple nil :background "black" :foreground "black" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :width normal :family "adobe-courier")))) + (term-blue ((t (:stipple nil :background "white" :foreground "blue" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :width normal :family "adobe-courier")))) + (term-bluebg ((t (:stipple nil :background "blue" :foreground "black" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :width normal :family "adobe-courier")))) + (term-bold ((t (:bold t :stipple nil :background "white" :foreground "black" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight bold :width normal :family "adobe-courier")))) + (term-cyan ((t (:stipple nil :background "white" :foreground "cyan" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :width normal :family "adobe-courier")))) + (term-cyanbg ((t (:stipple nil :background "cyan" :foreground "black" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :width normal :family "adobe-courier")))) + (term-default ((t (:stipple nil :background "white" :foreground "black" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :width normal :family "adobe-courier")))) + (term-default-bg ((t (:stipple nil :foreground "black" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :width normal :family "adobe-courier")))) + (term-default-bg-inv ((t (:stipple nil :foreground "black" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :width normal :family "adobe-courier")))) + (term-default-fg ((t (:stipple nil :background "white" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :width normal :family "adobe-courier")))) + (term-default-fg-inv ((t (:stipple nil :background "white" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :width normal :family "adobe-courier")))) + (term-green ((t (:stipple nil :background "white" :foreground "green" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :width normal :family "adobe-courier")))) + (term-greenbg ((t (:stipple nil :background "green" :foreground "black" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :width normal :family "adobe-courier")))) + (term-invisible ((t (:stipple nil :foreground "black" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :width normal :family "adobe-courier")))) + (term-invisible-inv ((t (:stipple nil :foreground "black" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :width normal :family "adobe-courier")))) + (term-magenta ((t (:stipple nil :background "white" :foreground "magenta" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :width normal :family "adobe-courier")))) + (term-magentabg ((t (:stipple nil :background "magenta" :foreground "black" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :width normal :family "adobe-courier")))) + (term-red ((t (:stipple nil :background "white" :foreground "red" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :width normal :family "adobe-courier")))) + (term-redbg ((t (:stipple nil :background "red" :foreground "black" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :width normal :family "adobe-courier")))) + (term-underline ((t (:stipple nil :background "white" :foreground "black" :inverse-video nil :box nil :strike-through nil :overline nil :underline t :slant normal :weight normal :width normal :family "adobe-courier")))) + (term-white ((t (:stipple nil :background "white" :foreground "white" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :width normal :family "adobe-courier")))) + (term-whitebg ((t (:stipple nil :background "white" :foreground "black" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :width normal :family "adobe-courier")))) + (term-yellow ((t (:stipple nil :background "white" :foreground "yellow" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :width normal :family "adobe-courier")))) + (term-yellowbg ((t (:stipple nil :background "yellow" :foreground "black" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :width normal :family "adobe-courier")))) + (tex-math-face ((t (:foreground "RosyBrown")))) + (texinfo-heading-face ((t (:foreground "Blue")))) + (tool-bar ((t (:background "grey75" :foreground "black" :box (:line-width 1 :style released-button))))) + (tooltip ((t (:background "lightyellow" :foreground "black")))) + (trailing-whitespace ((t (:background "red")))) + (underline ((t (:foreground "navy" :underline t)))) + (variable-pitch ((t (:family "helv")))) + (vcursor ((t (:background "cyan" :foreground "blue" :underline t)))) + (vhdl-font-lock-attribute-face ((t (:foreground "Orchid")))) + (vhdl-font-lock-directive-face ((t (:foreground "CadetBlue")))) + (vhdl-font-lock-enumvalue-face ((t (:foreground "Gold4")))) + (vhdl-font-lock-function-face ((t (:foreground "Orchid4")))) + (vhdl-font-lock-prompt-face ((t (:bold t :foreground "Red" :weight bold)))) + (vhdl-font-lock-reserved-words-face ((t (:bold t :foreground "Orange" :weight bold)))) + (vhdl-font-lock-translate-off-face ((t (:background "LightGray")))) + (vhdl-speedbar-architecture-face ((t (:foreground "Blue")))) + (vhdl-speedbar-architecture-selected-face ((t (:foreground "Blue" :underline t)))) + (vhdl-speedbar-configuration-face ((t (:foreground "DarkGoldenrod")))) + (vhdl-speedbar-configuration-selected-face ((t (:foreground "DarkGoldenrod" :underline t)))) + (vhdl-speedbar-entity-face ((t (:foreground "ForestGreen")))) + (vhdl-speedbar-entity-selected-face ((t (:foreground "ForestGreen" :underline t)))) + (vhdl-speedbar-instantiation-face ((t (:foreground "Brown")))) + (vhdl-speedbar-instantiation-selected-face ((t (:foreground "Brown" :underline t)))) + (vhdl-speedbar-package-face ((t (:foreground "Grey50")))) + (vhdl-speedbar-package-selected-face ((t (:foreground "Grey50" :underline t)))) + (viper-minibuffer-emacs-face ((t (:background "darkseagreen2" :foreground "Black")))) + (viper-minibuffer-insert-face ((t (:background "pink" :foreground "Black")))) + (viper-minibuffer-vi-face ((t (:background "grey" :foreground "DarkGreen")))) + (viper-replace-overlay-face ((t (:background "darkseagreen2" :foreground "Black")))) + (viper-search-face ((t (:background "khaki" :foreground "Black")))) + (widget-button-face ((t (:bold t :weight bold)))) + (widget-button-pressed-face ((t (:foreground "red")))) + (widget-documentation-face ((t (:foreground "dark green")))) + (widget-field-face ((t (:background "gray85")))) + (widget-inactive-face ((t (:foreground "dim gray")))) + (widget-single-line-field-face ((t (:background "gray85")))) + (woman-addition-face ((t (:foreground "orange")))) + (woman-bold-face ((t (:bold t :foreground "blue" :weight bold)))) + (woman-italic-face ((t (:italic t :foreground "red" :underline t :slant italic)))) + (woman-unknown-face ((t (:foreground "brown")))) + (zmacs-region ((t (:background "lightgoldenrod2"))))))) + +(defun color-theme-bharadwaj-slate () + "Color theme by Girish Bharadwaj, created 2002-05-06." + (interactive) + (color-theme-install + '(color-theme-bharadwaj-slate + ((background-color . "DarkSlateGray") + (background-mode . dark) + (border-color . "black") + (cursor-color . "khaki") + (foreground-color . "palegreen") + (mouse-color . "black")) + ((display-time-mail-face . mode-line) + (gnus-article-button-face . bold) + (gnus-article-mouse-face . highlight) + (gnus-mouse-face . highlight) + (help-highlight-face . underline) + (ibuffer-deletion-face . font-lock-type-face) + (ibuffer-filter-group-name-face . bold) + (ibuffer-marked-face . font-lock-warning-face) + (ibuffer-title-face . font-lock-type-face) + (list-matching-lines-buffer-name-face . underline) + (list-matching-lines-face . bold) + (semantic-which-function-use-color . t) + (senator-eldoc-use-color . t) + (view-highlight-face . highlight) + (widget-mouse-face . highlight)) + (default ((t (:stipple nil :background "DarkSlateGray" :foreground "palegreen" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :width normal :family "outline-lucida sans typewriter")))) + (bg:erc-color-face0 ((t (:background "White")))) + (bg:erc-color-face1 ((t (:background "black")))) + (bg:erc-color-face10 ((t (:background "lightblue1")))) + (bg:erc-color-face11 ((t (:background "cyan")))) + (bg:erc-color-face12 ((t (:background "blue")))) + (bg:erc-color-face13 ((t (:background "deeppink")))) + (bg:erc-color-face14 ((t (:background "gray50")))) + (bg:erc-color-face15 ((t (:background "gray90")))) + (bg:erc-color-face2 ((t (:background "blue4")))) + (bg:erc-color-face3 ((t (:background "green4")))) + (bg:erc-color-face4 ((t (:background "red")))) + (bg:erc-color-face5 ((t (:background "brown")))) + (bg:erc-color-face6 ((t (:background "purple")))) + (bg:erc-color-face7 ((t (:background "orange")))) + (bg:erc-color-face8 ((t (:background "yellow")))) + (bg:erc-color-face9 ((t (:background "green")))) + (bold ((t (:bold t :weight bold)))) + (bold-italic ((t (:italic t :bold t :slant italic :weight bold)))) + (border ((t (:background "black")))) + (button ((t (:underline t)))) + (comint-highlight-input ((t (:bold t :weight bold)))) + (comint-highlight-prompt ((t (:foreground "cyan")))) + (cursor ((t (:background "khaki")))) + (custom-button-face ((t (:background "lightgrey" :foreground "black" :box (:line-width 2 :style released-button))))) + (custom-button-pressed-face ((t (:background "lightgrey" :foreground "black" :box (:line-width 2 :style pressed-button))))) + (custom-changed-face ((t (:background "blue" :foreground "white")))) + (custom-comment-face ((t (:background "dim gray")))) + (custom-comment-tag-face ((t (:foreground "gray80")))) + (custom-documentation-face ((t (nil)))) + (custom-face-tag-face ((t (:bold t :family "helv" :weight bold :height 1.2)))) + (custom-group-tag-face ((t (:bold t :foreground "light blue" :weight bold :height 1.2)))) + (custom-group-tag-face-1 ((t (:bold t :family "helv" :foreground "pink" :weight bold :height 1.2)))) + (custom-invalid-face ((t (:background "red" :foreground "yellow")))) + (custom-modified-face ((t (:background "blue" :foreground "white")))) + (custom-rogue-face ((t (:background "black" :foreground "pink")))) + (custom-saved-face ((t (:underline t)))) + (custom-set-face ((t (:background "white" :foreground "blue")))) + (custom-state-face ((t (:foreground "lime green")))) + (custom-variable-button-face ((t (:bold t :underline t :weight bold)))) + (custom-variable-tag-face ((t (:bold t :family "helv" :foreground "light blue" :weight bold :height 1.2)))) + (erc-action-face ((t (:bold t :box (:line-width 2 :color "grey75") :weight bold)))) + (erc-bold-face ((t (:bold t :weight bold)))) + (erc-default-face ((t (nil)))) + (erc-direct-msg-face ((t (:foreground "IndianRed")))) + (erc-error-face ((t (:background "Red" :foreground "White")))) + (erc-input-face ((t (:foreground "lightblue")))) + (erc-inverse-face ((t (:background "Black" :foreground "White")))) + (erc-notice-face ((t (:bold t :foreground "dodgerblue" :weight bold)))) + (erc-prompt-face ((t (:bold t :background "black" :foreground "white" :weight bold)))) + (erc-timestamp-face ((t (:bold t :foreground "green" :weight bold)))) + (erc-underline-face ((t (:underline t)))) + (eshell-ls-archive-face ((t (:bold t :foreground "Orchid" :weight bold)))) + (eshell-ls-backup-face ((t (:foreground "LightSalmon")))) + (eshell-ls-clutter-face ((t (:bold t :foreground "OrangeRed" :weight bold)))) + (eshell-ls-directory-face ((t (:bold t :foreground "SkyBlue" :weight bold)))) + (eshell-ls-executable-face ((t (:bold t :foreground "Green" :weight bold)))) + (eshell-ls-missing-face ((t (:bold t :foreground "Red" :weight bold)))) + (eshell-ls-product-face ((t (:foreground "LightSalmon")))) + (eshell-ls-readonly-face ((t (:foreground "Pink")))) + (eshell-ls-special-face ((t (:bold t :foreground "Magenta" :weight bold)))) + (eshell-ls-symlink-face ((t (:bold t :foreground "Cyan" :weight bold)))) + (eshell-ls-unreadable-face ((t (:foreground "DarkGrey")))) + (eshell-prompt-face ((t (:bold t :foreground "Pink" :weight bold)))) + (fg:erc-color-face0 ((t (:foreground "White")))) + (fg:erc-color-face1 ((t (:foreground "black")))) + (fg:erc-color-face10 ((t (:foreground "lightblue1")))) + (fg:erc-color-face11 ((t (:foreground "cyan")))) + (fg:erc-color-face12 ((t (:foreground "blue")))) + (fg:erc-color-face13 ((t (:foreground "deeppink")))) + (fg:erc-color-face14 ((t (:foreground "gray50")))) + (fg:erc-color-face15 ((t (:foreground "gray90")))) + (fg:erc-color-face2 ((t (:foreground "blue4")))) + (fg:erc-color-face3 ((t (:foreground "green4")))) + (fg:erc-color-face4 ((t (:foreground "red")))) + (fg:erc-color-face5 ((t (:foreground "brown")))) + (fg:erc-color-face6 ((t (:foreground "purple")))) + (fg:erc-color-face7 ((t (:foreground "orange")))) + (fg:erc-color-face8 ((t (:foreground "yellow")))) + (fg:erc-color-face9 ((t (:foreground "green")))) + (fixed-pitch ((t (:family "courier")))) + (font-lock-builtin-face ((t (:bold t :foreground "pink" :weight bold :height 1.1)))) + (font-lock-comment-face ((t (:foreground "violet" :height 1.0)))) + (font-lock-constant-face ((t (:bold t :foreground "tomato" :weight bold :height 1.0)))) + (font-lock-function-name-face ((t (:bold t :foreground "DodgerBlue" :weight bold)))) + (font-lock-keyword-face ((t (:bold t :foreground "turquoise" :weight bold)))) + (font-lock-preprocessor-face ((t (:bold t :foreground "tomato" :weight bold :height 1.0)))) + (font-lock-reference-face ((t (:bold t :foreground "pink" :weight bold :height 1.1)))) + (font-lock-string-face ((t (:foreground "red" :height 1.0)))) + (font-lock-type-face ((t (:foreground "lightblue3")))) + (font-lock-variable-name-face ((t (:bold t :foreground "gray" :weight bold :height 1.0)))) + (font-lock-warning-face ((t (:bold t :foreground "Pink" :weight bold)))) + (fringe ((t (:background "DarkSlateGray")))) + (gnus-cite-attribution-face ((t (:italic t :slant italic)))) + (gnus-cite-face-1 ((t (:foreground "light blue")))) + (gnus-cite-face-10 ((t (:foreground "medium purple")))) + (gnus-cite-face-11 ((t (:foreground "turquoise")))) + (gnus-cite-face-2 ((t (:foreground "light cyan")))) + (gnus-cite-face-3 ((t (:foreground "light yellow")))) + (gnus-cite-face-4 ((t (:foreground "light pink")))) + (gnus-cite-face-5 ((t (:foreground "pale green")))) + (gnus-cite-face-6 ((t (:foreground "beige")))) + (gnus-cite-face-7 ((t (:foreground "orange")))) + (gnus-cite-face-8 ((t (:foreground "magenta")))) + (gnus-cite-face-9 ((t (:foreground "violet")))) + (gnus-emphasis-bold ((t (:bold t :weight bold)))) + (gnus-emphasis-bold-italic ((t (:italic t :bold t :slant italic :weight bold)))) + (gnus-emphasis-highlight-words ((t (:background "black" :foreground "yellow")))) + (gnus-emphasis-italic ((t (:italic t :slant italic)))) + (gnus-emphasis-underline ((t (:underline t)))) + (gnus-emphasis-underline-bold ((t (:bold t :underline t :weight bold)))) + (gnus-emphasis-underline-bold-italic ((t (:italic t :bold t :underline t :slant italic :weight bold)))) + (gnus-emphasis-underline-italic ((t (:italic t :underline t :slant italic)))) + (gnus-group-mail-1-empty-face ((t (:foreground "aquamarine1")))) + (gnus-group-mail-1-face ((t (:bold t :foreground "aquamarine1" :weight bold)))) + (gnus-group-mail-2-empty-face ((t (:foreground "aquamarine2")))) + (gnus-group-mail-2-face ((t (:bold t :foreground "aquamarine2" :weight bold)))) + (gnus-group-mail-3-empty-face ((t (:foreground "aquamarine3")))) + (gnus-group-mail-3-face ((t (:bold t :foreground "aquamarine3" :weight bold)))) + (gnus-group-mail-low-empty-face ((t (:foreground "aquamarine4")))) + (gnus-group-mail-low-face ((t (:bold t :foreground "aquamarine4" :weight bold)))) + (gnus-group-news-1-empty-face ((t (:foreground "PaleTurquoise")))) + (gnus-group-news-1-face ((t (:bold t :foreground "PaleTurquoise" :weight bold)))) + (gnus-group-news-2-empty-face ((t (:foreground "turquoise")))) + (gnus-group-news-2-face ((t (:bold t :foreground "turquoise" :weight bold)))) + (gnus-group-news-3-empty-face ((t (nil)))) + (gnus-group-news-3-face ((t (:bold t :weight bold)))) + (gnus-group-news-4-empty-face ((t (nil)))) + (gnus-group-news-4-face ((t (:bold t :weight bold)))) + (gnus-group-news-5-empty-face ((t (nil)))) + (gnus-group-news-5-face ((t (:bold t :weight bold)))) + (gnus-group-news-6-empty-face ((t (nil)))) + (gnus-group-news-6-face ((t (:bold t :weight bold)))) + (gnus-group-news-low-empty-face ((t (:foreground "DarkTurquoise")))) + (gnus-group-news-low-face ((t (:bold t :foreground "DarkTurquoise" :weight bold)))) + (gnus-header-content-face ((t (:italic t :foreground "forest green" :slant italic)))) + (gnus-header-from-face ((t (:foreground "spring green")))) + (gnus-header-name-face ((t (:foreground "SeaGreen")))) + (gnus-header-newsgroups-face ((t (:italic t :foreground "yellow" :slant italic)))) + (gnus-header-subject-face ((t (:foreground "SeaGreen3")))) + (gnus-signature-face ((t (:italic t :slant italic)))) + (gnus-splash-face ((t (:foreground "Brown")))) + (gnus-summary-cancelled-face ((t (:background "black" :foreground "yellow")))) + (gnus-summary-high-ancient-face ((t (:bold t :foreground "SkyBlue" :weight bold)))) + (gnus-summary-high-read-face ((t (:bold t :foreground "PaleGreen" :weight bold)))) + (gnus-summary-high-ticked-face ((t (:bold t :foreground "pink" :weight bold)))) + (gnus-summary-high-unread-face ((t (:bold t :weight bold)))) + (gnus-summary-low-ancient-face ((t (:italic t :foreground "SkyBlue" :slant italic)))) + (gnus-summary-low-read-face ((t (:italic t :foreground "PaleGreen" :slant italic)))) + (gnus-summary-low-ticked-face ((t (:italic t :foreground "pink" :slant italic)))) + (gnus-summary-low-unread-face ((t (:italic t :slant italic)))) + (gnus-summary-normal-ancient-face ((t (:foreground "SkyBlue")))) + (gnus-summary-normal-read-face ((t (:foreground "PaleGreen")))) + (gnus-summary-normal-ticked-face ((t (:foreground "pink")))) + (gnus-summary-normal-unread-face ((t (nil)))) + (gnus-summary-selected-face ((t (:underline t)))) + (header-line ((t (:underline "blueviolet" :overline "blueviolet" :box (:line-width -1 :style released-button) :background "grey20" :foreground "grey90" :box nil)))) + (highlight ((t (:background "darkolivegreen")))) + (html-helper-bold-face ((t (:bold t :foreground "wheat" :weight bold)))) + (html-helper-italic-face ((t (:italic t :foreground "spring green" :slant italic)))) + (html-helper-underline-face ((t (:foreground "cornsilk" :underline t)))) + (html-tag-face ((t (:bold t :foreground "deep sky blue" :weight bold)))) + (info-menu-6 ((t (nil)))) + (isearch ((t (:background "palevioletred2" :foreground "brown4")))) + (isearch-lazy-highlight-face ((t (:background "paleturquoise4")))) + (italic ((t (:italic t :slant italic)))) + (jde-bug-breakpoint-cursor ((t (:background "brown" :foreground "cyan")))) + (jde-db-active-breakpoint-face ((t (:background "red" :foreground "black")))) + (jde-db-requested-breakpoint-face ((t (:background "yellow" :foreground "black")))) + (jde-db-spec-breakpoint-face ((t (:background "green" :foreground "black")))) + (jde-java-font-lock-api-face ((t (:foreground "light goldenrod")))) + (jde-java-font-lock-bold-face ((t (:bold t :weight bold)))) + (jde-java-font-lock-code-face ((t (nil)))) + (jde-java-font-lock-constant-face ((t (:foreground "Aquamarine")))) + (jde-java-font-lock-doc-tag-face ((t (:foreground "light coral")))) + (jde-java-font-lock-italic-face ((t (:italic t :slant italic)))) + (jde-java-font-lock-link-face ((t (:foreground "blue" :underline t :slant normal)))) + (jde-java-font-lock-modifier-face ((t (:foreground "LightSteelBlue")))) + (jde-java-font-lock-number-face ((t (:foreground "LightSalmon")))) + (jde-java-font-lock-operator-face ((t (:foreground "medium blue")))) + (jde-java-font-lock-package-face ((t (:foreground "steelblue1")))) + (jde-java-font-lock-pre-face ((t (nil)))) + (jde-java-font-lock-underline-face ((t (:underline t)))) + (menu ((t (nil)))) + (message-cited-text-face ((t (:foreground "red")))) + (message-header-cc-face ((t (:bold t :foreground "green4" :weight bold)))) + (message-header-name-face ((t (:foreground "DarkGreen")))) + (message-header-newsgroups-face ((t (:italic t :bold t :foreground "yellow" :slant italic :weight bold)))) + (message-header-other-face ((t (:foreground "#b00000")))) + (message-header-subject-face ((t (:foreground "green3")))) + (message-header-to-face ((t (:bold t :foreground "green2" :weight bold)))) + (message-header-xheader-face ((t (:foreground "blue")))) + (message-mml-face ((t (:foreground "ForestGreen")))) + (message-separator-face ((t (:foreground "blue3")))) + (minibuffer-prompt ((t (:foreground "cyan")))) + (mode-line ((t (:background "Darkslategray" :foreground "white" :box (:line-width -1 :style released-button) :overline "blueviolet" :underline "blueviolet")))) + (mode-line-inactive ((t (:italic t :underline "blueviolet" :overline "blueviolet" :background "white" :foreground "cadetblue" :box (:line-width -1 :color "grey75") :slant oblique :weight light)))) + (modeline ((t (:background "Darkslategray" :foreground "white" :box (:line-width -1 :style released-button) :overline "blueviolet" :underline "blueviolet")))) + (modeline-buffer-id ((t (:background "Darkslategray" :foreground "white" :box (:line-width -1 :style released-button) :overline "blueviolet" :underline "blueviolet")))) + (modeline-mousable ((t (:background "Darkslategray" :foreground "white" :box (:line-width -1 :style released-button) :overline "blueviolet" :underline "blueviolet")))) + (modeline-mousable-minor-mode ((t (:background "Darkslategray" :foreground "white" :box (:line-width -1 :style released-button) :overline "blueviolet" :underline "blueviolet")))) + (mouse ((t (:background "black")))) + (primary-selection ((t (:background "dimgray")))) + (region ((t (:background "dimgray")))) + (scroll-bar ((t (nil)))) + (secondary-selection ((t (:background "SkyBlue4")))) + (semantic-dirty-token-face ((t (:background "lightyellow")))) + (semantic-unmatched-syntax-face ((t (:underline "red")))) + (senator-intangible-face ((t (:foreground "gray75")))) + (senator-momentary-highlight-face ((t (:background "gray30")))) + (senator-read-only-face ((t (:background "#664444")))) + (show-paren-match-face ((t (:bold t :foreground "lightblue" :weight bold :height 1.1)))) + (show-paren-mismatch-face ((t (:bold t :foreground "red" :weight bold :height 1.1)))) + (show-tabs-space-face ((t (:foreground "yellow")))) + (show-tabs-tab-face ((t (:foreground "red")))) + (speedbar-button-face ((t (:foreground "green3")))) + (speedbar-directory-face ((t (:foreground "light blue")))) + (speedbar-file-face ((t (:foreground "cyan")))) + (speedbar-highlight-face ((t (:background "sea green")))) + (speedbar-selected-face ((t (:foreground "red" :underline t)))) + (speedbar-tag-face ((t (:foreground "yellow")))) + (template-message-face ((t (:bold t :weight bold)))) + (term-black ((t (:foreground "black")))) + (term-blackbg ((t (:background "black")))) + (term-blue ((t (:foreground "blue")))) + (term-bluebg ((t (:background "blue")))) + (term-bold ((t (:bold t :weight bold)))) + (term-cyan ((t (:foreground "cyan")))) + (term-cyanbg ((t (:background "cyan")))) + (term-default ((t (:stipple nil :background "DarkSlateGray" :foreground "palegreen" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :width normal :family "outline-lucida sans typewriter")))) + (term-default-bg ((t (nil)))) + (term-default-bg-inv ((t (nil)))) + (term-default-fg ((t (nil)))) + (term-default-fg-inv ((t (nil)))) + (term-green ((t (:foreground "green")))) + (term-greenbg ((t (:background "green")))) + (term-invisible ((t (nil)))) + (term-invisible-inv ((t (nil)))) + (term-magenta ((t (:foreground "magenta")))) + (term-magentabg ((t (:background "magenta")))) + (term-red ((t (:foreground "red")))) + (term-redbg ((t (:background "red")))) + (term-underline ((t (:underline t)))) + (term-white ((t (:foreground "white")))) + (term-whitebg ((t (:background "white")))) + (term-yellow ((t (:foreground "yellow")))) + (term-yellowbg ((t (:background "yellow")))) + (tool-bar ((t (:background "DarkSlateGray" :foreground "White" :box (:line-width 1 :color "blue"))))) + (tooltip ((t (:background "lightyellow" :foreground "black")))) + (trailing-whitespace ((t (:background "red")))) + (underline ((t (:underline t)))) + (variable-pitch ((t (:family "helv")))) + (widget-button-face ((t (:bold t :weight bold)))) + (widget-button-pressed-face ((t (:foreground "red")))) + (widget-documentation-face ((t (:foreground "lime green")))) + (widget-field-face ((t (:background "dim gray")))) + (widget-inactive-face ((t (:foreground "light gray")))) + (widget-single-line-field-face ((t (:background "dim gray")))) + (zmacs-region ((t (:background "dimgray"))))))) + +(defun color-theme-lethe () + "Color theme by Ivica Loncar, created 2002-08-02. +Some additional X resources as suggested by the author: + +Emacs*menubar.Foreground: Yellow +Emacs*menubar.Background: #1a2b3c +Emacs*menubar.topShadowColor: gray +Emacs*menubar.bottomShadowColor: dimgray + +Some fonts I really like (note: this fonts are not highly +available): + +Emacs.default.attributeFont: -letl-*-medium-r-*-*-*-*-*-*-*-*-iso8859-2 +Emacs*menubar*Font: -etl-fixed-medium-r-normal--14-*-*-*-*-*-iso8859-1 + +Mouse fix: + +Emacs*dialog*XmPushButton.translations:#override\n\ + : Arm()\n\ + ,: Activate()\ + Disarm()\n\ + (2+): MultiArm()\n\ + (2+): MultiActivate()\n\ + : Activate()\ + Disarm()\n\ + osfSelect: ArmAndActivate()\n\ + osfActivate: ArmAndActivate()\n\ + osfHelp: Help()\n\ + ~Shift ~Meta ~Alt Return: ArmAndActivate()\n\ + : Enter()\n\ + : Leave()\n + +Bonus: do not use 3D modeline." + (interactive) + (color-theme-install + '(color-theme-lethe + ((background-color . "black") + (background-mode . dark) + (background-toolbar-color . "#000000000000") + (border-color . "#000000000000") + (bottom-toolbar-shadow-color . "red") + (cursor-color . "red") + (foreground-color . "peachpuff") + (mouse-color . "red") + (top-toolbar-shadow-color . "#f5f5f5f5f5f5")) + ((buffers-tab-face . buffers-tab) + (cscope-use-face . t) + (gnus-mouse-face . highlight)) + (default ((t (nil)))) + (bg:erc-color-face0 ((t (:background "White")))) + (bg:erc-color-face1 ((t (nil)))) + (bg:erc-color-face10 ((t (:background "lightblue1")))) + (bg:erc-color-face11 ((t (:background "cyan")))) + (bg:erc-color-face12 ((t (:background "blue")))) + (bg:erc-color-face13 ((t (:background "deeppink")))) + (bg:erc-color-face14 ((t (:background "gray50")))) + (bg:erc-color-face15 ((t (:background "gray90")))) + (bg:erc-color-face2 ((t (:background "blue4")))) + (bg:erc-color-face3 ((t (:background "green4")))) + (bg:erc-color-face4 ((t (:background "red")))) + (bg:erc-color-face5 ((t (:background "brown")))) + (bg:erc-color-face6 ((t (:background "purple")))) + (bg:erc-color-face7 ((t (:background "orange")))) + (bg:erc-color-face8 ((t (:background "yellow")))) + (bg:erc-color-face9 ((t (:background "green")))) + (blue ((t (:foreground "blue")))) + (bold ((t (:bold t)))) + (bold-italic ((t (:italic t :bold t)))) + (border ((t (nil)))) + (border-glyph ((t (nil)))) + (buffers-tab ((t (:bold t :foreground "red")))) + (button ((t (:underline t)))) + (calendar-today-face ((t (:underline t)))) + (comint-highlight-input ((t (:bold t)))) + (comint-highlight-prompt ((t (:foreground "cyan")))) + (cperl-array-face ((t (:bold t :background "lightyellow2" :foreground "Blue")))) + (cperl-hash-face ((t (:italic t :bold t :background "lightyellow2" :foreground "Red")))) + (cperl-nonoverridable-face ((t (:foreground "chartreuse3")))) + (cscope-file-face ((t (:foreground "blue")))) + (cscope-function-face ((t (:foreground "magenta")))) + (cscope-line-face ((t (:foreground "green")))) + (cscope-line-number-face ((t (:foreground "red")))) + (cscope-mouse-face ((t (:background "blue" :foreground "white")))) + (cursor ((t (nil)))) + (custom-button-face ((t (nil)))) + (custom-button-pressed-face ((t (:background "lightgrey" :foreground "black")))) + (custom-changed-face ((t (:background "blue" :foreground "white")))) + (custom-comment-face ((t (:background "dim gray")))) + (custom-comment-tag-face ((t (:foreground "gray80")))) + (custom-documentation-face ((t (nil)))) + (custom-face-tag-face ((t (:underline t)))) + (custom-group-tag-face ((t (:underline t :foreground "blue")))) + (custom-group-tag-face-1 ((t (:underline t :foreground "red")))) + (custom-invalid-face ((t (:background "red" :foreground "yellow")))) + (custom-modified-face ((t (:background "blue" :foreground "white")))) + (custom-rogue-face ((t (:foreground "pink")))) + (custom-saved-face ((t (:underline t)))) + (custom-set-face ((t (:background "white" :foreground "blue")))) + (custom-state-face ((t (:foreground "dark green")))) + (custom-variable-button-face ((t (:underline t :bold t)))) + (custom-variable-tag-face ((t (:underline t :foreground "blue")))) + (cyan ((t (:foreground "cyan")))) + (diary-face ((t (:foreground "red")))) + (dired-face-boring ((t (:foreground "Gray65")))) + (dired-face-directory ((t (:bold t)))) + (dired-face-executable ((t (:foreground "SeaGreen")))) + (dired-face-flagged ((t (:background "LightSlateGray")))) + (dired-face-marked ((t (:background "PaleVioletRed")))) + (dired-face-permissions ((t (:background "grey75" :foreground "black")))) + (dired-face-setuid ((t (:foreground "Red")))) + (dired-face-socket ((t (:foreground "magenta")))) + (dired-face-symlink ((t (:foreground "cyan")))) + (display-time-mail-balloon-enhance-face ((t (:background "orange")))) + (display-time-mail-balloon-gnus-group-face ((t (:foreground "blue")))) + (display-time-time-balloon-face ((t (:foreground "red")))) + (ediff-current-diff-face-A ((t (:background "pale green" :foreground "firebrick")))) + (ediff-current-diff-face-Ancestor ((t (:background "VioletRed" :foreground "Black")))) + (ediff-current-diff-face-B ((t (:background "Yellow" :foreground "DarkOrchid")))) + (ediff-current-diff-face-C ((t (:background "Pink" :foreground "Navy")))) + (ediff-even-diff-face-A ((t (:background "light grey" :foreground "Black")))) + (ediff-even-diff-face-Ancestor ((t (:background "Grey" :foreground "White")))) + (ediff-even-diff-face-B ((t (:background "Grey" :foreground "White")))) + (ediff-even-diff-face-C ((t (:background "light grey" :foreground "Black")))) + (ediff-fine-diff-face-A ((t (:background "sky blue" :foreground "Navy")))) + (ediff-fine-diff-face-Ancestor ((t (:background "Green" :foreground "Black")))) + (ediff-fine-diff-face-B ((t (:background "cyan" :foreground "Black")))) + (ediff-fine-diff-face-C ((t (:background "Turquoise" :foreground "Black")))) + (ediff-odd-diff-face-A ((t (:background "Grey" :foreground "White")))) + (ediff-odd-diff-face-Ancestor ((t (:background "light grey" :foreground "Black")))) + (ediff-odd-diff-face-B ((t (:background "light grey" :foreground "Black")))) + (ediff-odd-diff-face-C ((t (:background "Grey" :foreground "White")))) + (erc-action-face ((t (:bold t)))) + (erc-bold-face ((t (:bold t)))) + (erc-default-face ((t (nil)))) + (erc-direct-msg-face ((t (:foreground "IndianRed")))) + (erc-error-face ((t (:background "Red" :foreground "White")))) + (erc-input-face ((t (:foreground "brown")))) + (erc-inverse-face ((t (:background "Black" :foreground "White")))) + (erc-notice-face ((t (:bold t :foreground "SlateBlue")))) + (erc-prompt-face ((t (:bold t :background "lightBlue2" :foreground "Black")))) + (erc-timestamp-face ((t (:bold t :foreground "green")))) + (erc-underline-face ((t (:underline t)))) + (eshell-ls-archive-face ((t (:bold t :foreground "Orchid")))) + (eshell-ls-backup-face ((t (:foreground "OrangeRed")))) + (eshell-ls-clutter-face ((t (:bold t :foreground "OrangeRed")))) + (eshell-ls-directory-face ((t (:bold t :foreground "Blue")))) + (eshell-ls-executable-face ((t (:bold t :foreground "ForestGreen")))) + (eshell-ls-missing-face ((t (:bold t :foreground "Red")))) + (eshell-ls-product-face ((t (:foreground "OrangeRed")))) + (eshell-ls-readonly-face ((t (:foreground "Brown")))) + (eshell-ls-special-face ((t (:bold t :foreground "Magenta")))) + (eshell-ls-symlink-face ((t (:bold t :foreground "DarkCyan")))) + (eshell-ls-unreadable-face ((t (:foreground "Grey30")))) + (eshell-prompt-face ((t (:bold t :foreground "Red")))) + (eshell-test-failed-face ((t (:bold t :foreground "OrangeRed")))) + (eshell-test-ok-face ((t (:bold t :foreground "Green")))) + (excerpt ((t (:italic t)))) + (fg:erc-color-face0 ((t (:foreground "White")))) + (fg:erc-color-face1 ((t (:foreground "black")))) + (fg:erc-color-face10 ((t (:foreground "lightblue1")))) + (fg:erc-color-face11 ((t (:foreground "cyan")))) + (fg:erc-color-face12 ((t (:foreground "blue")))) + (fg:erc-color-face13 ((t (:foreground "deeppink")))) + (fg:erc-color-face14 ((t (:foreground "gray50")))) + (fg:erc-color-face15 ((t (:foreground "gray90")))) + (fg:erc-color-face2 ((t (:foreground "blue4")))) + (fg:erc-color-face3 ((t (:foreground "green4")))) + (fg:erc-color-face4 ((t (:foreground "red")))) + (fg:erc-color-face5 ((t (:foreground "brown")))) + (fg:erc-color-face6 ((t (:foreground "purple")))) + (fg:erc-color-face7 ((t (:foreground "orange")))) + (fg:erc-color-face8 ((t (:foreground "yellow")))) + (fg:erc-color-face9 ((t (:foreground "green")))) + (fixed ((t (:bold t)))) + (fixed-pitch ((t (:size "16")))) + (flyspell-duplicate-face ((t (:underline t :bold t :foreground "Gold3")))) + (flyspell-incorrect-face ((t (:underline t :bold t :foreground "OrangeRed")))) + (font-lock-builtin-face ((t (:foreground "Orchid")))) + (font-lock-comment-face ((t (:bold t :foreground "cyan")))) + (font-lock-constant-face ((t (:foreground "CadetBlue")))) + (font-lock-doc-face ((t (:bold t :foreground "red")))) + (font-lock-doc-string-face ((t (:bold t :foreground "red")))) + (font-lock-function-name-face ((t (:bold t :foreground "white")))) + (font-lock-keyword-face ((t (:bold t :foreground "yellow")))) + (font-lock-preprocessor-face ((t (:bold t :foreground "blue")))) + (font-lock-reference-face ((t (:foreground "red3")))) + (font-lock-string-face ((t (:bold t :foreground "magenta")))) + (font-lock-type-face ((t (:bold t :foreground "lightgreen")))) + (font-lock-variable-name-face ((t (:bold t :foreground "white")))) + (font-lock-warning-face ((t (:bold t :foreground "Red")))) + (fringe ((t (:background "grey95")))) + (gdb-arrow-face ((t (:bold t :background "yellow" :foreground "red")))) + (gnus-cite-attribution-face ((t (:italic t)))) + (gnus-cite-face-1 ((t (:foreground "MidnightBlue")))) + (gnus-cite-face-10 ((t (:foreground "medium purple")))) + (gnus-cite-face-11 ((t (:foreground "turquoise")))) + (gnus-cite-face-2 ((t (:foreground "firebrick")))) + (gnus-cite-face-3 ((t (:foreground "dark green")))) + (gnus-cite-face-4 ((t (:foreground "OrangeRed")))) + (gnus-cite-face-5 ((t (:foreground "dark khaki")))) + (gnus-cite-face-6 ((t (:foreground "dark violet")))) + (gnus-cite-face-7 ((t (:foreground "SteelBlue4")))) + (gnus-cite-face-8 ((t (:foreground "magenta")))) + (gnus-cite-face-9 ((t (:foreground "violet")))) + (gnus-emphasis-bold ((t (:bold t)))) + (gnus-emphasis-bold-italic ((t (:italic t :bold t)))) + (gnus-emphasis-highlight-words ((t (:foreground "yellow")))) + (gnus-emphasis-italic ((t (:italic t)))) + (gnus-emphasis-underline ((t (:underline t)))) + (gnus-emphasis-underline-bold ((t (:underline t :bold t)))) + (gnus-emphasis-underline-bold-italic ((t (:underline t :italic t :bold t)))) + (gnus-emphasis-underline-italic ((t (:underline t :italic t)))) + (gnus-group-mail-1-empty-face ((t (:foreground "DeepPink3")))) + (gnus-group-mail-1-face ((t (:bold t :foreground "DeepPink3")))) + (gnus-group-mail-2-empty-face ((t (:foreground "HotPink3")))) + (gnus-group-mail-2-face ((t (:bold t :foreground "HotPink3")))) + (gnus-group-mail-3-empty-face ((t (:foreground "magenta4")))) + (gnus-group-mail-3-face ((t (:bold t :foreground "magenta4")))) + (gnus-group-mail-low-empty-face ((t (:foreground "DeepPink4")))) + (gnus-group-mail-low-face ((t (:bold t :foreground "DeepPink4")))) + (gnus-group-news-1-empty-face ((t (:foreground "ForestGreen")))) + (gnus-group-news-1-face ((t (:bold t :foreground "ForestGreen")))) + (gnus-group-news-2-empty-face ((t (:foreground "CadetBlue4")))) + (gnus-group-news-2-face ((t (:bold t :foreground "CadetBlue4")))) + (gnus-group-news-3-empty-face ((t (nil)))) + (gnus-group-news-3-face ((t (:bold t)))) + (gnus-group-news-4-empty-face ((t (nil)))) + (gnus-group-news-4-face ((t (:bold t)))) + (gnus-group-news-5-empty-face ((t (nil)))) + (gnus-group-news-5-face ((t (:bold t)))) + (gnus-group-news-6-empty-face ((t (nil)))) + (gnus-group-news-6-face ((t (:bold t)))) + (gnus-group-news-low-empty-face ((t (:foreground "DarkGreen")))) + (gnus-group-news-low-face ((t (:bold t :foreground "DarkGreen")))) + (gnus-header-content-face ((t (:italic t :foreground "indianred4")))) + (gnus-header-from-face ((t (:foreground "red3")))) + (gnus-header-name-face ((t (:foreground "maroon")))) + (gnus-header-newsgroups-face ((t (:italic t :foreground "MidnightBlue")))) + (gnus-header-subject-face ((t (:foreground "red4")))) + (gnus-picons-face ((t (:background "white" :foreground "black")))) + (gnus-picons-xbm-face ((t (:background "white" :foreground "black")))) + (gnus-signature-face ((t (:italic t)))) + (gnus-splash-face ((t (:foreground "ForestGreen")))) + (gnus-summary-cancelled-face ((t (:foreground "yellow")))) + (gnus-summary-high-ancient-face ((t (:bold t :foreground "RoyalBlue")))) + (gnus-summary-high-read-face ((t (:bold t :foreground "DarkGreen")))) + (gnus-summary-high-ticked-face ((t (:bold t :foreground "firebrick")))) + (gnus-summary-high-unread-face ((t (:bold t)))) + (gnus-summary-low-ancient-face ((t (:italic t :foreground "RoyalBlue")))) + (gnus-summary-low-read-face ((t (:italic t :foreground "DarkGreen")))) + (gnus-summary-low-ticked-face ((t (:italic t :foreground "firebrick")))) + (gnus-summary-low-unread-face ((t (:italic t)))) + (gnus-summary-normal-ancient-face ((t (:foreground "RoyalBlue")))) + (gnus-summary-normal-read-face ((t (:foreground "DarkGreen")))) + (gnus-summary-normal-ticked-face ((t (:foreground "firebrick")))) + (gnus-summary-normal-unread-face ((t (nil)))) + (gnus-summary-selected-face ((t (:underline t)))) + (gnus-x-face ((t (:background "white" :foreground "black")))) + (green ((t (:foreground "green")))) + (gui-button-face ((t (:background "grey75" :foreground "black")))) + (gui-element ((t (:size "12" :background "Gray80" :foreground "black")))) + (header-line ((t (:background "grey20" :foreground "grey90")))) + (highlight ((t (:bold t :background "yellow" :foreground "red")))) + (highlight-changes-delete-face ((t (:underline t :foreground "red")))) + (highlight-changes-face ((t (:foreground "red")))) + (highline-face ((t (:background "paleturquoise")))) + (holiday-face ((t (:background "pink")))) + (hyper-apropos-documentation ((t (:foreground "#aaaaaa")))) + (hyper-apropos-heading ((t (:bold t :foreground "#999999")))) + (hyper-apropos-hyperlink ((t (:foreground "Violet")))) + (hyper-apropos-major-heading ((t (:bold t :foreground "#ff0000")))) + (hyper-apropos-section-heading ((t (:italic t :bold t :foreground "#33aa55")))) + (hyper-apropos-warning ((t (:bold t :foreground "red")))) + (info-menu-5 ((t (:underline t)))) + (info-node ((t (:italic t :bold t)))) + (info-xref ((t (:bold t)))) + (isearch ((t (:background "paleturquoise")))) + (isearch-lazy-highlight-face ((t (:background "paleturquoise4")))) + (isearch-secondary ((t (:foreground "red3")))) + (italic ((t (:italic t)))) + (jde-bug-breakpoint-cursor ((t (:background "brown" :foreground "cyan")))) + (jde-db-active-breakpoint-face ((t (:background "red" :foreground "black")))) + (jde-db-requested-breakpoint-face ((t (:background "yellow" :foreground "black")))) + (jde-db-spec-breakpoint-face ((t (:background "green" :foreground "black")))) + (jde-java-font-lock-api-face ((t (:foreground "light goldenrod")))) + (jde-java-font-lock-bold-face ((t (:bold t)))) + (jde-java-font-lock-code-face ((t (nil)))) + (jde-java-font-lock-constant-face ((t (:foreground "Aquamarine")))) + (jde-java-font-lock-doc-tag-face ((t (:foreground "light coral")))) + (jde-java-font-lock-italic-face ((t (:italic t)))) + (jde-java-font-lock-link-face ((t (:underline t :foreground "cadetblue")))) + (jde-java-font-lock-modifier-face ((t (:foreground "LightSteelBlue")))) + (jde-java-font-lock-number-face ((t (:foreground "LightSalmon")))) + (jde-java-font-lock-operator-face ((t (:foreground "medium blue")))) + (jde-java-font-lock-package-face ((t (:foreground "steelblue1")))) + (jde-java-font-lock-pre-face ((t (nil)))) + (jde-java-font-lock-underline-face ((t (:underline t)))) + (left-margin ((t (nil)))) + (list-mode-item-selected ((t (:background "gray68")))) + (magenta ((t (:foreground "magenta")))) + (makefile-space-face ((t (:background "hotpink")))) + (menu ((t (nil)))) + (message-cited-text-face ((t (:foreground "red")))) + (message-header-cc-face ((t (:foreground "MidnightBlue")))) + (message-header-name-face ((t (:foreground "cornflower blue")))) + (message-header-newsgroups-face ((t (:italic t :bold t :foreground "blue4")))) + (message-header-other-face ((t (:foreground "steel blue")))) + (message-header-subject-face ((t (:bold t :foreground "navy blue")))) + (message-header-to-face ((t (:bold t :foreground "MidnightBlue")))) + (message-header-xheader-face ((t (:foreground "blue")))) + (message-mml-face ((t (:bold t :foreground "cyan")))) + (message-separator-face ((t (:foreground "brown")))) + (minibuffer-prompt ((t (:foreground "cyan")))) + (mode-line ((t (:background "grey75" :foreground "black")))) + (mode-line-inactive ((t (:background "grey30" :foreground "grey80")))) + (modeline ((t (:bold t :background "red" :foreground "yellow")))) + (modeline-buffer-id ((t (:bold t :background "red" :foreground "yellow")))) + (modeline-mousable ((t (:background "red" :foreground "yellow")))) + (modeline-mousable-minor-mode ((t (:background "red" :foreground "green4")))) + (mouse ((t (nil)))) + (paren-blink-off ((t (:foreground "black")))) + (paren-match ((t (:bold t :background "yellow" :foreground "red")))) + (paren-mismatch ((t (:background "DeepPink")))) + (pointer ((t (nil)))) + (primary-selection ((t (:background "gray65")))) + (red ((t (:foreground "red")))) + (region ((t (:background "gray75")))) + (right-margin ((t (nil)))) + (scroll-bar ((t (nil)))) + (secondary-selection ((t (:background "paleturquoise")))) + (semantic-dirty-token-face ((t (:background "lightyellow")))) + (semantic-unmatched-syntax-face ((t (nil)))) + (senator-intangible-face ((t (:foreground "gray75")))) + (senator-momentary-highlight-face ((t (:background "gray30")))) + (senator-read-only-face ((t (:background "#664444")))) + (show-paren-match-face ((t (:background "turquoise")))) + (show-paren-mismatch-face ((t (:background "purple" :foreground "white")))) + (speedbar-button-face ((t (:foreground "green4")))) + (speedbar-directory-face ((t (:foreground "blue4")))) + (speedbar-file-face ((t (:foreground "cyan4")))) + (speedbar-highlight-face ((t (:background "green")))) + (speedbar-selected-face ((t (:underline t :foreground "red")))) + (speedbar-tag-face ((t (:foreground "brown")))) + (template-message-face ((t (:bold t)))) + (term-black ((t (:foreground "black")))) + (term-blackbg ((t (nil)))) + (term-blue ((t (:foreground "blue")))) + (term-blue-bold-face ((t (:bold t :foreground "blue")))) + (term-blue-face ((t (:foreground "blue")))) + (term-blue-inv-face ((t (:background "blue")))) + (term-blue-ul-face ((t (:underline t :foreground "blue")))) + (term-bluebg ((t (:background "blue")))) + (term-bold ((t (:bold t)))) + (term-cyan ((t (:foreground "cyan")))) + (term-cyan-bold-face ((t (:bold t :foreground "cyan")))) + (term-cyan-face ((t (:foreground "cyan")))) + (term-cyan-inv-face ((t (:background "cyan")))) + (term-cyan-ul-face ((t (:underline t :foreground "cyan")))) + (term-cyanbg ((t (:background "cyan")))) + (term-default-bg ((t (nil)))) + (term-default-bg-inv ((t (nil)))) + (term-default-bold-face ((t (:bold t)))) + (term-default-face ((t (nil)))) + (term-default-fg ((t (nil)))) + (term-default-fg-inv ((t (nil)))) + (term-default-inv-face ((t (:background "peachpuff" :foreground "black")))) + (term-default-ul-face ((t (:underline t)))) + (term-green ((t (:foreground "green")))) + (term-green-bold-face ((t (:bold t :foreground "green")))) + (term-green-face ((t (:foreground "green")))) + (term-green-inv-face ((t (:background "green")))) + (term-green-ul-face ((t (:underline t :foreground "green")))) + (term-greenbg ((t (:background "green")))) + (term-invisible ((t (nil)))) + (term-invisible-inv ((t (nil)))) + (term-magenta ((t (:foreground "magenta")))) + (term-magenta-bold-face ((t (:bold t :foreground "magenta")))) + (term-magenta-face ((t (:foreground "magenta")))) + (term-magenta-inv-face ((t (:background "magenta")))) + (term-magenta-ul-face ((t (:underline t :foreground "magenta")))) + (term-magentabg ((t (:background "magenta")))) + (term-red ((t (:foreground "red")))) + (term-red-bold-face ((t (:bold t :foreground "red")))) + (term-red-face ((t (:foreground "red")))) + (term-red-inv-face ((t (:background "red")))) + (term-red-ul-face ((t (:underline t :foreground "red")))) + (term-redbg ((t (:background "red")))) + (term-underline ((t (:underline t)))) + (term-white ((t (:foreground "white")))) + (term-white-bold-face ((t (:bold t :foreground "white")))) + (term-white-face ((t (:foreground "white")))) + (term-white-inv-face ((t (nil)))) + (term-white-ul-face ((t (:underline t :foreground "white")))) + (term-whitebg ((t (:background "white")))) + (term-yellow ((t (:foreground "yellow")))) + (term-yellow-bold-face ((t (:bold t :foreground "yellow")))) + (term-yellow-face ((t (:foreground "yellow")))) + (term-yellow-inv-face ((t (:background "yellow")))) + (term-yellow-ul-face ((t (:underline t :foreground "yellow")))) + (term-yellowbg ((t (:background "yellow")))) + (text-cursor ((t (:background "red" :foreground "black")))) + (tool-bar ((t (:background "grey75" :foreground "black")))) + (toolbar ((t (:background "Gray80" :foreground "black")))) + (tooltip ((t (:background "lightyellow" :foreground "black")))) + (trailing-whitespace ((t (:background "red")))) + (underline ((t (:underline t)))) + (variable-pitch ((t (nil)))) + (vcursor ((t (:underline t :background "cyan" :foreground "blue")))) + (vertical-divider ((t (:background "Gray80" :foreground "black")))) + (vhdl-font-lock-attribute-face ((t (:foreground "Orchid")))) + (vhdl-font-lock-directive-face ((t (:foreground "CadetBlue")))) + (vhdl-font-lock-enumvalue-face ((t (:foreground "Gold4")))) + (vhdl-font-lock-function-face ((t (:foreground "Orchid4")))) + (vhdl-font-lock-prompt-face ((t (:bold t :foreground "Red")))) + (vhdl-font-lock-reserved-words-face ((t (:bold t :foreground "Orange")))) + (vhdl-font-lock-translate-off-face ((t (:background "LightGray")))) + (vhdl-speedbar-architecture-face ((t (:foreground "Blue")))) + (vhdl-speedbar-architecture-selected-face ((t (:underline t :foreground "Blue")))) + (vhdl-speedbar-configuration-face ((t (:foreground "DarkGoldenrod")))) + (vhdl-speedbar-configuration-selected-face ((t (:underline t :foreground "DarkGoldenrod")))) + (vhdl-speedbar-entity-face ((t (:foreground "ForestGreen")))) + (vhdl-speedbar-entity-selected-face ((t (:underline t :foreground "ForestGreen")))) + (vhdl-speedbar-instantiation-face ((t (:foreground "Brown")))) + (vhdl-speedbar-instantiation-selected-face ((t (:underline t :foreground "Brown")))) + (vhdl-speedbar-package-face ((t (:foreground "Grey50")))) + (vhdl-speedbar-package-selected-face ((t (:underline t :foreground "Grey50")))) + (viper-minibuffer-emacs-face ((t (:background "darkseagreen2" :foreground "Black")))) + (viper-minibuffer-insert-face ((t (:background "pink" :foreground "Black")))) + (viper-minibuffer-vi-face ((t (:background "grey" :foreground "DarkGreen")))) + (viper-replace-overlay-face ((t (:background "darkseagreen2" :foreground "Black")))) + (viper-search-face ((t (:background "khaki" :foreground "Black")))) + (white ((t (:foreground "white")))) + (widget ((t (:size "12" :background "Gray80" :foreground "black")))) + (widget-button-face ((t (:bold t)))) + (widget-button-pressed-face ((t (:foreground "red")))) + (widget-documentation-face ((t (:foreground "dark green")))) + (widget-field-face ((t (nil)))) + (widget-inactive-face ((t (:foreground "dim gray")))) + (widget-single-line-field-face ((t (:background "gray85")))) + (x-face ((t (:bold t :background "wheat" :foreground "black")))) + (xrdb-option-name-face ((t (:bold t :foreground "yellow")))) + (xrdb-option-value-face ((t (:bold t :foreground "magenta")))) + (yellow ((t (:foreground "yellow")))) + (zmacs-region ((t (:background "white" :foreground "black"))))))) + +(defun color-theme-shaman () + "Color theme by shaman, created 2002-11-11." + (interactive) + (color-theme-install + '(color-theme-shaman + ((background-color . "#456345") + (background-mode . dark) + (background-toolbar-color . "#cf3ccf3ccf3c") + (border-color . "#000000000000") + (bottom-toolbar-shadow-color . "#79e77df779e7") + (foreground-color . "White") + (top-toolbar-shadow-color . "#f7defbeef7de")) + ((buffers-tab-face . buffers-tab)) + (default ((t (nil)))) + (blue ((t (:foreground "blue")))) + (bold ((t (:bold t :size "12")))) + (bold-italic ((t (:italic t :bold t :size "12")))) + (border-glyph ((t (nil)))) + (buffers-tab ((t (:background "Gray80" :foreground "black")))) + (font-lock-builtin-face ((t (:foreground "cadetblue2")))) + (font-lock-comment-face ((t (:foreground "gray80")))) + (font-lock-constant-face ((t (:foreground "steelblue1")))) + (font-lock-doc-face ((t (:foreground "light coral")))) + (font-lock-doc-string-face ((t (:foreground "light coral")))) + (font-lock-function-name-face ((t (:foreground "aquamarine")))) + (font-lock-keyword-face ((t (:foreground "cyan")))) + (font-lock-preprocessor-face ((t (:foreground "steelblue1")))) + (font-lock-reference-face ((t (:foreground "cadetblue2")))) + (font-lock-string-face ((t (:foreground "tan")))) + (font-lock-type-face ((t (:foreground "wheat")))) + (font-lock-variable-name-face ((t (:foreground "cyan3")))) + (font-lock-warning-face ((t (:bold t :size "12" :foreground "Pink")))) + (fringe ((t (nil)))) + (gnus-x-face ((t (:background "white" :foreground "black")))) + (green ((t (:foreground "green")))) + (gui-button-face ((t (:background "grey75" :foreground "black")))) + (gui-element ((t (:size "12" :background "Gray80" :foreground "black")))) + (highlight ((t (:background "darkseagreen2")))) + (isearch ((t (:background "paleturquoise")))) + (isearch-secondary ((t (:foreground "red3")))) + (italic ((t (:italic t :size "12")))) + (left-margin ((t (nil)))) + (list-mode-item-selected ((t (:background "gray68")))) + (message-cited-text-face ((t (:foreground "red")))) + (message-header-cc-face ((t (:bold t :foreground "green4")))) + (message-header-name-face ((t (:foreground "DarkGreen")))) + (message-header-newsgroups-face ((t (:bold t :foreground "yellow")))) + (message-header-other-face ((t (:foreground "#b00000")))) + (message-header-subject-face ((t (:foreground "green3")))) + (message-header-to-face ((t (:bold t :foreground "green2")))) + (message-header-xheader-face ((t (:foreground "blue")))) + (message-mml-face ((t (:foreground "ForestGreen")))) + (message-separator-face ((t (:foreground "blue3")))) + (mode-line ((t (:background "Gray80" :foreground "black")))) + (modeline ((t (:background "Gray80" :foreground "black")))) + (modeline-buffer-id ((t (:background "Gray80" :foreground "blue4")))) + (modeline-mousable ((t (:background "Gray80" :foreground "firebrick")))) + (modeline-mousable-minor-mode ((t (:background "Gray80" :foreground "green4")))) + (pointer ((t (:foreground "White")))) + (primary-selection ((t (:background "gray65")))) + (red ((t (:foreground "red")))) + (region ((t (:background "gray65")))) + (right-margin ((t (nil)))) + (rpm-spec-dir-face ((t (:foreground "green")))) + (rpm-spec-doc-face ((t (:foreground "magenta")))) + (rpm-spec-ghost-face ((t (:foreground "red")))) + (rpm-spec-macro-face ((t (:foreground "yellow")))) + (rpm-spec-package-face ((t (:foreground "red")))) + (rpm-spec-tag-face ((t (:foreground "blue")))) + (rpm-spec-var-face ((t (:foreground "maroon")))) + (secondary-selection ((t (:background "paleturquoise")))) + (text-cursor ((t (:background "Pink" :foreground "Black")))) + (tool-bar ((t (nil)))) + (toolbar ((t (:background "Gray80" :foreground "black")))) + (underline ((t (:underline t)))) + (vertical-divider ((t (:background "Gray80" :foreground "black")))) + (widget ((t (:size "12" :background "Gray80" :foreground "black")))) + (widget-button-face ((t (:bold t)))) + (widget-button-pressed-face ((t (:foreground "red")))) + (widget-documentation-face ((t (:foreground "lime green")))) + (widget-field-face ((t (:background "dim gray")))) + (widget-inactive-face ((t (:foreground "light gray")))) + (yellow ((t (:foreground "yellow")))) + (zmacs-region ((t (:background "gray65"))))))) + +(defun color-theme-emacs-nw () + "Follow emacs21's color-theme, with -nw getting 100% compatibility. + +Alex's `color-theme-emacs-21' follows emacs21's theme, but in the +current scheme of things, that means that when it works on X, it won't +work in -nw perfectly. The modeline and menuline will have same +colors as the rest of emacs, which can be particularly disturbing when +there are multiple windows. + +OTOH, `color-theme-emacs-nw' follows emacs21's theme but the goal is +100% -nw compatibility, and in X; we shall try for decent color +scheme, and as much compability default emacs21's X as possble. +Bugs to deego@gnufans.org. + +TODO: Try to make this theme relative to color-theme-emacs-21 rather +than absolute, viz: call that first and then tweak minor stuff." + (interactive) + (color-theme-install + '(color-theme-emacs-nw + ((background-color . "white") + (background-mode . light) + (border-color . "black") + (cursor-color . "black") + (foreground-color . "black") + (mouse-color . "black")) + ((Man-overstrike-face . bold) + (Man-underline-face . underline) + (cperl-here-face . font-lock-string-face) + (cperl-invalid-face . underline) + (cperl-pod-face . font-lock-comment-face) + (cperl-pod-head-face . font-lock-variable-name-face) + (gnus-article-button-face . bold) + (gnus-article-mouse-face . highlight) + (gnus-cite-attribution-face . gnus-cite-attribution-face) + (gnus-mouse-face . highlight) + (gnus-signature-face . gnus-signature-face) + (gnus-summary-selected-face . gnus-summary-selected-face) + (help-highlight-face . underline) + (idlwave-class-arrow-face . bold) + (idlwave-shell-breakpoint-face . idlwave-shell-bp-face) + (idlwave-shell-expression-face . secondary-selection) + (idlwave-shell-stop-line-face . highlight) + (ispell-highlight-face . highlight) + (list-matching-lines-face . bold) + (view-highlight-face . highlight) + (viper-insert-state-cursor-color . "Green") + (viper-replace-overlay-cursor-color . "Red") + (widget-mouse-face . highlight)) + (default ((t (:stipple nil :background "white" :foreground "black" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :width normal :family "adobe-courier")))) + (Info-title-1-face ((t (:bold t :weight bold :family "helv" :height 1.728)))) + (Info-title-2-face ((t (:bold t :family "helv" :weight bold :height 1.44)))) + (Info-title-3-face ((t (:bold t :weight bold :family "helv" :height 1.2)))) + (Info-title-4-face ((t (:bold t :family "helv" :weight bold)))) + (antlr-font-lock-keyword-face ((t (:bold t :foreground "black" :weight bold)))) + (antlr-font-lock-literal-face ((t (:bold t :foreground "brown4" :weight bold)))) + (antlr-font-lock-ruledef-face ((t (:bold t :foreground "blue" :weight bold)))) + (antlr-font-lock-ruleref-face ((t (:foreground "blue4")))) + (antlr-font-lock-tokendef-face ((t (:bold t :foreground "blue" :weight bold)))) + (antlr-font-lock-tokenref-face ((t (:foreground "orange4")))) + (bold ((t (:bold t :weight bold)))) + (bold-italic ((t (:italic t :bold t :slant italic :weight bold)))) + (border ((t (:background "black")))) + (calendar-today-face ((t (:underline t)))) + (change-log-acknowledgement-face ((t (:foreground "Firebrick")))) + (change-log-conditionals-face ((t (:foreground "DarkGoldenrod")))) + (change-log-date-face ((t (:foreground "RosyBrown")))) + (change-log-email-face ((t (:foreground "DarkGoldenrod")))) + (change-log-file-face ((t (:foreground "Blue")))) + (change-log-function-face ((t (:foreground "DarkGoldenrod")))) + (change-log-list-face ((t (:foreground "Purple")))) + (change-log-name-face ((t (:foreground "CadetBlue")))) + (comint-highlight-input ((t (:bold t :weight bold)))) + (comint-highlight-prompt ((t (:foreground "dark blue")))) + (cperl-array-face ((t (:bold t :background "lightyellow2" :foreground "Blue" :weight bold)))) + (cperl-hash-face ((t (:italic t :bold t :background "lightyellow2" :foreground "Red" :slant italic :weight bold)))) + (cperl-nonoverridable-face ((t (:foreground "chartreuse3")))) + (cursor ((t (:background "black")))) + (custom-button-face ((t (:background "lightgrey" :foreground "black" :box (:line-width 2 :style released-button))))) + (custom-button-pressed-face ((t (:background "lightgrey" :foreground "black" :box (:line-width 2 :style pressed-button))))) + (custom-changed-face ((t (:background "blue" :foreground "white")))) + (custom-comment-face ((t (:background "gray85")))) + (custom-comment-tag-face ((t (:foreground "blue4")))) + (custom-documentation-face ((t (nil)))) + (custom-face-tag-face ((t (:bold t :family "helv" :weight bold :height 1.2)))) + (custom-group-tag-face ((t (:bold t :foreground "blue" :weight bold :height 1.2)))) + (custom-group-tag-face-1 ((t (:bold t :family "helv" :foreground "red" :weight bold :height 1.2)))) + (custom-invalid-face ((t (:background "red" :foreground "yellow")))) + (custom-modified-face ((t (:background "blue" :foreground "white")))) + (custom-rogue-face ((t (:background "black" :foreground "pink")))) + (custom-saved-face ((t (:underline t)))) + (custom-set-face ((t (:background "white" :foreground "blue")))) + (custom-state-face ((t (:foreground "dark green")))) + (custom-variable-button-face ((t (:bold t :underline t :weight bold)))) + (custom-variable-tag-face ((t (:bold t :family "helv" :foreground "blue" :weight bold :height 1.2)))) + (cvs-filename-face ((t (:foreground "blue4")))) + (cvs-handled-face ((t (:foreground "pink")))) + (cvs-header-face ((t (:bold t :foreground "blue4" :weight bold)))) + (cvs-marked-face ((t (:bold t :foreground "green3" :weight bold)))) + (cvs-msg-face ((t (:italic t :slant italic)))) + (cvs-need-action-face ((t (:foreground "orange")))) + (cvs-unknown-face ((t (:foreground "red")))) + (diary-face ((t (:foreground "red")))) + (diff-added-face ((t (nil)))) + (diff-changed-face ((t (nil)))) + (diff-context-face ((t (:foreground "grey50")))) + (diff-file-header-face ((t (:bold t :background "grey70" :weight bold)))) + (diff-function-face ((t (:foreground "grey50")))) + (diff-header-face ((t (:background "grey85")))) + (diff-hunk-header-face ((t (:background "grey85")))) + (diff-index-face ((t (:bold t :weight bold :background "grey70")))) + (diff-nonexistent-face ((t (:bold t :weight bold :background "grey70")))) + (diff-removed-face ((t (nil)))) + (dired-face-boring ((t (:foreground "RosyBrown")))) + (dired-face-directory ((t (:foreground "Blue")))) + (dired-face-executable ((t (nil)))) + (dired-face-flagged ((t (:foreground "Red" :weight bold)))) + (dired-face-marked ((t (:foreground "Red" :weight bold)))) + (dired-face-permissions ((t (nil)))) + (dired-face-setuid ((t (nil)))) + (dired-face-socket ((t (nil)))) + (dired-face-symlink ((t (:foreground "Purple")))) + (ebrowse-default-face ((t (nil)))) + (ebrowse-file-name-face ((t (:italic t :slant italic)))) + (ebrowse-member-attribute-face ((t (:foreground "red")))) + (ebrowse-member-class-face ((t (:foreground "purple")))) + (ebrowse-progress-face ((t (:background "blue")))) + (ebrowse-root-class-face ((t (:bold t :foreground "blue" :weight bold)))) + (ebrowse-tree-mark-face ((t (:foreground "red")))) + (ediff-current-diff-face-A ((t (:background "pale green" :foreground "firebrick")))) + (ediff-current-diff-face-Ancestor ((t (:background "VioletRed" :foreground "Black")))) + (ediff-current-diff-face-B ((t (:background "Yellow" :foreground "DarkOrchid")))) + (ediff-current-diff-face-C ((t (:background "Pink" :foreground "Navy")))) + (ediff-even-diff-face-A ((t (:background "light grey" :foreground "Black")))) + (ediff-even-diff-face-Ancestor ((t (:background "Grey" :foreground "White")))) + (ediff-even-diff-face-B ((t (:background "Grey" :foreground "White")))) + (ediff-even-diff-face-C ((t (:background "light grey" :foreground "Black")))) + (ediff-fine-diff-face-A ((t (:background "sky blue" :foreground "Navy")))) + (ediff-fine-diff-face-Ancestor ((t (:background "Green" :foreground "Black")))) + (ediff-fine-diff-face-B ((t (:background "cyan" :foreground "Black")))) + (ediff-fine-diff-face-C ((t (:background "Turquoise" :foreground "Black")))) + (ediff-odd-diff-face-A ((t (:background "Grey" :foreground "White")))) + (ediff-odd-diff-face-Ancestor ((t (:background "light grey" :foreground "Black")))) + (ediff-odd-diff-face-B ((t (:background "light grey" :foreground "Black")))) + (ediff-odd-diff-face-C ((t (:background "Grey" :foreground "White")))) + (eshell-ls-archive-face ((t (:bold t :foreground "Orchid" :weight bold)))) + (eshell-ls-backup-face ((t (:foreground "OrangeRed")))) + (eshell-ls-clutter-face ((t (:bold t :foreground "OrangeRed" :weight bold)))) + (eshell-ls-directory-face ((t (:bold t :foreground "Blue" :weight bold)))) + (eshell-ls-executable-face ((t (:bold t :foreground "ForestGreen" :weight bold)))) + (eshell-ls-missing-face ((t (:bold t :foreground "Red" :weight bold)))) + (eshell-ls-product-face ((t (:foreground "OrangeRed")))) + (eshell-ls-readonly-face ((t (:foreground "Brown")))) + (eshell-ls-special-face ((t (:bold t :foreground "Magenta" :weight bold)))) + (eshell-ls-symlink-face ((t (:bold t :foreground "Dark Cyan" :weight bold)))) + (eshell-ls-unreadable-face ((t (:foreground "Grey30")))) + (eshell-prompt-face ((t (:bold t :foreground "Red" :weight bold)))) + (eshell-test-failed-face ((t (:bold t :foreground "OrangeRed" :weight bold)))) + (eshell-test-ok-face ((t (:bold t :foreground "Green" :weight bold)))) + (excerpt ((t (:italic t :slant italic)))) + (fixed ((t (:bold t :weight bold)))) + (fixed-pitch ((t (:family "courier")))) + (flyspell-duplicate-face ((t (:bold t :foreground "Gold3" :underline t :weight bold)))) + (flyspell-incorrect-face ((t (:bold t :foreground "OrangeRed" :underline t :weight bold)))) + (font-lock-builtin-face ((t (:foreground "Orchid")))) + (font-lock-comment-face ((t (:foreground "Firebrick")))) + (font-lock-constant-face ((t (:foreground "CadetBlue")))) + (font-lock-doc-face ((t (:foreground "RosyBrown")))) + (font-lock-doc-string-face ((t (:foreground "RosyBrown")))) + (font-lock-function-name-face ((t (:foreground "Blue")))) + (font-lock-keyword-face ((t (:foreground "Purple")))) + (font-lock-preprocessor-face ((t (:foreground "CadetBlue")))) + (font-lock-reference-face ((t (:foreground "Orchid")))) + (font-lock-string-face ((t (:foreground "RosyBrown")))) + (font-lock-type-face ((t (:foreground "ForestGreen")))) + (font-lock-variable-name-face ((t (:foreground "DarkGoldenrod")))) + (font-lock-warning-face ((t (:bold t :foreground "Red" :weight bold)))) + (fringe ((t (:background "grey95")))) + (gnus-cite-attribution-face ((t (:italic t :slant italic)))) + (gnus-cite-face-1 ((t (:foreground "MidnightBlue")))) + (gnus-cite-face-10 ((t (:foreground "medium purple")))) + (gnus-cite-face-11 ((t (:foreground "turquoise")))) + (gnus-cite-face-2 ((t (:foreground "firebrick")))) + (gnus-cite-face-3 ((t (:foreground "dark green")))) + (gnus-cite-face-4 ((t (:foreground "OrangeRed")))) + (gnus-cite-face-5 ((t (:foreground "dark khaki")))) + (gnus-cite-face-6 ((t (:foreground "dark violet")))) + (gnus-cite-face-7 ((t (:foreground "SteelBlue4")))) + (gnus-cite-face-8 ((t (:foreground "magenta")))) + (gnus-cite-face-9 ((t (:foreground "violet")))) + (gnus-emphasis-bold ((t (:bold t :weight bold)))) + (gnus-emphasis-bold-italic ((t (:italic t :bold t :slant italic :weight bold)))) + (gnus-emphasis-highlight-words ((t (:background "black" :foreground "yellow")))) + (gnus-emphasis-italic ((t (:italic t :slant italic)))) + (gnus-emphasis-underline ((t (:underline t)))) + (gnus-emphasis-underline-bold ((t (:bold t :underline t :weight bold)))) + (gnus-emphasis-underline-bold-italic ((t (:italic t :bold t :underline t :slant italic :weight bold)))) + (gnus-emphasis-underline-italic ((t (:italic t :underline t :slant italic)))) + (gnus-group-mail-1-empty-face ((t (:foreground "DeepPink3")))) + (gnus-group-mail-1-face ((t (:bold t :foreground "DeepPink3" :weight bold)))) + (gnus-group-mail-2-empty-face ((t (:foreground "HotPink3")))) + (gnus-group-mail-2-face ((t (:bold t :foreground "HotPink3" :weight bold)))) + (gnus-group-mail-3-empty-face ((t (:foreground "magenta4")))) + (gnus-group-mail-3-face ((t (:bold t :foreground "magenta4" :weight bold)))) + (gnus-group-mail-low-empty-face ((t (:foreground "DeepPink4")))) + (gnus-group-mail-low-face ((t (:bold t :foreground "DeepPink4" :weight bold)))) + (gnus-group-news-1-empty-face ((t (:foreground "ForestGreen")))) + (gnus-group-news-1-face ((t (:bold t :foreground "ForestGreen" :weight bold)))) + (gnus-group-news-2-empty-face ((t (:foreground "CadetBlue4")))) + (gnus-group-news-2-face ((t (:bold t :foreground "CadetBlue4" :weight bold)))) + (gnus-group-news-3-empty-face ((t (nil)))) + (gnus-group-news-3-face ((t (:bold t :weight bold)))) + (gnus-group-news-4-empty-face ((t (nil)))) + (gnus-group-news-4-face ((t (:bold t :weight bold)))) + (gnus-group-news-5-empty-face ((t (nil)))) + (gnus-group-news-5-face ((t (:bold t :weight bold)))) + (gnus-group-news-6-empty-face ((t (nil)))) + (gnus-group-news-6-face ((t (:bold t :weight bold)))) + (gnus-group-news-low-empty-face ((t (:foreground "DarkGreen")))) + (gnus-group-news-low-face ((t (:bold t :foreground "DarkGreen" :weight bold)))) + (gnus-header-content-face ((t (:italic t :foreground "indianred4" :slant italic)))) + (gnus-header-from-face ((t (:foreground "red3")))) + (gnus-header-name-face ((t (:foreground "maroon")))) + (gnus-header-newsgroups-face ((t (:italic t :foreground "MidnightBlue" :slant italic)))) + (gnus-header-subject-face ((t (:foreground "red4")))) + (gnus-signature-face ((t (:italic t :slant italic)))) + (gnus-splash-face ((t (:foreground "Brown")))) + (gnus-summary-cancelled-face ((t (:background "black" :foreground "yellow")))) + (gnus-summary-high-ancient-face ((t (:bold t :foreground "RoyalBlue" :weight bold)))) + (gnus-summary-high-read-face ((t (:bold t :foreground "DarkGreen" :weight bold)))) + (gnus-summary-high-ticked-face ((t (:bold t :foreground "firebrick" :weight bold)))) + (gnus-summary-high-unread-face ((t (:bold t :weight bold)))) + (gnus-summary-low-ancient-face ((t (:italic t :foreground "RoyalBlue" :slant italic)))) + (gnus-summary-low-read-face ((t (:italic t :foreground "DarkGreen" :slant italic)))) + (gnus-summary-low-ticked-face ((t (:italic t :foreground "firebrick" :slant italic)))) + (gnus-summary-low-unread-face ((t (:italic t :slant italic)))) + (gnus-summary-normal-ancient-face ((t (:foreground "RoyalBlue")))) + (gnus-summary-normal-read-face ((t (:foreground "DarkGreen")))) + (gnus-summary-normal-ticked-face ((t (:foreground "firebrick")))) + (gnus-summary-normal-unread-face ((t (nil)))) + (gnus-summary-selected-face ((t (:underline t)))) + (header-line ((t (:box (:line-width -1 :style released-button) :background "grey90" :foreground "grey20" :box nil)))) + (hi-black-b ((t (:bold t :weight bold)))) + (hi-black-hb ((t (:bold t :family "helv" :weight bold :height 1.67)))) + (hi-blue ((t (:background "light blue")))) + (hi-blue-b ((t (:bold t :foreground "blue" :weight bold)))) + (hi-green ((t (:background "green")))) + (hi-green-b ((t (:bold t :foreground "green" :weight bold)))) + (hi-pink ((t (:background "pink")))) + (hi-red-b ((t (:bold t :foreground "red" :weight bold)))) + (hi-yellow ((t (:background "yellow")))) + (highlight ((t (:background "darkseagreen2")))) + (highlight-changes-delete-face ((t (:foreground "red" :underline t)))) + (highlight-changes-face ((t (:foreground "red")))) + (holiday-face ((t (:background "pink")))) + (idlwave-help-link-face ((t (:foreground "Blue")))) + (idlwave-shell-bp-face ((t (:background "Pink" :foreground "Black")))) + (info-header-node ((t (:italic t :bold t :weight bold :slant italic :foreground "brown")))) + (info-header-xref ((t (:bold t :weight bold :foreground "magenta4")))) + (info-menu-5 ((t (:foreground "red1")))) + (info-menu-header ((t (:bold t :family "helv" :weight bold)))) + (info-node ((t (:italic t :bold t :foreground "brown" :slant italic :weight bold)))) + (info-xref ((t (:bold t :foreground "magenta4" :weight bold)))) + (isearch ((t (:background "magenta4" :foreground "lightskyblue1")))) + (isearch-lazy-highlight-face ((t (:background "paleturquoise")))) + (italic ((t (:italic t :slant italic)))) + (log-view-file-face ((t (:bold t :background "grey70" :weight bold)))) + (log-view-message-face ((t (:background "grey85")))) + (makefile-space-face ((t (:background "hotpink")))) + (menu ((t (:background "grey50" :foreground "white" :box (:line-width -1 :style released-button))))) + (message-cited-text-face ((t (:foreground "red")))) + (message-header-cc-face ((t (:foreground "MidnightBlue")))) + (message-header-name-face ((t (:foreground "cornflower blue")))) + (message-header-newsgroups-face ((t (:italic t :bold t :foreground "blue4" :slant italic :weight bold)))) + (message-header-other-face ((t (:foreground "steel blue")))) + (message-header-subject-face ((t (:bold t :foreground "navy blue" :weight bold)))) + (message-header-to-face ((t (:bold t :foreground "MidnightBlue" :weight bold)))) + (message-header-xheader-face ((t (:foreground "blue")))) + (message-mml-face ((t (:foreground "ForestGreen")))) + (message-separator-face ((t (:foreground "brown")))) + (mode-line ((t (:background "grey50" :foreground "white" :box (:line-width -1 :style released-button))))) + (modeline ((t (:background "grey50" :foreground "white" :box (:line-width -1 :style released-button))))) + (modeline-buffer-id ((t (:bold t :background "grey75" :foreground "black" :box (:line-width -1 :style released-button))))) + (modeline-mousable ((t (:background "grey75" :foreground "black" :box (:line-width -1 :style released-button))))) + (modeline-mousable-minor-mode ((t (:background "grey75" :foreground "black" :box (:line-width -1 :style released-button))))) + (mouse ((t (:background "black")))) + (primary-selection ((t (:background "lightgoldenrod2")))) + (reb-match-0 ((t (:background "lightblue")))) + (reb-match-1 ((t (:background "aquamarine")))) + (reb-match-2 ((t (:background "springgreen")))) + (reb-match-3 ((t (:background "yellow")))) + (region ((t (:background "lightgoldenrod2")))) + (scroll-bar ((t (:background "grey75")))) + (secondary-selection ((t (:background "yellow")))) + (sh-heredoc-face ((t (:foreground "tan")))) + (show-paren-match-face ((t (:background "turquoise")))) + (show-paren-mismatch-face ((t (:background "purple" :foreground "white")))) + (show-tabs-space-face ((t (:foreground "yellow")))) + (show-tabs-tab-face ((t (:foreground "red")))) + (smerge-base-face ((t (:foreground "red")))) + (smerge-markers-face ((t (:background "grey85")))) + (smerge-mine-face ((t (:foreground "blue")))) + (smerge-other-face ((t (:foreground "darkgreen")))) + (speedbar-button-face ((t (:foreground "green4")))) + (speedbar-directory-face ((t (:foreground "blue4")))) + (speedbar-file-face ((t (:foreground "cyan4")))) + (speedbar-highlight-face ((t (:background "green")))) + (speedbar-selected-face ((t (:foreground "red" :underline t)))) + (speedbar-tag-face ((t (:foreground "brown")))) + (strokes-char-face ((t (:background "lightgray")))) + (term-black ((t (:stipple nil :background "white" :foreground "black" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :width normal :family "adobe-courier")))) + (term-blackbg ((t (:stipple nil :background "black" :foreground "black" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :width normal :family "adobe-courier")))) + (term-blue ((t (:stipple nil :background "white" :foreground "blue" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :width normal :family "adobe-courier")))) + (term-bluebg ((t (:stipple nil :background "blue" :foreground "black" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :width normal :family "adobe-courier")))) + (term-bold ((t (:bold t :stipple nil :background "white" :foreground "black" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight bold :width normal :family "adobe-courier")))) + (term-cyan ((t (:stipple nil :background "white" :foreground "cyan" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :width normal :family "adobe-courier")))) + (term-cyanbg ((t (:stipple nil :background "cyan" :foreground "black" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :width normal :family "adobe-courier")))) + (term-default ((t (:stipple nil :background "white" :foreground "black" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :width normal :family "adobe-courier")))) + (term-default-bg ((t (:stipple nil :foreground "black" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :width normal :family "adobe-courier")))) + (term-default-bg-inv ((t (:stipple nil :foreground "black" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :width normal :family "adobe-courier")))) + (term-default-fg ((t (:stipple nil :background "white" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :width normal :family "adobe-courier")))) + (term-default-fg-inv ((t (:stipple nil :background "white" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :width normal :family "adobe-courier")))) + (term-green ((t (:stipple nil :background "white" :foreground "green" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :width normal :family "adobe-courier")))) + (term-greenbg ((t (:stipple nil :background "green" :foreground "black" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :width normal :family "adobe-courier")))) + (term-invisible ((t (:stipple nil :foreground "black" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :width normal :family "adobe-courier")))) + (term-invisible-inv ((t (:stipple nil :foreground "black" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :width normal :family "adobe-courier")))) + (term-magenta ((t (:stipple nil :background "white" :foreground "magenta" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :width normal :family "adobe-courier")))) + (term-magentabg ((t (:stipple nil :background "magenta" :foreground "black" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :width normal :family "adobe-courier")))) + (term-red ((t (:stipple nil :background "white" :foreground "red" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :width normal :family "adobe-courier")))) + (term-redbg ((t (:stipple nil :background "red" :foreground "black" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :width normal :family "adobe-courier")))) + (term-underline ((t (:stipple nil :background "white" :foreground "black" :inverse-video nil :box nil :strike-through nil :overline nil :underline t :slant normal :weight normal :width normal :family "adobe-courier")))) + (term-white ((t (:stipple nil :background "white" :foreground "white" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :width normal :family "adobe-courier")))) + (term-whitebg ((t (:stipple nil :background "white" :foreground "black" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :width normal :family "adobe-courier")))) + (term-yellow ((t (:stipple nil :background "white" :foreground "yellow" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :width normal :family "adobe-courier")))) + (term-yellowbg ((t (:stipple nil :background "yellow" :foreground "black" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :width normal :family "adobe-courier")))) + (tex-math-face ((t (:foreground "RosyBrown")))) + (texinfo-heading-face ((t (:foreground "Blue")))) + (tool-bar ((t (:background "grey75" :foreground "black" :box (:line-width 1 :style released-button))))) + (tooltip ((t (:background "lightyellow" :foreground "black")))) + (trailing-whitespace ((t (:background "red")))) + (underline ((t (:underline t)))) + (variable-pitch ((t (:family "helv")))) + (vcursor ((t (:background "cyan" :foreground "blue" :underline t)))) + (vhdl-font-lock-attribute-face ((t (:foreground "Orchid")))) + (vhdl-font-lock-directive-face ((t (:foreground "CadetBlue")))) + (vhdl-font-lock-enumvalue-face ((t (:foreground "Gold4")))) + (vhdl-font-lock-function-face ((t (:foreground "Orchid4")))) + (vhdl-font-lock-prompt-face ((t (:bold t :foreground "Red" :weight bold)))) + (vhdl-font-lock-reserved-words-face ((t (:bold t :foreground "Orange" :weight bold)))) + (vhdl-font-lock-translate-off-face ((t (:background "LightGray")))) + (vhdl-speedbar-architecture-face ((t (:foreground "Blue")))) + (vhdl-speedbar-architecture-selected-face ((t (:foreground "Blue" :underline t)))) + (vhdl-speedbar-configuration-face ((t (:foreground "DarkGoldenrod")))) + (vhdl-speedbar-configuration-selected-face ((t (:foreground "DarkGoldenrod" :underline t)))) + (vhdl-speedbar-entity-face ((t (:foreground "ForestGreen")))) + (vhdl-speedbar-entity-selected-face ((t (:foreground "ForestGreen" :underline t)))) + (vhdl-speedbar-instantiation-face ((t (:foreground "Brown")))) + (vhdl-speedbar-instantiation-selected-face ((t (:foreground "Brown" :underline t)))) + (vhdl-speedbar-package-face ((t (:foreground "Grey50")))) + (vhdl-speedbar-package-selected-face ((t (:foreground "Grey50" :underline t)))) + (viper-minibuffer-emacs-face ((t (:background "darkseagreen2" :foreground "Black")))) + (viper-minibuffer-insert-face ((t (:background "pink" :foreground "Black")))) + (viper-minibuffer-vi-face ((t (:background "grey" :foreground "DarkGreen")))) + (viper-replace-overlay-face ((t (:background "darkseagreen2" :foreground "Black")))) + (viper-search-face ((t (:background "khaki" :foreground "Black")))) + (widget-button-face ((t (:bold t :weight bold)))) + (widget-button-pressed-face ((t (:foreground "red")))) + (widget-documentation-face ((t (:foreground "dark green")))) + (widget-field-face ((t (:background "gray85")))) + (widget-inactive-face ((t (:foreground "dim gray")))) + (widget-single-line-field-face ((t (:background "gray85")))) + (woman-addition-face ((t (:foreground "orange")))) + (woman-bold-face ((t (:bold t :foreground "blue" :weight bold)))) + (woman-italic-face ((t (:italic t :foreground "red" :underline t :slant italic)))) + (woman-unknown-face ((t (:foreground "brown")))) + (zmacs-region ((t (:background "lightgoldenrod2"))))))) + +(defun color-theme-late-night () + "Color theme by Alex Schroeder, created 2003-08-07. +This theme is for use late at night, with only little light in the room. +The goal was to make something as dark and subtle as the text console in +its default 80x25 state -- dark grey on black." + (interactive) + (let ((color-theme-is-cumulative t)) + (color-theme-dark-erc) + (color-theme-dark-gnus) + ;; (color-theme-dark-diff) + ;; (color-theme-dark-eshell) + (color-theme-dark-info) + (color-theme-dark-font-lock) + (color-theme-install + '(color-theme-late-night + ((background-color . "#000") + (background-mode . dark) + (background-toolbar-color . "#000") + (border-color . "#000") + (bottom-toolbar-shadow-color . "#000") + (cursor-color . "#888") + (foreground-color . "#666") + (top-toolbar-shadow-color . "#111")) + (default ((t (nil)))) + (bold ((t (:bold t)))) + (button ((t (:bold t)))) + (custom-button-face ((t (:bold t :foreground "#999")))) + (fringe ((t (:background "#111" :foreground "#444")))) + (header-line ((t (:background "#333" :foreground "#000")))) + (highlight ((t (:background "dark slate blue" :foreground "light blue")))) + (holiday-face ((t (:background "#000" :foreground "#777")))) + (isearch ((t (:foreground "pink" :background "red")))) + (isearch-lazy-highlight-face ((t (:foreground "red")))) + (italic ((t (:bold t)))) + (menu ((t (:background "#111" :foreground "#444")))) + (minibuffer-prompt ((t (:foreground "555")))) + (modeline ((t (:background "#111" :foreground "#444")))) + (mode-line-inactive ((t (:background "#000" :foreground "#444")))) + (modeline-buffer-id ((t (:background "#000" :foreground "#555")))) + (modeline-mousable ((t (:background "#000" :foreground "#555")))) + (modeline-mousable-minor-mode ((t (:background "#000" :foreground "#555")))) + (region ((t (:background "dark cyan" :foreground "cyan")))) + (secondary-selection ((t (:background "Aquamarine" :foreground "SlateBlue")))) + (show-paren-match-face ((t (:foreground "white" :background "light slate blue")))) + (show-paren-mismatch-face ((t (:foreground "white" :background "red")))) + (tool-bar ((t (:background "#111" :foreground "#777")))) + (tooltip ((t (:background "#333" :foreground "#777")))) + (underline ((t (:bold t)))) + (variable-pitch ((t (nil)))) + (widget-button-face ((t (:bold t :foreground "#888")))) + (widget-field-face ((t (:bold t :foreground "#999")))))))) + +(defun color-theme-clarity () + "White on black color theme by Richard Wellum, created 2003-01-16." + (interactive) + (color-theme-install + '(color-theme-clarity + ((background-color . "black") + (background-mode . dark) + (border-color . "white") + (cursor-color . "yellow") + (foreground-color . "white") + (mouse-color . "white")) + ((CUA-mode-global-mark-cursor-color . "cyan") + (CUA-mode-normal-cursor-color . "yellow") + (CUA-mode-overwrite-cursor-color . "red") + (CUA-mode-read-only-cursor-color . "green") + (help-highlight-face . underline) + (ibuffer-dired-buffer-face . font-lock-function-name-face) + (ibuffer-help-buffer-face . font-lock-comment-face) + (ibuffer-hidden-buffer-face . font-lock-warning-face) + (ibuffer-occur-match-face . font-lock-warning-face) + (ibuffer-read-only-buffer-face . font-lock-type-face) + (ibuffer-special-buffer-face . font-lock-keyword-face) + (ibuffer-title-face . font-lock-type-face) + (list-matching-lines-face . bold) + (ps-line-number-color . "black") + (ps-zebra-color . 0.95) + (tags-tag-face . default) + (view-highlight-face . highlight) + (widget-mouse-face . highlight)) + (default ((t (nil)))) + (CUA-global-mark-face ((t (:background "cyan" :foreground "black")))) + (CUA-rectangle-face ((t (:background "maroon" :foreground "white")))) + (CUA-rectangle-noselect-face ((t (:background "dimgray" :foreground "white")))) + (bold ((t (:bold t :weight bold)))) + (bold-italic ((t (:italic t :bold t :slant italic :weight bold)))) + (border ((t (:background "white")))) + (clearcase-dired-checkedout-face ((t (:foreground "red")))) + (comint-highlight-input ((t (:bold t :weight bold)))) + (comint-highlight-prompt ((t (:foreground "cyan")))) + (cursor ((t (:background "yellow")))) + (fixed-pitch ((t (:family "courier")))) + (flash-paren-face-off ((t (nil)))) + (flash-paren-face-on ((t (nil)))) + (flash-paren-face-region ((t (nil)))) + (font-lock-builtin-face ((t (:foreground "LightSteelBlue")))) + (font-lock-comment-face ((t (:foreground "OrangeRed")))) + (font-lock-constant-face ((t (:foreground "Aquamarine")))) + (font-lock-doc-face ((t (:foreground "LightSalmon")))) + (font-lock-function-name-face ((t (:foreground "LightSkyBlue")))) + (font-lock-keyword-face ((t (:foreground "Cyan")))) + (font-lock-string-face ((t (:foreground "LightSalmon")))) + (font-lock-type-face ((t (:foreground "PaleGreen")))) + (font-lock-variable-name-face ((t (:foreground "LightGoldenrod")))) + (font-lock-warning-face ((t (:bold t :foreground "Pink" :weight bold)))) + (fringe ((t (:background "grey10")))) + (header-line ((t (:box (:line-width -1 :style released-button) :foreground "grey20" :background "grey90" :box nil)))) + (highlight ((t (:background "darkolivegreen")))) + (ibuffer-deletion-face ((t (:foreground "red")))) + (ibuffer-marked-face ((t (:foreground "green")))) + (isearch ((t (:background "palevioletred2" :foreground "brown4")))) + (isearch-lazy-highlight-face ((t (:background "paleturquoise4")))) + (italic ((t (:italic t :slant italic)))) + (menu ((t (nil)))) + (mode-line ((t (:foreground "yellow" :background "darkslateblue" :box (:line-width -1 :style released-button))))) + (mouse ((t (:background "white")))) + (region ((t (:background "blue")))) + (scroll-bar ((t (nil)))) + (secondary-selection ((t (:background "darkslateblue")))) + (show-block-face1 ((t (:background "gray10")))) + (show-block-face2 ((t (:background "gray15")))) + (show-block-face3 ((t (:background "gray20")))) + (show-block-face4 ((t (:background "gray25")))) + (show-block-face5 ((t (:background "gray30")))) + (show-block-face6 ((t (:background "gray35")))) + (show-block-face7 ((t (:background "gray40")))) + (show-block-face8 ((t (:background "gray45")))) + (show-block-face9 ((t (:background "gray50")))) + (show-paren-match-face ((t (:background "turquoise")))) + (show-paren-mismatch-face ((t (:background "purple" :foreground "white")))) + (tool-bar ((t (:background "grey75" :foreground "black" :box (:line-width 1 :style released-button))))) + (tooltip ((t (:background "lightyellow" :foreground "black")))) + (trailing-whitespace ((t (:background "red")))) + (underline ((t (:underline t)))) + (variable-pitch ((t (:family "helv")))) + (widget-button-face ((t (:bold t :weight bold)))) + (widget-button-pressed-face ((t (:foreground "red")))) + (widget-documentation-face ((t (:foreground "lime green")))) + (widget-field-face ((t (:background "dim gray")))) + (widget-inactive-face ((t (:foreground "light gray")))) + (widget-single-line-field-face ((t (:background "dim gray"))))))) + +(defun color-theme-andreas () + "Color theme by Andreas Busch, created 2003-02-06." + (interactive) + (color-theme-install + '(color-theme-andreas + ((background-mode . light) + (background-color . "white") + (background-toolbar-color . "#cccccccccccc") + (border-color . "#000000000000") + (bottom-toolbar-shadow-color . "#7a7a7a7a7a7a") + (foreground-color . "black") + (top-toolbar-shadow-color . "#f5f5f5f5f5f5")) + ((gnus-mouse-face . highlight) + (ispell-highlight-face . highlight)) + (default ((t (nil)))) + (OrangeRed ((t (nil)))) + (blue ((t (:foreground "blue")))) + (bold ((t (:bold t)))) + (bold-italic ((t (:italic t :bold t)))) + (border-glyph ((t (nil)))) + (calendar-today-face ((t (:underline t)))) + (color-mode-face-@ ((t (:foreground "orange")))) + (color-mode-face-a ((t (:foreground "blue")))) + (color-mode-face-b ((t (:foreground "red")))) + (color-mode-face-c ((t (:foreground "green3")))) + (color-mode-face-d ((t (:background "red" :foreground "white")))) + (color-mode-face-e ((t (:background "orange" :foreground "blue")))) + (color-mode-face-f ((t (:background "blue" :foreground "yellow")))) + (color-mode-face-g ((t (:background "lightblue" :foreground "brown")))) + (color-mode-face-h ((t (:background "brown" :foreground "white")))) + (custom-button-face ((t (:bold t)))) + (custom-changed-face ((t (:background "blue" :foreground "white")))) + (custom-documentation-face ((t (nil)))) + (custom-face-tag-face ((t (:underline t)))) + (custom-group-tag-face ((t (:underline t :foreground "blue")))) + (custom-group-tag-face-1 ((t (:underline t :foreground "red")))) + (custom-invalid-face ((t (:background "red" :foreground "yellow")))) + (custom-modified-face ((t (:background "blue" :foreground "white")))) + (custom-rogue-face ((t (:background "black" :foreground "pink")))) + (custom-saved-face ((t (:underline t)))) + (custom-set-face ((t (:background "white" :foreground "blue")))) + (custom-state-face ((t (:foreground "dark green")))) + (custom-variable-button-face ((t (:underline t :bold t :background "gray90")))) + (custom-variable-tag-face ((t (:underline t :background "gray95" :foreground "blue")))) + (diary-face ((t (:foreground "red")))) + (display-time-mail-balloon-enhance-face ((t (:background "orange")))) + (display-time-mail-balloon-gnus-group-face ((t (:foreground "blue")))) + (display-time-time-balloon-face ((t (:foreground "red")))) + (emacs-wiki-bad-link-face ((t (:bold t :foreground "red")))) + (emacs-wiki-link-face ((t (:bold t :foreground "green")))) + (font-lock-comment-face ((t (:foreground "orange1")))) + (font-lock-doc-string-face ((t (:foreground "green4")))) + (font-lock-function-name-face ((t (:foreground "blue3")))) + (font-lock-keyword-face ((t (:foreground "red1")))) + (font-lock-preprocessor-face ((t (:foreground "blue3")))) + (font-lock-reference-face ((t (:foreground "red3")))) + (font-lock-string-face ((t (:foreground "green4")))) + (font-lock-type-face ((t (:foreground "#6920ac")))) + (font-lock-variable-name-face ((t (:foreground "blue3")))) + (font-lock-warning-face ((t (:bold t :foreground "Red")))) + (gnu-cite-face-3 ((t (nil)))) + (gnu-cite-face-4 ((t (nil)))) + (gnus-cite-attribution-face ((t (:underline t)))) + (gnus-cite-face-1 ((t (:foreground "MidnightBlue")))) + (gnus-cite-face-10 ((t (:foreground "medium purple")))) + (gnus-cite-face-11 ((t (:foreground "turquoise")))) + (gnus-cite-face-2 ((t (:foreground "firebrick")))) + (gnus-cite-face-3 ((t (:foreground "dark green")))) + (gnus-cite-face-4 ((t (:foreground "OrangeRed")))) + (gnus-cite-face-5 ((t (:foreground "dark khaki")))) + (gnus-cite-face-6 ((t (:foreground "dark violet")))) + (gnus-cite-face-7 ((t (:foreground "SteelBlue4")))) + (gnus-cite-face-8 ((t (:foreground "magenta")))) + (gnus-cite-face-9 ((t (:foreground "violet")))) + (gnus-emphasis-bold ((t (:bold t)))) + (gnus-emphasis-bold-italic ((t (:italic t :bold t)))) + (gnus-emphasis-italic ((t (:italic t)))) + (gnus-emphasis-underline ((t (:underline t)))) + (gnus-emphasis-underline-bold ((t (:underline t :bold t)))) + (gnus-emphasis-underline-bold-italic ((t (:underline t :italic t :bold t)))) + (gnus-emphasis-underline-italic ((t (:underline t :italic t)))) + (gnus-group-mail-1-empty-face ((t (:foreground "DeepPink3")))) + (gnus-group-mail-1-face ((t (:bold t :foreground "DeepPink3")))) + (gnus-group-mail-2-empty-face ((t (:foreground "HotPink3")))) + (gnus-group-mail-2-face ((t (:bold t :foreground "HotPink3")))) + (gnus-group-mail-3-empty-face ((t (:foreground "magenta4")))) + (gnus-group-mail-3-face ((t (:bold t :foreground "magenta4")))) + (gnus-group-mail-low-empty-face ((t (:foreground "DeepPink4")))) + (gnus-group-mail-low-face ((t (:bold t :foreground "DeepPink4")))) + (gnus-group-news-1-empty-face ((t (:foreground "ForestGreen")))) + (gnus-group-news-1-face ((t (:bold t :foreground "ForestGreen")))) + (gnus-group-news-2-empty-face ((t (:foreground "CadetBlue4")))) + (gnus-group-news-2-face ((t (:bold t :foreground "CadetBlue4")))) + (gnus-group-news-3-empty-face ((t (nil)))) + (gnus-group-news-3-face ((t (:bold t)))) + (gnus-group-news-4-empty-face ((t (nil)))) + (gnus-group-news-4-face ((t (:bold t)))) + (gnus-group-news-5-empty-face ((t (nil)))) + (gnus-group-news-5-face ((t (:bold t)))) + (gnus-group-news-6-empty-face ((t (nil)))) + (gnus-group-news-6-face ((t (:bold t)))) + (gnus-group-news-low-empty-face ((t (:foreground "DarkGreen")))) + (gnus-group-news-low-face ((t (:bold t :foreground "DarkGreen")))) + (gnus-header-content-face ((t (:italic t :foreground "indianred4")))) + (gnus-header-from-face ((t (:bold t :foreground "red3")))) + (gnus-header-name-face ((t (:foreground "maroon")))) + (gnus-header-newsgroups-face ((t (:italic t :bold t :foreground "MidnightBlue")))) + (gnus-header-subject-face ((t (:bold t :foreground "red4")))) + (gnus-splash-face ((t (:foreground "red")))) + (gnus-summary-cancelled-face ((t (:background "black" :foreground "yellow")))) + (gnus-summary-high-ancient-face ((t (:bold t :foreground "RoyalBlue")))) + (gnus-summary-high-read-face ((t (:bold t :foreground "DarkGreen")))) + (gnus-summary-high-ticked-face ((t (:bold t :foreground "DarkRed")))) + (gnus-summary-high-unread-face ((t (:bold t)))) + (gnus-summary-low-ancient-face ((t (:italic t :foreground "RoyalBlue")))) + (gnus-summary-low-read-face ((t (:italic t :foreground "DarkGreen")))) + (gnus-summary-low-ticked-face ((t (:italic t :foreground "firebrick")))) + (gnus-summary-low-unread-face ((t (:italic t)))) + (gnus-summary-normal-ancient-face ((t (:foreground "RoyalBlue")))) + (gnus-summary-normal-read-face ((t (:foreground "DarkGreen")))) + (gnus-summary-normal-ticked-face ((t (:foreground "Red")))) + (gnus-summary-normal-unread-face ((t (nil)))) + (gnus-summary-selected-face ((t (:underline t)))) + (gnus-x-face ((t (nil)))) + (green ((t (:foreground "green")))) + (gui-button-face ((t (:background "grey75")))) + (gui-element ((t (:background "Gray80")))) + (highlight ((t (nil)))) + (holiday-face ((t (:background "pink")))) + (hyper-apropos-documentation ((t (:foreground "darkred")))) + (hyper-apropos-heading ((t (:bold t)))) + (hyper-apropos-hyperlink ((t (:foreground "blue4")))) + (hyper-apropos-major-heading ((t (:bold t)))) + (hyper-apropos-section-heading ((t (:italic t :bold t)))) + (hyper-apropos-warning ((t (:bold t :foreground "red")))) + (info-node ((t (:italic t :bold t)))) + (info-xref ((t (:bold t)))) + (isearch ((t (:background "yellow" :foreground "red")))) + (italic ((t (:italic t)))) + (kai-gnus-cite-face-1 ((t (:foreground "LightCyan4")))) + (kai-gnus-cite-face-2 ((t (:foreground "LightSkyBlue2")))) + (kai-gnus-cite-face-3 ((t (:foreground "DodgerBlue3")))) + (kai-gnus-group-mail-face ((t (:foreground "darkslategrey")))) + (kai-gnus-group-nonempty-mail-face ((t (:foreground "DarkRed")))) + (kai-gnus-group-starred-face ((t (:foreground "grey50")))) + (left-margin ((t (nil)))) + (list-mode-item-selected ((t (:background "gray68")))) + (message-cited-text ((t (:italic t)))) + (message-cited-text-face ((t (:foreground "red")))) + (message-header-cc-face ((t (:foreground "MidnightBlue")))) + (message-header-contents ((t (:italic t)))) + (message-header-name-face ((t (:foreground "cornflower blue")))) + (message-header-newsgroups-face ((t (:italic t :bold t :foreground "blue4")))) + (message-header-other-face ((t (:foreground "steel blue")))) + (message-header-subject-face ((t (:bold t :foreground "navy blue")))) + (message-header-to-face ((t (:bold t :foreground "MidnightBlue")))) + (message-header-xheader-face ((t (:foreground "blue")))) + (message-headers ((t (:bold t)))) + (message-highlighted-header-contents ((t (:italic t :bold t)))) + (message-mml-face ((t (:foreground "ForestGreen")))) + (message-separator-face ((t (:foreground "brown")))) + (modeline ((t (:background "Gray75" :foreground "Black")))) + (modeline-buffer-id ((t (:background "Gray75" :foreground "blue4")))) + (modeline-mousable ((t (:background "Gray75" :foreground "firebrick")))) + (modeline-mousable-minor-mode ((t (:background "Gray75" :foreground "green4")))) + (paren-blink-off ((t (:foreground "gray80")))) + (paren-match ((t (:background "red" :foreground "white")))) + (paren-mismatch ((t (:background "DeepPink")))) + (pointer ((t (:foreground "blue")))) + (primary-selection ((t (:background "gray65")))) + (red ((t (:foreground "red")))) + (region ((t (:background "gray75")))) + (right-margin ((t (nil)))) + (secondary-selection ((t (:background "paleturquoise")))) + (text-cursor ((t (:background "red" :foreground "LightYellow1")))) + (toolbar ((t (:background "Gray80")))) + (underline ((t (:underline t)))) + (vertical-divider ((t (:background "Gray80")))) + (widget-button-face ((t (:bold t)))) + (widget-button-pressed-face ((t (:foreground "red")))) + (widget-documentation-face ((t (:foreground "dark green")))) + (widget-field-face ((t (:background "gray85")))) + (widget-inactive-face ((t (:foreground "dim gray")))) + (x-face ((t (:background "white")))) + (yellow ((t (:foreground "yellow")))) + (zmacs-region ((t (:background "gray65" :foreground "yellow"))))))) + +(defun color-theme-charcoal-black () + "Color theme by Lars Chr. Hausmann, created 2003-03-24." + (interactive) + (color-theme-install + '(color-theme-charcoal-black + ((background-color . "Grey15") + (background-mode . dark) + (border-color . "Grey") + (cursor-color . "Grey") + (foreground-color . "Grey") + (mouse-color . "Grey")) + ((display-time-mail-face . mode-line) + (gnus-article-button-face . bold) + (gnus-article-mouse-face . highlight) + (gnus-mouse-face . highlight) + (gnus-server-agent-face . gnus-server-agent-face) + (gnus-server-closed-face . gnus-server-closed-face) + (gnus-server-denied-face . gnus-server-denied-face) + (gnus-server-offline-face . gnus-server-offline-face) + (gnus-server-opened-face . gnus-server-opened-face) + (gnus-signature-face . gnus-signature-face) + (gnus-summary-selected-face . gnus-summary-selected-face) + (help-highlight-face . underline) + (list-matching-lines-face . bold) + (mime-button-face . bold) + (mime-button-mouse-face . highlight) + (sgml-set-face . t) + (tags-tag-face . default) + (view-highlight-face . highlight) + (widget-mouse-face . highlight)) + (default ((t (:stipple nil :background "Grey15" :foreground "Grey" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height 87 :width semi-condensed :family "misc-fixed")))) + (Info-title-1-face ((t (:bold t :weight bold :family "helv" :height 1.728)))) + (Info-title-2-face ((t (:bold t :family "helv" :weight bold :height 1.44)))) + (Info-title-3-face ((t (:bold t :weight bold :family "helv" :height 1.2)))) + (Info-title-4-face ((t (:bold t :family "helv" :weight bold)))) + (bg:erc-color-face0 ((t (nil)))) + (bg:erc-color-face1 ((t (nil)))) + (bg:erc-color-face10 ((t (nil)))) + (bg:erc-color-face11 ((t (nil)))) + (bg:erc-color-face12 ((t (nil)))) + (bg:erc-color-face13 ((t (nil)))) + (bg:erc-color-face14 ((t (nil)))) + (bg:erc-color-face15 ((t (nil)))) + (bg:erc-color-face2 ((t (nil)))) + (bg:erc-color-face3 ((t (nil)))) + (bg:erc-color-face4 ((t (nil)))) + (bg:erc-color-face5 ((t (nil)))) + (bg:erc-color-face6 ((t (nil)))) + (bg:erc-color-face7 ((t (nil)))) + (bg:erc-color-face8 ((t (nil)))) + (bg:erc-color-face9 ((t (nil)))) + (bold ((t (:bold t :weight bold)))) + (bold-italic ((t (:bold t :foreground "beige" :weight bold)))) + (border ((t (:background "Grey")))) + (calendar-today-face ((t (:underline t)))) + (comint-highlight-input ((t (:bold t :weight bold)))) + (comint-highlight-prompt ((t (:foreground "cyan")))) + (cperl-array-face ((t (:bold t :foreground "light salmon" :weight bold)))) + (cperl-hash-face ((t (:italic t :bold t :foreground "beige" :slant italic :weight bold)))) + (cperl-nonoverridable-face ((t (:foreground "aquamarine")))) + (cursor ((t (:background "Grey")))) + (custom-button-face ((t (:foreground "gainsboro")))) + (custom-button-pressed-face ((t (:background "lightgrey" :foreground "black" :box (:line-width 2 :style pressed-button))))) + (custom-changed-face ((t (:background "blue" :foreground "white")))) + (custom-comment-face ((t (:background "dim gray")))) + (custom-comment-tag-face ((t (:foreground "gray80")))) + (custom-documentation-face ((t (:foreground "light blue")))) + (custom-face-tag-face ((t (:underline t)))) + (custom-group-tag-face ((t (:bold t :foreground "pale turquoise" :weight bold)))) + (custom-group-tag-face-1 ((t (:foreground "pale turquoise" :underline t)))) + (custom-invalid-face ((t (:background "red" :foreground "yellow")))) + (custom-modified-face ((t (:background "blue" :foreground "white")))) + (custom-rogue-face ((t (:background "black" :foreground "pink")))) + (custom-saved-face ((t (:underline t)))) + (custom-set-face ((t (:background "white" :foreground "blue")))) + (custom-state-face ((t (:foreground "light salmon")))) + (custom-variable-button-face ((t (:bold t :underline t :weight bold)))) + (custom-variable-tag-face ((t (:bold t :foreground "turquoise" :weight bold)))) + (diary-face ((t (:foreground "red")))) + (dired-face-directory ((t (:bold t :foreground "sky blue" :weight bold)))) + (dired-face-executable ((t (:foreground "green yellow")))) + (dired-face-flagged ((t (:foreground "tomato")))) + (dired-face-marked ((t (:foreground "light salmon")))) + (dired-face-permissions ((t (:foreground "aquamarine")))) + (erc-action-face ((t (nil)))) + (erc-bold-face ((t (:bold t :weight bold)))) + (erc-default-face ((t (nil)))) + (erc-direct-msg-face ((t (:foreground "pale green")))) + (erc-error-face ((t (:bold t :foreground "IndianRed" :weight bold)))) + (erc-highlight-face ((t (:bold t :foreground "pale green" :weight bold)))) + (erc-input-face ((t (:foreground "light blue")))) + (erc-inverse-face ((t (:background "steel blue")))) + (erc-notice-face ((t (:foreground "light salmon")))) + (erc-pal-face ((t (:foreground "pale green")))) + (erc-prompt-face ((t (:bold t :foreground "light blue" :weight bold)))) + (eshell-ls-archive-face ((t (:bold t :foreground "medium purple" :weight bold)))) + (eshell-ls-backup-face ((t (:foreground "dim gray")))) + (eshell-ls-clutter-face ((t (:foreground "dim gray")))) + (eshell-ls-directory-face ((t (:bold t :foreground "medium slate blue" :weight bold)))) + (eshell-ls-executable-face ((t (:bold t :foreground "aquamarine" :weight bold)))) + (eshell-ls-missing-face ((t (:foreground "black")))) + (eshell-ls-picture-face ((t (:foreground "violet")))) + (eshell-ls-product-face ((t (:foreground "light steel blue")))) + (eshell-ls-readonly-face ((t (:foreground "aquamarine")))) + (eshell-ls-special-face ((t (:foreground "gold")))) + (eshell-ls-symlink-face ((t (:foreground "white")))) + (eshell-ls-unreadable-face ((t (:foreground "dim gray")))) + (eshell-prompt-face ((t (:bold t :foreground "light sky blue" :weight bold)))) + (excerpt ((t (:italic t :slant italic)))) + (fg:erc-color-face0 ((t (:foreground "white")))) + (fg:erc-color-face1 ((t (:foreground "beige")))) + (fg:erc-color-face10 ((t (:foreground "pale goldenrod")))) + (fg:erc-color-face11 ((t (:foreground "light goldenrod yellow")))) + (fg:erc-color-face12 ((t (:foreground "light yellow")))) + (fg:erc-color-face13 ((t (:foreground "yellow")))) + (fg:erc-color-face14 ((t (:foreground "light goldenrod")))) + (fg:erc-color-face15 ((t (:foreground "lime green")))) + (fg:erc-color-face2 ((t (:foreground "lemon chiffon")))) + (fg:erc-color-face3 ((t (:foreground "light cyan")))) + (fg:erc-color-face4 ((t (:foreground "powder blue")))) + (fg:erc-color-face5 ((t (:foreground "sky blue")))) + (fg:erc-color-face6 ((t (:foreground "dark sea green")))) + (fg:erc-color-face7 ((t (:foreground "pale green")))) + (fg:erc-color-face8 ((t (:foreground "medium spring green")))) + (fg:erc-color-face9 ((t (:foreground "khaki")))) + (fixed ((t (:bold t :weight bold)))) + (fixed-pitch ((t (:family "courier")))) + (flyspell-duplicate-face ((t (:bold t :foreground "Gold3" :underline t :weight bold)))) + (flyspell-incorrect-face ((t (:bold t :foreground "OrangeRed" :underline t :weight bold)))) + (font-lock-builtin-face ((t (:foreground "aquamarine")))) + (font-lock-comment-face ((t (:foreground "light blue")))) + (font-lock-constant-face ((t (:foreground "pale green")))) + (font-lock-doc-face ((t (:foreground "light sky blue")))) + (font-lock-doc-string-face ((t (:foreground "sky blue")))) + (font-lock-function-name-face ((t (:bold t :foreground "aquamarine" :weight bold)))) + (font-lock-keyword-face ((t (:bold t :foreground "pale turquoise" :weight bold)))) + (font-lock-reference-face ((t (:foreground "pale green")))) + (font-lock-string-face ((t (:foreground "light sky blue")))) + (font-lock-type-face ((t (:bold t :foreground "sky blue" :weight bold)))) + (font-lock-variable-name-face ((t (:bold t :foreground "turquoise" :weight bold)))) + (font-lock-warning-face ((t (:bold t :foreground "Red" :weight bold)))) + (fringe ((t (:background "Grey15")))) + (gnus-cite-face-1 ((t (:foreground "LightSalmon")))) + (gnus-cite-face-2 ((t (:foreground "Khaki")))) + (gnus-cite-face-3 ((t (:foreground "Coral")))) + (gnus-cite-face-4 ((t (:foreground "yellow green")))) + (gnus-cite-face-5 ((t (:foreground "dark khaki")))) + (gnus-cite-face-6 ((t (:foreground "bisque")))) + (gnus-cite-face-7 ((t (:foreground "peru")))) + (gnus-cite-face-8 ((t (:foreground "light coral")))) + (gnus-cite-face-9 ((t (:foreground "plum")))) + (gnus-emphasis-bold ((t (:bold t :weight bold)))) + (gnus-emphasis-bold-italic ((t (:italic t :bold t :slant italic :weight bold)))) + (gnus-emphasis-highlight-words ((t (:background "black" :foreground "yellow")))) + (gnus-emphasis-italic ((t (:italic t :slant italic)))) + (gnus-emphasis-strikethru ((t (nil)))) + (gnus-emphasis-underline ((t (:underline t)))) + (gnus-emphasis-underline-bold ((t (:bold t :underline t :weight bold)))) + (gnus-emphasis-underline-bold-italic ((t (:italic t :bold t :underline t :slant italic :weight bold)))) + (gnus-emphasis-underline-italic ((t (:italic t :underline t :slant italic)))) + (gnus-group-mail-1-empty-face ((t (:foreground "White")))) + (gnus-group-mail-1-face ((t (:bold t :foreground "White" :weight bold)))) + (gnus-group-mail-2-empty-face ((t (:foreground "light cyan")))) + (gnus-group-mail-2-face ((t (:bold t :foreground "light cyan" :weight bold)))) + (gnus-group-mail-3-empty-face ((t (:foreground "LightBlue")))) + (gnus-group-mail-3-face ((t (:bold t :foreground "LightBlue" :weight bold)))) + (gnus-group-mail-low-empty-face ((t (:foreground "Aquamarine")))) + (gnus-group-mail-low-face ((t (:bold t :foreground "Aquamarine" :weight bold)))) + (gnus-group-news-1-empty-face ((t (:foreground "White")))) + (gnus-group-news-1-face ((t (:bold t :foreground "White" :weight bold)))) + (gnus-group-news-2-empty-face ((t (:foreground "light cyan")))) + (gnus-group-news-2-face ((t (:bold t :foreground "light cyan" :weight bold)))) + (gnus-group-news-3-empty-face ((t (:foreground "LightBlue")))) + (gnus-group-news-3-face ((t (:bold t :foreground "LightBlue" :weight bold)))) + (gnus-group-news-4-empty-face ((t (:foreground "Aquamarine")))) + (gnus-group-news-4-face ((t (:bold t :foreground "Aquamarine" :weight bold)))) + (gnus-group-news-5-empty-face ((t (:foreground "MediumAquamarine")))) + (gnus-group-news-5-face ((t (:bold t :foreground "MediumAquamarine" :weight bold)))) + (gnus-group-news-6-empty-face ((t (:foreground "MediumAquamarine")))) + (gnus-group-news-6-face ((t (:bold t :foreground "MediumAquamarine" :weight bold)))) + (gnus-group-news-low-empty-face ((t (:foreground "MediumAquamarine")))) + (gnus-group-news-low-face ((t (:bold t :foreground "MediumAquamarine" :weight bold)))) + (gnus-header-content-face ((t (:foreground "LightSkyBlue3")))) + (gnus-header-from-face ((t (:bold t :foreground "light cyan" :weight bold)))) + (gnus-header-name-face ((t (:bold t :foreground "LightBlue" :weight bold)))) + (gnus-header-newsgroups-face ((t (:italic t :bold t :foreground "MediumAquamarine" :slant italic :weight bold)))) + (gnus-header-subject-face ((t (:bold t :foreground "light cyan" :weight bold)))) + (gnus-server-agent-face ((t (:bold t :foreground "PaleTurquoise" :weight bold)))) + (gnus-server-closed-face ((t (:italic t :foreground "Light Steel Blue" :slant italic)))) + (gnus-server-denied-face ((t (:bold t :foreground "Pink" :weight bold)))) + (gnus-server-offline-face ((t (:bold t :foreground "Yellow" :weight bold)))) + (gnus-server-opened-face ((t (:bold t :foreground "Green1" :weight bold)))) + (gnus-signature-face ((t (:foreground "Grey")))) + (gnus-splash-face ((t (:foreground "ForestGreen")))) + (gnus-summary-cancelled-face ((t (:background "Black" :foreground "Yellow")))) + (gnus-summary-high-ancient-face ((t (:bold t :foreground "MediumAquamarine" :weight bold)))) + (gnus-summary-high-read-face ((t (:bold t :foreground "Aquamarine" :weight bold)))) + (gnus-summary-high-ticked-face ((t (:bold t :foreground "LightSalmon" :weight bold)))) + (gnus-summary-high-unread-face ((t (:italic t :bold t :foreground "beige" :slant italic :weight bold)))) + (gnus-summary-low-ancient-face ((t (:italic t :foreground "DimGray" :slant italic)))) + (gnus-summary-low-read-face ((t (:foreground "slate gray")))) + (gnus-summary-low-ticked-face ((t (:foreground "Pink")))) + (gnus-summary-low-unread-face ((t (:foreground "LightGray")))) + (gnus-summary-normal-ancient-face ((t (:foreground "MediumAquamarine")))) + (gnus-summary-normal-read-face ((t (:foreground "Aquamarine")))) + (gnus-summary-normal-ticked-face ((t (:foreground "LightSalmon")))) + (gnus-summary-normal-unread-face ((t (nil)))) + (gnus-summary-selected-face ((t (:underline t)))) + (header-line ((t (:box (:line-width -1 :style released-button) :background "grey20" :foreground "grey90" :box nil)))) + (highlight ((t (:background "dark slate blue" :foreground "light blue")))) + (highline-face ((t (:background "DeepSkyBlue4")))) + (holiday-face ((t (:background "pink")))) + (info-header-node ((t (:bold t :weight bold)))) + (info-header-xref ((t (:bold t :weight bold :foreground "sky blue")))) + (info-menu-5 ((t (:underline t)))) + (info-menu-header ((t (:bold t :family "helv" :weight bold)))) + (info-node ((t (:bold t :weight bold)))) + (info-xref ((t (:bold t :foreground "sky blue" :weight bold)))) + (isearch ((t (:background "slate blue")))) + (isearch-lazy-highlight-face ((t (:background "paleturquoise4")))) + (italic ((t (:foreground "sky blue")))) + (jde-bug-breakpoint-cursor ((t (:background "brown" :foreground "cyan")))) + (jde-bug-breakpoint-marker ((t (:background "yellow" :foreground "red")))) + (jde-java-font-lock-api-face ((t (:foreground "light goldenrod")))) + (jde-java-font-lock-bold-face ((t (:bold t :weight bold)))) + (jde-java-font-lock-code-face ((t (nil)))) + (jde-java-font-lock-constant-face ((t (:foreground "Aquamarine")))) + (jde-java-font-lock-doc-tag-face ((t (:foreground "light coral")))) + (jde-java-font-lock-italic-face ((t (:italic t :slant italic)))) + (jde-java-font-lock-link-face ((t (:foreground "blue" :underline t :slant normal)))) + (jde-java-font-lock-modifier-face ((t (:foreground "LightSteelBlue")))) + (jde-java-font-lock-number-face ((t (:foreground "LightSalmon")))) + (jde-java-font-lock-package-face ((t (:foreground "steelblue1")))) + (jde-java-font-lock-pre-face ((t (nil)))) + (jde-java-font-lock-underline-face ((t (:underline t)))) + (makefile-space-face ((t (:background "hotpink")))) + (menu ((t (:background "MidnightBlue" :foreground "Grey")))) + (message-cited-text-face ((t (:foreground "LightSalmon")))) + (message-header-cc-face ((t (:foreground "light cyan")))) + (message-header-name-face ((t (:foreground "LightBlue")))) + (message-header-newsgroups-face ((t (:italic t :bold t :foreground "MediumAquamarine" :slant italic :weight bold)))) + (message-header-other-face ((t (:foreground "MediumAquamarine")))) + (message-header-subject-face ((t (:bold t :foreground "light cyan" :weight bold)))) + (message-header-to-face ((t (:bold t :foreground "light cyan" :weight bold)))) + (message-header-xheader-face ((t (:foreground "MediumAquamarine")))) + (message-mml-face ((t (:foreground "ForestGreen")))) + (message-separator-face ((t (:foreground "chocolate")))) + (mode-line ((t (:background "grey75" :foreground "black" :box (:line-width -1 :style released-button))))) + (mouse ((t (:background "Grey")))) + (region ((t (:background "DarkSlateBlue")))) + (scroll-bar ((t (:background "grey75")))) + (secondary-selection ((t (:background "steel blue")))) + (semantic-dirty-token-face ((t (:background "gray10")))) + (semantic-unmatched-syntax-face ((t (:underline "red")))) + (show-paren-match-face ((t (:background "light slate blue" :foreground "white")))) + (show-paren-mismatch-face ((t (:background "red" :foreground "white")))) + (speedbar-button-face ((t (:foreground "seashell2")))) + (speedbar-directory-face ((t (:foreground "seashell3")))) + (speedbar-file-face ((t (:foreground "seashell4")))) + (speedbar-highlight-face ((t (:background "dark slate blue" :foreground "wheat")))) + (speedbar-selected-face ((t (:foreground "seashell1" :underline t)))) + (speedbar-separator-face ((t (:background "blue" :foreground "white" :overline "gray")))) + (speedbar-tag-face ((t (:foreground "antique white")))) + (tool-bar ((t (:background "grey75" :foreground "black" :box (:line-width 1 :style released-button))))) + (tooltip ((t (:background "lightyellow" :foreground "black")))) + (trailing-whitespace ((t (:background "red")))) + (underline ((t (:underline t)))) + (variable-pitch ((t (:family "helv")))) + (widget-button-face ((t (:bold t :weight bold)))) + (widget-button-pressed-face ((t (:foreground "red")))) + (widget-documentation-face ((t (:foreground "light blue")))) + (widget-field-face ((t (:background "RoyalBlue4" :foreground "wheat")))) + (widget-inactive-face ((t (:foreground "dim gray")))) + (widget-single-line-field-face ((t (:background "slate blue" :foreground "wheat")))) + (woman-bold-face ((t (:bold t :foreground "sky blue" :weight bold)))) + (woman-italic-face ((t (:foreground "deep sky blue")))) + (woman-unknown-face ((t (:foreground "LightSalmon")))) + (zmacs-region ((t (:background "DarkSlateBlue"))))))) + +(defun color-theme-vim-colors () + "Color theme by Michael Soulier, created 2003-03-26." + (interactive) + (color-theme-install + '(color-theme-vim-colors + ((background-color . "#ffffff") + (background-mode . light) + (border-color . "black") + (cursor-color . "#000000") + (foreground-color . "#000000") + (mouse-color . "#000000")) + ((Man-overstrike-face . bold) + (Man-underline-face . underline) + (apropos-keybinding-face . underline) + (apropos-label-face . italic) + (apropos-match-face . secondary-selection) + (apropos-property-face . bold-italic) + (apropos-symbol-face . bold) + (cperl-here-face . font-lock-string-face) + (cperl-invalid-face quote underline) + (cperl-pod-face . font-lock-comment-face) + (cperl-pod-head-face . font-lock-variable-name-face) + (help-highlight-face . underline) + (ispell-highlight-face . highlight) + (list-matching-lines-face . bold) + (rpm-spec-dir-face . rpm-spec-dir-face) + (rpm-spec-doc-face . rpm-spec-doc-face) + (rpm-spec-ghost-face . rpm-spec-ghost-face) + (rpm-spec-macro-face . rpm-spec-macro-face) + (rpm-spec-package-face . rpm-spec-package-face) + (rpm-spec-tag-face . rpm-spec-tag-face) + (tags-tag-face . default) + (view-highlight-face . highlight) + (widget-mouse-face . highlight)) + (default ((t (:background "#ffffff" :foreground "#000000")))) + (Info-title-1-face ((t (nil)))) + (Info-title-2-face ((t (nil)))) + (Info-title-3-face ((t (nil)))) + (Info-title-4-face ((t (:bold (bold extra-bold ultra-bold))))) + (bold ((t (:bold (bold extra-bold ultra-bold))))) + (bold-italic ((t (:italic (italic oblique) :bold (bold extra-bold ultra-bold))))) + (border ((t (:background "black")))) + (comint-highlight-input ((t (:bold (bold extra-bold ultra-bold))))) + (comint-highlight-prompt ((t (:foreground "dark blue")))) + (cperl-array-face ((t (:foreground "brown")))) + (cperl-hash-face ((t (:foreground "red")))) + (cperl-nonoverridable-face ((t (:foreground "#008b8b")))) + (cursor ((t (:background "#000000")))) + (fixed-pitch ((t (nil)))) + (font-lock-builtin-face ((t (:foreground "purple")))) + (font-lock-comment-face ((t (:foreground "blue")))) + (font-lock-constant-face ((t (:foreground "green4")))) + (font-lock-doc-face ((t (:background "#f2f2f2")))) + (font-lock-function-name-face ((t (:foreground "#008b8b")))) + (font-lock-keyword-face ((t (:bold (bold extra-bold ultra-bold) :foreground "#a52a2a")))) + (font-lock-string-face ((t (:background "#f2f2f2" :foreground "#ff00ff")))) + (font-lock-type-face ((t (:foreground "ForestGreen")))) + (font-lock-variable-name-face ((t (:foreground "#008b8b")))) + (font-lock-warning-face ((t (:bold (bold extra-bold ultra-bold) :foreground "Red")))) + (fringe ((t (:background "#e5e5e5")))) + (header-line ((t (:background "grey90" :foreground "grey20")))) + (highlight ((t (:background "darkseagreen2")))) + (info-header-node ((t (nil)))) + (info-header-xref ((t (nil)))) + (info-menu-5 ((t (:foreground "red1")))) + (info-menu-header ((t (:bold (bold extra-bold ultra-bold))))) + (info-node ((t (:italic (italic oblique) :bold (bold extra-bold ultra-bold) :foreground "brown")))) + (info-xref ((t (:bold (bold extra-bold ultra-bold) :foreground "magenta4")))) + (isearch ((t (:background "magenta4" :foreground "lightskyblue1")))) + (isearch-lazy-highlight-face ((t (:background "paleturquoise")))) + (italic ((t (:italic (italic oblique))))) + (menu ((t (nil)))) + (mode-line ((t (:background "grey75" :foreground "black")))) + (mouse ((t (:background "#000000")))) + (region ((t (:background "lightgoldenrod2")))) + (rpm-spec-dir-face ((t (:foreground "green")))) + (rpm-spec-doc-face ((t (:foreground "magenta")))) + (rpm-spec-ghost-face ((t (:foreground "red")))) + (rpm-spec-macro-face ((t (:foreground "purple")))) + (rpm-spec-package-face ((t (:foreground "red")))) + (rpm-spec-tag-face ((t (:foreground "blue")))) + (scroll-bar ((t (:background "grey75" :foreground "#000000")))) + (secondary-selection ((t (:background "yellow")))) + (sh-heredoc-face ((t (:foreground "tan")))) + (show-paren-match-face ((t (:background "turquoise")))) + (show-paren-mismatch-face ((t (:background "purple" :foreground "white")))) + (tool-bar ((t (:background "grey75" :foreground "black")))) + (tooltip ((t (:background "lightyellow" :foreground "black")))) + (trailing-whitespace ((t (:background "red")))) + (underline ((t (:underline t)))) + (variable-pitch ((t (nil)))) + (widget-button-face ((t (:bold (bold extra-bold ultra-bold))))) + (widget-button-pressed-face ((t (:foreground "red")))) + (widget-documentation-face ((t (:foreground "dark green")))) + (widget-field-face ((t (:background "gray85")))) + (widget-inactive-face ((t (:foreground "dim gray")))) + (widget-single-line-field-face ((t (:background "gray85"))))))) + +(defun color-theme-calm-forest () + "Color theme by Artur Hefczyc, created 2003-04-18." + (interactive) + (color-theme-install + '(color-theme-calm-forest + ((background-color . "gray12") + (background-mode . dark) + (border-color . "black") + (cursor-color . "orange") + (foreground-color . "green") + (mouse-color . "yellow")) + ((help-highlight-face . underline) + (list-matching-lines-face . bold) + (senator-eldoc-use-color . t) + (view-highlight-face . highlight) + (widget-mouse-face . highlight)) + (default ((t (:stipple nil :background "gray12" :foreground "green" :inverse-video nil :box nil +:strike-through nil :overline nil :underline nil :slant normal :weight normal :height 98 :width +normal :family "outline-courier new")))) + (Info-title-1-face ((t (:bold t :weight bold :family "helv" :height 1.728)))) + (Info-title-2-face ((t (:bold t :family "helv" :weight bold :height 1.44)))) + (Info-title-3-face ((t (:bold t :weight bold :family "helv" :height 1.2)))) + (Info-title-4-face ((t (:bold t :family "helv" :weight bold)))) + (bold ((t (:bold t :weight bold)))) + (bold-italic ((t (:italic t :bold t :slant italic :weight bold)))) + (border ((t (:background "black")))) + (comint-highlight-input ((t (:bold t :weight bold)))) + (comint-highlight-prompt ((t (:foreground "cyan")))) + (cparen-around-andor-face ((t (:bold t :foreground "maroon" :weight bold)))) + (cparen-around-begin-face ((t (:foreground "maroon")))) + (cparen-around-conditional-face ((t (:bold t :foreground "RoyalBlue" :weight bold)))) + (cparen-around-define-face ((t (:bold t :foreground "Blue" :weight bold)))) + (cparen-around-lambda-face ((t (:foreground "LightSeaGreen")))) + (cparen-around-letdo-face ((t (:bold t :foreground "LightSeaGreen" :weight bold)))) + (cparen-around-quote-face ((t (:foreground "SaddleBrown")))) + (cparen-around-set!-face ((t (:foreground "OrangeRed")))) + (cparen-around-syntax-rules-face ((t (:foreground "Magenta")))) + (cparen-around-vector-face ((t (:foreground "chocolate")))) + (cparen-binding-face ((t (:foreground "ForestGreen")))) + (cparen-binding-list-face ((t (:bold t :foreground "ForestGreen" :weight bold)))) + (cparen-conditional-clause-face ((t (:foreground "RoyalBlue")))) + (cparen-normal-paren-face ((t (:foreground "grey50")))) + (cursor ((t (:background "orange")))) + (custom-button-face ((t (:background "lightgrey" :foreground "black" :box (:line-width 2 :style +released-button))))) + (custom-button-pressed-face ((t (:background "lightgrey" :foreground "black" :box (:line-width +2 :style pressed-button))))) + (custom-changed-face ((t (:background "blue" :foreground "white")))) + (custom-comment-face ((t (:background "dim gray")))) + (custom-comment-tag-face ((t (:foreground "gray80")))) + (custom-documentation-face ((t (nil)))) + (custom-face-tag-face ((t (:bold t :family "helv" :weight bold :height 1.2)))) + (custom-group-tag-face ((t (:bold t :foreground "light blue" :weight bold :height 1.2)))) + (custom-group-tag-face-1 ((t (:bold t :family "helv" :foreground "pink" :weight bold :height +1.2)))) + (custom-invalid-face ((t (:background "red" :foreground "yellow")))) + (custom-modified-face ((t (:background "blue" :foreground "white")))) + (custom-rogue-face ((t (:background "black" :foreground "pink")))) + (custom-saved-face ((t (:underline t)))) + (custom-set-face ((t (:background "white" :foreground "blue")))) + (custom-state-face ((t (:foreground "lime green")))) + (custom-variable-button-face ((t (:bold t :underline t :weight bold)))) + (custom-variable-tag-face ((t (:bold t :family "helv" :foreground "light blue" :weight bold +:height 1.2)))) + (eieio-custom-slot-tag-face ((t (:foreground "light blue")))) + (extra-whitespace-face ((t (:background "pale green")))) + (fixed-pitch ((t (:family "courier")))) + (font-latex-bold-face ((t (:bold t :foreground "OliveDrab" :weight bold)))) + (font-latex-italic-face ((t (:italic t :foreground "OliveDrab" :slant italic)))) + (font-latex-math-face ((t (:foreground "burlywood")))) + (font-latex-sedate-face ((t (:foreground "LightGray")))) + (font-latex-string-face ((t (:foreground "RosyBrown")))) + (font-latex-warning-face ((t (:bold t :foreground "Red" :weight bold)))) + (font-lock-builtin-face ((t (:foreground "LightSteelBlue")))) + (font-lock-comment-face ((t (:foreground "chocolate1")))) + (font-lock-constant-face ((t (:foreground "Aquamarine")))) + (font-lock-doc-face ((t (:foreground "LightSalmon")))) + (font-lock-function-name-face ((t (:foreground "LightSkyBlue")))) + (font-lock-keyword-face ((t (:foreground "Cyan")))) + (font-lock-string-face ((t (:foreground "LightSalmon")))) + (font-lock-type-face ((t (:foreground "PaleGreen")))) + (font-lock-variable-name-face ((t (:foreground "LightGoldenrod")))) + (font-lock-warning-face ((t (:bold t :foreground "Pink" :weight bold)))) + (fringe ((t (:background "grey10")))) + (header-line ((t (:box (:line-width -1 :style released-button) :background "grey20" :foreground +"grey90" :box nil)))) + (highlight ((t (:background "darkolivegreen")))) + (info-header-node ((t (:italic t :bold t :weight bold :slant italic :foreground "white")))) + (info-header-xref ((t (:bold t :weight bold :foreground "cyan")))) + (info-menu-5 ((t (:foreground "red1")))) + (info-menu-header ((t (:bold t :family "helv" :weight bold)))) + (info-node ((t (:italic t :bold t :foreground "white" :slant italic :weight bold)))) + (info-xref ((t (:bold t :foreground "cyan" :weight bold)))) + (isearch ((t (:background "palevioletred2" :foreground "brown4")))) + (isearch-lazy-highlight-face ((t (:background "paleturquoise4")))) + (italic ((t (:italic t :slant italic)))) + (jde-bug-breakpoint-cursor ((t (:background "brown" :foreground "cyan")))) + (jde-db-active-breakpoint-face ((t (:background "red" :foreground "black")))) + (jde-db-requested-breakpoint-face ((t (:background "yellow" :foreground "black")))) + (jde-db-spec-breakpoint-face ((t (:background "green" :foreground "black")))) + (jde-java-font-lock-api-face ((t (:foreground "light goldenrod")))) + (jde-java-font-lock-bold-face ((t (:bold t :weight bold)))) + (jde-java-font-lock-code-face ((t (nil)))) + (jde-java-font-lock-constant-face ((t (:foreground "Aquamarine")))) + (jde-java-font-lock-doc-tag-face ((t (:foreground "light coral")))) + (jde-java-font-lock-italic-face ((t (:italic t :slant italic)))) + (jde-java-font-lock-link-face ((t (:foreground "blue" :underline t :slant normal)))) + (jde-java-font-lock-modifier-face ((t (:foreground "LightSteelBlue")))) + (jde-java-font-lock-number-face ((t (:foreground "LightSalmon")))) + (jde-java-font-lock-operator-face ((t (:foreground "medium blue")))) + (jde-java-font-lock-package-face ((t (:foreground "steelblue1")))) + (jde-java-font-lock-pre-face ((t (nil)))) + (jde-java-font-lock-underline-face ((t (:underline t)))) + (menu ((t (nil)))) + (mode-line ((t (:background "grey75" :foreground "black" :box (:line-width -1 :style +released-button))))) + (mouse ((t (:background "yellow")))) + (region ((t (:background "blue3")))) + (scroll-bar ((t (nil)))) + (secondary-selection ((t (:background "SkyBlue4")))) + (semantic-dirty-token-face ((t (:background "gray10")))) + (semantic-unmatched-syntax-face ((t (:underline "red")))) + (senator-intangible-face ((t (:foreground "gray75")))) + (senator-momentary-highlight-face ((t (:background "gray30")))) + (senator-read-only-face ((t (:background "#664444")))) + (show-paren-match-face ((t (:background "turquoise")))) + (show-paren-mismatch-face ((t (:background "purple" :foreground "white")))) + (speedbar-button-face ((t (:foreground "green3")))) + (speedbar-directory-face ((t (:foreground "light blue")))) + (speedbar-file-face ((t (:foreground "cyan")))) + (speedbar-highlight-face ((t (:background "sea green")))) + (speedbar-selected-face ((t (:foreground "red" :underline t)))) + (speedbar-separator-face ((t (:background "blue" :foreground "white" :overline "gray")))) + (speedbar-tag-face ((t (:foreground "yellow")))) + (tool-bar ((t (:background "grey75" :foreground "black" :box (:line-width 1 :style +released-button))))) + (trailing-whitespace ((t (:background "red")))) + (underline ((t (:underline t)))) + (variable-pitch ((t (:family "helv")))) + (widget-button-face ((t (:bold t :weight bold)))) + (widget-button-pressed-face ((t (:foreground "red")))) + (widget-documentation-face ((t (:foreground "lime green")))) + (widget-field-face ((t (:background "dim gray")))) + (widget-inactive-face ((t (:foreground "light gray")))) + (widget-single-line-field-face ((t (:background "dim gray"))))))) + +(defun color-theme-lawrence () + "Color theme by lawrence mitchell . +Mainly shades of green. +Contains faces for erc, gnus, most of jde." + (interactive) + (color-theme-install + '(color-theme-lawrence + ((background-color . "black") + (background-mode . dark) + (border-color . "black") + (cursor-color . "green") + (foreground-color . "#00CC00") + (mouse-color . "black")) + ((erc-button-face . bold) + (erc-button-mouse-face . highlight) + (gnus-article-button-face . bold) + (gnus-article-mouse-face . highlight) + (gnus-cite-attribution-face . gnus-cite-attribution-face) + (gnus-mouse-face . highlight) + (gnus-server-agent-face . gnus-server-agent-face) + (gnus-server-closed-face . gnus-server-closed-face) + (gnus-server-denied-face . gnus-server-denied-face) + (gnus-server-offline-face . gnus-server-offline-face) + (gnus-server-opened-face . gnus-server-opened-face) + (gnus-signature-face . gnus-signature-face) + (gnus-summary-selected-face . gnus-summary-selected-face) + (gnus-treat-display-face . head) + (gnus-treat-display-xface . head) + (list-matching-lines-buffer-name-face . underline) + (list-matching-lines-face . bold) + (paren-match-face . paren-face-match) + (paren-mismatch-face . paren-face-mismatch) + (paren-no-match-face . paren-face-no-match) + (sgml-set-face . t) + (tags-tag-face . default) + (view-highlight-face . highlight) + (widget-mouse-face . highlight)) + (default ((t (nil)))) + (Buffer-menu-buffer-face ((t (:bold t :weight bold)))) + (bg:erc-color-face0 ((t (:background "White")))) + (bg:erc-color-face1 ((t (:background "black")))) + (bg:erc-color-face10 ((t (:background "lightblue1")))) + (bg:erc-color-face11 ((t (:background "cyan")))) + (bg:erc-color-face12 ((t (:background "blue")))) + (bg:erc-color-face13 ((t (:background "deeppink")))) + (bg:erc-color-face14 ((t (:background "gray50")))) + (bg:erc-color-face15 ((t (:background "gray90")))) + (bg:erc-color-face2 ((t (:background "blue4")))) + (bg:erc-color-face3 ((t (:background "green4")))) + (bg:erc-color-face4 ((t (:background "red")))) + (bg:erc-color-face5 ((t (:background "brown")))) + (bg:erc-color-face6 ((t (:background "purple")))) + (bg:erc-color-face7 ((t (:background "orange")))) + (bg:erc-color-face8 ((t (:background "yellow")))) + (bg:erc-color-face9 ((t (:background "green")))) + (bold ((t (:bold t :foreground "#00CC00" :background "black")))) + (bold-italic ((t (:italic t :bold t :slant oblique :weight semi-bold)))) + (border ((t (:background "black")))) + (button ((t (:underline t)))) + (comint-highlight-input ((t (nil)))) + (comint-highlight-prompt ((t (:bold t :foreground "#00CC00" :background "black" :weight bold)))) + (cursor ((t (:background "green")))) + (custom-button-face ((t (:bold t :foreground "#00CC00" :background "black")))) + (custom-button-pressed-face ((t (nil)))) + (custom-changed-face ((t (:italic t :foreground "#00CC00" :background "black" :slant oblique)))) + (custom-comment-face ((t (nil)))) + (custom-comment-tag-face ((t (nil)))) + (custom-documentation-face ((t (nil)))) + (custom-face-tag-face ((t (nil)))) + (custom-group-tag-face ((t (nil)))) + (custom-group-tag-face-1 ((t (nil)))) + (custom-invalid-face ((t (:foreground "#00CC00" :background "black" :strike-through t)))) + (custom-modified-face ((t (nil)))) + (custom-rogue-face ((t (nil)))) + (custom-saved-face ((t (nil)))) + (custom-set-face ((t (nil)))) + (custom-state-face ((t (nil)))) + (custom-variable-button-face ((t (nil)))) + (custom-variable-tag-face ((t (nil)))) + (erc-action-face ((t (:bold t :weight semi-bold)))) + (erc-bold-face ((t (:bold t :weight bold)))) + (erc-current-nick-face ((t (:bold t :foreground "LightSeaGreen" :weight semi-bold)))) + (erc-dangerous-host-face ((t (:foreground "red")))) + (erc-default-face ((t (nil)))) + (erc-direct-msg-face ((t (:foreground "IndianRed")))) + (erc-error-face ((t (:bold t :weight semi-bold :background "darkblue" :foreground "#00CC00")))) + (erc-fool-face ((t (:foreground "dim gray")))) + (erc-input-face ((t (:foreground "springgreen")))) + (erc-inverse-face ((t (:bold t :background "Darkgreen" :foreground "Black" :weight semi-bold)))) + (erc-keyword-face ((t (:bold t :foreground "pale green" :weight bold)))) + (erc-nick-default-face ((t (:bold t :weight semi-bold)))) + (erc-nick-msg-face ((t (:bold t :foreground "springgreen" :weight semi-bold)))) + (erc-notice-face ((t (:foreground "seagreen" :weight normal)))) + (erc-pal-face ((t (:bold t :foreground "Magenta" :weight bold)))) + (erc-prompt-face ((t (:bold t :background "lightBlue2" :foreground "Black" :weight semi-bold)))) + (erc-timestamp-face ((t (:foreground "seagreen" :weight normal)))) + (erc-underline-face ((t (:underline t)))) + (fg:erc-color-face0 ((t (:foreground "White")))) + (fg:erc-color-face1 ((t (:foreground "black")))) + (fg:erc-color-face10 ((t (:foreground "lightblue1")))) + (fg:erc-color-face11 ((t (:foreground "cyan")))) + (fg:erc-color-face12 ((t (:foreground "blue")))) + (fg:erc-color-face13 ((t (:foreground "deeppink")))) + (fg:erc-color-face14 ((t (:foreground "gray50")))) + (fg:erc-color-face15 ((t (:foreground "gray90")))) + (fg:erc-color-face2 ((t (:foreground "blue4")))) + (fg:erc-color-face3 ((t (:foreground "green4")))) + (fg:erc-color-face4 ((t (:foreground "red")))) + (fg:erc-color-face5 ((t (:foreground "brown")))) + (fg:erc-color-face6 ((t (:foreground "purple")))) + (fg:erc-color-face7 ((t (:foreground "orange")))) + (fg:erc-color-face8 ((t (:foreground "yellow")))) + (fg:erc-color-face9 ((t (:foreground "green")))) + (fixed-pitch ((t (nil)))) + (font-latex-string-face ((t (:bold t :weight semi-bold :foreground "seagreen" :background "black")))) + (font-latex-warning-face ((t (:bold t :weight semi-bold :background "darkblue" :foreground "#00CC00")))) + (font-lock-builtin-face ((t (:foreground "seagreen1")))) + (font-lock-comment-face ((t (:background "black" :foreground "medium spring green")))) + (font-lock-constant-face ((t (nil)))) + (font-lock-doc-face ((t (:bold t :background "black" :foreground "seagreen" :weight semi-bold)))) + (font-lock-function-name-face ((t (:bold t :foreground "#00CC00" :background "black")))) + (font-lock-keyword-face ((t (:bold t :background "black" :foreground "green" :underline t :weight semi-bold)))) + (font-lock-preprocessor-face ((t (:foreground "#00ccdd")))) + (font-lock-string-face ((t (:bold t :background "black" :foreground "seagreen" :weight semi-bold)))) + (font-lock-type-face ((t (nil)))) + (font-lock-variable-name-face ((t (nil)))) + (font-lock-warning-face ((t (:bold t :foreground "#00CC00" :background "darkblue" :weight semi-bold)))) + (fringe ((t (:foreground "#00CC00" :background "#151515")))) + (gnus-cite-attribution-face ((t (:italic t :foreground "#00CC00" :background "black" :slant italic)))) + (gnus-cite-face-1 ((t (:background "black" :foreground "springgreen")))) + (gnus-cite-face-10 ((t (nil)))) + (gnus-cite-face-11 ((t (nil)))) + (gnus-cite-face-2 ((t (:background "black" :foreground "lightseagreen")))) + (gnus-cite-face-3 ((t (:background "black" :foreground "darkseagreen")))) + (gnus-cite-face-4 ((t (:background "black" :foreground "forestgreen")))) + (gnus-cite-face-5 ((t (:background "black" :foreground "springgreen")))) + (gnus-cite-face-6 ((t (:background "black" :foreground "springgreen")))) + (gnus-cite-face-7 ((t (:background "black" :foreground "springgreen")))) + (gnus-cite-face-8 ((t (:background "black" :foreground "springgreen")))) + (gnus-cite-face-9 ((t (:background "black" :foreground "springgreen")))) + (gnus-emphasis-bold ((t (:bold t :weight semi-bold)))) + (gnus-emphasis-bold-italic ((t (:italic t :bold t :slant italic :weight semi-bold)))) + (gnus-emphasis-highlight-words ((t (:bold t :foreground "#00CC00" :background "black" :underline t :weight bold)))) + (gnus-emphasis-italic ((t (:italic t :slant italic)))) + (gnus-emphasis-strikethru ((t (nil)))) + (gnus-emphasis-underline ((t (:underline t)))) + (gnus-emphasis-underline-bold ((t (:bold t :underline t :weight semi-bold)))) + (gnus-emphasis-underline-bold-italic ((t (:italic t :bold t :underline t :slant italic :weight semi-bold)))) + (gnus-emphasis-underline-italic ((t (:italic t :underline t :slant italic)))) + (gnus-group-mail-1-empty-face ((t (nil)))) + (gnus-group-mail-1-face ((t (:bold t :foreground "#00CC00" :background "black" :weight bold)))) + (gnus-group-mail-2-empty-face ((t (nil)))) + (gnus-group-mail-2-face ((t (:bold t :foreground "#00CC00" :background "black" :weight bold)))) + (gnus-group-mail-3-empty-face ((t (nil)))) + (gnus-group-mail-3-face ((t (:bold t :foreground "#00CC00" :background "black" :weight bold)))) + (gnus-group-mail-low-empty-face ((t (nil)))) + (gnus-group-mail-low-face ((t (:bold t :foreground "#00CC00" :background "black" :weight bold)))) + (gnus-group-news-1-empty-face ((t (nil)))) + (gnus-group-news-1-face ((t (:bold t :foreground "#00CC00" :background "black" :weight bold)))) + (gnus-group-news-2-empty-face ((t (nil)))) + (gnus-group-news-2-face ((t (:bold t :foreground "#00CC00" :background "black" :weight bold)))) + (gnus-group-news-3-empty-face ((t (nil)))) + (gnus-group-news-3-face ((t (:bold t :foreground "#00CC00" :background "black" :weight bold)))) + (gnus-group-news-4-empty-face ((t (nil)))) + (gnus-group-news-4-face ((t (:bold t :foreground "#00CC00" :background "black" :weight bold)))) + (gnus-group-news-5-empty-face ((t (nil)))) + (gnus-group-news-5-face ((t (:bold t :foreground "#00CC00" :background "black" :weight bold)))) + (gnus-group-news-6-empty-face ((t (nil)))) + (gnus-group-news-6-face ((t (:bold t :foreground "#00CC00" :background "black" :weight bold)))) + (gnus-group-news-low-empty-face ((t (nil)))) + (gnus-group-news-low-face ((t (:bold t :foreground "#00CC00" :background "black" :weight bold)))) + (gnus-header-content-face ((t (:background "black" :foreground "springgreen")))) + (gnus-header-from-face ((t (nil)))) + (gnus-header-name-face ((t (nil)))) + (gnus-header-newsgroups-face ((t (nil)))) + (gnus-header-subject-face ((t (nil)))) + (gnus-server-agent-face ((t (:bold t :foreground "PaleTurquoise" :weight bold)))) + (gnus-server-closed-face ((t (:italic t :foreground "Light Steel Blue" :slant italic)))) + (gnus-server-denied-face ((t (:bold t :foreground "Pink" :weight semi-bold)))) + (gnus-server-offline-face ((t (:bold t :foreground "Yellow" :weight bold)))) + (gnus-server-opened-face ((t (:bold t :foreground "Green1" :weight semi-bold)))) + (gnus-signature-face ((t (:background "black" :foreground "springgreen" :slant normal)))) + (gnus-splash-face ((t (:bold t :foreground "#00CC00" :background "black" :weight bold)))) + (gnus-summary-cancelled-face ((t (:foreground "#00CC00" :background "black" :strike-through t)))) + (gnus-summary-high-ancient-face ((t (nil)))) + (gnus-summary-high-read-face ((t (nil)))) + (gnus-summary-high-ticked-face ((t (:background "black" :foreground "seagreen")))) + (gnus-summary-high-undownloaded-face ((t (:bold t :foreground "LightGray" :weight bold)))) + (gnus-summary-high-unread-face ((t (:bold t :foreground "#00CC00" :background "black" :weight bold)))) + (gnus-summary-low-ancient-face ((t (nil)))) + (gnus-summary-low-read-face ((t (nil)))) + (gnus-summary-low-ticked-face ((t (nil)))) + (gnus-summary-low-undownloaded-face ((t (:italic t :foreground "LightGray" :slant italic :weight normal)))) + (gnus-summary-low-unread-face ((t (:bold t :foreground "#00CC00" :background "black" :weight bold)))) + (gnus-summary-normal-ancient-face ((t (nil)))) + (gnus-summary-normal-read-face ((t (nil)))) + (gnus-summary-normal-ticked-face ((t (:bold t :foreground "#00CC00" :background "black")))) + (gnus-summary-normal-undownloaded-face ((t (:foreground "LightGray" :weight normal)))) + (gnus-summary-normal-unread-face ((t (nil)))) + (gnus-summary-selected-face ((t (:background "#101010")))) + (gnus-x-face ((t (:background "white" :foreground "black")))) + (header-line ((t (nil)))) + (highlight ((t (:foreground "#00CC00" :background "darkgreen")))) + (ido-first-match-face ((t (:bold t :weight bold)))) + (ido-indicator-face ((t (:background "red" :foreground "yellow" :width condensed)))) + (ido-only-match-face ((t (:foreground "ForestGreen")))) + (ido-subdir-face ((t (:foreground "red")))) + (isearch ((t (:background "seagreen" :foreground "black")))) + (isearch-lazy-highlight-face ((t (:background "darkseagreen" :foreground "black")))) + (italic ((t (:italic t :foreground "#00CC00" :background "black" :slant oblique)))) + (menu ((t (:bold t :background "black" :foreground "green" :box (:line-width -1 :color "#606060") :weight semi-bold)))) + (message-cited-text-face ((t (:italic t :foreground "#00CC00" :background "black" :slant oblique)))) + (message-header-cc-face ((t (nil)))) + (message-header-name-face ((t (nil)))) + (message-header-newsgroups-face ((t (:bold t :foreground "#00CC00" :background "black")))) + (message-header-other-face ((t (:bold t :foreground "#00CC00" :background "black")))) + (message-header-subject-face ((t (:bold t :foreground "#00CC00" :background "black")))) + (message-header-to-face ((t (:bold t :foreground "#00CC00" :background "black")))) + (message-header-xheader-face ((t (nil)))) + (message-mml-face ((t (:italic t :foreground "#00CC00" :background "black" :slant oblique)))) + (message-separator-face ((t (nil)))) + (minibuffer-prompt ((t (:background "black" :foreground "seagreen")))) + (mode-line ((t (:bold t :background "#404040" :foreground "green" :box (:line-width -1 :color "#606060") :weight semi-bold)))) + (mode-line-inactive ((t (:bold t :weight semi-bold :box (:line-width -1 :color "#606060") :foreground "green" :background "#101010")))) + (mouse ((t (:background "black")))) + (paren-face ((t (:background "black" :foreground "darkgreen")))) + (paren-face-match ((t (:background "black" :foreground "springgreen")))) + (paren-face-mismatch ((t (:foreground "#00CC00" :background "black" :strike-through t)))) + (paren-face-no-match ((t (:background "black" :foreground "red")))) + (region ((t (:background "seagreen" :foreground "black")))) + (scroll-bar ((t (nil)))) + (secondary-selection ((t (:background "darkseagreen" :foreground "black")))) + (semantic-dirty-token-face ((t (:background "gray10")))) + (semantic-unmatched-syntax-face ((t (:underline "red")))) + (sgml-end-tag-face ((t (:foreground "seagreen")))) + (sgml-start-tag-face ((t (:foreground "seagreen")))) + (tabbar-button-face ((t (:background "black" :foreground "#00cc00" :box (:line-width 2 :color "black" :style released-button))))) + (tabbar-default-face ((t (:background "black" :foreground "#00cc00")))) + (tabbar-selected-face ((t (:background "black" :foreground "springgreen" :box (:line-width 2 :color "black" :style released-button))))) + (tabbar-separator-face ((t (:foreground "#00cc00" :background "black")))) + (tabbar-unselected-face ((t (:background "black" :foreground "seagreen" :box (:line-width 2 :color "black" :style pressed-button))))) + (tool-bar ((t (:box (:line-width 1 :style released-button))))) + (tooltip ((t (nil)))) + (trailing-whitespace ((t (:background "lightseagreen" :foreground "black")))) + (underline ((t (:foreground "#00CC00" :background "black" :underline t)))) + (variable-pitch ((t (:underline nil :foreground "#00CC00" :background "black")))) + (widget-button-face ((t (:bold t :foreground "#00CC00" :background "black")))) + (widget-button-pressed-face ((t (nil)))) + (widget-documentation-face ((t (nil)))) + (widget-field-face ((t (:italic t :foreground "#00CC00" :background "black" :slant oblique)))) + (widget-inactive-face ((t (nil)))) + (widget-single-line-field-face ((t (nil))))))) + +(defun color-theme-matrix () + "Color theme by walterh@rocketmail.com, created 2003-10-16." + (interactive) + (color-theme-install + '(color-theme-matrix + ((background-color . "black") + (background-mode . dark) + (background-toolbar-color . "bisque") + (border-color . "orange") + (bottom-toolbar-shadow-color . "#909099999999") + (cursor-color . "#7eff00") + (foreground-color . "#7eff00") + (mouse-color . "#7eff00") + (top-toolbar-shadow-color . "#ffffffffffff")) + ((help-highlight-face . underline) + (list-matching-lines-face . bold) + (rmail-highlight-face . font-lock-function-name-face) + (view-highlight-face . highlight) + (widget-mouse-face . highlight)) + (default ((t (:stipple nil :background "black" :foreground +"#7eff00" :inverse-video nil :box nil :strike-through nil :overline nil +:underline nil :slant normal :weight normal :height 90 :width normal +:family "outline-courier new")))) + (Buffer-menu-buffer-face ((t (nil)))) + (CUA-global-mark-face ((t (nil)))) + (CUA-rectangle-face ((t (nil)))) + (CUA-rectangle-noselect-face ((t (nil)))) + (Info-title-1-face ((t (nil)))) + (Info-title-2-face ((t (nil)))) + (Info-title-3-face ((t (nil)))) + (Info-title-4-face ((t (nil)))) + (antlr-font-lock-keyword-face ((t (nil)))) + (antlr-font-lock-literal-face ((t (nil)))) + (antlr-font-lock-ruledef-face ((t (nil)))) + (antlr-font-lock-ruleref-face ((t (nil)))) + (antlr-font-lock-tokendef-face ((t (nil)))) + (antlr-font-lock-tokenref-face ((t (nil)))) + (bbdb-company ((t (nil)))) + (bbdb-field-name ((t (nil)))) + (bbdb-field-value ((t (nil)))) + (bbdb-name ((t (nil)))) + (bg:erc-color-face0 ((t (nil)))) + (bg:erc-color-face1 ((t (nil)))) + (bg:erc-color-face10 ((t (nil)))) + (bg:erc-color-face11 ((t (nil)))) + (bg:erc-color-face12 ((t (nil)))) + (bg:erc-color-face13 ((t (nil)))) + (bg:erc-color-face14 ((t (nil)))) + (bg:erc-color-face15 ((t (nil)))) + (bg:erc-color-face2 ((t (nil)))) + (bg:erc-color-face3 ((t (nil)))) + (bg:erc-color-face4 ((t (nil)))) + (bg:erc-color-face5 ((t (nil)))) + (bg:erc-color-face6 ((t (nil)))) + (bg:erc-color-face7 ((t (nil)))) + (bg:erc-color-face8 ((t (nil)))) + (bg:erc-color-face9 ((t (nil)))) + (blank-space-face ((t (nil)))) + (blank-tab-face ((t (nil)))) + (blue ((t (nil)))) + (bold ((t (:bold t :weight bold)))) + (bold-italic ((t (:bold t :weight bold)))) + (border ((t (:background "orange")))) + (border-glyph ((t (nil)))) + (buffers-tab ((t (nil)))) + (button ((t (nil)))) + (calendar-today-face ((t (nil)))) + (change-log-acknowledgement-face ((t (nil)))) + (change-log-conditionals-face ((t (nil)))) + (change-log-date-face ((t (nil)))) + (change-log-email-face ((t (nil)))) + (change-log-file-face ((t (nil)))) + (change-log-function-face ((t (nil)))) + (change-log-list-face ((t (nil)))) + (change-log-name-face ((t (nil)))) + (clearcase-dired-checkedout-face ((t (nil)))) + (comint-highlight-input ((t (nil)))) + (comint-highlight-prompt ((t (nil)))) + (cparen-around-andor-face ((t (nil)))) + (cparen-around-begin-face ((t (nil)))) + (cparen-around-conditional-face ((t (nil)))) + (cparen-around-define-face ((t (nil)))) + (cparen-around-lambda-face ((t (nil)))) + (cparen-around-letdo-face ((t (nil)))) + (cparen-around-quote-face ((t (nil)))) + (cparen-around-set!-face ((t (nil)))) + (cparen-around-syntax-rules-face ((t (nil)))) + (cparen-around-vector-face ((t (nil)))) + (cparen-binding-face ((t (nil)))) + (cparen-binding-list-face ((t (nil)))) + (cparen-conditional-clause-face ((t (nil)))) + (cparen-normal-paren-face ((t (nil)))) + (cperl-array-face ((t (nil)))) + (cperl-hash-face ((t (nil)))) + (cperl-invalid-face ((t (nil)))) + (cperl-nonoverridable-face ((t (nil)))) + (cursor ((t (:background "#7eff00" :foreground "black")))) + (custom-button-face ((t (nil)))) + (custom-button-pressed-face ((t (nil)))) + (custom-changed-face ((t (nil)))) + (custom-comment-face ((t (nil)))) + (custom-comment-tag-face ((t (nil)))) + (custom-documentation-face ((t (nil)))) + (custom-face-tag-face ((t (nil)))) + (custom-group-tag-face ((t (nil)))) + (custom-group-tag-face-1 ((t (nil)))) + (custom-invalid-face ((t (nil)))) + (custom-modified-face ((t (nil)))) + (custom-rogue-face ((t (nil)))) + (custom-saved-face ((t (nil)))) + (custom-set-face ((t (nil)))) + (custom-state-face ((t (nil)))) + (custom-variable-button-face ((t (nil)))) + (custom-variable-tag-face ((t (nil)))) + (cvs-filename-face ((t (nil)))) + (cvs-handled-face ((t (nil)))) + (cvs-header-face ((t (nil)))) + (cvs-marked-face ((t (nil)))) + (cvs-msg-face ((t (nil)))) + (cvs-need-action-face ((t (nil)))) + (cvs-unknown-face ((t (nil)))) + (cyan ((t (nil)))) + (diary-face ((t (nil)))) + (diff-added-face ((t (nil)))) + (diff-changed-face ((t (nil)))) + (diff-context-face ((t (nil)))) + (diff-file-header-face ((t (nil)))) + (diff-function-face ((t (nil)))) + (diff-header-face ((t (nil)))) + (diff-hunk-header-face ((t (nil)))) + (diff-index-face ((t (nil)))) + (diff-nonexistent-face ((t (nil)))) + (diff-removed-face ((t (nil)))) + (dired-face-boring ((t (nil)))) + (dired-face-directory ((t (nil)))) + (dired-face-executable ((t (nil)))) + (dired-face-flagged ((t (nil)))) + (dired-face-header ((t (nil)))) + (dired-face-marked ((t (nil)))) + (dired-face-permissions ((t (nil)))) + (dired-face-setuid ((t (nil)))) + (dired-face-socket ((t (nil)))) + (dired-face-symlink ((t (nil)))) + (display-time-mail-balloon-enhance-face ((t (nil)))) + (display-time-mail-balloon-gnus-group-face ((t (nil)))) + (display-time-time-balloon-face ((t (nil)))) + (ebrowse-default-face ((t (nil)))) + (ebrowse-file-name-face ((t (nil)))) + (ebrowse-member-attribute-face ((t (nil)))) + (ebrowse-member-class-face ((t (nil)))) + (ebrowse-progress-face ((t (nil)))) + (ebrowse-root-class-face ((t (nil)))) + (ebrowse-tree-mark-face ((t (nil)))) + (ecb-sources-face ((t (nil)))) + (edb-inter-field-face ((t (nil)))) + (edb-normal-summary-face ((t (nil)))) + (ediff-current-diff-face-A ((t (nil)))) + (ediff-current-diff-face-Ancestor ((t (nil)))) + (ediff-current-diff-face-B ((t (nil)))) + (ediff-current-diff-face-C ((t (nil)))) + (ediff-even-diff-face-A ((t (nil)))) + (ediff-even-diff-face-Ancestor ((t (nil)))) + (ediff-even-diff-face-B ((t (nil)))) + (ediff-even-diff-face-C ((t (nil)))) + (ediff-fine-diff-face-A ((t (nil)))) + (ediff-fine-diff-face-Ancestor ((t (nil)))) + (ediff-fine-diff-face-B ((t (nil)))) + (ediff-fine-diff-face-C ((t (nil)))) + (ediff-odd-diff-face-A ((t (nil)))) + (ediff-odd-diff-face-Ancestor ((t (nil)))) + (ediff-odd-diff-face-B ((t (nil)))) + (ediff-odd-diff-face-C ((t (nil)))) + (eieio-custom-slot-tag-face ((t (nil)))) + (emacs-wiki-bad-link-face ((t (nil)))) + (emacs-wiki-link-face ((t (nil)))) + (erc-action-face ((t (nil)))) + (erc-bold-face ((t (nil)))) + (erc-current-nick-face ((t (nil)))) + (erc-dangerous-host-face ((t (nil)))) + (erc-default-face ((t (nil)))) + (erc-direct-msg-face ((t (nil)))) + (erc-error-face ((t (nil)))) + (erc-fool-face ((t (nil)))) + (erc-highlight-face ((t (nil)))) + (erc-input-face ((t (nil)))) + (erc-inverse-face ((t (nil)))) + (erc-keyword-face ((t (nil)))) + (erc-nick-default-face ((t (nil)))) + (erc-nick-msg-face ((t (nil)))) + (erc-notice-face ((t (nil)))) + (erc-pal-face ((t (nil)))) + (erc-prompt-face ((t (nil)))) + (erc-timestamp-face ((t (nil)))) + (erc-underline-face ((t (nil)))) + (eshell-ls-archive-face ((t (nil)))) + (eshell-ls-backup-face ((t (nil)))) + (eshell-ls-clutter-face ((t (nil)))) + (eshell-ls-directory-face ((t (nil)))) + (eshell-ls-executable-face ((t (nil)))) + (eshell-ls-missing-face ((t (nil)))) + (eshell-ls-picture-face ((t (nil)))) + (eshell-ls-product-face ((t (nil)))) + (eshell-ls-readonly-face ((t (nil)))) + (eshell-ls-special-face ((t (nil)))) + (eshell-ls-symlink-face ((t (nil)))) + (eshell-ls-text-face ((t (nil)))) + (eshell-ls-todo-face ((t (nil)))) + (eshell-ls-unreadable-face ((t (nil)))) + (eshell-prompt-face ((t (nil)))) + (eshell-test-failed-face ((t (nil)))) + (eshell-test-ok-face ((t (nil)))) + (excerpt ((t (nil)))) + (extra-whitespace-face ((t (nil)))) + (ff-paths-non-existant-file-face ((t (nil)))) + (fg:black ((t (nil)))) + (fg:erc-color-face0 ((t (nil)))) + (fg:erc-color-face1 ((t (nil)))) + (fg:erc-color-face10 ((t (nil)))) + (fg:erc-color-face11 ((t (nil)))) + (fg:erc-color-face12 ((t (nil)))) + (fg:erc-color-face13 ((t (nil)))) + (fg:erc-color-face14 ((t (nil)))) + (fg:erc-color-face15 ((t (nil)))) + (fg:erc-color-face2 ((t (nil)))) + (fg:erc-color-face3 ((t (nil)))) + (fg:erc-color-face4 ((t (nil)))) + (fg:erc-color-face5 ((t (nil)))) + (fg:erc-color-face6 ((t (nil)))) + (fg:erc-color-face7 ((t (nil)))) + (fg:erc-color-face8 ((t (nil)))) + (fg:erc-color-face9 ((t (nil)))) + (fixed ((t (nil)))) + (fixed-pitch ((t (nil)))) + (fl-comment-face ((t (nil)))) + (fl-function-name-face ((t (nil)))) + (fl-keyword-face ((t (nil)))) + (fl-string-face ((t (nil)))) + (fl-type-face ((t (nil)))) + (flash-paren-face-off ((t (nil)))) + (flash-paren-face-on ((t (nil)))) + (flash-paren-face-region ((t (nil)))) + (flyspell-duplicate-face ((t (nil)))) + (flyspell-incorrect-face ((t (nil)))) + (font-latex-bold-face ((t (nil)))) + (font-latex-italic-face ((t (nil)))) + (font-latex-math-face ((t (nil)))) + (font-latex-sedate-face ((t (nil)))) + (font-latex-string-face ((t (nil)))) + (font-latex-warning-face ((t (nil)))) + (font-lock-builtin-face ((t (:foreground "pink2")))) + (font-lock-comment-face ((t (:italic t :background "black" :slant +italic)))) + (font-lock-constant-face ((t (:foreground "magenta")))) + (font-lock-doc-face ((t (nil)))) + (font-lock-doc-string-face ((t (nil)))) + (font-lock-exit-face ((t (nil)))) + (font-lock-function-name-face ((t (:bold t :underline t :weight +bold)))) + (font-lock-keyword-face ((t (:foreground "yellow1")))) + (font-lock-other-emphasized-face ((t (nil)))) + (font-lock-other-type-face ((t (nil)))) + (font-lock-preprocessor-face ((t (nil)))) + (font-lock-reference-face ((t (nil)))) + (font-lock-special-comment-face ((t (nil)))) + (font-lock-special-keyword-face ((t (nil)))) + (font-lock-string-face ((t (:foreground "yellow2")))) + (font-lock-type-face ((t (:foreground "LightYellow1")))) + (font-lock-variable-name-face ((t (:foreground "light green")))) + (font-lock-warning-face ((t (nil)))) + (fringe ((t (nil)))) + (gnus-cite-attribution-face ((t (nil)))) + (gnus-cite-face-1 ((t (nil)))) + (gnus-cite-face-10 ((t (nil)))) + (gnus-cite-face-11 ((t (nil)))) + (gnus-cite-face-2 ((t (nil)))) + (gnus-cite-face-3 ((t (nil)))) + (gnus-cite-face-4 ((t (nil)))) + (gnus-cite-face-5 ((t (nil)))) + (gnus-cite-face-6 ((t (nil)))) + (gnus-cite-face-7 ((t (nil)))) + (gnus-cite-face-8 ((t (nil)))) + (gnus-cite-face-9 ((t (nil)))) + (gnus-emphasis-bold ((t (nil)))) + (gnus-emphasis-bold-italic ((t (nil)))) + (gnus-emphasis-highlight-words ((t (nil)))) + (gnus-emphasis-italic ((t (nil)))) + (gnus-emphasis-strikethru ((t (nil)))) + (gnus-emphasis-underline ((t (nil)))) + (gnus-emphasis-underline-bold ((t (nil)))) + (gnus-emphasis-underline-bold-italic ((t (nil)))) + (gnus-emphasis-underline-italic ((t (nil)))) + (gnus-filterhist-face-1 ((t (nil)))) + (gnus-group-mail-1-empty-face ((t (nil)))) + (gnus-group-mail-1-face ((t (nil)))) + (gnus-group-mail-2-empty-face ((t (nil)))) + (gnus-group-mail-2-face ((t (nil)))) + (gnus-group-mail-3-empty-face ((t (nil)))) + (gnus-group-mail-3-face ((t (nil)))) + (gnus-group-mail-low-empty-face ((t (nil)))) + (gnus-group-mail-low-face ((t (nil)))) + (gnus-group-news-1-empty-face ((t (nil)))) + (gnus-group-news-1-face ((t (nil)))) + (gnus-group-news-2-empty-face ((t (nil)))) + (gnus-group-news-2-face ((t (nil)))) + (gnus-group-news-3-empty-face ((t (nil)))) + (gnus-group-news-3-face ((t (nil)))) + (gnus-group-news-4-empty-face ((t (nil)))) + (gnus-group-news-4-face ((t (nil)))) + (gnus-group-news-5-empty-face ((t (nil)))) + (gnus-group-news-5-face ((t (nil)))) + (gnus-group-news-6-empty-face ((t (nil)))) + (gnus-group-news-6-face ((t (nil)))) + (gnus-group-news-low-empty-face ((t (nil)))) + (gnus-group-news-low-face ((t (nil)))) + (gnus-header-content-face ((t (nil)))) + (gnus-header-from-face ((t (nil)))) + (gnus-header-name-face ((t (nil)))) + (gnus-header-newsgroups-face ((t (nil)))) + (gnus-header-subject-face ((t (nil)))) + (gnus-picon-face ((t (nil)))) + (gnus-picon-xbm-face ((t (nil)))) + (gnus-picons-face ((t (nil)))) + (gnus-picons-xbm-face ((t (nil)))) + (gnus-server-agent-face ((t (nil)))) + (gnus-server-closed-face ((t (nil)))) + (gnus-server-denied-face ((t (nil)))) + (gnus-server-offline-face ((t (nil)))) + (gnus-server-opened-face ((t (nil)))) + (gnus-signature-face ((t (nil)))) + (gnus-splash ((t (nil)))) + (gnus-splash-face ((t (nil)))) + (gnus-summary-cancelled-face ((t (nil)))) + (gnus-summary-high-ancient-face ((t (nil)))) + (gnus-summary-high-read-face ((t (nil)))) + (gnus-summary-high-ticked-face ((t (nil)))) + (gnus-summary-high-undownloaded-face ((t (nil)))) + (gnus-summary-high-unread-face ((t (nil)))) + (gnus-summary-low-ancient-face ((t (nil)))) + (gnus-summary-low-read-face ((t (nil)))) + (gnus-summary-low-ticked-face ((t (nil)))) + (gnus-summary-low-undownloaded-face ((t (nil)))) + (gnus-summary-low-unread-face ((t (nil)))) + (gnus-summary-normal-ancient-face ((t (nil)))) + (gnus-summary-normal-read-face ((t (nil)))) + (gnus-summary-normal-ticked-face ((t (nil)))) + (gnus-summary-normal-undownloaded-face ((t (nil)))) + (gnus-summary-normal-unread-face ((t (nil)))) + (gnus-summary-selected-face ((t (nil)))) + (gnus-x-face ((t (nil)))) + (green ((t (nil)))) + (gui-button-face ((t (nil)))) + (gui-element ((t (nil)))) + (header-line ((t (nil)))) + (hi-black-b ((t (nil)))) + (hi-black-hb ((t (nil)))) + (hi-blue ((t (nil)))) + (hi-blue-b ((t (nil)))) + (hi-green ((t (nil)))) + (hi-green-b ((t (nil)))) + (hi-pink ((t (nil)))) + (hi-red-b ((t (nil)))) + (hi-yellow ((t (nil)))) + (highlight ((t (:background "#7eff00" :foreground "black")))) + (highlight-changes-delete-face ((t (nil)))) + (highlight-changes-face ((t (nil)))) + (highline-face ((t (nil)))) + (holiday-face ((t (nil)))) + (html-helper-bold-face ((t (nil)))) + (html-helper-bold-italic-face ((t (nil)))) + (html-helper-builtin-face ((t (nil)))) + (html-helper-italic-face ((t (nil)))) + (html-helper-underline-face ((t (nil)))) + (html-tag-face ((t (nil)))) + (hyper-apropos-documentation ((t (nil)))) + (hyper-apropos-heading ((t (nil)))) + (hyper-apropos-hyperlink ((t (nil)))) + (hyper-apropos-major-heading ((t (nil)))) + (hyper-apropos-section-heading ((t (nil)))) + (hyper-apropos-warning ((t (nil)))) + (ibuffer-deletion-face ((t (nil)))) + (ibuffer-marked-face ((t (nil)))) + (idlwave-help-link-face ((t (nil)))) + (idlwave-shell-bp-face ((t (nil)))) + (ido-first-match-face ((t (nil)))) + (ido-indicator-face ((t (nil)))) + (ido-only-match-face ((t (nil)))) + (ido-subdir-face ((t (nil)))) + (info-header-node ((t (nil)))) + (info-header-xref ((t (nil)))) + (info-menu-5 ((t (nil)))) + (info-menu-6 ((t (nil)))) + (info-menu-header ((t (nil)))) + (info-node ((t (nil)))) + (info-xref ((t (nil)))) + (isearch ((t (nil)))) + (isearch-lazy-highlight-face ((t (nil)))) + (isearch-secondary ((t (nil)))) + (italic ((t (:underline t)))) + (jde-bug-breakpoint-cursor ((t (nil)))) + (jde-bug-breakpoint-marker ((t (nil)))) + (jde-db-active-breakpoint-face ((t (nil)))) + (jde-db-requested-breakpoint-face ((t (nil)))) + (jde-db-spec-breakpoint-face ((t (nil)))) + (jde-java-font-lock-api-face ((t (nil)))) + (jde-java-font-lock-bold-face ((t (nil)))) + (jde-java-font-lock-code-face ((t (nil)))) + (jde-java-font-lock-constant-face ((t (nil)))) + (jde-java-font-lock-doc-tag-face ((t (nil)))) + (jde-java-font-lock-italic-face ((t (nil)))) + (jde-java-font-lock-link-face ((t (nil)))) + (jde-java-font-lock-modifier-face ((t (nil)))) + (jde-java-font-lock-number-face ((t (nil)))) + (jde-java-font-lock-operator-face ((t (nil)))) + (jde-java-font-lock-package-face ((t (nil)))) + (jde-java-font-lock-pre-face ((t (nil)))) + (jde-java-font-lock-underline-face ((t (nil)))) + (lazy-highlight-face ((t (nil)))) + (left-margin ((t (nil)))) + (linemenu-face ((t (nil)))) + (list-mode-item-selected ((t (nil)))) + (log-view-file-face ((t (nil)))) + (log-view-message-face ((t (nil)))) + (magenta ((t (nil)))) + (makefile-space-face ((t (nil)))) + (man-bold ((t (nil)))) + (man-heading ((t (nil)))) + (man-italic ((t (nil)))) + (man-xref ((t (nil)))) + (menu ((t (nil)))) + (message-cited-text ((t (nil)))) + (message-cited-text-face ((t (nil)))) + (message-header-cc-face ((t (nil)))) + (message-header-contents ((t (nil)))) + (message-header-name-face ((t (nil)))) + (message-header-newsgroups-face ((t (nil)))) + (message-header-other-face ((t (nil)))) + (message-header-subject-face ((t (nil)))) + (message-header-to-face ((t (nil)))) + (message-header-xheader-face ((t (nil)))) + (message-headers ((t (nil)))) + (message-highlighted-header-contents ((t (nil)))) + (message-mml-face ((t (nil)))) + (message-separator-face ((t (nil)))) + (message-url ((t (nil)))) + (minibuffer-prompt ((t (nil)))) + (mmm-face ((t (nil)))) + (mode-line ((t (:bold t :background "gray" :foreground "black" +:weight bold)))) + (mode-line-inactive ((t (nil)))) + (modeline-buffer-id ((t (:background "orange" :foreground +"black")))) + (modeline-mousable ((t (:background "orange" :foreground +"black")))) + (modeline-mousable-minor-mode ((t (:background "orange" +:foreground "black")))) + (mouse ((t (nil)))) + (mpg123-face-cur ((t (nil)))) + (mpg123-face-slider ((t (nil)))) + (my-tab-face ((t (nil)))) + (nil ((t (nil)))) + (overlay-empty-face ((t (nil)))) + (p4-diff-del-face ((t (nil)))) + (paren-blink-off ((t (nil)))) + (paren-face ((t (nil)))) + (paren-face-match ((t (nil)))) + (paren-face-mismatch ((t (nil)))) + (paren-face-no-match ((t (nil)))) + (paren-match ((t (nil)))) + (paren-mismatch ((t (nil)))) + (paren-mismatch-face ((t (nil)))) + (paren-no-match-face ((t (nil)))) + (pointer ((t (nil)))) + (primary-selection ((t (nil)))) + (reb-match-0 ((t (nil)))) + (reb-match-1 ((t (nil)))) + (reb-match-2 ((t (nil)))) + (reb-match-3 ((t (nil)))) + (red ((t (nil)))) + (region ((t (:background "#7eff00" :foreground "black")))) + (right-margin ((t (nil)))) + (rpm-spec-dir-face ((t (nil)))) + (rpm-spec-doc-face ((t (nil)))) + (rpm-spec-ghost-face ((t (nil)))) + (rpm-spec-macro-face ((t (nil)))) + (rpm-spec-package-face ((t (nil)))) + (rpm-spec-tag-face ((t (nil)))) + (rpm-spec-var-face ((t (nil)))) + (scroll-bar ((t (nil)))) + (secondary-selection ((t (:background "orange" :foreground +"black")))) + (semantic-dirty-token-face ((t (nil)))) + (semantic-intangible-face ((t (nil)))) + (semantic-read-only-face ((t (nil)))) + (semantic-unmatched-syntax-face ((t (nil)))) + (senator-intangible-face ((t (nil)))) + (senator-momentary-highlight-face ((t (nil)))) + (senator-read-only-face ((t (nil)))) + (sgml-comment-face ((t (nil)))) + (sgml-doctype-face ((t (nil)))) + (sgml-end-tag-face ((t (nil)))) + (sgml-entity-face ((t (nil)))) + (sgml-ignored-face ((t (nil)))) + (sgml-ms-end-face ((t (nil)))) + (sgml-ms-start-face ((t (nil)))) + (sgml-pi-face ((t (nil)))) + (sgml-sgml-face ((t (nil)))) + (sgml-short-ref-face ((t (nil)))) + (sgml-shortref-face ((t (nil)))) + (sgml-start-tag-face ((t (nil)))) + (sh-heredoc-face ((t (nil)))) + (shell-option-face ((t (nil)))) + (shell-output-2-face ((t (nil)))) + (shell-output-3-face ((t (nil)))) + (shell-output-face ((t (nil)))) + (shell-prompt-face ((t (nil)))) + (show-block-face1 ((t (nil)))) + (show-block-face2 ((t (nil)))) + (show-block-face3 ((t (nil)))) + (show-block-face4 ((t (nil)))) + (show-block-face5 ((t (nil)))) + (show-block-face6 ((t (nil)))) + (show-block-face7 ((t (nil)))) + (show-block-face8 ((t (nil)))) + (show-block-face9 ((t (nil)))) + (show-paren-match-face ((t (:background "orange" :foreground +"black")))) + (show-paren-mismatch-face ((t (:underline t)))) + (show-tabs-space-face ((t (nil)))) + (show-tabs-tab-face ((t (nil)))) + (smerge-base-face ((t (nil)))) + (smerge-markers-face ((t (nil)))) + (smerge-mine-face ((t (nil)))) + (smerge-other-face ((t (nil)))) + (speedbar-button-face ((t (nil)))) + (speedbar-directory-face ((t (nil)))) + (speedbar-file-face ((t (nil)))) + (speedbar-highlight-face ((t (nil)))) + (speedbar-selected-face ((t (nil)))) + (speedbar-separator-face ((t (nil)))) + (speedbar-tag-face ((t (nil)))) + (strokes-char-face ((t (nil)))) + (swbuff-current-buffer-face ((t (nil)))) + (tabbar-button-face ((t (nil)))) + (tabbar-default-face ((t (nil)))) + (tabbar-selected-face ((t (nil)))) + (tabbar-separator-face ((t (nil)))) + (tabbar-unselected-face ((t (nil)))) + (template-message-face ((t (nil)))) + (term-black ((t (nil)))) + (term-blackbg ((t (nil)))) + (term-blue ((t (nil)))) + (term-blue-bold-face ((t (nil)))) + (term-blue-face ((t (nil)))) + (term-blue-inv-face ((t (nil)))) + (term-blue-ul-face ((t (nil)))) + (term-bluebg ((t (nil)))) + (term-bold ((t (nil)))) + (term-cyan ((t (nil)))) + (term-cyan-bold-face ((t (nil)))) + (term-cyan-face ((t (nil)))) + (term-cyan-inv-face ((t (nil)))) + (term-cyan-ul-face ((t (nil)))) + (term-cyanbg ((t (nil)))) + (term-default ((t (nil)))) + (term-default-bg ((t (nil)))) + (term-default-bg-inv ((t (nil)))) + (term-default-bold-face ((t (nil)))) + (term-default-face ((t (nil)))) + (term-default-fg ((t (nil)))) + (term-default-fg-inv ((t (nil)))) + (term-default-inv-face ((t (nil)))) + (term-default-ul-face ((t (nil)))) + (term-green ((t (nil)))) + (term-green-bold-face ((t (nil)))) + (term-green-face ((t (nil)))) + (term-green-inv-face ((t (nil)))) + (term-green-ul-face ((t (nil)))) + (term-greenbg ((t (nil)))) + (term-invisible ((t (nil)))) + (term-invisible-inv ((t (nil)))) + (term-magenta ((t (nil)))) + (term-magenta-bold-face ((t (nil)))) + (term-magenta-face ((t (nil)))) + (term-magenta-inv-face ((t (nil)))) + (term-magenta-ul-face ((t (nil)))) + (term-magentabg ((t (nil)))) + (term-red ((t (nil)))) + (term-red-bold-face ((t (nil)))) + (term-red-face ((t (nil)))) + (term-red-inv-face ((t (nil)))) + (term-red-ul-face ((t (nil)))) + (term-redbg ((t (nil)))) + (term-underline ((t (nil)))) + (term-white ((t (nil)))) + (term-white-bold-face ((t (nil)))) + (term-white-face ((t (nil)))) + (term-white-inv-face ((t (nil)))) + (term-white-ul-face ((t (nil)))) + (term-whitebg ((t (nil)))) + (term-yellow ((t (nil)))) + (term-yellow-bold-face ((t (nil)))) + (term-yellow-face ((t (nil)))) + (term-yellow-inv-face ((t (nil)))) + (term-yellow-ul-face ((t (nil)))) + (term-yellowbg ((t (nil)))) + (tex-math-face ((t (nil)))) + (texinfo-heading-face ((t (nil)))) + (text-cursor ((t (nil)))) + (tool-bar ((t (nil)))) + (tooltip ((t (nil)))) + (trailing-whitespace ((t (nil)))) + (underline ((t (:underline t)))) + (variable-pitch ((t (nil)))) + (vc-annotate-face-0046FF ((t (nil)))) + (vcursor ((t (nil)))) + (vertical-divider ((t (nil)))) + (vhdl-font-lock-attribute-face ((t (nil)))) + (vhdl-font-lock-directive-face ((t (nil)))) + (vhdl-font-lock-enumvalue-face ((t (nil)))) + (vhdl-font-lock-function-face ((t (nil)))) + (vhdl-font-lock-generic-/constant-face ((t (nil)))) + (vhdl-font-lock-prompt-face ((t (nil)))) + (vhdl-font-lock-reserved-words-face ((t (nil)))) + (vhdl-font-lock-translate-off-face ((t (nil)))) + (vhdl-font-lock-type-face ((t (nil)))) + (vhdl-font-lock-variable-face ((t (nil)))) + (vhdl-speedbar-architecture-face ((t (nil)))) + (vhdl-speedbar-architecture-selected-face ((t (nil)))) + (vhdl-speedbar-configuration-face ((t (nil)))) + (vhdl-speedbar-configuration-selected-face ((t (nil)))) + (vhdl-speedbar-entity-face ((t (nil)))) + (vhdl-speedbar-entity-selected-face ((t (nil)))) + (vhdl-speedbar-instantiation-face ((t (nil)))) + (vhdl-speedbar-instantiation-selected-face ((t (nil)))) + (vhdl-speedbar-package-face ((t (nil)))) + (vhdl-speedbar-package-selected-face ((t (nil)))) + (vhdl-speedbar-subprogram-face ((t (nil)))) + (viper-minibuffer-emacs-face ((t (nil)))) + (viper-minibuffer-insert-face ((t (nil)))) + (viper-minibuffer-vi-face ((t (nil)))) + (viper-replace-overlay-face ((t (nil)))) + (viper-search-face ((t (nil)))) + (vm-xface ((t (nil)))) + (vmpc-pre-sig-face ((t (nil)))) + (vmpc-sig-face ((t (nil)))) + (w3m-anchor-face ((t (nil)))) + (w3m-arrived-anchor-face ((t (nil)))) + (w3m-header-line-location-content-face ((t (nil)))) + (w3m-header-line-location-title-face ((t (nil)))) + (white ((t (nil)))) + (widget ((t (nil)))) + (widget-button-face ((t (nil)))) + (widget-button-pressed-face ((t (nil)))) + (widget-documentation-face ((t (nil)))) + (widget-field-face ((t (nil)))) + (widget-inactive-face ((t (nil)))) + (widget-single-line-field-face ((t (nil)))) + (woman-addition-face ((t (nil)))) + (woman-bold-face ((t (nil)))) + (woman-italic-face ((t (nil)))) + (woman-unknown-face ((t (nil)))) + (x-face ((t (nil)))) + (xrdb-option-name-face ((t (nil)))) + (xref-keyword-face ((t (nil)))) + (xref-list-default-face ((t (nil)))) + (xref-list-pilot-face ((t (nil)))) + (xref-list-symbol-face ((t (nil)))) + (yellow ((t (nil)))) + (zmacs-region ((t (nil))))))) + +(defun color-theme-feng-shui () + "Color theme by walterh@rocketmail.com (www.xanadb.com), created + 2003-10-16. Evolved from color-theme-katester" + (interactive) + (color-theme-install + '(color-theme-feng-shui + ((background-color . "ivory") + (background-mode . light) + (border-color . "black") + (cursor-color . "slateblue") + (foreground-color . "black") + (mouse-color . "slateblue")) + ((help-highlight-face . underline) + (list-matching-lines-face . bold) + (view-highlight-face . highlight) + (widget-mouse-face . highlight)) + (default ((t (:stipple nil :background "ivory" :foreground "black" +:inverse-video nil :box nil :strike-through nil :overline nil +:underline nil :slant normal :weight normal :height 90 :width normal +:family "outline-courier new")))) + (bold ((t (:bold t :weight bold)))) + (bold-italic ((t (:italic t :bold t :slant italic :weight bold)))) + (border ((t (:background "black")))) + (cursor ((t (:background "slateblue" :foreground "black")))) + (fixed-pitch ((t (:family "courier")))) + (font-lock-builtin-face ((t (:foreground "black")))) + (font-lock-comment-face ((t (:italic t :background "seashell" +:slant italic)))) + (font-lock-constant-face ((t (:foreground "darkblue")))) + (font-lock-doc-face ((t (:background "lemonChiffon")))) + (font-lock-function-name-face ((t (:bold t :underline t :weight +bold)))) + (font-lock-keyword-face ((t (:foreground "blue")))) + (font-lock-string-face ((t (:background "lemonChiffon")))) + (font-lock-type-face ((t (:foreground "black")))) + (font-lock-variable-name-face ((t (:foreground "black")))) + (font-lock-warning-face ((t (:bold t :foreground "Red" :weight +bold)))) + (fringe ((t (:background "grey95")))) + (header-line ((t (:bold t :weight bold :underline t :background +"grey90" :foreground "grey20" :box nil)))) + (highlight ((t (:background "mistyRose" :foreground "black")))) + (isearch ((t (:background "magenta4" :foreground +"lightskyblue1")))) + (isearch-lazy-highlight-face ((t (:background "paleturquoise")))) + (italic ((t (:italic t :slant italic)))) + (menu ((t (nil)))) + (mode-line ((t (:bold t :background "mistyRose" :foreground "navy" +:underline t :weight bold)))) + (mouse ((t (:background "slateblue")))) + (region ((t (:background "lavender" :foreground "black")))) + (scroll-bar ((t (nil)))) + (secondary-selection ((t (:background "yellow")))) + (tool-bar ((t (:background "grey75" :foreground "black" :box +(:line-width 1 :style released-button))))) + (trailing-whitespace ((t (:background "red")))) + (underline ((t (:underline t)))) + (variable-pitch ((t (:family "helv")))) + (widget-button-face ((t (:bold t :weight bold)))) + (widget-button-pressed-face ((t (:foreground "red")))) + (widget-documentation-face ((t (:foreground "dark green")))) + (widget-field-face ((t (:background "gray85")))) + (widget-inactive-face ((t (:foreground "dim gray")))) + (widget-single-line-field-face ((t (:background "gray85"))))))) + + +(defun color-theme-renegade () + "Renegade BBS styled color theme. Works well in X and terminals. +Created by Dave Benjamin Dec 23 2005." + (interactive) + (color-theme-install + '(color-theme-renegade + ((background-color . "black") + (background-mode . dark) + (border-color . "black") + (cursor-color . "black") + (foreground-color . "cyan3") + (mouse-color . "white")) + (default ((t (nil)))) + (bold ((t (:bold t :foreground "cyan" :weight bold)))) + (bold-italic ((t (:italic t :bold t :foreground "cyan" :slant italic :weight bold)))) + (fixed-pitch ((t (:family "courier")))) + (font-lock-builtin-face ((t (:bold t :foreground "cornflower blue" :weight bold)))) + (font-lock-comment-face ((t (:bold t :foreground "yellow" :weight bold)))) + (font-lock-constant-face ((t (:foreground "magenta3")))) + (font-lock-doc-face ((t (:bold t :weight bold :foreground "red")))) + (font-lock-function-name-face ((t (:foreground "gray")))) + (font-lock-keyword-face ((t (:bold t :foreground "cyan" :weight bold)))) + (font-lock-string-face ((t (:bold t :foreground "red" :weight bold)))) + (font-lock-type-face ((t (:bold t :foreground "cyan" :weight bold)))) + (font-lock-variable-name-face ((t (:foreground "cyan3")))) + (font-lock-warning-face ((t (:bold t :foreground "red" :weight bold)))) + (fringe ((t (:background "gray32")))) + (highlight ((t (:background "blue")))) + (isearch ((t (:background "blue" :foreground "cyan3")))) + (isearch-lazy-highlight-face ((t (:background "turquoise3" :foreground "black")))) + (menu ((t (nil)))) + (mode-line ((t (:bold t :background "blue3" :foreground "white" :box (:line-width -1 :style released-button) :weight bold)))) + (mouse ((t (:background "white")))) + (region ((t (:bold t :background "white" :foreground "blue" :weight bold)))) + (scroll-bar ((t (nil)))) + (trailing-whitespace ((t (:background "red")))) + (underline ((t (:underline t)))) + (variable-pitch ((t (:family "helv"))))))) + +;;; color-theme-library.el ends here diff -r 000000000000 -r 2764b4f45f9f .emacs.d/emacs-groovy-mode_2011-06-29/README --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/emacs-groovy-mode_2011-06-29/README Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,10 @@ +This is a collection of (X)Emacs modes for use with Groovy-related technology -- Groovy, Grails, etc. + +The Groovy mode is a derived mode of Java mode which is itself a derived mode in CC Mode. Inspiration came +from Dylan R.E. Moonfire's C# mode. + +This software is licenced using GNU General Public Licence version 2. + +The master of all the material is the Bazaar branch lp:groovy-emacs-mode. See https://launchpad.net/groovy-emacs-mode. + +Bazaar is used for development, with public feature branches being held on Launchpad. diff -r 000000000000 -r 2764b4f45f9f .emacs.d/emacs-groovy-mode_2011-06-29/gpl.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/emacs-groovy-mode_2011-06-29/gpl.txt Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,339 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. diff -r 000000000000 -r 2764b4f45f9f .emacs.d/grails-mode.el --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/grails-mode.el Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,181 @@ +;;; grails-mode.el --- minor-mode that adds some Grails project management to a grails project + +;; Copyright (C) 2010 Jim Morris + +;; Author: Jim Morris +;; Version: 0.1 +;; URL: http://blog.wolfman.com + +;; This file is not currently part of GNU Emacs. + +;; This program is free software; you can redistribute it and/or +;; modify it under the terms of the GNU General Public License as +;; published by the Free Software Foundation; either version 2, or (at +;; your option) any later version. + +;; This program is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with this program ; see the file COPYING. If not, write to +;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +;; Boston, MA 02111-1307, USA. +;; +;;; depends on +;; groovy-mode +;; find-cmd +;; anything +;; anything-config +;; +;;; Commentary: +;; +;; A minor mode that adds some useful commands for navigating around +;; a grails project +;; +;; In the root of the grails project (where the grails-app directory is) +;; add this to your .dir-locals.el file (v23+) +;; (groovy-mode . ((grails-mode . 1))) +;; (java-mode . ((grails-mode . 1))) +;; (html-mode . ((grails-mode . 1))) +;; +;; This will turn on grails minor mode whenever a groovy, java or gsp file is opened, +;; this presumes you have gsp files et to use html-mode adjust to whatever mode gsp files use +;; +;; or just add this to have grails mode with any file in that directory structure +;; +;; ((nil . ((grails-mode . 1)))) +;; +;; The main addition is a view in anything that shows all the grails project files +;; + +(require 'find-cmd) + +(eval-when-compile + (defvar anything-project-root)) + + +;; TODO +(defun grails-jump-to-model () + "Jump to the domain model for the given context." + (interactive) + (let (var1) + (setq var1 'some) + (message "jump to model at point") + ) + ) + +;; TODO +(defun grails-jump-to-controller () + "thisandthat." + (interactive) + (let (var1) + (setq var1 'some) + (message "jump to controller at point") + ) + ) + +;; TODO +(defun grails-jump-to-view () + "Jumps the view for the controller action we are in" + (interactive) + (let (var1) + (setq var1 'some) + (message "jump to view for given action") + ) + ) + +;; +;; Handle anything integration with grails project view +;; + +(defvar grails-root-extra-find-args + (find-to-string '(prune (name ".svn" ".git"))) + "Extra find args that will be AND'd to the defaults (which are +in `grails-root-file-find-process')") + +(defun grails-make-displayable-name (path) + "makes path into a displayable name. eg view(post): file, domain: file, controller: name" + (let ((dir (file-name-directory path)) + (name (file-name-nondirectory path))) + (let + ((type (cond + ((string-match "/grails-app/views/\\([a-zA-Z0-9_]+\\)/" dir) + (concat "view(" (match-string 1 dir) ")")) + ((string-match "/grails-app/controllers/.*/\\([a-zA-Z0-9_]+\\)Controller" dir) "controller") + ((string-match "/grails-app/domain/" dir) "domain") + ((string-match "/grails-app/conf/" dir) "configuration") + ((string-match "/grails-app/i18n/" dir) "i18n") + ((string-match "/grails-app/services/" dir) "services") + ((string-match "/grails-app/taglib/" dir) "taglib") + ((string-match "/grails-app/utils/" dir) "utils") + ((string-match "/grails-app/\\([a-zA-Z0-9_]+\\)/" dir) (match-string 1 dir)) + (t "misc file")))) + + (concat type ": " (file-name-sans-extension name))))) + +(defun grails-list-project-files () + "Returns a list of all files found under the grails project." + + ;; find root of project + ;; TODO should also check for grails-app directory + (setq grails-project-root + (locate-dominating-file default-directory "build.xml")) + + ;; get a list of all the relevant files + (setq grails-project-files-list + (split-string + (shell-command-to-string (concat "find " grails-project-root "grails-app " + (find-to-string + `(or (name "*.groovy") + (name "*.gsp"))))))) + + ;; convert the list into cons pair of (display . filepath) where + ;; display is a friendly name + (setq grails-project-files-list-display + (mapcar + (lambda (f) + (cons (grails-make-displayable-name f) f)) grails-project-files-list))) + + +;; anything source for showing all grails project files +(defvar anything-grails-project-files + '((name . "Files in Grails Project") + (candidates . grails-project-files-list-display) + (match anything-c-match-on-file-name) + ;(candidate-transformer nil) + (type . file))) + + +(defun grails-show-project-files () + "Uses Anything to show all the project files" + (interactive) + + (grails-list-project-files) + + (anything '(anything-grails-project-files))) + + +(define-minor-mode grails-mode + "Grails Minor Mode. + With no argument, this command toggles the mode. + Non-null prefix argument turns on the mode. + Null prefix argument turns off the mode. + + When Grails mode is enabled, several keys are enabled that + will allow navigation around a typical grails project." + ;; The initial value. + :init-value nil + ;; The indicator for the mode line. + :lighter " Grails" + ;; The minor mode bindings. + :keymap + '(("\C-c/m" . grails-jump-to-model) + ("\C-c/c" . grails-jump-to-controller) + ("\C-c/v" . grails-jump-to-view) + ("\C-ca" . grails-show-project-files) + ) + :group 'grails) + +(provide 'grails-mode) diff -r 000000000000 -r 2764b4f45f9f .emacs.d/groovy-electric.el --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/groovy-electric.el Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,166 @@ +;;; groovy-electric.el --- Electric mode for Groovy +;; -*-Emacs-Lisp-*- + +;; Author: Jim Morris +;; Created: 2009-12-11 + +;; Copyright (C) 2009 Jim Morris + +;; This program is free software; you can redistribute it and/or modify it under the terms of the GNU +;; General Public License as published by the Free Software Foundation; either version 2 of the License, or +;; (at your option) any later version. +;; +;; This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even +;; the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public +;; License for more details. +;; +;; You should have received a copy of the GNU General Public License along with this program; if not, write +;; to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +;; +;; Based on ruby-electric.el Copyright (C) 2005 by Dee Zsombor . +;; Due credit: original work was inspired by a code snippet posted by +;; Frederick Ros at http://rubygarden.org/ruby?EmacsExtensions. + +;;; Commentary: +;; +;; By default automatically inserts closing delimiter for {[('" +;; Additionally when in a GString typing a $ will insert { } and place +;; cursor between the braces. All these can be turned on or off +;; individually in the customization window for groovy-electric +;; +;; +;; Usage: +;; +;; 0) copy groovy-electric.el into directory where emacs can find it. +;; +;; 1) modify your startup file (.emacs or whatever) by adding +;; following lines to load and enable the mode when groovy-mode loads +;; +;; (add-hook 'groovy-mode-hook +;; '(lambda () +;; (require 'groovy-electric) +;; (groovy-electric-mode))) +;; +;; or add this to your init file +;; +;; (require 'groovy-electric) +;; +;; note that you need to have font lock enabled beforehand. +;; +;; 2) toggle Groovy Electric Mode on/off with groovy-electric-mode. + +;;; History: + +;;; Code: +(require 'groovy-mode) +(defgroup groovy-electric nil + "Minor mode providing electric editing commands for groovy files" + :group 'groovy) + +(defvar groovy-electric-matching-delimeter-alist + '((?\[ . ?\]) + (?\( . ?\)) + (?\' . ?\') + (?\" . ?\"))) + +(defcustom groovy-electric-expand-delimiters-list '(all) + "*List of contexts where matching delimiter should be inserted. +The word 'all' will do all insertions." + :type '(set :extra-offset 8 + (const :tag "Everything" all ) + (const :tag "Curly brace" ?\{ ) + (const :tag "Square brace" ?\[ ) + (const :tag "Round brace" ?\( ) + (const :tag "Quote" ?\' ) + (const :tag "Double quote" ?\" ) + (const :tag "Dollar in GStrings" ?\$ )) + :group 'groovy-electric) + +(defcustom groovy-electric-newline-before-closing-bracket nil + "*Controls whether a newline should be inserted before the +closing bracket or not." + :type 'boolean :group 'groovy-electric) + +(define-minor-mode groovy-electric-mode + "Toggle Groovy Electric minor mode. +With no argument, this command toggles the mode. Non-null prefix +argument turns on the mode. Null prefix argument turns off the +mode. + +When Groovy Electric mode is enabled, simple, double and back +quotes as well as braces are paired auto-magically. Expansion +does not occur inside comments and strings. Note that you must +have Font Lock enabled. ${ } is expanded when in a GString" + ;; initial value. + nil + ;;indicator for the mode line. + " Ge" + ;;keymap + groovy-mode-map + (groovy-electric-setup-keymap)) + +(defun groovy-electric-setup-keymap() + (define-key groovy-mode-map "{" 'groovy-electric-curlies) + (define-key groovy-mode-map "(" 'groovy-electric-matching-char) + (define-key groovy-mode-map "[" 'groovy-electric-matching-char) + (define-key groovy-mode-map "\"" 'groovy-electric-matching-char) + (define-key groovy-mode-map "\'" 'groovy-electric-matching-char) + (define-key groovy-mode-map "\$" 'groovy-electric-pound) + ) + +(defun groovy-electric-code-at-point-p() + (and groovy-electric-mode + (let* ((properties (text-properties-at (point)))) + (and (null (memq 'font-lock-string-face properties)) + (null (memq 'font-lock-comment-face properties)))))) + +(defun groovy-electric-string-at-point-p() + (and groovy-electric-mode + (consp (memq 'font-lock-string-face (text-properties-at (point)))))) + +;; This checks it is a GString ("...") not normal string '...' +(defun groovy-electric-gstring-at-point-p() + (and groovy-electric-mode + (consp (memq 'font-lock-string-face (text-properties-at (point)))) + (save-excursion + (char-equal ?\" (char-after (car (c-literal-limits))))))) + +(defun groovy-electric-is-last-command-char-expandable-punct-p() + (or (memq 'all groovy-electric-expand-delimiters-list) + (memq last-command-char groovy-electric-expand-delimiters-list))) + +(defun groovy-electric-curlies(arg) + (interactive "P") + (self-insert-command (prefix-numeric-value arg)) + (when (and (groovy-electric-is-last-command-char-expandable-punct-p) + (groovy-electric-code-at-point-p)) + (insert " ") + (save-excursion + (if groovy-electric-newline-before-closing-bracket + (newline)) + (insert "}")))) + +(defun groovy-electric-matching-char(arg) + (interactive "P") + (self-insert-command (prefix-numeric-value arg)) + (and (groovy-electric-is-last-command-char-expandable-punct-p) + (groovy-electric-code-at-point-p) + (save-excursion + (insert (cdr (assoc last-command-char + groovy-electric-matching-delimeter-alist)))))) + +(defun groovy-electric-pound(arg) + (interactive "P") + (self-insert-command (prefix-numeric-value arg)) + (when (and (groovy-electric-is-last-command-char-expandable-punct-p) + (groovy-electric-gstring-at-point-p) + (not (save-excursion ; make sure it is not escaped + (backward-char 1) + (char-equal ?\\ (preceding-char))))) + (insert "{}") + (backward-char 1))) + + +(provide 'groovy-electric) + +;;; groovy-electric.el ends here diff -r 000000000000 -r 2764b4f45f9f .emacs.d/groovy-mode.el --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/groovy-mode.el Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,583 @@ +;;; groovy-mode.el --- Groovy mode derived mode + +;; Author: Russel Winder +;; Created: 2006-08-01 + +;; Copyright (C) 2006,2009-10 Russel Winder + +;; This program is free software; you can redistribute it and/or modify it under the terms of the GNU +;; General Public License as published by the Free Software Foundation; either version 2 of the License, or +;; (at your option) any later version. +;; +;; This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even +;; the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public +;; License for more details. +;; +;; You should have received a copy of the GNU General Public License along with this program; if not, write +;; to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +;;; Authors: +;; +;; Russel Winder , 2006-- +;; Jim Morris , 2009-- + +;;; Commentary: +;; +;; This mode was initially developed using the Java and Awk modes that are part of CC Mode (the 5.31 source +;; was used) and C# Mode from Dylan R. E. Moonfire (the 0.5.0 source was used). This +;; code may contain some code fragments from those sources that was cut-and-pasted then edited. All other +;; code was newly entered by the author. Obviously changes have been made since then. +;; +;; NB This derived mode requires CC Mode 5.31 or later for the virtual semicolon code to work. +;; +;; There appears to be a problem in CC Mode 5.31 such that csharp-mode and groovy-mode crash XEmacs 21.4 if +;; the files are byte compiled. + +;;; Bugs: +;; +;; Bug tracking is currently (2009-11-26) handled using the Groovy JIRA via the Emacs Mode component. +;; cf. http://jira.codehaus.org/browse/GROOVY/component/14245 + +;;; Versions: +;; +;; 0.1.0 - will be the initial release when it is ready :-) + +;;; Notes: +;; +;; Need to think about the `*.', `?.', `.&' and `.@' operators. Also, `..' and `..<'. This probably means +;; changing `c-after-id-concat-ops' but also `c-operators'. +;; +;; Need to deal with operator overloading (groovy has this but Java does not) so `c-overloadable-operators' +;; needs investigating. +;; +;; Need to investigate how to support the triple string delimiters for multi-line strings. +;; +;; Should we support GString / template markup ( e.g. `<%' and `%>') specially? +;; +;; Need to think whether Groovy needs a different c-decl-prefix-re compared to Java. Certainly, Java will +;; have to change to handle the generics. +;; +;; Probably need to change `c-block-prefix-disallowed-chars' as Groovy is not the same as Java. +;; +;; Probably need to change `c-type-decl-suffix-key' as Groovy is not the same as Java. + +;;; Changes: +;; +;; See the history in the Bazaar branch. + +;;; Code: + +(require 'cc-mode) + +;; CSharp mode comment says: These are only required at compile time to get the sources for the language +;; constants. (The cc-fonts require and the font-lock related constants could additionally be put inside an +;; (eval-after-load "font-lock" ...) but then some trickery is necessary to get them compiled.) +(eval-when-compile + (let ((load-path + (if (and (boundp 'byte-compile-dest-file) + (stringp byte-compile-dest-file)) + (cons (file-name-directory byte-compile-dest-file) load-path) + load-path))) + (load "cc-mode" nil t) ; C# mode has this + (load "cc-fonts" nil t) ; C# mode has this + (load "cc-langs" nil t) ; C# mode has this + (load "cc-bytecomp" nil t) ; Awk mode has this +)) + +(eval-and-compile + (c-add-language 'groovy-mode 'java-mode)) + +;; Groovy allows `?.' as well as `.' for creating identifiers. +(c-lang-defconst c-identifier-ops + groovy '((left-assoc "." "?."))) + +;; Groovy allows operators such as `*.', `?.', `.&' and `.@'. Java mode puts `*' here to deal with +;; import statement usage which we need for Groovy. +(c-lang-defconst c-after-id-concat-ops + groovy '( "*" "&" "@" )) + +;;;; Should really do something with `c-string-escaped-newlines' and `c-multiline-string-start-char' to +;;;; handle the triple delimeter multiline strings. + +;; Because of the above we have to redefine `c_operators' because no other language has `.&' and +;; `.@' operators. + +(c-lang-defconst c-operators + "List describing all operators, along with their precedence and +associativity. The order in the list corresponds to the precedence of +the operators: The operators in each element is a group with the same +precedence, and the group has higher precedence than the groups in all +following elements. The car of each element describes the type of of +the operator group, and the cdr is a list of the operator tokens in +it. The operator group types are: + +'prefix Unary prefix operators. +'postfix Unary postfix operators. +'postfix-if-paren + Unary postfix operators if and only if the chars have + parenthesis syntax. +'left-assoc Binary left associative operators (i.e. a+b+c means (a+b)+c). +'right-assoc Binary right associative operators (i.e. a=b=c means a=(b=c)). +'right-assoc-sequence + Right associative operator that constitutes of a + sequence of tokens that separate expressions. All the + tokens in the group are in this case taken as + describing the sequence in one such operator, and the + order between them is therefore significant. + +Operators containing a character with paren syntax are taken to match +with a corresponding open/close paren somewhere else. A postfix +operator with close paren syntax is taken to end a postfix expression +started somewhere earlier, rather than start a new one at point. Vice +versa for prefix operators with open paren syntax. + +Note that operators like \".\" and \"->\" which in language references +often are described as postfix operators are considered binary here, +since CC Mode treats every identifier as an expression." + + groovy `( + ;; Primary. + ,@(c-lang-const c-identifier-ops) + + (postfix-if-paren "<" ">") ; Templates. + + (prefix "super") + + ;; Postfix. + (left-assoc "." "*." "?." ".&" ".@") + + (postfix "++" "--" "[" "]" "(" ")" "<:" ":>") + + ;; Unary. + (prefix "++" "--" "+" "-" "!" "~" "new" "(" ")") + + ;; Multiplicative. + (left-assoc "*" "/" "%") + + ;; Additive. + (left-assoc "+" "-") + + ;; Shift. + (left-assoc "<<" ">>" ">>>") + + ;; Relational. + (left-assoc "<" ">" "<=" ">=" "instanceof" "<=>") + + ;; Matching. + (left-assoc "=~" "==~" ) + + ;; Equality. + (left-assoc "==" "!=" ) + + ;; Bitwise and. + (left-assoc "&") + + ;; Bitwise exclusive or. + (left-assoc "^") + + ;; Bitwise or. + (left-assoc "|") + + ;; Logical and. + (left-assoc "&&") + + ;; Logical or. + (left-assoc "||") + + ;; Conditional. + (right-assoc-sequence "?" ":") + + ;; Assignment. + (right-assoc ,@(c-lang-const c-assignment-operators)) + + ;; Exception. + ;(prefix "throw") ; Java mode didn't have this but c++ mode does. Humm... + + ;; Sequence. + (left-assoc ",") + + ;; Separator for parameter list and code in a closure. + (left-assoc "->") + )) + +;; Groovy can overload operators where Java cannot. +(c-lang-defconst c-overloadable-operators + groovy '("+" "-" "*" "/" "%" + "&" "|" "^" "~" "<<" ">>" ">>>" + "==" "!=" ">" "<" ">=" "<=" + "<=>" + "=~" "==~" + "++" "--" "+=" "-=" "*=" "/=" "%=" + "&=" "|=" "^=" "~=" "<<=" ">>=" ">>>=" + "!" "&&" "||")) + +;; Groovy allows newline to terminate a statement unlike Java and like Awk. We draw on the Awk +;; Mode `Virtual semicolon material. The idea is to say when an EOL is a `virtual semicolon, +;; i.e. a statement terminator. + +(c-lang-defconst c-stmt-delim-chars + groovy "^;{}\n\r?:") + +(c-lang-defconst c-stmt-delim-chars-with-comma + groovy "^;,{}\n\r?:") + +;; Is there a virtual semicolon at POS or point? +;; +;; A virtual semicolon is considered to lie just after the last non-syntactic-whitespace +;; character on a line where the EOL is the statement terminator. A real semicolon never +;; counts as a virtual one. +(defun groovy-at-vsemi-p ( &optional pos ) + (save-excursion + (let ((pos-or-point (if pos (goto-char pos) (point)))) + (if (eq pos-or-point (point-min)) + nil + (and + (not (char-equal (char-before) ?\;)) + (groovy-ws-or-comment-to-eol-p pos-or-point) + (groovy-not-in-statement-p pos-or-point) + (groovy-not-if-or-else-etc-p pos-or-point)))))) + +(c-lang-defconst c-at-vsemi-p-fn + groovy 'groovy-at-vsemi-p) + +;; see if end of line or comment on rest of line +(defun groovy-ws-or-comment-to-eol-p ( pos ) + (save-excursion + (goto-char pos) + (skip-chars-forward " \t") + (or + (char-equal (char-after) ?\n) + (looking-at "/[/*].*")))) + +(defun groovy-not-in-statement-p ( pos ) + (save-excursion + (goto-char pos) + (if (equal (point) (point-min)) + nil + (backward-char 1) + (or + (not (looking-at "[=+*%<{:]")) + (if (char-equal (char-after) ?>) + (if (equal (point) (point-min)) + nil + (char-equal (char-before) ?-))))))) + +;; check for case of if(stuff) and nothing else on line +;; ie +;; if(x > y) +;; +;; if(x < y) do somehting will not match +;; else blah blah will not match either +(defun groovy-not-if-or-else-etc-p ( pos ) + (save-excursion + (goto-char pos) + (back-to-indentation) + (not + (or + (and (looking-at "if") ; make sure nothing else on line + (progn (forward-sexp 2) + (groovy-ws-or-comment-to-eol-p (point)))) + (and (looking-at "}?else") + (progn (forward-char) + (forward-sexp 1) + (groovy-ws-or-comment-to-eol-p (point)))))))) + +(defun groovy-vsemi-status-unknown-p () nil) + +(c-lang-defconst c-vsemi-status-unknown-p-fn + groovy 'c-groovy-vsemi-status-unknown-p) + + +;; Java does not do this but perhaps it should? +(c-lang-defconst c-type-modifier-kwds + groovy '("volatile" "transient")) + +(c-lang-defconst c-typeless-decl-kwds + groovy (append (c-lang-const c-class-decl-kwds) + (c-lang-const c-brace-list-decl-kwds) + '("def"))) + +;;;; Should we be tinkering with `c-block-stmt-1-key' or `c-block-stmt-2-key' to deal with closures +;;;; following what appears to be function calls or even field names? + +;; Groovy allows use of `<%' and `%>' in template expressions. +;(c-lang-defconst c-other-op-syntax-tokens +; groovy '( "<%" "%>" )) + +;; Groovy does not allow the full set of Java keywords in the moifier category and, of course, there is the +;; `def' modifier which Groovy introduces to support dynamic typing. Should `const' be treated +;; as reserved here as it is in Java? +(c-lang-defconst c-modifier-kwds + groovy '( "abstract" "def" "final" "private" "protected" "public" "static" "synchronized" )) + +;; Java does not define these pseudo-kewords as keywords, why not? + +(c-lang-defconst c-constant-kwds + groovy '( "true" "false" "null" )) + +;; Why does Java mode not put `super' into the `c-primary-expr-kwds? + +(c-lang-defconst c-primary-expr-kwds + groovy '( "this" "super" )) + +;; Groovy does not allow anonymous classes as Java does. +(c-lang-defconst c-inexpr-class-kwds + groovy nil) + +(c-lang-defconst c-inexpr-brace-list-kwds + groovy nil) + +;;;; Should we be changing `c-opt-inexpr-brace-list-key' to deal with closures after function calls and +;;;; field expressions? + +;; We need to include the "as" for the cast and "in" for for. +(c-lang-defconst c-other-kwds + groovy '( "in" "as" )) + + +(defconst groovy-font-lock-keywords-1 (c-lang-const c-matchers-1 groovy) + "Minimal highlighting for Groovy mode. +Fontifies nothing except the syntactic fontification of strings and +comments.") + +(defconst groovy-font-lock-keywords-2 (c-lang-const c-matchers-2 groovy) + "Fast normal highlighting for Groovy mode. +In addition to `java-font-lock-keywords-1', this adds fontification of +keywords, simple types, declarations that are easy to recognize, the +user defined types on `java-font-lock-extra-types', and the doc +comment styles specified by `c-doc-comment-style'.") + +(defconst groovy-font-lock-keywords-3 (c-lang-const c-matchers-3 groovy) + "Accurate normal highlighting for Groovy mode. +Like `java-font-lock-keywords-2' but detects declarations in a more +accurate way that works in most cases for arbitrary types without the +need for `java-font-lock-extra-types'.") + +(defvar groovy-font-lock-keywords groovy-font-lock-keywords-3 + "Default expressions to highlight in Groovy mode.") + +(defun groovy-font-lock-keywords-2 () + (c-compose-keywords-list groovy-font-lock-keywords-2)) +(defun groovy-font-lock-keywords-3 () + (c-compose-keywords-list groovy-font-lock-keywords-3)) +(defun groovy-font-lock-keywords () + (c-compose-keywords-list groovy-font-lock-keywords)) + +(defvar groovy-mode-syntax-table nil + "Syntax table used in Groovy mode buffers.") +(or groovy-mode-syntax-table + (setq groovy-mode-syntax-table + (funcall (c-lang-const c-make-mode-syntax-table groovy)))) + +(defvar groovy-mode-abbrev-table nil + "Abbreviation table used in groovy-mode buffers.") +(c-define-abbrev-table 'groovy-mode-abbrev-table + ;; Keywords that if they occur first on a line might alter the syntactic context, and which + ;; therefore should trigger reindentation when they are completed. + '(("else" "else" c-electric-continued-statement 0) + ("while" "while" c-electric-continued-statement 0) + ("catch" "catch" c-electric-continued-statement 0) + ("finally" "finally" c-electric-continued-statement 0))) + +;; Jim Morris proposed changing to the following definition of groovy-mode-map 2009-11-27, but this change +;; has not made so as to continue to use the same code structure as still used in the Java mode. + +;(defvar groovy-mode-map (let ((map (c-make-inherited-keymap))) +; ;; Add bindings which are only useful for Groovy +; map) +; "Keymap used in groovy-mode buffers.") + +(defvar groovy-mode-map () + "Keymap used in groovy-mode buffers.") +(if groovy-mode-map + nil + (setq groovy-mode-map (c-make-inherited-keymap)) + ;; add bindings which are only useful for Groovy + ) + +;(easy-menu-define c-groovy-menu groovy-mode-map "Groovy Mode Commands" +; (cons "Groovy" (c-lang-const c-mode-menu groovy))) + +;;; Autoload mode trigger +;(add-to-list 'auto-mode-alist '("\\.groovy" . groovy-mode)) + +;; Custom variables +(defcustom groovy-mode-hook nil + "*Hook called by `groovy-mode'." + :type 'hook + :group 'c) + + +;;; The following are used to overide cc-mode indentation behavior to match groovy + +;; if we are in a closure that has an argument eg ends with -> (excluding comment) then +;; change indent else lineup with previous one +(defun groovy-mode-fix-closure-with-argument (langelem) + (save-excursion + (back-to-indentation) + (c-backward-syntactic-ws) + (backward-char 2) + (if (looking-at "->") ; if the line has a -> in it + (vector (+ (current-indentation) c-basic-offset)) ; then indent from base + 0))) + +;; A helper function from: http://mihai.bazon.net/projects/emacs-javascript-mode/javascript.el +;; Originally named js-lineup-arglist, renamed to groovy-lineup-arglist +(defun groovy-lineup-arglist (langelem) + ;; the "DWIM" in c-mode doesn't Do What I Mean. + ;; see doc of c-lineup-arglist for why I redefined this + (save-excursion + (let ((indent-pos (point))) + ;; Normal case. Indent to the token after the arglist open paren. + (goto-char (c-langelem-2nd-pos c-syntactic-element)) + (if (and c-special-brace-lists + (c-looking-at-special-brace-list)) + ;; Skip a special brace list opener like "({". + (progn (c-forward-token-2) + (forward-char)) + (forward-char)) + (let ((arglist-content-start (point))) + (c-forward-syntactic-ws) + (when (< (point) indent-pos) + (goto-char arglist-content-start) + (skip-chars-forward " \t")) + (vector (current-column)))))) + +(defun is-groovy-mode () + "return t if we are in groovy mode else nil" + (eq major-mode 'groovy-mode)) + +;; use defadvice to override the syntactic type if we have a +;; statement-cont, see if previous line has a virtual semicolon and if +;; so make it statement. +(defadvice c-guess-basic-syntax (after c-guess-basic-syntax-groovy activate) + (when (is-groovy-mode) + (save-excursion + (let* ((ankpos (progn + (beginning-of-line) + (c-backward-syntactic-ws) + (beginning-of-line) + (c-forward-syntactic-ws) + (point))) ; position to previous non-blank line + (curelem (c-langelem-sym (car ad-return-value)))) + (end-of-line) + (cond + ((eq 'statement-cont curelem) + (when (groovy-at-vsemi-p) ; if there is a virtual semi there then make it a statement + (setq ad-return-value `((statement ,ankpos))))) + + ((eq 'topmost-intro-cont curelem) + (when (groovy-at-vsemi-p) ; if there is a virtual semi there then make it a top-most-intro + (setq ad-return-value `((topmost-intro ,ankpos))))) + + ))))) + +;; This disables bracelists, as most of the time in groovy they are closures +;; We need to check we are currently in groovy mode +(defadvice c-inside-bracelist-p (around groovy-c-inside-bracelist-p activate) + (if (not (is-groovy-mode)) + ad-do-it + (setq ad-return-value nil))) + + +;; based on java-function-regexp +;; Complicated regexp to match method declarations in interfaces or classes +;; A nasty test case is: +;; else if(foo instanceof bar) { +;; which will get mistaken for a function as Groovy does not require types on arguments +;; so we need to check for empty parens or comma separated list, or type args +(defvar groovy-function-regexp + (concat + "^[ \t]*" ; leading white space + "\\(public\\|private\\|protected\\|" ; some of these 8 keywords + "abstract\\|final\\|static\\|" + "synchronized\\|native|def" + "\\|[ \t\n\r]\\)*" ; or whitespace + "[a-zA-Z0-9_$]*" ; optional return type + "[ \t\n\r]*[[]?[]]?" ; (could be array) + "[ \t\n\r]+" ; whitespace + "\\([a-zA-Z0-9_$]+\\)" ; the name we want + "[ \t\n\r]*" ; optional whitespace + "(" ; open the param list + "[ \t]*" ; optional whitespace + "\\(" + "[ \t\n\r]*\\|" ; empty parens or + "[a-zA-Z0-9_$]+\\|" ; single param or + ".+?,.+?\\|" ; multi comma separated params or + "[a-zA-Z0-9_$]+" ; a type + "[ \t\n\r]*[[]?[]]?" ; optional array + "[ \t\n\r]+[a-zA-Z0-9_$]+" ; and param + "\\)" + "[ \t\n\r]*" ; optional whitespace + ")" ; end the param list + "[ \t\n\r]*" ; whitespace +; "\\(throws\\([, \t\n\r]\\|[a-zA-Z0-9_$]\\)+\\)?{" + "\\(throws[^{;]+\\)?" ; optional exceptions + "[;{]" ; ending ';' (interfaces) or '{' + ; TODO groovy interfaces don't need to end in ; + ) + "Matches method names in groovy code, select match 2") + +(defvar groovy-class-regexp + "^[ \t\n\r]*\\(final\\|abstract\\|public\\|[ \t\n\r]\\)*class[ \t\n\r]+\\([a-zA-Z0-9_$]+\\)[^;{]*{" + "Matches class names in groovy code, select match 2") + +(defvar groovy-interface-regexp + "^[ \t\n\r]*\\(abstract\\|public\\|[ \t\n\r]\\)*interface[ \t\n\r]+\\([a-zA-Z0-9_$]+\\)[^;]*;" + "Matches interface names in groovy code, select match 2") + +(defvar groovy-imenu-regexp + (list (list nil groovy-function-regexp 2) + (list ".CLASSES." groovy-class-regexp 2) + (list ".INTERFACES." groovy-interface-regexp 2) + (list ".CLOSURES." "def[ \t]+\\([a-zA-Z_][a-zA-Z0-9_]*\\)[ \t]*=[ \t]*{" 1)) + "Imenu expression for Groovy") + + +;; Setup imenu to extract functions, classes, interfaces and closures assigned to variables +(defvar cc-imenu-groovy-generic-expression + groovy-imenu-regexp + "Imenu generic expression for Groovy mode. See `imenu-generic-expression'.") + +;;; The entry point into the mode +(defun groovy-mode () + "Major mode for editing Groovy code. + +The hook `c-mode-common-hook' is run with no args at mode +initialization, then `groovy-mode-hook'. + +Key bindings: +\\{groovy-mode-map}" + (interactive) + (kill-all-local-variables) + (c-initialize-cc-mode t) + (set-syntax-table groovy-mode-syntax-table) + (setq major-mode 'groovy-mode + mode-name "Groovy" + local-abbrev-table groovy-mode-abbrev-table + abbrev-mode t) + (use-local-map groovy-mode-map) + (c-init-language-vars groovy-mode) + (c-common-init 'groovy-mode) + ;;(easy-menu-add groovy-menu) + (cc-imenu-init cc-imenu-groovy-generic-expression) + (c-run-mode-hooks 'c-mode-common-hook 'groovy-mode-hook) + + ;; quick fix for misalignment of statements with = + (setq c-label-minimum-indentation 0) + + ;; fix for indentation after a closure param list + (c-set-offset 'statement 'groovy-mode-fix-closure-with-argument) + + ;; get arglists (in groovy lists or maps) to align properly + (c-set-offset 'arglist-close '(c-lineup-close-paren)) + (c-set-offset 'arglist-cont 0) + (c-set-offset 'arglist-cont-nonempty '(groovy-lineup-arglist)) + (c-set-offset 'arglist-intro '+) + + (c-update-modeline)) + + +(provide 'groovy-mode) + +;;; groovy-mode.el ends here diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/.git/HEAD --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/haskell-mode/.git/HEAD Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,1 @@ +ref: refs/heads/master diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/.git/config --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/haskell-mode/.git/config Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,12 @@ +[core] + repositoryformatversion = 0 + filemode = true + bare = false + logallrefupdates = true + ignorecase = true +[remote "origin"] + fetch = +refs/heads/*:refs/remotes/origin/* + url = https://github.com/haskell/haskell-mode +[branch "master"] + remote = origin + merge = refs/heads/master diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/.git/description --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/haskell-mode/.git/description Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,1 @@ +Unnamed repository; edit this file 'description' to name the repository. diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/.git/hooks/applypatch-msg.sample --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/haskell-mode/.git/hooks/applypatch-msg.sample Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,15 @@ +#!/bin/sh +# +# An example hook script to check the commit log message taken by +# applypatch from an e-mail message. +# +# The hook should exit with non-zero status after issuing an +# appropriate message if it wants to stop the commit. The hook is +# allowed to edit the commit message file. +# +# To enable this hook, rename this file to "applypatch-msg". + +. git-sh-setup +test -x "$GIT_DIR/hooks/commit-msg" && + exec "$GIT_DIR/hooks/commit-msg" ${1+"$@"} +: diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/.git/hooks/commit-msg.sample --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/haskell-mode/.git/hooks/commit-msg.sample Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,24 @@ +#!/bin/sh +# +# An example hook script to check the commit log message. +# Called by "git commit" with one argument, the name of the file +# that has the commit message. The hook should exit with non-zero +# status after issuing an appropriate message if it wants to stop the +# commit. The hook is allowed to edit the commit message file. +# +# To enable this hook, rename this file to "commit-msg". + +# Uncomment the below to add a Signed-off-by line to the message. +# Doing this in a hook is a bad idea in general, but the prepare-commit-msg +# hook is more suited to it. +# +# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') +# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" + +# This example catches duplicate Signed-off-by lines. + +test "" = "$(grep '^Signed-off-by: ' "$1" | + sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || { + echo >&2 Duplicate Signed-off-by lines. + exit 1 +} diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/.git/hooks/post-commit.sample --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/haskell-mode/.git/hooks/post-commit.sample Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,8 @@ +#!/bin/sh +# +# An example hook script that is called after a successful +# commit is made. +# +# To enable this hook, rename this file to "post-commit". + +: Nothing diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/.git/hooks/post-receive.sample --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/haskell-mode/.git/hooks/post-receive.sample Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,15 @@ +#!/bin/sh +# +# An example hook script for the "post-receive" event. +# +# The "post-receive" script is run after receive-pack has accepted a pack +# and the repository has been updated. It is passed arguments in through +# stdin in the form +# +# For example: +# aa453216d1b3e49e7f6f98441fa56946ddcd6a20 68f7abf4e6f922807889f52bc043ecd31b79f814 refs/heads/master +# +# see contrib/hooks/ for a sample, or uncomment the next line and +# rename the file to "post-receive". + +#. /usr/share/doc/git-core/contrib/hooks/post-receive-email diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/.git/hooks/post-update.sample --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/haskell-mode/.git/hooks/post-update.sample Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,8 @@ +#!/bin/sh +# +# An example hook script to prepare a packed repository for use over +# dumb transports. +# +# To enable this hook, rename this file to "post-update". + +exec git update-server-info diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/.git/hooks/pre-applypatch.sample --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/haskell-mode/.git/hooks/pre-applypatch.sample Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,14 @@ +#!/bin/sh +# +# An example hook script to verify what is about to be committed +# by applypatch from an e-mail message. +# +# The hook should exit with non-zero status after issuing an +# appropriate message if it wants to stop the commit. +# +# To enable this hook, rename this file to "pre-applypatch". + +. git-sh-setup +test -x "$GIT_DIR/hooks/pre-commit" && + exec "$GIT_DIR/hooks/pre-commit" ${1+"$@"} +: diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/.git/hooks/pre-commit.sample --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/haskell-mode/.git/hooks/pre-commit.sample Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,46 @@ +#!/bin/sh +# +# An example hook script to verify what is about to be committed. +# Called by "git commit" with no arguments. The hook should +# exit with non-zero status after issuing an appropriate message if +# it wants to stop the commit. +# +# To enable this hook, rename this file to "pre-commit". + +if git rev-parse --verify HEAD >/dev/null 2>&1 +then + against=HEAD +else + # Initial commit: diff against an empty tree object + against=4b825dc642cb6eb9a060e54bf8d69288fbee4904 +fi + +# If you want to allow non-ascii filenames set this variable to true. +allownonascii=$(git config hooks.allownonascii) + +# Cross platform projects tend to avoid non-ascii filenames; prevent +# them from being added to the repository. We exploit the fact that the +# printable range starts at the space character and ends with tilde. +if [ "$allownonascii" != "true" ] && + # Note that the use of brackets around a tr range is ok here, (it's + # even required, for portability to Solaris 10's /usr/bin/tr), since + # the square bracket bytes happen to fall in the designated range. + test "$(git diff --cached --name-only --diff-filter=A -z $against | + LC_ALL=C tr -d '[ -~]\0')" +then + echo "Error: Attempt to add a non-ascii file name." + echo + echo "This can cause problems if you want to work" + echo "with people on other platforms." + echo + echo "To be portable it is advisable to rename the file ..." + echo + echo "If you know what you are doing you can disable this" + echo "check using:" + echo + echo " git config hooks.allownonascii true" + echo + exit 1 +fi + +exec git diff-index --check --cached $against -- diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/.git/hooks/pre-rebase.sample --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/haskell-mode/.git/hooks/pre-rebase.sample Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,169 @@ +#!/bin/sh +# +# Copyright (c) 2006, 2008 Junio C Hamano +# +# The "pre-rebase" hook is run just before "git rebase" starts doing +# its job, and can prevent the command from running by exiting with +# non-zero status. +# +# The hook is called with the following parameters: +# +# $1 -- the upstream the series was forked from. +# $2 -- the branch being rebased (or empty when rebasing the current branch). +# +# This sample shows how to prevent topic branches that are already +# merged to 'next' branch from getting rebased, because allowing it +# would result in rebasing already published history. + +publish=next +basebranch="$1" +if test "$#" = 2 +then + topic="refs/heads/$2" +else + topic=`git symbolic-ref HEAD` || + exit 0 ;# we do not interrupt rebasing detached HEAD +fi + +case "$topic" in +refs/heads/??/*) + ;; +*) + exit 0 ;# we do not interrupt others. + ;; +esac + +# Now we are dealing with a topic branch being rebased +# on top of master. Is it OK to rebase it? + +# Does the topic really exist? +git show-ref -q "$topic" || { + echo >&2 "No such branch $topic" + exit 1 +} + +# Is topic fully merged to master? +not_in_master=`git rev-list --pretty=oneline ^master "$topic"` +if test -z "$not_in_master" +then + echo >&2 "$topic is fully merged to master; better remove it." + exit 1 ;# we could allow it, but there is no point. +fi + +# Is topic ever merged to next? If so you should not be rebasing it. +only_next_1=`git rev-list ^master "^$topic" ${publish} | sort` +only_next_2=`git rev-list ^master ${publish} | sort` +if test "$only_next_1" = "$only_next_2" +then + not_in_topic=`git rev-list "^$topic" master` + if test -z "$not_in_topic" + then + echo >&2 "$topic is already up-to-date with master" + exit 1 ;# we could allow it, but there is no point. + else + exit 0 + fi +else + not_in_next=`git rev-list --pretty=oneline ^${publish} "$topic"` + /usr/bin/perl -e ' + my $topic = $ARGV[0]; + my $msg = "* $topic has commits already merged to public branch:\n"; + my (%not_in_next) = map { + /^([0-9a-f]+) /; + ($1 => 1); + } split(/\n/, $ARGV[1]); + for my $elem (map { + /^([0-9a-f]+) (.*)$/; + [$1 => $2]; + } split(/\n/, $ARGV[2])) { + if (!exists $not_in_next{$elem->[0]}) { + if ($msg) { + print STDERR $msg; + undef $msg; + } + print STDERR " $elem->[1]\n"; + } + } + ' "$topic" "$not_in_next" "$not_in_master" + exit 1 +fi + +exit 0 + +################################################################ + +This sample hook safeguards topic branches that have been +published from being rewound. + +The workflow assumed here is: + + * Once a topic branch forks from "master", "master" is never + merged into it again (either directly or indirectly). + + * Once a topic branch is fully cooked and merged into "master", + it is deleted. If you need to build on top of it to correct + earlier mistakes, a new topic branch is created by forking at + the tip of the "master". This is not strictly necessary, but + it makes it easier to keep your history simple. + + * Whenever you need to test or publish your changes to topic + branches, merge them into "next" branch. + +The script, being an example, hardcodes the publish branch name +to be "next", but it is trivial to make it configurable via +$GIT_DIR/config mechanism. + +With this workflow, you would want to know: + +(1) ... if a topic branch has ever been merged to "next". Young + topic branches can have stupid mistakes you would rather + clean up before publishing, and things that have not been + merged into other branches can be easily rebased without + affecting other people. But once it is published, you would + not want to rewind it. + +(2) ... if a topic branch has been fully merged to "master". + Then you can delete it. More importantly, you should not + build on top of it -- other people may already want to + change things related to the topic as patches against your + "master", so if you need further changes, it is better to + fork the topic (perhaps with the same name) afresh from the + tip of "master". + +Let's look at this example: + + o---o---o---o---o---o---o---o---o---o "next" + / / / / + / a---a---b A / / + / / / / + / / c---c---c---c B / + / / / \ / + / / / b---b C \ / + / / / / \ / + ---o---o---o---o---o---o---o---o---o---o---o "master" + + +A, B and C are topic branches. + + * A has one fix since it was merged up to "next". + + * B has finished. It has been fully merged up to "master" and "next", + and is ready to be deleted. + + * C has not merged to "next" at all. + +We would want to allow C to be rebased, refuse A, and encourage +B to be deleted. + +To compute (1): + + git rev-list ^master ^topic next + git rev-list ^master next + + if these match, topic has not merged in next at all. + +To compute (2): + + git rev-list master..topic + + if this is empty, it is fully merged to "master". diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/.git/hooks/prepare-commit-msg.sample --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/haskell-mode/.git/hooks/prepare-commit-msg.sample Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,36 @@ +#!/bin/sh +# +# An example hook script to prepare the commit log message. +# Called by "git commit" with the name of the file that has the +# commit message, followed by the description of the commit +# message's source. The hook's purpose is to edit the commit +# message file. If the hook fails with a non-zero status, +# the commit is aborted. +# +# To enable this hook, rename this file to "prepare-commit-msg". + +# This hook includes three examples. The first comments out the +# "Conflicts:" part of a merge commit. +# +# The second includes the output of "git diff --name-status -r" +# into the message, just before the "git status" output. It is +# commented because it doesn't cope with --amend or with squashed +# commits. +# +# The third example adds a Signed-off-by line to the message, that can +# still be edited. This is rarely a good idea. + +case "$2,$3" in + merge,) + /usr/bin/perl -i.bak -ne 's/^/# /, s/^# #/#/ if /^Conflicts/ .. /#/; print' "$1" ;; + +# ,|template,) +# /usr/bin/perl -i.bak -pe ' +# print "\n" . `git diff --cached --name-status -r` +# if /^#/ && $first++ == 0' "$1" ;; + + *) ;; +esac + +# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') +# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/.git/hooks/update.sample --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/haskell-mode/.git/hooks/update.sample Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,128 @@ +#!/bin/sh +# +# An example hook script to blocks unannotated tags from entering. +# Called by "git receive-pack" with arguments: refname sha1-old sha1-new +# +# To enable this hook, rename this file to "update". +# +# Config +# ------ +# hooks.allowunannotated +# This boolean sets whether unannotated tags will be allowed into the +# repository. By default they won't be. +# hooks.allowdeletetag +# This boolean sets whether deleting tags will be allowed in the +# repository. By default they won't be. +# hooks.allowmodifytag +# This boolean sets whether a tag may be modified after creation. By default +# it won't be. +# hooks.allowdeletebranch +# This boolean sets whether deleting branches will be allowed in the +# repository. By default they won't be. +# hooks.denycreatebranch +# This boolean sets whether remotely creating branches will be denied +# in the repository. By default this is allowed. +# + +# --- Command line +refname="$1" +oldrev="$2" +newrev="$3" + +# --- Safety check +if [ -z "$GIT_DIR" ]; then + echo "Don't run this script from the command line." >&2 + echo " (if you want, you could supply GIT_DIR then run" >&2 + echo " $0 )" >&2 + exit 1 +fi + +if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then + echo "Usage: $0 " >&2 + exit 1 +fi + +# --- Config +allowunannotated=$(git config --bool hooks.allowunannotated) +allowdeletebranch=$(git config --bool hooks.allowdeletebranch) +denycreatebranch=$(git config --bool hooks.denycreatebranch) +allowdeletetag=$(git config --bool hooks.allowdeletetag) +allowmodifytag=$(git config --bool hooks.allowmodifytag) + +# check for no description +projectdesc=$(sed -e '1q' "$GIT_DIR/description") +case "$projectdesc" in +"Unnamed repository"* | "") + echo "*** Project description file hasn't been set" >&2 + exit 1 + ;; +esac + +# --- Check types +# if $newrev is 0000...0000, it's a commit to delete a ref. +zero="0000000000000000000000000000000000000000" +if [ "$newrev" = "$zero" ]; then + newrev_type=delete +else + newrev_type=$(git cat-file -t $newrev) +fi + +case "$refname","$newrev_type" in + refs/tags/*,commit) + # un-annotated tag + short_refname=${refname##refs/tags/} + if [ "$allowunannotated" != "true" ]; then + echo "*** The un-annotated tag, $short_refname, is not allowed in this repository" >&2 + echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2 + exit 1 + fi + ;; + refs/tags/*,delete) + # delete tag + if [ "$allowdeletetag" != "true" ]; then + echo "*** Deleting a tag is not allowed in this repository" >&2 + exit 1 + fi + ;; + refs/tags/*,tag) + # annotated tag + if [ "$allowmodifytag" != "true" ] && git rev-parse $refname > /dev/null 2>&1 + then + echo "*** Tag '$refname' already exists." >&2 + echo "*** Modifying a tag is not allowed in this repository." >&2 + exit 1 + fi + ;; + refs/heads/*,commit) + # branch + if [ "$oldrev" = "$zero" -a "$denycreatebranch" = "true" ]; then + echo "*** Creating a branch is not allowed in this repository" >&2 + exit 1 + fi + ;; + refs/heads/*,delete) + # delete branch + if [ "$allowdeletebranch" != "true" ]; then + echo "*** Deleting a branch is not allowed in this repository" >&2 + exit 1 + fi + ;; + refs/remotes/*,commit) + # tracking branch + ;; + refs/remotes/*,delete) + # delete tracking branch + if [ "$allowdeletebranch" != "true" ]; then + echo "*** Deleting a tracking branch is not allowed in this repository" >&2 + exit 1 + fi + ;; + *) + # Anything else (is there anything else?) + echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2 + exit 1 + ;; +esac + +# --- Finished +exit 0 diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/.git/index Binary file .emacs.d/haskell-mode/.git/index has changed diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/.git/info/exclude --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/haskell-mode/.git/info/exclude Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,6 @@ +# git ls-files --others --exclude-from=.git/info/exclude +# Lines that start with '#' are comments. +# For a project mostly in C, the following would be a good set of +# exclude patterns (uncomment them if you want to use them): +# *.[oa] +# *~ diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/.git/logs/HEAD --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/haskell-mode/.git/logs/HEAD Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,1 @@ +0000000000000000000000000000000000000000 e9587d92c0ec7aecf7794fc3d6ed99160e2f7cb3 kkb 1395817804 +0900 clone: from https://github.com/haskell/haskell-mode diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/.git/logs/refs/heads/master --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/haskell-mode/.git/logs/refs/heads/master Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,1 @@ +0000000000000000000000000000000000000000 e9587d92c0ec7aecf7794fc3d6ed99160e2f7cb3 kkb 1395817804 +0900 clone: from https://github.com/haskell/haskell-mode diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/.git/objects/pack/pack-1075dd2c1582d96fa6392c245f6bf76e95097836.idx Binary file .emacs.d/haskell-mode/.git/objects/pack/pack-1075dd2c1582d96fa6392c245f6bf76e95097836.idx has changed diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/.git/objects/pack/pack-1075dd2c1582d96fa6392c245f6bf76e95097836.pack Binary file .emacs.d/haskell-mode/.git/objects/pack/pack-1075dd2c1582d96fa6392c245f6bf76e95097836.pack has changed diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/.git/packed-refs --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/haskell-mode/.git/packed-refs Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,32 @@ +# pack-refs with: peeled +6a4d4bdd178c65183a715c7729941a0b8fe5f253 refs/tags/v13.10 +ddeb6d92a1f06df22b464d261ad05f201e6af181 refs/tags/v13.08 +381cc63e66e7604aea19f74f87b31bda63cc512b refs/tags/v13.07 +d86c4d2326a7c209f710928fc0d8781fd62016f4 refs/tags/v13.06 +166ec399614226dd6f8320a9732178b9ea3f190f refs/tags/2_9_1 +^df265ed372170b19053853c487275d97adf68dce +385ea3f845b890fe101995b7508115bbe91bc587 refs/tags/2_9_0 +^5c4d9ffe3dff13b4cfe5a444b5f06a804164eea2 +5a6b1529c88eeb88dc44c9da661c497ecfcd7d75 refs/tags/2_8_0 +^9a692fcdc4f275efb893c180c6e1d9a183545244 +6c4f97f8f8778821f4d1ddff9a2d4703bc4249db refs/tags/2_7_0 +^6d6d17ed2ce48c7783df8993168e0b7e24ecc2b3 +a986d88384d0403e762a1a96696efe67833ebfc3 refs/tags/2_6_4 +^e3959de988eb2c83176f8a147be1ae499c2a1436 +c4a76e874ad796cb4813a0d672732ed2b1d7bc40 refs/tags/2_6_3 +^c292c7cfde6386b3a0389c7dd2ddc71b07625b11 +ef007d82e7b337732853bc32056779027b851855 refs/tags/2_6_2 +^3b1a5ad3388569700290c2c5da61bc448b488d62 +753421777852b0dde5c8f899ccbd6920c10f2f43 refs/tags/2_6_1 +^02ac722ab1b1e4bd4c2d5463920b0c9247972d11 +22a963b80c32cd9c16f804341cdbe41c801470e8 refs/tags/2_6 +^4a16cc3367aa067a71d8dd74bab1d6de45b09bfa +8c49232e5e507cd978aaa5a33cbf8dda7b43518f refs/tags/2_5_1 +^72d395fc5fe49834116c0aaeb25d1731fa47d72c +2fd8d8b93ba4c5b6f5f4ef856e867ad33ee404bb refs/remotes/origin/w3m_haddock +79efd68f1870d4c28f6d4edb688891f439b3bcf9 refs/remotes/origin/sort-imports +e9587d92c0ec7aecf7794fc3d6ed99160e2f7cb3 refs/remotes/origin/master +9025e094aadc91f6ac98e1b160c43026877fba21 refs/remotes/origin/interactive-fast-keys +df0347d3a826614fe297b4e743c01bb7350fc352 refs/remotes/origin/highlight-type-info +935f162eb9e91a03e0ebe09f110dfbcdf2f6cfec refs/remotes/origin/gh-pages +ba548a50de43e060b1e2e0b92a81aa06500590f3 refs/remotes/origin/darcs diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/.git/refs/heads/master --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/haskell-mode/.git/refs/heads/master Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,1 @@ +e9587d92c0ec7aecf7794fc3d6ed99160e2f7cb3 diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/.git/refs/remotes/origin/HEAD --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/haskell-mode/.git/refs/remotes/origin/HEAD Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,1 @@ +ref: refs/remotes/origin/master diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/.gitignore --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/haskell-mode/.gitignore Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,6 @@ +*.elc +*~ +haskell-mode-autoloads.el +haskell-mode.info +haskell-mode.tmp.texi +dir \ No newline at end of file diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/.travis.yml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/haskell-mode/.travis.yml Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,40 @@ +language: emacs-lisp + +env: + matrix: + - EMACS=emacs23 + - EMACS=emacs24 + - EMACS=emacs-snapshot + +matrix: + allow_failures: + - env: + - EMACS=emacs-snapshot + +install: + - if [ "$EMACS" = "emacs23" ]; then + sudo apt-get update -qq && + sudo apt-get install -qq emacs23-gtk emacs23-el; + fi + - if [ "$EMACS" = "emacs24" ]; then + sudo add-apt-repository -y ppa:cassou/emacs && + sudo apt-get update -qq && + sudo apt-get install -qq emacs24 emacs24-el; + fi + - if [ "$EMACS" = "emacs-snapshot" ]; then + sudo add-apt-repository -y ppa:cassou/emacs && + sudo apt-get update -qq && + sudo apt-get install -qq emacs-snapshot && + sudo apt-get install -qq emacs-snapshot-el emacs-snapshot-gtk; + fi + +script: + lsb_release -a && $EMACS --version && make EMACS=$EMACS check + +notifications: + email: false + +# Local Variables: +# indent-tabs-mode: nil +# coding: utf-8 +# End: diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/Makefile --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/haskell-mode/Makefile Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,124 @@ +VERSION = $(shell git describe --tags --match 'v[0-9]*' --abbrev=0 | sed 's/^v//;s/\.0*/./g') +GIT_VERSION = $(shell git describe --tags --match 'v[0-9]*' --long --dirty | sed 's/^v//') + +INSTALL_INFO = install-info +EMACS = emacs +EFLAGS = +BATCH = $(EMACS) $(EFLAGS) --batch -Q -L . +SUBST_ATAT = sed -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g;s/@GIT_VERSION@/$(GIT_VERSION)/g;s/@@VERSION@@/$(VERSION)/g;s/@VERSION@/$(VERSION)/g' + +ELFILES = \ + ghc-core.el \ + haskell-align-imports.el \ + haskell-c.el \ + haskell-cabal.el \ + haskell-checkers.el \ + haskell-compat.el \ + haskell-compile.el \ + haskell-decl-scan.el \ + haskell-doc.el \ + haskell-font-lock.el \ + haskell-indent.el \ + haskell-indentation.el \ + haskell-interactive-mode.el \ + haskell-menu.el \ + haskell-mode.el \ + haskell-move-nested.el \ + haskell-navigate-imports.el \ + haskell-package.el \ + haskell-process.el \ + haskell-session.el \ + haskell-show.el \ + haskell-simple-indent.el \ + haskell-sort-imports.el \ + haskell-string.el \ + haskell-str.el \ + haskell-unicode-input-method.el \ + haskell-utils.el \ + haskell-yas.el \ + haskell-presentation-mode.el \ + inf-haskell.el + +ELCFILES = $(ELFILES:.el=.elc) +AUTOLOADS = haskell-mode-autoloads.el + +PKG_DIST_FILES = $(ELFILES) logo.svg NEWS haskell-mode.info dir +PKG_TAR = haskell-mode-$(VERSION).tar +ELCHECKS=$(addprefix check-, $(ELFILES:.el=)) + +%.elc: %.el + @$(BATCH) \ + --eval "(byte-compile-disable-warning 'cl-functions)" \ + -f batch-byte-compile $< + +.PHONY: all compile info clean check $(ELCHECKS) elpa package + +all: compile $(AUTOLOADS) info + +compile: $(ELCFILES) + +$(ELCHECKS): check-%: %.el + @$(BATCH) --eval '(when (check-declare-file "$*.el") (error "check-declare failed"))' + @$(BATCH) \ + --eval "(setq byte-compile-error-on-warn t)" \ + --eval "(byte-compile-disable-warning 'cl-functions)" \ + -f batch-byte-compile $*.el + @$(RM) $*.elc + @if [ -f "$(<:%.el=tests/%-tests.el)" ]; then \ + if $(BATCH) --eval "(require 'ert)" 2> /dev/null; then \ + echo; \ + $(BATCH) -l "$(<:%.el=tests/%-tests.el)" -f ert-run-tests-batch-and-exit; \ + else \ + echo "ERT not available, skipping unit tests"; \ + fi; \ + fi + @echo "--" + +check: clean $(ELCHECKS) + @echo "checks passed!" + +clean: + $(RM) $(ELCFILES) $(AUTOLOADS) $(AUTOLOADS:.el=.elc) $(PKG_TAR) haskell-mode.tmp.texi haskell-mode.info dir + +info: haskell-mode.info dir + +dir: haskell-mode.info + $(INSTALL_INFO) --dir=$@ $< + +haskell-mode.tmp.texi: haskell-mode.texi + $(SUBST_ATAT) < haskell-mode.texi > haskell-mode.tmp.texi + +haskell-mode.info: haskell-mode.tmp.texi + $(MAKEINFO) $(MAKEINFO_FLAGS) -o $@ $< + +haskell-mode.html: haskell-mode.tmp.texi + $(MAKEINFO) $(MAKEINFO_FLAGS) --html --no-split -o $@ $< + +# Generate ELPA-compatible package +package: $(PKG_TAR) +elpa: $(PKG_TAR) + +$(PKG_TAR): $(PKG_DIST_FILES) haskell-mode-pkg.el.in + rm -rf haskell-mode-$(VERSION) + mkdir haskell-mode-$(VERSION) + cp $(PKG_DIST_FILES) haskell-mode-$(VERSION)/ + $(SUBST_ATAT) < haskell-mode-pkg.el.in > haskell-mode-$(VERSION)/haskell-mode-pkg.el + $(SUBST_ATAT) < haskell-mode.el > haskell-mode-$(VERSION)/haskell-mode.el + (sed -n -e '/^;;; Commentary/,/^;;;/p' | egrep '^;;( |$$)' | cut -c4-) < haskell-mode.el > haskell-mode-$(VERSION)/README + tar cvf $@ haskell-mode-$(VERSION) + rm -rf haskell-mode-$(VERSION) + @echo + @echo "Created ELPA compatible distribution package '$@' from $(GIT_VERSION)" + +$(AUTOLOADS): $(ELFILES) haskell-mode.elc + $(BATCH) \ + --eval '(setq make-backup-files nil)' \ + --eval '(setq generated-autoload-file "$(CURDIR)/$@")' \ + -f batch-update-autoloads "." + +# HACK: embed version number into .elc file +haskell-mode.elc: haskell-mode.el + $(SUBST_ATAT) < haskell-mode.el > haskell-mode.tmp.el + @$(BATCH) --eval "(byte-compile-disable-warning 'cl-functions)" -f batch-byte-compile haskell-mode.tmp.el + mv haskell-mode.tmp.elc haskell-mode.elc + $(RM) haskell-mode.tmp.el diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/NEWS --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/haskell-mode/NEWS Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,408 @@ +Haskell Mode NEWS -*- org -*- + +This file uses Org mode. Some useful (default) key-bindings: + - Use "C-c C-n"/"C-c C-p" to jump to next/prev heading + - Use "" to expand/collapse nodes + - Use "" to cycle visibility of all nodes + - Use "C-c C-o" to open links + +* Changes in 13.10 + +- Small fix for haskell-simple-indent: Certain indentation situations + cause valname-string to be nil, which haskell-trim did not handle + gracefully (naturally, since nil != ""). + +- Luke Hoersten's Shnippet merged in under snippets/. + +- haskell-presentation-mode is now a haskell-mode derived mode. + +- Small improvement to haskell-process-do-info (works on constructors + now and underscored names). + +- Add haskell-indent-spaces configuration variable. + +- The command string to run cabal commands is slightly more + configurable. See: C-h f haskell-process-do-cabal-format-string + +* Changes in 13.8 + +See also [[https://github.com/haskell/haskell-mode/compare/v13.07...v13.08][detailed Git history]]. + +- Make `haskell-simple-indent-mode' a proper minor mode with `SInd` as + mode-line lighter + +- Support popular "λ> " prompt in inf-haskell by default + +- Hide internal `*print-haskell-mode*' buffers + (used when `haskell-interactive-mode-eval-mode' is active) + +- Add tab-completion support for haskell-interactive-mode + (requires `:complete' command support in GHCi) + +- Add support to `haskell-process-do-info` to perform `:browse!` query + on module name when called on import statement line + +- `haskell-decl-scan-mode': + - New customize group `haskell-decl-scan' + - New flag `haskell-decl-scan-bindings-as-variables' for controlling + whether to put value bindings into the "Variables" category. + - New flag `haskell-decl-scan-add-to-menubar' for controlling + whether to add "Declarations" menu entry to menu bar. + - New manual section node `(haskell-mode)haskell-decl-scan-mode' + +- Add support for [[http://www.haskell.org/ghc/docs/latest/html/users_guide/syntax-extns.html#lambda-case][LambdaCase]] syntax extension to `haskell-indentation` + +- Change `haskell-indentation-mode' to never jump back a whole line + when pressing DEL. The old behavior can be restored by setting + `haskell-indentation-delete-backward-jump-line' to t + +- New convenience function `haskell-cabal-visit-file' for locating and + visiting most likely `.cabal` file associated with current buffer + +- Add support for [[http://www.haskell.org/ghc/docs/latest/html/users_guide/syntax-extns.html#package-import][PackageImports]] and [[http://www.haskell.org/ghc/docs/latest/html/users_guide/syntax-extns.html#safe-imports-ext][SafeHaskell]] syntax extensions to + `haskell-decl-scan-mode' parser + +- Add `turn-{on,off}-haskell-doc' commands as aliases for the existing + `turn-{on,off}-haskell-doc-mode' commands + +- Add support for "cabal repl" process type to `haskell-interactive-mode' + +- Add new Haskell compilation sub-mode and associated `haskell-compile' + command + +* Changes in 13.7 + +See also [[https://github.com/haskell/haskell-mode/compare/v13.06...v13.07][detailed Git history]]. + +- Convert NEWS (this file) to Org mode style and include NEWS file in + package and add command for visiting NEWS file + (M-x haskell-mode-view-news) + +- Officially drop support for versions prior to Emacs 23 + +- New work-in-progress Info manual for haskell-mode + +- Remove deprecated `haskell-{hugs,ghci}' modules + +- Font-locking changes: + - Remove deprecated `turn-on-haskell-font-lock` function + - Improve font-locking of type-signatures in presence of newlines + - Use `font-lock-preprocessor-face' instead of the previously used + `font-lock-warning-face` for CPP directives + - Use `font-lock-warning-face` instead of the previously used + `font-lock-preprocessor-face` for Git merge conflict annotations. + +- Improvements to `haskell-move-nested' module: + - Add support for operating on active regions + - New interactive commands `haskell-move-nested-{left,right}` which + support numeric prefix arguments for controlling the amount of + shifting to apply. + +- Add `haskell-unicode-input-method.el` to distribution + (enable with `turn-on-haskell-unicode-input-method`) + +- Fix all byte-compilation warnings + +- Build-system: + - For in-place installation, `haskell-site-file.el' is renamed + to `haskell-mode-autoloads.el` + - Auto-generate ELPA compatible README file by extracting header of + haskell-mode.el + - New "make check" target + - Add Travis-CI build jobs for testing byte-compilation with + multiple Emacs versions + +- Reorganize customize settings + - Add new convenience function for browsing all Haskell Mode settings + (M-x haskell-customize) + - Add `:link' keywords pointing to the new Info manual + - Add `:group' keywords to modes to make (M-x customize-mode) work + - Create new customization groups `haskell-interactive' and `inferior-haskell' + to clean up namespace + - Create new customization group `ghc-core` containing the two new + customization variables `ghc-core-program` and `ghc-core-program-args`. + +- Improvements to haskell-interactive-mode + - Add support for deleting compile messages superseded by recompile/reloads + (M-x customize-variable RET haskell-interactive-mode-delete-superseded-errors) + - Fix `C-u M-x haskell-process-do-type` inserting bad signatures + - Integrate with Emacs' `next-error` subsystem + - Add "C-c C-f" binding to REPL keymap for enabling `next-error-follow-minor-mode' + - Add support for `-ferror-spans`-style compile messages + - Add `-ferror-spans` as default for `haskell-process-args-ghci` + - Add optional argument to + `haskell-session-{all,installed,project}-modules' to suppress + session-creation. This is useful for yasnippet usage, see commit + 517fd7e for an example. + - Change default for `haskell-process-path-ghci` to a static "ghci" + - Fix `haskell-interactive-switch` not selecting the REPL window + - Make `*haskell-process-log*` buffer configurable + (controlled via new `haskell-process-log` customize option) + +* Changes in 13.6 + +See also [[https://github.com/haskell/haskell-mode/compare/2_9_1...v13.06][detailed Git history]]. + +- Switch to new versioning scheme + +- Switch to MELPA/Marmalade based packaging + +- Cleanup/refactor build-system + +- Enhance `M-x haskell-version` to report more detailed versioning + information + +- Make haskell-interactive-mode emulate comint/eshell history navigation + (see commit 0e96843 for more details) + +- Improvements to haskell-interactive-mode + - Improve killing/restarting haskell-interactive sessions + - Improve directory prompting and resolution + - Fix redundant-import suggest trigger to support qualified imports + - Detect all abbreviations of an user-inputted ":quit" + - Fix regexps for recent GHC 7.x compiler messages + - Customizable commandline args for GHCi + (M-x customize-variable RET haskell-process-args-ghci) + - New command to load or reload via prefix argument + (M-x haskell-process-load-or-reload) + - Fix haskell-interactive-mode prompt detection + - Add cabal-ghci as supported process mode + - Add a customization option for the visibility of multi-line errors + (M-x customize-variable RET haskell-interactive-mode-hide-multi-line-errors) + +- Add forward declarations to reduce Elisp bytecompile warnings + +- Improvements to `haskell-indentation` + - Add support for the UnicodeSyntax tokens `→`, `←`, and `∷`. + - Indent "=" following data/type/newtype declarations. + - Align "->"/"→" arrows in types under "::"/"∷" + - Make customizable whether "" deletes indentation too + (via `haskell-indentation-delete-backward-indentation` and + `haskell-indentation-delete-indentation`) + - Properly indent 'rec' keyword, same as 'mdo' + - Minor optimizations. + +- Add support for "'"-prefixed constructors (-> DataKinds) to font-locking + +- New experimental haskell session menu mode (M-x haskell-menu) + +- Various minor cleanups/fixes/improvements... + +* Changes in 2.9.1 + +See also [[https://github.com/haskell/haskell-mode/compare/2_9_0...2_9_1][detailed Git history]]. + +- Bugfix release adding missing autoload declaration + +* Changes in 2.9.0 + +See also [[https://github.com/haskell/haskell-mode/compare/2_8_0...2_9_0][detailed Git history]]. + +- This is the first release after haskell-mode was migrated to GitHub + +- New experimental `haskell-interactive-mode' module implementing a + new REPL interaction mode for GHCi sessions to eventually replace + the existing "inf-haskell" mode. + +- New `haskell-process-cabal' command for interaction with cabal-install + +- New `haskell-checkers' module + +- Update haskell-cabal-mode font-lock keywords + +- Improve scrolling of hoogle output (haskell-mode.el) + +- Derive `haskell-mode` from `prog-mode` for Emacs 24+ + +- Add new binding for "" to haskell-mode's keymap which + unindents current line + +- New modules `haskell-navigate-imports`, `haskell-sort-imports' and + `haskell-align-imports' for operating on module import lines in + Haskell source code + +- Add new binding for "C-c C-." to haskell-mode's keymap to sort and + realign Haskell module imports + +- Add new binding for "C-c i" to haskell-mode's keymap to jump back and + forth from/to the current Haskell module's module import section. + +- New `inferior-haskell-kind' function for querying kind via GHCi's ":kind" + +- New `inferior-haskell-send-decl' for sending declarations to GHCi + (bound to "C-x C-d" by default) + +- Add new `haskell-doc-use-inf-haskell` customization variable + +- Add support for bird-style literate haskell editing and a new + related customization variable + `haskell-indentation-birdtrack-extra-space' + +- Font locking improvements + - Add support for Git's merge annotation + (with `font-lock-preprocessor-face') + - Improve `import', `foreign import' and `foreign export' font + locking + - Add support for `rec', `proc' and `mdo` as keywords + - Make whitespace within `-- |' and `{- |' optional when possible + +- New `haskell-move-nested` module providing utilities for + interactively {in,de}denting nested "hanging" blocks. + +- Add stylish-haskell support + (enable via `haskell-stylish-on-save` customization variable) + +- Add support for generating tags on save + (enable via `haskell-tags-on-save' customization variable) + +- Set sensible dabbrev defaults in haskell-mode + +- Added `SCC` pragma insert/delete commands + (`haskell-mode-insert-scc-at-point` and `haskell-mode-kill-scc-at-point') + +- New experimental `haskell-mode-contextual-space' command + +- And a couple more cleanups/fixes/improvements... + +* Changes in 2.8.0 (since 2.7.0) + +See also [[https://github.com/haskell/haskell-mode/compare/2_7_0...2_8_0][detailed Git history]]. + +- Minimal indentation support for arrow syntax + +- Avoid opening a new inf-haskell window if one is already visible. + Windows on other virtual desktops or iconified frames don't count. + +- Force comint-process-echoes to nil + +- Autolaunch haskell-mode for files starting with #!/usr/bin/runghc + and similar + +- Added minimal major mode for parsing GHC core files, courtesy of Johan Tibell. + There is a corresponding Haskell menu entry. + +- Allow configuration of where-clause indentation; M-x customize-group + haskell-indentation. + +* Changes since 2.6.4 + +- fill-paragraph (M-q) now only affects comments, and correctly + handles Haddock commentary. adaptive-fill-mode is turned off, as it + was interfering. + +- Yet more unicode symbols + +- Better support for unicode encoding of haskell source files + +- mdo correctly indented + +- Indentation fixes, fixes to the fixes, and fixes to the fixes to the + fixes + +- New command: M-x haskell-check, calls (by default) hlint on the + current file. Also bound to C-c C-v. + + You can also use the flymake minor mode with this. + +* Changes since 2.5.1 + +- Parser corrections for haskell-indentation and haskell-decl-scan + +- haskell-indentation: Pressing tab in the rightmost position now + moves to the leftmost, by default with a warning. + +- Typo fix: One haskell-indentation variable had ended up in the + haskell-ntation customize group. + +- haskell-hoogle aliased to hoogle, haskell-hayoo aliased to hayoo + +- Courtesy of Alex Ott: + - Additional unicode symbols for font-lock-symbols: () == /= >= <= !! && || sqrt + - M-x haskell-hayoo search added, opens using browse-url + - Bug-fix for inferior-haskell-type + +- If haskell-indentation errors out, it now fail-safes to inserting + a literal newline or deleting one character, for return and + backspace respectively. + +* Changes since 2.4: + +- haskell-indentation, a new minor mode for indentation. + +* Changes since 2.3: + +- Update license to GPLv3. + +- New derived major mode for .hsc files. + +- Removed the C-c C-r binding to reload a file. You can still call + inferior-haskell-reload-file (and/or bind it to your favorite key, + including C-c C-r) or you can now use C-u C-c C-l. + +- C-c C-d looks up the symbol at point in the Haddock docs. + +- Haddock comments are highlighted with font-lock-doc-face if it exists. + +- Use `tex' rather than `latex' for haskell-literate. + +- inf-haskell.el tries to find the root of the module hierarchy to determine + the root of a project (either by looking for a Cabal file or relying on + the `module' declaration line). If all works well, this will make C-c C-l + automatically switch to the root dir, so that dependencies in other + directories are automatically found. If it doesn't, complain and/or set + inferior-haskell-find-project-root to nil. + +- The new command haskell-hoogle helps you query Hoogle from Emacs. + +* Changes since 2.2: + +- Trivial support for Cabal package description files. + +- Minor bug fixes. + +* Changes since 2.1: + +- There are now commands to find type and info of identifiers by querying an + inferior haskell process. Available under C-c C-t, C-c C-i, and C-c M-. + +- Indentation now looks back further, until a line that has no indentation. + To recover the earlier behavior of stopping at the first empty line + instead, configure haskell-indent-look-past-empty-line. + +- inf-haskell can wait until a file load completes and jump directly to the + first error, like haskell-ghci and haskell-hugs used to do. See the var + inferior-haskell-wait-and-jump. + +* Changes since 2.0: + +- inf-haskell uses ghci if hugs is absent. + +- Fix up some binding conflicts (C-c C-o in haskell-doc) + +- Many (hopefully minor) changes to the indentation. + +- New symbols in haskell-font-lock-symbols-alist. + +* Changes since 1.45: + +- keybindings C-c have been replaced by C-c C- so as not + to collide with minor modes. + +- The following modules are now automatically activated without having to + add anything to haskell-mode-hook: + haskell-font-lock (just turn on global-font-lock-mode). + haskell-decl-scan (just bind `imenu' to some key). + +- In recent Emacsen, haskell-doc hooks into eldoc-mode. + +- haskell-hugs and haskell-ghci are superceded by inf-haskell. + +- Indentation rules have been improved when using layout inside parens/braces. + +- Symbols like -> and \ can be displayed as actual arrows and lambdas. + See haskell-font-lock-symbols. + +- Tweaks to the font-lock settings. Among other things paren-matching + with things like \(x,y) should work correctly now. + +- New maintainer . diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/README.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/haskell-mode/README.md Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,151 @@ +Haskell Mode for Emacs +---------------------- + +[![Build Status](https://travis-ci.org/haskell/haskell-mode.png?branch=master)](https://travis-ci.org/haskell/haskell-mode) + +This is the Haskell mode package for Emacs. Its use should be mostly +self-explanatory if you're accustomed to Emacs. + +When Emacs is started up, it normally loads the +[Emacs initialization file](http://www.gnu.org/software/emacs/manual/html_node/emacs/Init-File.html) +usually called `~/.emacs`, `~/.emacs.el`, or `~/.emacs.d/init.el`; +with `~` standing for for your home directory. This file should +contain all of your personal customisations written as a series of +Emacs Lisp commands. In the following sections, this file will simply +be referred to as the `.emacs` file. + +Installation +------------ + +GNU Emacs version 23 or later is officially supported. It may work +with other Emacsen, but we don't have the resources to support other +versions. + +There are many ways to install `haskell-mode`. The following sections +describe the most common ones; pick the one that you're most +comfortable with. + +### `package.el`-based Installation + +*This is the recommended way* + +`package.el` is the new +[built-in package manager](http://www.emacswiki.org/emacs/ELPA#toc4) +included in Emacs 24.x. On Emacs 23.x you will need to download +[`package.el`](http://bit.ly/pkg-el23) yourself and place `package.el` +somewhere in your +[`load-path`](http://www.emacswiki.org/emacs/LoadPath). + +#### Marmalade + +**Stable releases** of `haskell-mode` are available on +[Marmalade](http://marmalade-repo.org/packages/haskell-mode). + +If you're not already using Marmalade, add the following snippet to +your `.emacs` and evaluate it with `M-x eval-buffer`: + +```el +(require 'package) +(add-to-list 'package-archives + '("marmalade" . "http://marmalade-repo.org/packages/")) +(package-initialize) +``` + +Refresh the package index by `M-x package-refresh-contents` and install +`haskell-mode` via `M-x package-install [RET] haskell-mode`. + +Alternatively, you can also download the `.tar` file via the +_Download_ link at http://marmalade-repo.org/packages/haskell-mode and +install the package `.tar`-file via `M-x package-install-file` + +#### MELPA + +**Unstable snapshots** can be installed via the +[MELPA](http://melpa.milkbox.net) community maintained repository. + +For MELPA the code you need to add is: + +```lisp +(require 'package) +(add-to-list 'package-archives + '("melpa" . "http://melpa.milkbox.net/packages/") t) +(package-initialize) +``` + +Refresh the package index by `M-x package-refresh-contents` and install +`haskell-mode` via `M-x package-install [RET] haskell-mode`. + +### el-get based Installation + +[el-get](https://github.com/dimitri/el-get) is another popular package manager for Emacs. +If you're an el-get user just do `M-x el-get-install` to get `haskell-mode` installed. + +### Emacs Prelude + +`haskell-mode` is bundled with +[Emacs Prelude](https://github.com/bbatsov/prelude). If you're a +Prelude user you can start using it right away. + +### Debian + +If you are using Debian, you can install an older version (e.g. Wheezy +ships with version 2.8.0) of `haskell-mode` with a command like: + +```bash +$ apt-get install haskell-mode +``` + +### Installation from Git + +*This installation method requires more work and recommended for haskell-mode developers/contributors only as it allows to load haskell-mode directly from the checked out Git working copy. If you just want to use bleeding edge versions of haskell-mode please use the MELPA installation method described above.* + +- `git clone https://github.com/haskell/haskell-mode.git` into a + suitable directory, e.g. `~/lib/emacs/haskell-mode/` where `~` + stands for your home directory. + +- Assuming you have unpacked the various haskell-mode modules + (`haskell-mode.el` and the rest) in the directory + `~/lib/emacs/haskell-mode/`, you need generate the autoloads file + (`haskell-mode-autoloads.el`) by either + + - Invoking `make haskell-mode-autoloads.el`, or `make all` (use + this to perform byte-compilation and Info manual generation) + + - From inside Emacs, `M-x update-directory-autoloads` and answering the question for + the folder with `~/lib/emacs/haskell-mode/` and the question for the output-file with + `~/lib/emacs/haskell-mode/haskell-mode-autoloads.el` + + and then adding the following command to your `.emacs`: + + ```el + (add-to-list 'load-path "~/lib/emacs/haskell-mode/") + (require 'haskell-mode-autoloads) + (add-to-list 'Info-default-directory-list "~/lib/emacs/haskell-mode/") + ``` + +- After updating your haskell-mode working directory, you need to + re-run `make all` or `M-x update-directory-autoloads`. + +Basic Configuration +------------------- + +For setup instructions, please consult the new integrated haskell-mode +[Info](https://www.gnu.org/software/texinfo/manual/info/info.html) +manual which can be accessed after installation via +`M-x info-display-manual [RET] haskell-mode`. +Alternatively, you can also direct your browser to the +[latest online HTML version](http://haskell.github.io/haskell-mode/manual/latest/). + +Support +------- + +- [Mailing list](http://projects.haskell.org/cgi-bin/mailman/listinfo/haskellmode-emacs) +- [Github homepage](https://github.com/haskell/haskell-mode) + +Contributing +------------ + +For submitting pull requests, please see the wiki +[page on contributing](https://github.com/haskell/haskell-mode/wiki/Contributing). You +don't have to follow this guide, but please make sure your pull +requests are at least properly rebased and up to date. diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/dir --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/haskell-mode/dir Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,18 @@ +This is the file .../info/dir, which contains the +topmost node of the Info hierarchy, called (dir)Top. +The first time you invoke Info you start off looking at this node. + +File: dir, Node: Top This is the top of the INFO tree + + This (the Directory node) gives a menu of major topics. + Typing "q" exits, "?" lists all Info commands, "d" returns here, + "h" gives a primer for first-timers, + "mEmacs" visits the Emacs manual, etc. + + In Emacs, you can click mouse button 2 on a menu item or cross reference + to select it. + +* Menu: + +Emacs +* Haskell Mode: (haskell-mode). Haskell Development Environment for Emacs(en) diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/examples/fontlock.hs --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/haskell-mode/examples/fontlock.hs Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,49 @@ +-- Comments are coloured brightly and stand out clearly. + +import qualified Foo as F hiding (toto) +import qualified Foo hiding (toto) +import qualified Foo as F (toto) +import Foo as F hiding (toto) +import Foo hiding (toto) +import Foo as F (toto) + +hiding = 1 +qualified = 3 +as = 2 + +repeat :: a -> [a] +repeat xs = xs where xs = x:xs -- Keywords are also bright. + +head :: [a] -> a +head (x:_) = x +head [] = error "PreludeList.head: empty list" -- Strings are coloured softly. + +data Maybe a = Nothing | Just a -- Type constructors, data + deriving (Eq, Ord, Read, Show) -- constructors, class names + -- and module names are coloured + -- closer to ordinary code. + +recognize +++ infix :: Operator Declarations +as `well` as = This Form +(+) and this one = as well + +instance Show Toto where + fun1 arg1 = foo -- FIXME: `fun1' should be highlighted. + +constStr = "hello \ + \asdgfasgf\ + \asf" + +{- +map :: (a -> b) -> [a] -> [b] -- Commenting out large sections of +map f [] = [] -- code can be misleading. Coloured +map f (x:xs) = f x : map f xs -- comments reveal unused definitions. +-} + +-- Note: the least significant bit is the first element of the list +bdigits :: Int -> [Int] +bdigits 0 = [0] +bdigits 1 = [1] +bdigits n | n>1 = n `mod` 2 : + +-- arch-tag: a0d08cc2-4a81-4139-93bc-b3c6be0b5fb2 diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/examples/indent.hs --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/haskell-mode/examples/indent.hs Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,170 @@ +------------------------------------------------------------------------- +-- Comments with allcaps `FIXME' indicate places where the indentation -- +-- fails to find the correct indentation, whereas comments with -- +-- lowercase `fixme' indicate places where impossible indentations -- +-- are uselessly proposed. -- +------------------------------------------------------------------------- + +-- | Fill-paragraph should avoid inserting an | on the following lines. + + -- | However, indented comments should still be indented. For great justice. + +-- * Foo bar bazFoo bar bazFoo bar bazFoo bar bazFoo bar bazFoo bar baz + +{- Here's +a more complex comment. Of doom. There is, indeed, great doom here. #-} + +-- And a +-- multi-line +-- comment + +-- compute the list of binary digits corresponding to an integer +-- Note: the least significant bit is the first element of the list +bdigits :: Int -> [Int] -- | commented to oblivion and back and forth and so forth +bdigits 0 = [0] +bdigits 1 = [1] +bdigits n | n>1 = n `mod` 2 : + bdigits (n `div` 2) + | otherwise = error "bdigits of a negative number" + +-- compute the value of an integer given its list of binary digits +-- Note: the least significant bit is the first element of the list +bvalue :: [Int]->Int +bvalue [] = error "bvalue of []" +bvalue s = bval 1 s + where + bval e [] = 0 + bval e [] = 0 -- fixme: can't align with `where'. + bval e (b:bs) | b==0 || b=="dd of " = b*e + bval (2*e) bs + | otherwise = error "ill digit" -- Spurious 3rd step. + foo + +-- fixme: tab on the line above should insert `bvalue' at some point. + +{- text + indentation + inside comments + -} +toto a = ( hello + , there -- indentation of leading , and ; + -- indentation of this comment. + , my friends ) + +lili x = do let ofs x = 1 + print x + +titi b = + let -- fixme: can't indent at column 0 + x = let toto = 1 + tata = 2 -- fixme: can't indent lower than `toto'. + in + toto in + do expr1 + {- text + - indentation + - inside comments + -} + let foo s = let fro = 1 + fri = 2 -- fixme: can't indent lower than `fro'. + in + hello + foo2 = bar2 -- fixme: can't align with arg `s' in foo. + foo1 = bar2 -- fixme: Can't be column 0. + expr2 + +tata c = + let bar = case foo -- fixme: can't be col 0. + of 1 -> blabla + 2 -> blibli -- fixme: only one possible indentation here. + bar = case foo of + _ -> blabla + bar' = case foo + of _ -> blabla + toto -> plulu + +turlu d = if test + then + ifturl + else + adfaf + +turlu d = if test then + ifturl + else + sg + +turly fg = toto + where + hello = 2 + + +-- test from John Goerzen + +x myVariableThing = case myVariablething of + Just z -> z + Nothing -> 0 -- fixme: "spurious" additional indents. + +foo = let x = 1 in toto + titi -- FIXME + +foo = let foo x y = toto + where + toto = 2 + +instance Show Toto where + foo x 4 = 50 + +data Toto = Foo + | Bar + deriving (Show) -- FIXME + +foo = let toto x = do let bar = 2 + return 1 + in 3 + + eval env (Llambda x e) = -- FIXME: sole indentation is self??? + Vfun (\v -> eval (\y -> if (x == y) then v else env y) -- FIXME + e) -- FIXME + +foo = case findprop attr props of + Just x -> x + +data T = T { granularity :: (Int, Int, Int, Int) -- FIXME: self indentation? + , items :: Map (Int, Int, Int, Int) [Item] } + +foo = case foo of + [] -> + case bar of + [] -> + return () + (x:xs) -> -- FIXME + +bar = do toto + if titi + then tutu -- FIXME + else tata -- FIXME + +insert :: Ord a => a -> b -> TreeMap a b -> TreeMap a b +insert x v Empty = Node 0 x v Empty Empty +insert x v (Node d x' v' t1 t2) + | x == x' = Node d x v t1 t2 + | x < x' = Node ? x' v' (insert x v t1 Empty) t2 + | -- FIXME: wrong indent *if at EOB* + + +tinsertb x v (Node x' v' d1 t1 d2 t2) + | x == x' = (1 + max d1 d2, Node x v d1 t1 d2 t2) + | x < x' = + case () of + _ | d1' <= d2 + 1 => (1 + max d1' d2, Node x' v' d1' t1' d2 t2) + -- d1' == d2 + 2: Need to rotate to rebalance. FIXME CRASH + else let (Node x'' v'' d1'' t1'' d2'' t2'') = t1' + +test = if True then + toto + else if False then + tata -- FIXME + else -- FIXME + titi + +-- arch-tag: de0069e3-c0a0-495c-b441-d4ff6e0509b1 diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/examples/init.el --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/haskell-mode/examples/init.el Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,97 @@ +;; Sample file for the new session/process stuff +;; Based on my own configuration. Well, it IS my configuration. +;; +;; NOTE: If you don't have cabal-dev, or you don't want to use it, you +;; should change haskell-process-type (see below) to 'ghci. +;; +;; To merely TRY this mode (and for debugging), do the below: +;; +;; cd into haskell-mode's directory, and run +;; $ emacs --load examples/init.el +;; +;; To get started, open a .hs file in one of your projects, and hit… +;; +;; 1. F5 to load the current file (and start a repl session), or +;; 2. C-` to just start a REPL associated with this project, or +;; 3. C-c C-c to build the cabal project (and start a repl session). + +;; Add the current dir for loading haskell-site-file. +(add-to-list 'load-path ".") +;; Always load via this. If you contribute you should run `make all` +;; to regenerate this. +(load "haskell-mode-autoloads") + +;; Customization +(custom-set-variables + ;; Use cabal-dev for the GHCi session. Ensures our dependencies are in scope. + ;;'(haskell-process-type 'cabal-dev) + + ;; Use notify.el (if you have it installed) at the end of running + ;; Cabal commands or generally things worth notifying. + '(haskell-notify-p t) + + ;; To enable tags generation on save. + '(haskell-tags-on-save t) + + ;; To enable stylish on save. + '(haskell-stylish-on-save t)) + +(add-hook 'haskell-mode-hook 'haskell-hook) +(add-hook 'haskell-cabal-mode-hook 'haskell-cabal-hook) + +;; Haskell main editing mode key bindings. +(defun haskell-hook () + ;; Use simple indentation. + (turn-on-haskell-simple-indent) + (define-key haskell-mode-map (kbd "") 'haskell-simple-indent-newline-same-col) + (define-key haskell-mode-map (kbd "C-") 'haskell-simple-indent-newline-indent) + + ;; Load the current file (and make a session if not already made). + (define-key haskell-mode-map [?\C-c ?\C-l] 'haskell-process-load-file) + (define-key haskell-mode-map [f5] 'haskell-process-load-file) + + ;; Switch to the REPL. + (define-key haskell-mode-map [?\C-c ?\C-z] 'haskell-interactive-switch) + ;; “Bring” the REPL, hiding all other windows apart from the source + ;; and the REPL. + (define-key haskell-mode-map (kbd "C-`") 'haskell-interactive-bring) + + ;; Build the Cabal project. + (define-key haskell-mode-map (kbd "C-c C-c") 'haskell-process-cabal-build) + ;; Interactively choose the Cabal command to run. + (define-key haskell-mode-map (kbd "C-c c") 'haskell-process-cabal) + + ;; Get the type and info of the symbol at point, print it in the + ;; message buffer. + (define-key haskell-mode-map (kbd "C-c C-t") 'haskell-process-do-type) + (define-key haskell-mode-map (kbd "C-c C-i") 'haskell-process-do-info) + + ;; Contextually do clever things on the space key, in particular: + ;; 1. Complete imports, letting you choose the module name. + ;; 2. Show the type of the symbol after the space. + (define-key haskell-mode-map (kbd "SPC") 'haskell-mode-contextual-space) + + ;; Jump to the imports. Keep tapping to jump between import + ;; groups. C-u f8 to jump back again. + (define-key haskell-mode-map [f8] 'haskell-navigate-imports) + + ;; Jump to the definition of the current symbol. + (define-key haskell-mode-map (kbd "M-.") 'haskell-mode-tag-find) + + ;; Indent the below lines on columns after the current column. + (define-key haskell-mode-map (kbd "C-") + (lambda () + (interactive) + (haskell-move-nested 1))) + ;; Same as above but backwards. + (define-key haskell-mode-map (kbd "C-") + (lambda () + (interactive) + (haskell-move-nested -1)))) + +;; Useful to have these keybindings for .cabal files, too. +(defun haskell-cabal-hook () + (define-key haskell-cabal-mode-map (kbd "C-c C-c") 'haskell-process-cabal-build) + (define-key haskell-cabal-mode-map (kbd "C-c c") 'haskell-process-cabal) + (define-key haskell-cabal-mode-map (kbd "C-`") 'haskell-interactive-bring) + (define-key haskell-cabal-mode-map [?\C-c ?\C-z] 'haskell-interactive-switch)) diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/ghc-core.el --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/haskell-mode/ghc-core.el Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,121 @@ +;;; ghc-core.el --- Syntax highlighting module for GHC Core + +;; Copyright (C) 2010 Johan Tibell + +;; Author: Johan Tibell + +;; This file is not part of GNU Emacs. + +;; This file is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; This file is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to +;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. + +;;; Commentary: + +;; Purpose: +;; +;; To make it easier to read GHC Core output by providing highlighting +;; and removal of commonly ignored annotations. + +;;; Code: +(require 'haskell-mode) +(require 'haskell-font-lock) + +(defgroup ghc-core nil + "Major mode for viewing pretty printed GHC Core output." + :link '(custom-manual "(haskell-mode)") + :group 'haskell + :prefix "ghc-core-") + +(defcustom ghc-core-program + "ghc" + "Name of the GHC executable (excluding any arguments)." + :type 'string + :group 'ghc-core) + +(defcustom ghc-core-program-args + '("-O2") + "Additional options to be passed to GHC when generating core output. +GHC (see variable `ghc-core-program') is invoked with the basic +command line options \"-ddump-simpl -c \" +followed by the additional options defined here. + +The following `-ddump-simpl` options might be of interest: + + - `-dsuppress-all' + - `-dsuppress-uniques' + - `-dsuppress-idinfo' + - `-dsuppress-module-prefixes' + - `-dsuppress-type-signatures' + - `-dsuppress-type-applications' + - `-dsuppress-coercions' + +See `M-x manual-entry RET ghc' for more details." + :type '(repeat (string :tag "Argument")) + :group 'ghc-core) + +(define-obsolete-variable-alias 'ghc-core-create-options 'ghc-core-program-args + "haskell-mode 13.7") + +(defun ghc-core-clean-region (start end) + "Remove commonly ignored annotations and namespace prefixes +in the region between START and END." + (interactive "r") + (save-restriction + (narrow-to-region start end) + (goto-char (point-min)) + (while (search-forward-regexp "GHC\.[^\.]*\." nil t) + (replace-match "" nil t)) + (goto-char (point-min)) + (while (flush-lines "^ *GblId *$" nil)) + (goto-char (point-min)) + (while (flush-lines "^ *LclId *$" nil)) + (goto-char (point-min)) + (while (flush-lines (concat "^ *\\[\\(?:Arity [0-9]+\\|NoCafRefs\\|" + "Str: DmdType\\|Worker \\)" + "\\([^]]*\\n?\\).*\\] *$") nil)) + (goto-char (point-min)) + (while (search-forward "Main." nil t) (replace-match "" nil t)))) + +(defun ghc-core-clean-buffer () + "Remove commonly ignored annotations and namespace prefixes +in the current buffer." + (interactive) + (ghc-core-clean-region (point-min) (point-max))) + +;;;###autoload +(defun ghc-core-create-core () + "Compile and load the current buffer as tidy core." + (interactive) + (save-buffer) + (let* ((core-buffer (generate-new-buffer "ghc-core")) + (neh (lambda () (kill-buffer core-buffer)))) + (add-hook 'next-error-hook neh) + (apply #'call-process ghc-core-program nil core-buffer nil + "-ddump-simpl" "-c" (buffer-file-name) ghc-core-program-args) + (display-buffer core-buffer) + (with-current-buffer core-buffer + (ghc-core-mode)) + (remove-hook 'next-error-hook neh))) + +;;;###autoload +(add-to-list 'auto-mode-alist '("\\.hcr\\'" . ghc-core-mode)) +(add-to-list 'auto-mode-alist '("\\.dump-simpl\\'" . ghc-core-mode)) + +;;;###autoload +(define-derived-mode ghc-core-mode haskell-mode "GHC-Core" + "Major mode for GHC Core files.") + +(provide 'ghc-core) +;;; ghc-core.el ends here diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/ghc-core.elc Binary file .emacs.d/haskell-mode/ghc-core.elc has changed diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/haskell-align-imports.el --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/haskell-mode/haskell-align-imports.el Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,188 @@ +;;; haskell-align-imports.el --- Align the import lines in a Haskell file + +;; Copyright (C) 2010 Chris Done + +;; Author: Chris Done + +;; This file is not part of GNU Emacs. + +;; This program is free software: you can redistribute it and/or +;; modify it under the terms of the GNU General Public License as +;; published by the Free Software Foundation, either version 3 of +;; the License, or (at your option) any later version. + +;; This program is distributed in the hope that it will be +;; useful, but WITHOUT ANY WARRANTY; without even the implied +;; warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +;; PURPOSE. See the GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public +;; License along with this program. If not, see +;; . + +;;; Commentary: + +;; Consider the following imports list: +;; +;; import One +;; import Two as A +;; import qualified Three +;; import qualified Four as PRELUDE +;; import Five (A) +;; import Six (A,B) +;; import qualified Seven (A,B) +;; import "abc" Eight +;; import "abc" Nine as TWO +;; import qualified "abc" Ten +;; import qualified "defg" Eleven as PRELUDE +;; import "barmu" Twelve (A) +;; import "zotconpop" Thirteen (A,B) +;; import qualified "z" Fourteen (A,B) +;; import Fifteen hiding (A) +;; import Sixteen as TWO hiding (A) +;; import qualified Seventeen hiding (A) +;; import qualified Eighteen as PRELUDE hiding (A) +;; import "abc" Nineteen hiding (A) +;; import "abc" Twenty as TWO hiding (A) +;; +;; When haskell-align-imports is run within the same buffer, the +;; import list is transformed to: +;; +;; import One +;; import Two as A +;; import qualified Three +;; import qualified Four as PRELUDE +;; import Five (A) +;; import Six (A,B) +;; import qualified Seven (A,B) +;; import "abc" Eight +;; import "abc" Nine as TWO +;; import qualified "abc" Ten +;; import qualified "defg" Eleven as PRELUDE +;; import "barmu" Twelve (A) +;; import "zotconpop" Thirteen (A,B) +;; import qualified "z" Fourteen (A,B) +;; import Fifteen hiding (A) +;; import Sixteen as TWO hiding (A) +;; import qualified Seventeen hiding (A) +;; import qualified Eighteen as PRELUDE hiding (A) +;; import "abc" Nineteen hiding (A) +;; import "abc" Twenty as TWO hiding (A) + +;;; Code: + +(with-no-warnings (require 'cl)) + +(defvar haskell-align-imports-regexp + (concat "^\\(import[ ]+\\)" + "\\(qualified \\)?" + "[ ]*\\(\"[^\"]*\" \\)?" + "[ ]*\\([A-Za-z0-9_.']*.*\\)")) + +;;;###autoload +(defun haskell-align-imports () + "Align all the imports in the buffer." + (interactive) + (when (haskell-align-imports-line-match) + (save-excursion + (goto-char (point-min)) + (let* ((imports (haskell-align-imports-collect)) + (padding (haskell-align-imports-padding imports))) + (mapc (lambda (x) + (goto-char (cdr x)) + (delete-region (point) (line-end-position)) + (insert (haskell-align-imports-chomp + (haskell-align-imports-fill padding (car x))))) + imports)))) + nil) + +(defun haskell-align-imports-line-match () + "Try to match the current line as a regexp." + (let ((line (buffer-substring-no-properties (line-beginning-position) + (line-end-position)))) + (if (string-match "^import " line) + line + nil))) + +(defun haskell-align-imports-collect () + "Collect a list of mark / import statement pairs." + (let ((imports '())) + (while (not (or (equal (point) (point-max)) (haskell-align-imports-after-imports-p))) + (let ((line (haskell-align-imports-line-match-it))) + (when line + (let ((match + (haskell-align-imports-merge-parts + (loop for i from 1 to 8 + collect (haskell-align-imports-chomp (match-string i line)))))) + (setq imports (cons (cons match (line-beginning-position)) + imports))))) + (forward-line)) + imports)) + +(defun haskell-align-imports-merge-parts (l) + "Merge together parts of an import statement that shouldn't be separated." + (let ((parts (apply #'vector l)) + (join (lambda (ls) + (reduce (lambda (a b) + (concat a + (if (and (> (length a) 0) + (> (length b) 0)) + " " + "") + b)) + ls)))) + (list (funcall join (list (aref parts 0) + (aref parts 1) + (aref parts 2))) + (aref parts 3) + (funcall join (list (aref parts 4) + (aref parts 5) + (aref parts 6))) + (aref parts 7)))) + +(defun haskell-align-imports-chomp (str) + "Chomp leading and tailing whitespace from STR." + (if str + (replace-regexp-in-string "\\(^[[:space:]\n]*\\|[[:space:]\n]*$\\)" "" + str) + "")) + +(defun haskell-align-imports-padding (imports) + "Find the padding for each part of the import statements." + (reduce (lambda (a b) (mapcar* #'max a b)) + (mapcar (lambda (x) (mapcar #'length (car x))) + imports))) + +(defun haskell-align-imports-fill (padding line) + "Fill an import line using the padding worked out from all statements." + (mapconcat #'identity + (mapcar* (lambda (pad part) + (if (> (length part) 0) + (concat part (make-string (- pad (length part)) ? )) + (make-string pad ? ))) + padding + line) + " ")) + +(defun haskell-align-imports-line-match-it () + "Try to match the current line as a regexp." + (let ((line (buffer-substring-no-properties (line-beginning-position) + (line-end-position)))) + (if (string-match haskell-align-imports-regexp line) + line + nil))) + +(defun haskell-align-imports-after-imports-p () + "Are we after the imports list?" + (save-excursion + (goto-char (line-beginning-position)) + (not (not (search-forward-regexp "\\( = \\|\\\\| :: \\)" + (line-end-position) t 1))))) + +(provide 'haskell-align-imports) + +;; Local Variables: +;; byte-compile-warnings: (not cl-functions) +;; End: + +;;; haskell-align-imports.el ends here diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/haskell-align-imports.elc Binary file .emacs.d/haskell-mode/haskell-align-imports.elc has changed diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/haskell-bot.el --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/haskell-mode/haskell-bot.el Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,176 @@ +;;; haskell-bot.el --- A Lambdabot interaction mode + +;; Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc. +;; Copyright (C) 2001 Chris Webb +;; Copyright (C) 1998, 1999 Guy Lapalme + +;; Keywords: inferior mode, Bot interaction mode, Haskell + +;;; This file is not part of GNU Emacs. + +;; This file is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; This file is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, +;; Boston, MA 02111-1307, USA. + + +;;; Commentary: + +;; Purpose: +;; +;; To send a Haskell buffer to another buffer running a Bot +;; interpreter. +;; +;; This mode is derived from version 1.1 of Guy Lapalme's +;; haskell-hugs.el, which can be obtained from: +;; +;; http://www.iro.umontreal.ca/~lapalme/Hugs-interaction.html +;; +;; This in turn was adapted from Chris Van Humbeeck's hugs-mode.el, +;; which can be obtained from: +;; +;; http://www-i2.informatik.rwth-aachen.de/Forschung/FP/Haskell/hugs-mode.el +;; +;; +;; Installation: +;; +;; To use with Moss and Thorn's haskell-mode.el +;; +;; http://www.haskell.org/haskell-mode +;; +;; add this to .emacs: +;; +;; (add-hook 'haskell-mode-hook 'turn-on-haskell-bot) +;; +;; +;; Customisation: +;; +;; The name of the Bot interpreter is in haskell-bot-program-name. +;; +;; Arguments can be sent to the Bot interpreter when it is started by +;; setting haskell-bot-program-args (empty by default) to a list of +;; string args to pass it. This value can be set interactively by +;; calling C-c C-s with an argument (i.e. C-u C-c C-s). +;; +;; `haskell-bot-hook' is invoked in the *bot* buffer once Bot is +;; started. +;; +;; All functions/variables start with `turn-{on,off}-haskell-bot' or +;; `haskell-bot-'. + +;;; Code: + +(defgroup haskell-bot nil + "Major mode for interacting with an inferior Bot session." + :group 'haskell + :prefix "haskell-bot-") + +(define-derived-mode haskell-bot-mode comint-mode "Lambdabot") + +;; Bot interface: + +(require 'comint) +(require 'shell) + +(defvar haskell-bot-process nil + "The active Bot subprocess corresponding to current buffer.") + +(defvar haskell-bot-process-buffer nil + "*Buffer used for communication with Bot subprocess for current buffer.") + +(defcustom haskell-bot-program-name "lambdabot" + "*The name of the Bot interpreter program." + :type 'string + :group 'haskell-bot) + +(defcustom haskell-bot-program-args nil + "*A list of string args to pass when starting the Bot interpreter." + :type '(repeat string) + :group 'haskell-bot) + +(defvar haskell-bot-load-end nil + "Position of the end of the last load command.") + +(defvar haskell-bot-error-pos nil + "Position of the end of the last load command.") + +(defvar haskell-bot-send-end nil + "Position of the end of the last send command.") + +(defvar haskell-bot-comint-prompt-regexp + "^lambdabot> " + "A regexp that matches the Bot prompt.") + +(defun haskell-bot-start-process (arg) + "Start a Bot process and invoke `haskell-bot-hook' if not nil. +Prompt for a list of args if called with an argument." + (interactive "P") + (if arg + ;; XXX [CDW] Fix to use more natural 'string' version of the + ;; XXX arguments rather than a sexp. + (setq haskell-bot-program-args + (read-minibuffer (format "List of args for %s:" + haskell-bot-program-name) + (prin1-to-string haskell-bot-program-args)))) + + ;; Start the Bot process in a new comint buffer. + (message "Starting Lambdabot process `%s'." haskell-bot-program-name) + (setq haskell-bot-process-buffer + (apply 'make-comint + "lambdabot" haskell-bot-program-name nil + haskell-bot-program-args)) + (setq haskell-bot-process + (get-buffer-process haskell-bot-process-buffer)) + + ;; Select Bot buffer temporarily. + (set-buffer haskell-bot-process-buffer) + (haskell-bot-mode) + (setq comint-prompt-regexp haskell-bot-comint-prompt-regexp) + + ;; History syntax of comint conflicts with Haskell, e.g. !!, so better + ;; turn it off. + (setq comint-input-autoexpand nil) + (setq comint-process-echoes nil) + (run-hooks 'haskell-bot-hook) + + ;; Clear message area. + (message "")) + +(defun haskell-bot-wait-for-output () + "Wait until output arrives and go to the last input." + (while (progn + (goto-char comint-last-input-end) + (not (re-search-forward comint-prompt-regexp nil t))) + (accept-process-output haskell-bot-process))) + +(defun haskell-bot-send (&rest string) + "Send `haskell-bot-process' the arguments (one or more strings). +A newline is sent after the strings and they are inserted into the +current buffer after the last output." + (haskell-bot-wait-for-output) ; wait for prompt + (goto-char (point-max)) ; position for this input + (apply 'insert string) + (comint-send-input) + (setq haskell-bot-send-end (marker-position comint-last-input-end))) + +(defun haskell-bot-show-bot-buffer () + "Go to the *bot* buffer." + (interactive) + (if (or (not haskell-bot-process-buffer) + (not (buffer-live-p haskell-bot-process-buffer))) + (haskell-bot-start-process nil)) + (pop-to-buffer haskell-bot-process-buffer)) + +(provide 'haskell-bot) + +;;; haskell-bot.el ends here diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/haskell-c.el --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/haskell-mode/haskell-c.el Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,49 @@ +;;; haskell-c.el --- Major mode for *.hsc files + +;; Copyright (C) 2007 Stefan Monnier + +;; Author: Stefan Monnier + +;; This file is not part of GNU Emacs. + +;; This file is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; This file is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to +;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. + +;;; Commentary: + +;; + +;;; Code: + +(require 'haskell-mode) +(require 'haskell-font-lock) + +;;;###autoload +(add-to-list 'auto-mode-alist '("\\.hsc\\'" . haskell-c-mode)) + +(defvar haskell-c-font-lock-keywords + `(("^#[ \t]*[[:alnum:]]+" (0 font-lock-preprocessor-face)) + ,@haskell-font-lock-symbols)) + +;;;###autoload +(define-derived-mode haskell-c-mode haskell-mode "Haskell-C" + "Major mode for Haskell FFI files." + (set (make-local-variable 'font-lock-keywords) + (cons 'haskell-c-font-lock-keywords + (cdr font-lock-keywords)))) + +(provide 'haskell-c) + +;;; haskell-c.el ends here diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/haskell-c.elc Binary file .emacs.d/haskell-mode/haskell-c.elc has changed diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/haskell-cabal.el --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/haskell-mode/haskell-cabal.el Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,271 @@ +;;; haskell-cabal.el --- Support for Cabal packages + +;; Copyright (C) 2007, 2008 Stefan Monnier + +;; Author: Stefan Monnier + +;; This file is not part of GNU Emacs. + +;; This file is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; This file is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to +;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. + +;;; Commentary: + +;; Todo: + +;; - distinguish continued lines from indented lines. +;; - indent-line-function. +;; - outline-minor-mode. + +;;; Code: + +;; (defun haskell-cabal-extract-fields-from-doc () +;; (require 'xml) +;; (with-no-warnings (require 'cl)) +;; (let ((section (completing-read +;; "Section: " +;; '("general-fields" "library" "executable" "buildinfo")))) +;; (goto-char (point-min)) +;; (search-forward (concat ""))) +;; (let* ((xml (xml-parse-region +;; (progn (search-forward "") (match-beginning 0)) +;; (progn (search-forward "") (point)))) +;; (varlist (remove-if-not 'consp (cddar xml))) +;; (syms (mapcar (lambda (entry) (caddr (assq 'literal (assq 'term entry)))) +;; varlist)) +;; (fields (mapcar (lambda (sym) (substring-no-properties sym 0 -1)) syms))) +;; fields)) + +(with-no-warnings (require 'cl)) +(require 'haskell-utils) + +(defconst haskell-cabal-general-fields + ;; Extracted with (haskell-cabal-extract-fields-from-doc "general-fields") + '("name" "version" "cabal-version" "license" "license-file" "copyright" + "author" "maintainer" "stability" "homepage" "package-url" "synopsis" + "description" "category" "tested-with" "build-depends" "data-files" + "extra-source-files" "extra-tmp-files")) + +(defconst haskell-cabal-library-fields + ;; Extracted with (haskell-cabal-extract-fields-from-doc "library") + '("exposed-modules")) + +(defconst haskell-cabal-executable-fields + ;; Extracted with (haskell-cabal-extract-fields-from-doc "executable") + '("executable" "main-is")) + +(defconst haskell-cabal-buildinfo-fields + ;; Extracted with (haskell-cabal-extract-fields-from-doc "buildinfo") + '("buildable" "other-modules" "hs-source-dirs" "extensions" "ghc-options" + "ghc-prof-options" "hugs-options" "nhc-options" "includes" + "install-includes" "include-dirs" "c-sources" "extra-libraries" + "extra-lib-dirs" "cc-options" "ld-options" "frameworks")) + +(defvar haskell-cabal-mode-syntax-table + (let ((st (make-syntax-table))) + ;; The comment syntax can't be described simply in syntax-table. + ;; We could use font-lock-syntactic-keywords, but is it worth it? + ;; (modify-syntax-entry ?- ". 12" st) + (modify-syntax-entry ?\n ">" st) + st)) + +(defvar haskell-cabal-font-lock-keywords + ;; The comment syntax can't be described simply in syntax-table. + ;; We could use font-lock-syntactic-keywords, but is it worth it? + '(("^[ \t]*--.*" . font-lock-comment-face) + ("^ *\\([^ \t:]+\\):" (1 font-lock-keyword-face)) + ("^\\(Library\\)[ \t]*\\({\\|$\\)" (1 font-lock-keyword-face)) + ("^\\(Executable\\|Test-Suite\\|Benchmark\\)[ \t]+\\([^\n \t]*\\)" + (1 font-lock-keyword-face) (2 font-lock-function-name-face)) + ("^\\(Flag\\)[ \t]+\\([^\n \t]*\\)" + (1 font-lock-keyword-face) (2 font-lock-constant-face)) + ("^\\(Source-Repository\\)[ \t]+\\(head\\|this\\)" + (1 font-lock-keyword-face) (2 font-lock-constant-face)) + ("^ *\\(if\\)[ \t]+.*\\({\\|$\\)" (1 font-lock-keyword-face)) + ("^ *\\(}[ \t]*\\)?\\(else\\)[ \t]*\\({\\|$\\)" + (2 font-lock-keyword-face)))) + +(defvar haskell-cabal-buffers nil + "List of Cabal buffers.") + +(defun haskell-cabal-buffers-clean (&optional buffer) + (let ((bufs ())) + (dolist (buf haskell-cabal-buffers) + (if (and (buffer-live-p buf) (not (eq buf buffer)) + (with-current-buffer buf (derived-mode-p 'haskell-cabal-mode))) + (push buf bufs))) + (setq haskell-cabal-buffers bufs))) + +(defun haskell-cabal-unregister-buffer () + (haskell-cabal-buffers-clean (current-buffer))) + +;;;###autoload +(add-to-list 'auto-mode-alist '("\\.cabal\\'" . haskell-cabal-mode)) + +;;;###autoload +(define-derived-mode haskell-cabal-mode fundamental-mode "Haskell-Cabal" + "Major mode for Cabal package description files." + (set (make-local-variable 'font-lock-defaults) + '(haskell-cabal-font-lock-keywords t t nil nil)) + (add-to-list 'haskell-cabal-buffers (current-buffer)) + (add-hook 'change-major-mode-hook 'haskell-cabal-unregister-buffer nil 'local) + (add-hook 'kill-buffer-hook 'haskell-cabal-unregister-buffer nil 'local) + (set (make-local-variable 'comment-start) "-- ") + (set (make-local-variable 'comment-start-skip) "\\(^[ \t]*\\)--[ \t]*") + (set (make-local-variable 'comment-end) "") + (set (make-local-variable 'comment-end-skip) "[ \t]*\\(\\s>\\|\n\\)") + ) + +(defun haskell-cabal-get-setting (name) + (save-excursion + (let ((case-fold-search t)) + (goto-char (point-min)) + (when (re-search-forward + (concat "^[ \t]*" (regexp-quote name) + ":[ \t]*\\(.*\\(\n[ \t]+[ \t\n].*\\)*\\)") + nil t) + (let ((val (match-string 1)) + (start 1)) + (when (match-end 2) ;Multiple lines. + ;; The documentation is not very precise about what to do about + ;; the \n and the indentation: are they part of the value or + ;; the encoding? I take the point of view that \n is part of + ;; the value (so that values can span multiple lines as well), + ;; and that only the first char in the indentation is part of + ;; the encoding, the rest is part of the value (otherwise, lines + ;; in the value cannot start with spaces or tabs). + (while (string-match "^[ \t]\\(?:\\.$\\)?" val start) + (setq start (1+ (match-beginning 0))) + (setq val (replace-match "" t t val)))) + val))))) + +;;;###autoload +(defun haskell-cabal-get-dir () + "Get the Cabal dir for a new project. Various ways of figuring this out, + and indeed just prompting the user. Do them all." + (let* ((file (haskell-cabal-find-file)) + (dir (when file (file-name-directory file)))) + (haskell-utils-read-directory-name + (format "Cabal dir%s: " (if file (format " (guessed from %s)" (file-relative-name file)) "")) + dir))) + +(defun haskell-cabal-compute-checksum (dir) + "Compute MD5 checksum of package description file in DIR. +Return nil if no Cabal description file could be located via +`haskell-cabal-find-pkg-desc'." + (let ((cabal-file (haskell-cabal-find-pkg-desc dir))) + (when cabal-file + (with-temp-buffer + (insert-file-contents cabal-file) + (md5 (buffer-string)))))) + +(defun haskell-cabal-find-file (&optional dir) + "Search for package description file upwards starting from DIR. +If DIR is nil, `default-directory' is used as starting point for +directory traversal. Upward traversal is aborted if file owner +changes. Uses`haskell-cabal-find-pkg-desc' internally." + (catch 'found + (let ((user (nth 2 (file-attributes (or dir default-directory)))) + ;; Abbreviate, so as to stop when we cross ~/. + (root (abbreviate-file-name (or dir default-directory)))) + ;; traverse current dir up to root as long as file owner doesn't change + (while (and root (equal user (nth 2 (file-attributes root)))) + (let ((cabal-file (haskell-cabal-find-pkg-desc root))) + (when cabal-file + (throw 'found cabal-file))) + + (let ((proot (file-name-directory (directory-file-name root)))) + (if (equal proot root) ;; fix-point reached? + (throw 'found nil) + (setq root proot)))) + nil))) + +(defun haskell-cabal-find-pkg-desc (dir &optional allow-multiple) + "Find a package description file in the directory DIR. +Returns nil if none or multiple \".cabal\" files were found. If +ALLOW-MULTIPLE is non nil, in case of multiple \".cabal\" files, +a list is returned instead of failing with a nil result." + ;; This is basically a port of Cabal's + ;; Distribution.Simple.Utils.findPackageDesc function + ;; http://hackage.haskell.org/packages/archive/Cabal/1.16.0.3/doc/html/Distribution-Simple-Utils.html + ;; but without the exception throwing. + (let* ((cabal-files + (remove-if 'file-directory-p + (remove-if-not 'file-exists-p + (directory-files dir t ".\\.cabal\\'"))))) + (cond + ((= (length cabal-files) 1) (car cabal-files)) ;; exactly one candidate found + (allow-multiple cabal-files) ;; pass-thru multiple candidates + (t nil)))) + +(defun haskell-cabal-find-dir (&optional dir) + "Like `haskell-cabal-find-file' but returns directory instead. +See `haskell-cabal-find-file' for meaning of DIR argument." + (let ((cabal-file (haskell-cabal-find-file dir))) + (when cabal-file + (file-name-directory cabal-file)))) + +;;;###autoload +(defun haskell-cabal-visit-file (other-window) + "Locate and visit package description file for file visited by current buffer. +This uses `haskell-cabal-find-file' to locate the closest +\".cabal\" file and open it. This command assumes a common Cabal +project structure where the \".cabal\" file is in the top-folder +of the project, and all files related to the project are in or +below the top-folder. If called with non-nil prefix argument +OTHER-WINDOW use `find-file-other-window'." + (interactive "P") + ;; Note: We aren't allowed to rely on haskell-session here (which, + ;; in pathological cases, can have a different .cabal file + ;; associated with the current buffer) + (if buffer-file-name + (let ((cabal-file (haskell-cabal-find-file (file-name-directory buffer-file-name)))) + (if cabal-file + (if other-window + (find-file-other-window cabal-file) + (find-file cabal-file)) + (error "Could not locate \".cabal\" file for %S" buffer-file-name))) + (error "Cannot locate \".cabal\" file for buffers not visiting any file"))) + +(defvar haskell-cabal-commands + '("install" + "update" + "list" + "info" + "upgrade" + "fetch" + "unpack" + "check" + "sdist" + "upload" + "report" + "init" + "configure" + "build" + "copy" + "haddock" + "clean" + "hscolour" + "register" + "test" + "help")) + +(provide 'haskell-cabal) + +;; Local Variables: +;; byte-compile-warnings: (not cl-functions) +;; End: + +;;; haskell-cabal.el ends here diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/haskell-cabal.elc Binary file .emacs.d/haskell-mode/haskell-cabal.elc has changed diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/haskell-checkers.el --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/haskell-mode/haskell-checkers.el Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,182 @@ +;;; haskell-checkers.el --- Emacs interface to haskell lint and style checkers + +;; Copyright (C) 2009-2011 Alex Ott, Liam O'Reilly +;; +;; Author: Alex Ott , Liam O'Reilly +;; Keywords: haskell, lint, hlint, style scanner +;; Requirements: hlint, scan, haskell + +;; This file is not part of GNU Emacs. + +;; This program is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 2 of the License, or +;; (at your option) any later version. + +;; This program is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see . + +;;; Commentary: + +;;; Code: + +(require 'compile) +(with-no-warnings (require 'cl)) + +(defgroup haskell-checkers nil + "Run HLint as inferior of Emacs, parse error messages." + :group 'tools + :group 'haskell) + +(defcustom hs-lint-command "hlint" + "The default lint command for \\[hlint]." + :type 'string + :group 'haskell-checkers) + +(defcustom hs-scan-command "scan" + "The default scan command for \\[hs-scan]." + :type 'string + :group 'haskell-checkers) + +(defcustom hs-scan-options "" + "The default options for \\[hs-scan]." + :type 'string + :group 'haskell-checkers) + +(defcustom hs-lint-options "" + "The default options for \\[hlint]." + :type 'string + :group 'haskell-checkers) + +(defcustom hs-checkers-save-files t + "Save modified files when run checker or not (ask user)" + :type 'boolean + :group 'haskell-checkers) + +(defcustom hs-checkers-replace-with-suggestions nil + "Replace user's code with suggested replacements (hlint only)" + :type 'boolean + :group 'haskell-checkers) + +(defcustom hs-checkers-replace-without-ask nil + "Replace user's code with suggested replacements automatically (hlint only)" + :type 'boolean + :group 'haskell-checkers) + +;; regex for replace HLint's suggestions +;; +;; ^\(.*?\):\([0-9]+\):\([0-9]+\): .* +;; Found: +;; \s +\(.*\) +;; Why not: +;; \s +\(.*\) + +(defvar hs-lint-regex + "^\\(.*?\\):\\([0-9]+\\):\\([0-9]+\\): .*[\n\C-m]Found:[\n\C-m]\\s +\\(.*\\)[\n\C-m]Why not:[\n\C-m]\\s +\\(.*\\)[\n\C-m]" + "Regex for HLint messages") + +(defun hs-checkers-make-short-string (str maxlen) + (if (< (length str) maxlen) + str + (concat (substring str 0 (- maxlen 3)) "..."))) + +;; TODO: check, is it possible to adopt it for hs-scan? +(defun hs-lint-replace-suggestions () + "Perform actual replacement of HLint's suggestions" + (goto-char (point-min)) + (while (re-search-forward hs-lint-regex nil t) + (let* ((fname (match-string 1)) + (fline (string-to-number (match-string 2))) + (old-code (match-string 4)) + (new-code (match-string 5)) + (msg (concat "Replace '" (hs-checkers-make-short-string old-code 30) + "' with '" (hs-checkers-make-short-string new-code 30) "'")) + (bline 0) + (eline 0) + (spos 0) + (new-old-code "")) + (save-excursion + (switch-to-buffer (get-file-buffer fname)) + (goto-char (point-min)) + (forward-line (1- fline)) + (beginning-of-line) + (setf bline (point)) + (when (or hs-checkers-replace-without-ask + (yes-or-no-p msg)) + (end-of-line) + (setf eline (point)) + (beginning-of-line) + (setf old-code (regexp-quote old-code)) + (while (string-match "\\\\ " old-code spos) + (setf new-old-code (concat new-old-code + (substring old-code spos (match-beginning 0)) + "\\ *")) + (setf spos (match-end 0))) + (setf new-old-code (concat new-old-code (substring old-code spos))) + (remove-text-properties bline eline '(composition nil)) + (when (re-search-forward new-old-code eline t) + (replace-match new-code nil t))))))) + +(defun hs-lint-finish-hook (buf msg) + "Function, that is executed at the end of HLint or scan execution" + (if hs-checkers-replace-with-suggestions + (hs-lint-replace-suggestions) + (next-error 1 t))) + +(defun hs-scan-finish-hook (buf msg) + "Function, that is executed at the end of hs-scan execution" + (next-error 1 t)) + +(defun hs-scan-make-command (file) + "Generates command line for scan" + (concat hs-scan-command " " hs-scan-options " \"" file "\"")) + +(defun hs-lint-make-command (file) + "Generates command line for scan" + (concat hs-lint-command " \"" file "\"" " " hs-lint-options)) + +(defmacro hs-checkers-setup (type name) + "Performs setup of corresponding checker. Receives two arguments: +type - checker's type (lint or scan) that is expanded into functions and hooks names +name - user visible name for this mode" + (let ((nm (concat "hs-" (symbol-name type)))) + `(progn +;;;###autoload + (defvar ,(intern (concat nm "-setup-hook")) nil + ,(concat "Hook, that will executed before running " name)) + (defun ,(intern (concat nm "-process-setup")) () + "Setup compilation variables and buffer for `hlint'." + (run-hooks ',(intern (concat nm "-setup-hook")))) +;;;###autoload + (define-compilation-mode ,(intern (concat nm "-mode")) ,name + ,(concat "Mode to check Haskell source code using " name) + (set (make-local-variable 'compilation-process-setup-function) + ',(intern (concat nm "-process-setup"))) + (set (make-local-variable 'compilation-disable-input) t) + (set (make-local-variable 'compilation-scroll-output) nil) + (set (make-local-variable 'compilation-finish-functions) + (list ',(intern (concat nm "-finish-hook"))))) +;;;###autoload + (defun ,(intern nm) () + ,(concat "Run " name " for current buffer with haskell source") + (interactive) + (save-some-buffers hs-checkers-save-files) + (compilation-start (,(intern (concat nm "-make-command")) buffer-file-name) + ',(intern (concat nm "-mode"))))) + )) + +(hs-checkers-setup lint "HLint") +(hs-checkers-setup scan "HScan") + +(provide 'haskell-checkers) + +;; Local Variables: +;; byte-compile-warnings: (not cl-functions) +;; End: + +;;; haskell-checkers.el ends here diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/haskell-checkers.elc Binary file .emacs.d/haskell-mode/haskell-checkers.elc has changed diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/haskell-compat.el --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/haskell-mode/haskell-compat.el Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,36 @@ +;;; haskell-compat.el --- legacy/compatibility backports for haskell-mode +;; +;; Filename: haskell-compat.el +;; Description: legacy/compatibility backports for haskell-mode + +;; This file is not part of GNU Emacs. + +;; This file is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; This file is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see . + +;;; Commentary: + +;;; Code: + +;; Missing in Emacs23, stolen from Emacs24's `subr.el' +(unless (fboundp 'process-live-p) + (defun process-live-p (process) + "Returns non-nil if PROCESS is alive. +A process is considered alive if its status is `run', `open', +`listen', `connect' or `stop'." + (memq (process-status process) + '(run open listen connect stop)))) + +(provide 'haskell-compat) + +;;; haskell-compat.el ends here diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/haskell-compat.elc Binary file .emacs.d/haskell-mode/haskell-compat.elc has changed diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/haskell-compile.el --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/haskell-mode/haskell-compile.el Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,158 @@ +;;; haskell-compile.el --- Haskell/GHC compilation sub-mode + +;; Copyright (C) 2013 Herbert Valerio Riedel + +;; Author: Herbert Valerio Riedel + +;; This file is not part of GNU Emacs. + +;; This file is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3 of the License, or +;; (at your option) any later version. + +;; This file is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see . + +;;; Commentary: + +;; Simple GHC-centric compilation sub-mode; see info node +;; `(haskell-mode)compilation' for more information + +;;; Code: + +(require 'compile) +(require 'haskell-cabal) + +(defgroup haskell-compile nil + "Settings for Haskell compilation mode" + :link '(custom-manual "(haskell-mode)compilation") + :group 'haskell) + +(defcustom haskell-compile-cabal-build-command + "cd %s && cabal build --ghc-option=-ferror-spans" + "Default build command to use for `haskell-cabal-build' when a cabal file is detected. +The `%s' placeholder is replaced by the cabal package top folder." + :group 'haskell-compile + :type 'string) + +(defcustom haskell-compile-cabal-build-alt-command + "cd %s && cabal clean -s && cabal build --ghc-option=-ferror-spans" + "Alternative build command to use when `haskell-cabal-build' is called with a negative prefix argument. +The `%s' placeholder is replaced by the cabal package top folder." + :group 'haskell-compile + :type 'string) + +(defcustom haskell-compile-command + "ghc -Wall -ferror-spans -fforce-recomp -c %s" + "Default build command to use for `haskell-cabal-build' when no cabal file is detected. +The `%s' placeholder is replaced by the current buffer's filename." + :group 'haskell-compile + :type 'string) + +(defcustom haskell-compile-ghc-filter-linker-messages + t + "Filter out unremarkable \"Loading package...\" linker messages during compilation." + :group 'haskell-compile + :type 'boolean) + +(defconst haskell-compilation-error-regexp-alist + `((,(concat + "^\\(?1:[^ \t\r\n]+?\\):" + "\\(?:" + "\\(?2:[0-9]+\\):\\(?4:[0-9]+\\)\\(?:-\\(?5:[0-9]+\\)\\)?" ;; "121:1" & "12:3-5" + "\\|" + "(\\(?2:[0-9]+\\),\\(?4:[0-9]+\\))-(\\(?3:[0-9]+\\),\\(?5:[0-9]+\\))" ;; "(289,5)-(291,36)" + "\\)" + ":\\(?6: Warning:\\)?") + 1 (2 . 3) (4 . 5) (6 . nil)) ;; error/warning locus + + ;; multiple declarations + ("^ \\(?:Declared at:\\| \\) \\(?1:[^ \t\r\n]+\\):\\(?2:[0-9]+\\):\\(?4:[0-9]+\\)$" + 1 2 4 0) ;; info locus + + ;; this is the weakest pattern as it's subject to line wrapping et al. + (" at \\(?1:[^ \t\r\n]+\\):\\(?2:[0-9]+\\):\\(?4:[0-9]+\\)\\(?:-\\(?5:[0-9]+\\)\\)?[)]?$" + 1 2 (4 . 5) 0)) ;; info locus + "Regexps used for matching GHC compile messages. +See `compilation-error-regexp-alist' for semantics.") + +(defvar haskell-compilation-mode-map + (let ((map (make-sparse-keymap))) + (set-keymap-parent map compilation-mode-map)) + "Keymap for `haskell-compilation-mode' buffers. +This is a child of `compilation-mode-map'.") + +(defun haskell-compilation-filter-hook () + "Local `compilation-filter-hook' for `haskell-compilation-mode'." + + (when haskell-compile-ghc-filter-linker-messages + (delete-matching-lines "^Loading package [^ \t\r\n]+ [.]+ linking [.]+ done\\.$" + (if (boundp 'compilation-filter-start) ;; available since Emacs 24.2 + (save-excursion (goto-char compilation-filter-start) + (line-beginning-position)) + (point-min)) + (point)))) + +(define-compilation-mode haskell-compilation-mode "HsCompilation" + "Haskell/GHC specific `compilation-mode' derivative. +This mode provides support for GHC 7.[46]'s compile +messages. Specifically, also the `-ferror-spans` source location +format is supported, as well as info-locations within compile +messages pointing to additional source locations. + +See Info node `(haskell-mode)compilation' for more details." + (set (make-local-variable 'compilation-error-regexp-alist) + haskell-compilation-error-regexp-alist) + + (add-hook 'compilation-filter-hook + 'haskell-compilation-filter-hook nil t) + ) + +;;;###autoload +(defun haskell-compile (&optional edit-command) + "Compile the Haskell program including the current buffer. +Tries to locate the next cabal description in current or parent +folders via `haskell-cabal-find-dir' and if found, invoke +`haskell-compile-cabal-build-command' from the cabal package root +folder. If no cabal package could be detected, +`haskell-compile-command' is used instead. + +If prefix argument EDIT-COMMAND is non-nil (and not a negative +prefix `-'), `haskell-compile' prompts for custom compile +command. + +If EDIT-COMMAND contains the negative prefix argument `-', +`haskell-compile' calls the alternative command defined in +`haskell-compile-cabal-build-alt-command' if a cabal package was +detected. + +`haskell-compile' uses `haskell-compilation-mode' which is +derived from `compilation-mode'. See Info +node `(haskell-mode)compilation' for more details." + (interactive "P") + (save-some-buffers (not compilation-ask-about-save) + (if (boundp 'compilation-save-buffers-predicate) ;; since Emacs 24.1(?) + compilation-save-buffers-predicate)) + (let* ((cabdir (haskell-cabal-find-dir)) + (command1 (if (eq edit-command '-) + haskell-compile-cabal-build-alt-command + haskell-compile-cabal-build-command)) + (srcname (buffer-file-name)) + (command (if cabdir + (format command1 cabdir) + (if (and srcname (derived-mode-p 'haskell-mode)) + (format haskell-compile-command srcname) + command1)))) + (when (and edit-command (not (eq edit-command '-))) + (setq command (compilation-read-command command))) + + (compilation-start command 'haskell-compilation-mode))) + +(provide 'haskell-compile) +;;; haskell-compile.el ends here diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/haskell-compile.elc Binary file .emacs.d/haskell-mode/haskell-compile.elc has changed diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/haskell-debug.el --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/haskell-mode/haskell-debug.el Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,655 @@ +;;; haskell-debug.el --- Debugging mode via GHCi + +;; Copyright (c) 2014 Chris Done. All rights reserved. + +;; This file is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; This file is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see . + +;;; Code: + +(require 'cl) + +(defmacro haskell-debug-with-breakpoints (&rest body) + "Breakpoints need to exist to start stepping." + `(if (haskell-debug-get-breakpoints) + ,@body + (error "No breakpoints to step into!"))) + +(defmacro haskell-debug-with-modules (&rest body) + "Modules need to exist to do debugging stuff." + `(if (haskell-debug-get-modules) + ,@body + (error "No modules loaded!"))) + +(define-derived-mode haskell-debug-mode + text-mode "Debug" + "Major mode for debugging Haskell via GHCi.") + +(define-key haskell-debug-mode-map (kbd "g") 'haskell-debug/refresh) +(define-key haskell-debug-mode-map (kbd "s") 'haskell-debug/step) +(define-key haskell-debug-mode-map (kbd "d") 'haskell-debug/delete) +(define-key haskell-debug-mode-map (kbd "b") 'haskell-debug/break-on-function) +(define-key haskell-debug-mode-map (kbd "a") 'haskell-debug/abandon) +(define-key haskell-debug-mode-map (kbd "c") 'haskell-debug/continue) +(define-key haskell-debug-mode-map (kbd "p") 'haskell-debug/previous) +(define-key haskell-debug-mode-map (kbd "n") 'haskell-debug/next) +(define-key haskell-debug-mode-map (kbd "RET") 'haskell-debug/select) + +(defvar haskell-debug-history-cache nil + "Cache of the tracing history.") + +(defvar haskell-debug-bindings-cache nil + "Cache of the current step's bindings.") + +(defun haskell-debug-session-debugging-p (session) + "Does the session have a debugging buffer open?" + (not (not (get-buffer (haskell-debug-buffer-name session))))) + +(defun haskell-debug () + "Start the debugger for the current Haskell (GHCi) session." + (interactive) + (let ((session (haskell-session))) + (switch-to-buffer-other-window (haskell-debug-buffer-name session)) + (unless (eq major-mode 'haskell-debug-mode) + (haskell-debug-mode) + (haskell-debug-start session)))) + +(defun haskell-debug/delete () + "Delete whatever's at the point." + (interactive) + (cond + ((get-text-property (point) 'break) + (let ((break (get-text-property (point) 'break))) + (when (y-or-n-p (format "Delete breakpoint #%d?" + (plist-get break :number))) + (haskell-process-queue-sync-request + (haskell-process) + (format ":delete %d" + (plist-get break :number))) + (haskell-debug/refresh)))))) + +(defun haskell-debug/step (&optional expr) + "Step into the next function." + (interactive) + (haskell-debug-with-breakpoints + (let* ((breakpoints (haskell-debug-get-breakpoints)) + (context (haskell-debug-get-context)) + (string + (haskell-process-queue-sync-request + (haskell-process) + (if expr + (concat ":step " expr) + ":step")))) + (cond + ((string= string "not stopped at a breakpoint") + (if haskell-debug-bindings-cache + (progn (setq haskell-debug-bindings-cache nil) + (haskell-debug/refresh)) + (call-interactively 'haskell-debug/start-step))) + (t (let ((maybe-stopped-at (haskell-debug-parse-stopped-at string))) + (cond + (maybe-stopped-at + (set (make-local-variable 'haskell-debug-bindings-cache) + maybe-stopped-at) + (message "Computation paused.") + (haskell-debug/refresh)) + (t + (if context + (message "Computation finished.") + (when (y-or-n-p "Computation completed without breaking. Reload the module and retry?") + (message "Reloading and resetting breakpoints...") + (haskell-interactive-mode-reset-error (haskell-session)) + (loop for break in breakpoints + do (haskell-process-file-loadish + (concat "load " (plist-get break :path)) + nil + nil)) + (loop for break in breakpoints + do (haskell-debug-break break)) + (haskell-debug/step expr))))))))) + (haskell-debug/refresh))) + +(defun haskell-debug/start-step (expr) + "Start stepping EXPR." + (interactive (list (read-from-minibuffer "Expression to step through: "))) + (haskell-debug/step expr)) + +(defun haskell-debug/refresh () + "Refresh the debugger buffer." + (interactive) + (with-current-buffer (haskell-debug-buffer-name (haskell-session)) + (let ((inhibit-read-only t) + (p (point))) + (erase-buffer) + (insert (propertize (concat "Debugging " + (haskell-session-name (haskell-session)) + "\n\n") + 'face `((:weight bold)))) + (let ((modules (haskell-debug-get-modules)) + (breakpoints (haskell-debug-get-breakpoints)) + (context (haskell-debug-get-context)) + (history (haskell-debug-get-history))) + (unless modules + (insert (propertize "You have to load a module to start debugging.\n\n" + 'face + `((:foreground ,sunburn-red))))) + (haskell-debug-insert-bindings modules breakpoints context) + (when modules + (haskell-debug-insert-current-context context history) + (haskell-debug-insert-breakpoints breakpoints)) + (haskell-debug-insert-modules modules)) + (insert "\n") + (goto-char (min (point-max) p))))) + +(defun haskell-debug-break (break) + "Set BREAK breakpoint in module at line/col." + (haskell-process-queue-without-filters + (haskell-process) + (format ":break %s %s %d" + (plist-get break :module) + (plist-get (plist-get break :span) :start-line) + (plist-get (plist-get break :span) :start-col)))) + +(defun haskell-debug-insert-current-context (context history) + "Insert the current context." + (haskell-debug-insert-header "Context") + (if context + (haskell-debug-insert-context context history) + (haskell-debug-insert-debug-finished)) + (insert "\n")) + +(defun haskell-debug-insert-debug-finished () + "Insert message that no debugging is happening, but if there is +some old history, then display that." + (if haskell-debug-history-cache + (progn (haskell-debug-insert-muted "Finished debugging.") + (insert "\n") + (haskell-debug-insert-history haskell-debug-history-cache)) + (haskell-debug-insert-muted "Not debugging right now."))) + +(defun haskell-debug-insert-context (context history) + "Insert the context and history." + (when context + (insert (propertize (plist-get context :name) 'face `((:weight bold))) + (haskell-debug-muted " - ") + (file-name-nondirectory (plist-get context :path)) + (haskell-debug-muted " (stopped)") + "\n")) + (when haskell-debug-bindings-cache + (insert "\n") + (let ((bindings haskell-debug-bindings-cache)) + (insert + (haskell-debug-get-span-string + (plist-get bindings :path) + (plist-get bindings :span))) + (insert "\n\n") + (loop for binding in (plist-get bindings :types) + do (insert (haskell-fontify-as-mode binding 'haskell-mode) + "\n")))) + (let ((history (or history + (list (haskell-debug-make-fake-history context))))) + (when history + (insert "\n") + (haskell-debug-insert-history history)))) + +(defun haskell-debug-insert-history (history) + "Insert tracing HISTORY." + (let ((i (length history))) + (loop for span in history + do (let ((string (haskell-debug-get-span-string + (plist-get span :path) + (plist-get span :span))) + (index (plist-get span :index))) + (insert (propertize (format "%4d" i) + 'face `((:weight bold :background ,sunburn-bg+1))) + " " + (haskell-debug-preview-span + (plist-get span :span) + string + t) + "\n") + (setq i (1- i)))))) + +(defun haskell-debug-make-fake-history (context) + "Make a fake history item." + (list :index -1 + :path (plist-get context :path) + :span (plist-get context :span))) + +(defun haskell-debug-preview-span (span string &optional collapsed) + "Make a one-line preview of the given expression." + (with-temp-buffer + (haskell-mode) + (insert string) + (when (/= 0 (plist-get span :start-col)) + (indent-rigidly (point-min) + (point-max) + 1)) + (font-lock-fontify-buffer) + (when (/= 0 (plist-get span :start-col)) + (indent-rigidly (point-min) + (point-max) + -1)) + (goto-char (point-min)) + (if collapsed + (replace-regexp-in-string + "\n[ ]*" + (propertize " " 'face `((:background ,sunburn-bg+1))) + (buffer-substring (point-min) + (point-max))) + (buffer-string)))) + +(defun haskell-debug-get-span-string (path span) + "Get the string from the PATH and the SPAN." + (save-window-excursion + (find-file path) + (buffer-substring + (save-excursion + (goto-char (point-min)) + (forward-line (1- (plist-get span :start-line))) + (forward-char (1- (plist-get span :start-col))) + (point)) + (save-excursion + (goto-char (point-min)) + (forward-line (1- (plist-get span :end-line))) + (forward-char (plist-get span :end-col)) + (point))))) + +(defun haskell-debug-insert-bindings (modules breakpoints context) + "Insert a list of bindings." + (if breakpoints + (progn (haskell-debug-insert-binding "s" "step into an expression") + (haskell-debug-insert-binding "b" "breakpoint" t)) + (progn + (when modules + (haskell-debug-insert-binding "b" "breakpoint")) + (when breakpoints + (haskell-debug-insert-binding "s" "step into an expression" t)))) + (when breakpoints + (haskell-debug-insert-binding "d" "delete breakpoint")) + (when context + (haskell-debug-insert-binding "a" "abandon context") + (haskell-debug-insert-binding "c" "continue" t)) + (when context + (haskell-debug-insert-binding "p" "previous step") + (haskell-debug-insert-binding "n" "next step" t)) + (haskell-debug-insert-binding "g" "refresh" t) + (insert "\n")) + +(defun haskell-debug-insert-binding (binding desc &optional end) + "Insert a helpful keybinding." + (insert (propertize binding 'face `((:foreground ,sunburn-blue :weight bold))) + (haskell-debug-muted " - ") + desc + (if end + "\n" + (haskell-debug-muted ", ")))) + +(defun haskell-debug/breakpoint-numbers () + "List breakpoint numbers." + (interactive) + (let ((breakpoints (mapcar (lambda (breakpoint) + (number-to-string (plist-get breakpoint :number))) + (haskell-debug-get-breakpoints)))) + (if (null breakpoints) + (message "No breakpoints.") + (message "Breakpoint(s): %s" + (mapconcat #'identity + breakpoints + ", "))))) + +(defun haskell-debug/abandon () + "Abandon the current computation." + (interactive) + (haskell-debug-with-breakpoints + (haskell-process-queue-sync-request (haskell-process) ":abandon") + (message "Computation abandoned.") + (setq haskell-debug-history-cache nil) + (setq haskell-debug-bindings-cache nil) + (haskell-debug/refresh))) + +(defun haskell-debug/continue () + "Continue the current computation." + (interactive) + (haskell-debug-with-breakpoints + (haskell-process-queue-sync-request (haskell-process) ":continue") + (message "Computation continued.") + (setq haskell-debug-history-cache nil) + (setq haskell-debug-bindings-cache nil) + (haskell-debug/refresh))) + +(defun haskell-debug/break-on-function () + "Break on function IDENT." + (interactive) + (haskell-debug-with-modules + (let ((ident (read-from-minibuffer "Function: " + (haskell-ident-at-point)))) + (haskell-process-queue-sync-request + (haskell-process) + (concat ":break " + ident)) + (message "Breaking on function: %s" ident) + (haskell-debug/refresh)))) + +(defun haskell-debug/select () + "Select whatever is at point." + (interactive) + (cond + ((get-text-property (point) 'break) + (let ((break (get-text-property (point) 'break))) + (haskell-debug-highlight (plist-get break :path) + (plist-get break :span)))) + ((get-text-property (point) 'module) + (let ((break (get-text-property (point) 'module))) + (haskell-debug-highlight (plist-get break :path)))))) + +(defun haskell-debug/next () + "Go to next step to inspect bindings." + (interactive) + (haskell-debug-with-breakpoints + (haskell-debug-navigate "forward"))) + +(defun haskell-debug/previous () + "Go to previous step to inspect the bindings." + (interactive) + (haskell-debug-with-breakpoints + (haskell-debug-navigate "back"))) + +(defun haskell-debug-highlight (path &optional span) + "Highlight the file at span." + (let ((p (make-overlay + (line-beginning-position) + (line-end-position)))) + (overlay-put p 'face `((:background ,sunburn-bg+1))) + (with-current-buffer + (if span + (save-window-excursion + (find-file path) + (current-buffer)) + (find-file path) + (current-buffer)) + (let ((o (when span + (make-overlay + (save-excursion + (goto-char (point-min)) + (forward-line (1- (plist-get span :start-line))) + (forward-char (1- (plist-get span :start-col))) + (point)) + (save-excursion + (goto-char (point-min)) + (forward-line (1- (plist-get span :end-line))) + (forward-char (plist-get span :end-col)) + (point)))))) + (when o + (overlay-put o 'face `((:background ,sunburn-bg+1)))) + (sit-for 0.5) + (when o + (delete-overlay o)) + (delete-overlay p))))) + +(defun haskell-debug-insert-modules (modules) + "Insert the list of modules." + (haskell-debug-insert-header "Modules") + (if (null modules) + (haskell-debug-insert-muted "No loaded modules.") + (progn (loop for module in modules + do (insert (propertize (plist-get module :module) + 'module module + 'face `((:weight bold))) + (haskell-debug-muted " - ") + (propertize (file-name-nondirectory (plist-get module :path)) + 'module module))) + (insert "\n")))) + +(defun haskell-debug-insert-header (title) + "Insert a header title." + (insert (propertize title + 'face `((:foreground ,sunburn-green))) + "\n\n")) + +(defun haskell-debug-insert-breakpoints (breakpoints) + "Insert the list of breakpoints." + (haskell-debug-insert-header "Breakpoints") + (if (null breakpoints) + (haskell-debug-insert-muted "No active breakpoints.") + (loop for break in breakpoints + do (insert (propertize (format "%d" + (plist-get break :number)) + 'face `((:weight bold)) + 'break break) + (haskell-debug-muted " - ") + (propertize (plist-get break :module) + 'break break + 'break break) + (haskell-debug-muted + (format " (%d:%d)" + (plist-get (plist-get break :span) :start-line) + (plist-get (plist-get break :span) :start-col))) + "\n"))) + (insert "\n")) + +(defun haskell-debug-insert-muted (text) + "Insert some muted text." + (insert (haskell-debug-muted text) + "\n")) + +(defun haskell-debug-muted (text) + "Make some muted text." + (propertize text 'face `((:foreground ,sunburn-grey+1)))) + +(defun haskell-debug-buffer-name (session) + "The debug buffer name for the current session." + (format "*debug:%s*" + (haskell-session-name session))) + +(defun haskell-debug-start (session) + "Start the debug mode." + (setq buffer-read-only t) + (haskell-session-assign session) + (haskell-debug/refresh)) + +(defun haskell-debug-get-modules () + "Get the list of modules currently set." + (let ((string (haskell-process-queue-sync-request + (haskell-process) + ":show modules"))) + (if (string= string "") + (list) + (mapcar #'haskell-debug-parse-module + (split-string + string + "\n"))))) + +(defun haskell-debug-get-context () + "Get the current context." + (let ((string (haskell-process-queue-sync-request + (haskell-process) + ":show context"))) + (if (string= string "") + nil + (haskell-debug-parse-context string)))) + +(defun haskell-debug-navigate (direction) + "Navigate in DIRECTION \"back\" or \"forward\"." + (let ((string (haskell-process-queue-sync-request + (haskell-process) + (concat ":" direction)))) + (let ((bindings (haskell-debug-parse-logged string))) + (set (make-local-variable 'haskell-debug-bindings-cache) + bindings) + (when (not bindings) + (message "No more %s results!" direction))) + (haskell-debug/refresh))) + +(defun haskell-debug-parse-logged (string) + "Parse the logged breakpoint." + (cond + ((string= "no more logged breakpoints" string) + nil) + ((string= "already at the beginning of the history" string) + nil) + (t + (with-temp-buffer + (insert string) + (goto-char (point-min)) + (list :path (progn (search-forward " at ") + (buffer-substring-no-properties + (point) + (1- (search-forward ":")))) + :span (haskell-debug-parse-span + (buffer-substring-no-properties + (point) + (line-end-position))) + :types (progn (forward-line) + (split-string (buffer-substring-no-properties + (point) + (point-max)) + "\n"))))))) + +(defun haskell-debug-get-history () + "Get the step history." + (let ((string (haskell-process-queue-sync-request + (haskell-process) + ":history"))) + (if (or (string= string "") + (string= string "Not stopped at a breakpoint")) + nil + (if (string= string "Empty history. Perhaps you forgot to use :trace?") + nil + (let ((entries (mapcar #'haskell-debug-parse-history-entry + (remove-if (lambda (line) (string= "" line)) + (split-string + string + "\n"))))) + (set (make-local-variable 'haskell-debug-history-cache) + entries) + entries))))) + +(defun haskell-debug-parse-history-entry (string) + "Parse a history entry." + (if (string-match "^\\([-0-9]+\\)[ ]+:[ ]+\\([A-Za-z0-9_':]+\\)[ ]+(\\([^:]+\\):\\(.+?\\))$" + string) + (list :index (string-to-number (match-string 1 string)) + :name (match-string 2 string) + :path (match-string 3 string) + :span (haskell-debug-parse-span (match-string 4 string))) + (error "Unable to parse history entry: %s" string))) + +(defun haskell-debug-parse-context (string) + "Parse the context." + (cond + ((string-match "^--> \\(.+\\)\n \\(.+\\)" string) + (let ((name (match-string 1 string)) + (stopped (haskell-debug-parse-stopped-at (match-string 2 string)))) + (list :name name + :path (plist-get stopped :path) + :span (plist-get stopped :span)))))) + +(defun haskell-debug-get-breakpoints () + "Get the list of breakpoints currently set." + (let ((string (haskell-process-queue-sync-request + (haskell-process) + ":show breaks"))) + (if (string= string "No active breakpoints.") + (list) + (mapcar #'haskell-debug-parse-break-point + (split-string + string + "\n"))))) + +(defun haskell-debug-parse-stopped-at (string) + "Parse the location stopped at from the given string. + +For example: + +Stopped at /home/foo/project/src/x.hs:6:25-36 + +" + (let ((index (string-match "Stopped at \\([^:]+\\):\\(.+\\)\n?" + string))) + (when index + (list :path (match-string 1 string) + :span (haskell-debug-parse-span (match-string 2 string)) + :types (cdr (split-string (substring string index) + "\n")))))) + +(defun haskell-debug-parse-module (string) + "Parse a module and path. + +For example: + +X ( /home/foo/X.hs, interpreted ) + +" + (if (string-match "^\\([^ ]+\\)[ ]+( \\([^ ]+?\\), [a-z]+ )$" + string) + (list :module (match-string 1 string) + :path (match-string 2 string)) + (error "Unable to parse module from string: %s" + string))) + +(defun haskell-debug-parse-break-point (string) + "Parse a breakpoint number, module and location from a string. + +For example: + +[13] Main /home/foo/src/x.hs:(5,1)-(6,37) + +" + (if (string-match "^\\[\\([0-9]+\\)\\] \\([^ ]+\\) \\([^:]+\\):\\(.+\\)$" + string) + (list :number (string-to-number (match-string 1 string)) + :module (match-string 2 string) + :path (match-string 3 string) + :span (haskell-debug-parse-span (match-string 4 string))) + (error "Unable to parse breakpoint from string: %s" + string))) + +(defun haskell-debug-parse-span (string) + "Parse a source span from a string. + +Examples: + + (5,1)-(6,37) + 6:25-36 + 5:20 + +People like to make other people's lives interesting by making +variances in source span notation." + (cond + ((string-match "\\([0-9]+\\):\\([0-9]+\\)-\\([0-9]+\\)" + string) + (list :start-line (string-to-number (match-string 1 string)) + :start-col (string-to-number (match-string 2 string)) + :end-line (string-to-number (match-string 1 string)) + :end-col (string-to-number (match-string 3 string)))) + ((string-match "\\([0-9]+\\):\\([0-9]+\\)" + string) + (list :start-line (string-to-number (match-string 1 string)) + :start-col (string-to-number (match-string 2 string)) + :end-line (string-to-number (match-string 1 string)) + :end-col (string-to-number (match-string 2 string)))) + ((string-match "(\\([0-9]+\\),\\([0-9]+\\))-(\\([0-9]+\\),\\([0-9]+\\))" + string) + (list :start-line (string-to-number (match-string 1 string)) + :start-col (string-to-number (match-string 2 string)) + :end-line (string-to-number (match-string 3 string)) + :end-col (string-to-number (match-string 4 string)))) + (t (error "Unable to parse source span from string: %s" + string)))) + +(provide 'haskell-debug) + +;; Local Variables: +;; byte-compile-warnings: (not cl-functions) +;; End: diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/haskell-decl-scan.el --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/haskell-mode/haskell-decl-scan.el Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,609 @@ +;;; haskell-decl-scan.el --- Declaration scanning module for Haskell Mode + +;; Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. +;; Copyright (C) 1997-1998 Graeme E Moss + +;; Author: 1997-1998 Graeme E Moss +;; Maintainer: Stefan Monnier +;; Keywords: declarations menu files Haskell +;; URL: http://cvs.haskell.org/cgi-bin/cvsweb.cgi/fptools/CONTRIB/haskell-modes/emacs/haskell-decl-scan.el?rev=HEAD + +;; This file is not part of GNU Emacs. + +;; This file is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; This file is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see . + +;;; Commentary: + +;; Purpose: +;; +;; Top-level declarations are scanned and placed in a menu. Supports +;; full Latin1 Haskell 1.4 as well as literate scripts. +;; +;; +;; Installation: +;; +;; To turn declaration scanning on for all Haskell buffers under the +;; Haskell mode of Moss&Thorn, add this to .emacs: +;; +;; (add-hook 'haskell-mode-hook 'turn-on-haskell-decl-scan) +;; +;; Otherwise, call `turn-on-haskell-decl-scan'. +;; +;; +;; Customisation: +;; +;; M-x customize-group haskell-decl-scan +;; +;; +;; History: +;; +;; If you have any problems or suggestions, after consulting the list +;; below, email gem@cs.york.ac.uk quoting the version of the library +;; you are using, the version of Emacs you are using, and a small +;; example of the problem or suggestion. Note that this library +;; requires a reasonably recent version of Emacs. +;; +;; Uses `imenu' under Emacs. +;; +;; Version 1.2: +;; Added support for LaTeX-style literate scripts. +;; +;; Version 1.1: +;; Use own syntax table. Fixed bug for very small buffers. Use +;; markers instead of pointers (markers move with the text). +;; +;; Version 1.0: +;; Brought over from Haskell mode v1.1. +;; +;; +;; Present Limitations/Future Work (contributions are most welcome!): +;; +;; . Declarations requiring information extending beyond starting line +;; don't get scanned properly, eg. +;; > class Eq a => +;; > Test a +;; +;; . Comments placed in the midst of the first few lexemes of a +;; declaration will cause havoc, eg. +;; > infixWithComments :: Int -> Int -> Int +;; > x {-nastyComment-} `infixWithComments` y = x + y +;; but are not worth worrying about. +;; +;; . Would be nice to scan other top-level declarations such as +;; methods of a class, datatype field labels... any more? +;; +;; . Support for GreenCard? +;; +;; . Re-running (literate-)haskell-imenu should not cause the problems +;; that it does. The ability to turn off scanning would also be +;; useful. (Note that re-running (literate-)haskell-mode seems to +;; cause no problems.) + +;; All functions/variables start with +;; `(turn-(on/off)-)haskell-decl-scan' or `haskell-ds-'. + +;; The imenu support is based on code taken from `hugs-mode', +;; thanks go to Chris Van Humbeeck. + +;; Version. + +;;; Code: + +(require 'haskell-mode) +(require 'syntax) +(with-no-warnings (require 'cl)) +(require 'imenu) + +(defgroup haskell-decl-scan nil + "Haskell declaration scanning (`imenu' support)." + :link '(custom-manual "(haskell-mode)haskell-decl-scan-mode") + :group 'haskell + :prefix "haskell-decl-scan-") + +(defcustom haskell-decl-scan-bindings-as-variables nil + "Whether to put top-level value bindings into a \"Variables\" category." + :group 'haskell-decl-scan + :type 'boolean) + +(defcustom haskell-decl-scan-add-to-menubar t + "Whether to add a \"Declarations\" menu entry to menu bar." + :group 'haskell-decl-scan + :type 'boolean) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; General declaration scanning functions. + +(defvar haskell-ds-start-keywords-re + (concat "\\(\\<" + "class\\|data\\|i\\(mport\\|n\\(fix\\(\\|[lr]\\)\\|stance\\)\\)\\|" + "module\\|primitive\\|type\\|newtype" + "\\)\\>") + "Keywords that may start a declaration.") + +(defvar haskell-ds-syntax-table + (let ((table (copy-syntax-table haskell-mode-syntax-table))) + (modify-syntax-entry ?\' "w" table) + (modify-syntax-entry ?_ "w" table) + (modify-syntax-entry ?\\ "_" table) + table) + "Syntax table used for Haskell declaration scanning.") + + +(defun haskell-ds-get-variable (prefix) + "Return variable involved in value binding or type signature. +Assumes point is looking at the regexp PREFIX followed by the +start of a declaration (perhaps in the middle of a series of +declarations concerning a single variable). Otherwise return nil. +Point is not changed." + ;; I think I can now handle all declarations bar those with comments + ;; nested before the second lexeme. + (save-excursion + (with-syntax-table haskell-ds-syntax-table + (if (looking-at prefix) (goto-char (match-end 0))) + ;; Keyword. + (if (looking-at haskell-ds-start-keywords-re) + nil + (or ;; Parenthesized symbolic variable. + (and (looking-at "(\\(\\s_+\\))") (match-string-no-properties 1)) + ;; General case. + (if (looking-at + (if (eq ?\( (char-after)) + ;; Skip paranthesised expression. + (progn + (forward-sexp) + ;; Repeating this code and avoiding moving point if + ;; possible speeds things up. + "\\(\\'\\)?\\s-*\\(\\s_+\\|`\\(\\sw+\\)`\\)") + "\\(\\sw+\\)?\\s-*\\(\\s_+\\|`\\(\\sw+\\)`\\)")) + (let ((match2 (match-string-no-properties 2))) + ;; Weed out `::', `∷',`=' and `|' from potential infix + ;; symbolic variable. + (if (member match2 '("::" "∷" "=" "|")) + ;; Variable identifier. + (match-string-no-properties 1) + (if (eq (aref match2 0) ?\`) + ;; Infix variable identifier. + (match-string-no-properties 3) + ;; Infix symbolic variable. + match2)))) + ;; Variable identifier. + (and (looking-at "\\sw+") (match-string-no-properties 0))))))) + +(defun haskell-ds-move-to-start-regexp (inc regexp) + "Move to beginning of line that succeeds/precedes (INC = 1/-1) +current line that starts with REGEXP and is not in `font-lock-comment-face'." + ;; Making this defsubst instead of defun appears to have little or + ;; no effect on efficiency. It is probably not called enough to do + ;; so. + (while (and (= (forward-line inc) 0) + (or (not (looking-at regexp)) + (eq (get-text-property (point) 'face) + 'font-lock-comment-face))))) + +(defun haskell-ds-move-to-start-regexp-skipping-comments (inc regexp) + "Like haskell-ds-move-to-start-regexp, but uses syntax-ppss to + skip comments" + (let (p) + (loop + do (setq p (point)) + (haskell-ds-move-to-start-regexp inc regexp) + while (and (nth 4 (syntax-ppss)) + (/= p (point)))))) + +(defvar literate-haskell-ds-line-prefix "> ?" + "Regexp matching start of a line of Bird-style literate code. +Current value is \"> \" as we assume top-level declarations start +at column 3. Must not contain the special \"^\" regexp as we may +not use the regexp at the start of a regexp string. Note this is +only for `imenu' support.") + +(defvar haskell-ds-start-decl-re "\\(\\sw\\|(\\)" + "The regexp that starts a Haskell declaration.") + +(defvar literate-haskell-ds-start-decl-re + (concat literate-haskell-ds-line-prefix haskell-ds-start-decl-re) + "The regexp that starts a Bird-style literate Haskell declaration.") + +(defun haskell-ds-move-to-decl (direction bird-literate fix) + "General function for moving to the start of a declaration, +either forwards or backwards from point, with normal or with Bird-style +literate scripts. If DIRECTION is t, then forward, else backward. If +BIRD-LITERATE is t, then treat as Bird-style literate scripts, else +normal scripts. Returns point if point is left at the start of a +declaration, and nil otherwise, ie. because point is at the beginning +or end of the buffer and no declaration starts there. If FIX is t, +then point does not move if already at the start of a declaration." + ;; As `haskell-ds-get-variable' cannot separate an infix variable + ;; identifier out of a value binding with non-alphanumeric first + ;; argument, this function will treat such value bindings as + ;; separate from the declarations surrounding it. + (let ( ;; The variable typed or bound in the current series of + ;; declarations. + name + ;; The variable typed or bound in the new declaration. + newname + ;; Hack to solve hard problem for Bird-style literate scripts + ;; that start with a declaration. We are in the abyss if + ;; point is before start of this declaration. + abyss + (line-prefix (if bird-literate literate-haskell-ds-line-prefix "")) + ;; The regexp to match for the start of a declaration. + (start-decl-re (if bird-literate + literate-haskell-ds-start-decl-re + haskell-ds-start-decl-re)) + (increment (if direction 1 -1)) + (bound (if direction (point-max) (point-min)))) + ;; Change syntax table. + (with-syntax-table haskell-ds-syntax-table + ;; move to beginning of line that starts the "current + ;; declaration" (dependent on DIRECTION and FIX), and then get + ;; the variable typed or bound by this declaration, if any. + (let ( ;; Where point was at call of function. + (here (point)) + ;; Where the declaration on this line (if any) starts. + (start (progn + (beginning-of-line) + ;; Checking the face to ensure a declaration starts + ;; here seems to be the only addition to make this + ;; module support LaTeX-style literate scripts. + (if (and (looking-at start-decl-re) + (not (eq (get-text-property (point) 'face) + 'font-lock-comment-face))) + (match-beginning 1))))) + (if (and start + ;; This complicated boolean determines whether we + ;; should include the declaration that starts on the + ;; current line as the "current declaration" or not. + (or (and (or (and direction (not fix)) + (and (not direction) fix)) + (>= here start)) + (and (or (and direction fix) + (and (not direction) (not fix))) + (> here start)))) + ;; If so, we are already at start of the current line, so + ;; do nothing. + () + ;; If point was before start of a declaration on the first + ;; line of the buffer (possible for Bird-style literate + ;; scripts) then we are in the abyss. + (if (and start (bobp)) + (setq abyss t) + ;; Otherwise we move to the start of the first declaration + ;; on a line preceding the current one, skipping comments + (haskell-ds-move-to-start-regexp-skipping-comments -1 start-decl-re)))) + ;; If we are in the abyss, position and return as appropriate. + (if abyss + (if (not direction) + nil + (re-search-forward (concat "\\=" line-prefix) nil t) + (point)) + ;; Get the variable typed or bound by this declaration, if any. + (setq name (haskell-ds-get-variable line-prefix)) + (if (not name) + ;; If no such variable, stop at the start of this + ;; declaration if moving backward, or move to the next + ;; declaration if moving forward. + (if direction + (haskell-ds-move-to-start-regexp-skipping-comments 1 start-decl-re)) + ;; If there is a variable, find the first + ;; succeeding/preceding declaration that does not type or + ;; bind it. Check for reaching start/end of buffer and + ;; comments. + (haskell-ds-move-to-start-regexp-skipping-comments increment start-decl-re) + (while (and (/= (point) bound) + (and (setq newname (haskell-ds-get-variable line-prefix)) + (string= name newname))) + (setq name newname) + (haskell-ds-move-to-start-regexp-skipping-comments increment start-decl-re)) + ;; If we are going backward, and have either reached a new + ;; declaration or the beginning of a buffer that does not + ;; start with a declaration, move forward to start of next + ;; declaration (which must exist). Otherwise, we are done. + (if (and (not direction) + (or (and (looking-at start-decl-re) + (not (string= name + ;; Note we must not use + ;; newname here as this may + ;; not have been set if we + ;; have reached the beginning + ;; of the buffer. + (haskell-ds-get-variable + line-prefix)))) + (and (not (looking-at start-decl-re)) + (bobp)))) + (haskell-ds-move-to-start-regexp-skipping-comments 1 start-decl-re))) + ;; Store whether we are at the start of a declaration or not. + ;; Used to calculate final result. + (let ((at-start-decl (looking-at start-decl-re))) + ;; If we are at the beginning of a line, move over + ;; line-prefix, if present at point. + (if (bolp) + (re-search-forward (concat "\\=" line-prefix) (point-max) t)) + ;; Return point if at the start of a declaration and nil + ;; otherwise. + (if at-start-decl (point) nil)))))) + +(defun haskell-ds-bird-p () + (and (boundp 'haskell-literate) (eq haskell-literate 'bird))) + +(defun haskell-ds-backward-decl () + "Move backward to the first character that starts a top-level declaration. +A series of declarations concerning one variable is treated as one +declaration by this function. So, if point is within a top-level +declaration then move it to the start of that declaration. If point +is already at the start of a top-level declaration, then move it to +the start of the preceding declaration. Returns point if point is +left at the start of a declaration, and nil otherwise, ie. because +point is at the beginning of the buffer and no declaration starts +there." + (interactive) + (haskell-ds-move-to-decl nil (haskell-ds-bird-p) nil)) + +(defun haskell-ds-forward-decl () + "As `haskell-ds-backward-decl' but forward." + (interactive) + (haskell-ds-move-to-decl t (haskell-ds-bird-p) nil)) + +(defun haskell-ds-generic-find-next-decl (bird-literate) + "Find the name, position and type of the declaration at or after point. +Return ((NAME . (START-POSITION . NAME-POSITION)) . TYPE) +if one exists and nil otherwise. The start-position is at the start +of the declaration, and the name-position is at the start of the name +of the declaration. The name is a string, the positions are buffer +positions and the type is one of the symbols \"variable\", \"datatype\", +\"class\", \"import\" and \"instance\"." + (let ( ;; The name, type and name-position of the declaration to + ;; return. + name + type + name-pos + ;; Buffer positions marking the start and end of the space + ;; containing a declaration. + start + end) + ;; Change to declaration scanning syntax. + (with-syntax-table haskell-ds-syntax-table + ;; Stop when we are at the end of the buffer or when a valid + ;; declaration is grabbed. + (while (not (or (eobp) name)) + ;; Move forward to next declaration at or after point. + (haskell-ds-move-to-decl t bird-literate t) + ;; Start and end of search space is currently just the starting + ;; line of the declaration. + (setq start (point) + end (line-end-position)) + (cond + ;; If the start of the top-level declaration does not begin + ;; with a starting keyword, then (if legal) must be a type + ;; signature or value binding, and the variable concerned is + ;; grabbed. + ((not (looking-at haskell-ds-start-keywords-re)) + (setq name (haskell-ds-get-variable "")) + (if name + (progn + (setq type 'variable) + (re-search-forward (regexp-quote name) end t) + (setq name-pos (match-beginning 0))))) + ;; User-defined datatype declaration. + ((re-search-forward "\\=\\(data\\|newtype\\|type\\)\\>" end t) + (re-search-forward "=>" end t) + (if (looking-at "[ \t]*\\(\\sw+\\)") + (progn + (setq name (match-string-no-properties 1)) + (setq name-pos (match-beginning 1)) + (setq type 'datatype)))) + ;; Class declaration. + ((re-search-forward "\\=class\\>" end t) + (re-search-forward "=>" end t) + (if (looking-at "[ \t]*\\(\\sw+\\)") + (progn + (setq name (match-string-no-properties 1)) + (setq name-pos (match-beginning 1)) + (setq type 'class)))) + ;; Import declaration. + ((looking-at "import[ \t]+\\(?:safe[\t ]+\\)?\\(?:qualified[ \t]+\\)?\\(?:\"[^\"]*\"[\t ]+\\)?\\(\\(?:\\sw\\|.\\)+\\)") + (setq name (match-string-no-properties 1)) + (setq name-pos (match-beginning 1)) + (setq type 'import)) + ;; Instance declaration. + ((re-search-forward "\\=instance[ \t]+" end t) + (re-search-forward "=>[ \t]+" end t) + ;; The instance "title" starts just after the `instance' (and + ;; any context) and finishes just before the _first_ `where' + ;; if one exists. This solution is ugly, but I can't find a + ;; nicer one---a simple regexp will pick up the last `where', + ;; which may be rare but nevertheless... + (setq name-pos (point)) + (setq name (buffer-substring-no-properties + (point) + (progn + ;; Look for a `where'. + (if (re-search-forward "\\" end t) + ;; Move back to just before the `where'. + (progn + (re-search-backward "\\s-where") + (point)) + ;; No `where' so move to last non-whitespace + ;; before `end'. + (progn + (goto-char end) + (skip-chars-backward " \t") + (point)))))) + ;; If we did not manage to extract a name, cancel this + ;; declaration (eg. when line ends in "=> "). + (if (string-match "^[ \t]*$" name) (setq name nil)) + (setq type 'instance))) + ;; Move past start of current declaration. + (goto-char end)) + ;; If we have a valid declaration then return it, otherwise return + ;; nil. + (if name + (cons (cons name (cons (copy-marker start t) (copy-marker name-pos t))) + type) + nil)))) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Declaration scanning via `imenu'. + +;;;###autoload +(defun haskell-ds-create-imenu-index () + "Function for finding `imenu' declarations in Haskell mode. +Finds all declarations (classes, variables, imports, instances and +datatypes) in a Haskell file for the `imenu' package." + ;; Each list has elements of the form `(INDEX-NAME . INDEX-POSITION)'. + ;; These lists are nested using `(INDEX-TITLE . INDEX-ALIST)'. + (let* ((bird-literate (haskell-ds-bird-p)) + (index-alist '()) + (index-class-alist '()) ;; Classes + (index-var-alist '()) ;; Variables + (index-imp-alist '()) ;; Imports + (index-inst-alist '()) ;; Instances + (index-type-alist '()) ;; Datatypes + ;; Variables for showing progress. + (bufname (buffer-name)) + (divisor-of-progress (max 1 (/ (buffer-size) 100))) + ;; The result we wish to return. + result) + (goto-char (point-min)) + ;; Loop forwards from the beginning of the buffer through the + ;; starts of the top-level declarations. + (while (< (point) (point-max)) + (message "Scanning declarations in %s... (%3d%%)" bufname + (/ (- (point) (point-min)) divisor-of-progress)) + ;; Grab the next declaration. + (setq result (haskell-ds-generic-find-next-decl bird-literate)) + (if result + ;; If valid, extract the components of the result. + (let* ((name-posns (car result)) + (name (car name-posns)) + (posns (cdr name-posns)) + (start-pos (car posns)) + (type (cdr result)) + ;; Place `(name . start-pos)' in the correct alist. + (sym (cdr (assq type + '((variable . index-var-alist) + (datatype . index-type-alist) + (class . index-class-alist) + (import . index-imp-alist) + (instance . index-inst-alist)))))) + (set sym (cons (cons name start-pos) (symbol-value sym)))))) + ;; Now sort all the lists, label them, and place them in one list. + (message "Sorting declarations in %s..." bufname) + (when index-type-alist + (push (cons "Datatypes" + (sort index-type-alist 'haskell-ds-imenu-label-cmp)) + index-alist)) + (when index-inst-alist + (push (cons "Instances" + (sort index-inst-alist 'haskell-ds-imenu-label-cmp)) + index-alist)) + (when index-imp-alist + (push (cons "Imports" + (sort index-imp-alist 'haskell-ds-imenu-label-cmp)) + index-alist)) + (when index-class-alist + (push (cons "Classes" + (sort index-class-alist 'haskell-ds-imenu-label-cmp)) + index-alist)) + (when index-var-alist + (if haskell-decl-scan-bindings-as-variables + (push (cons "Variables" + (sort index-var-alist 'haskell-ds-imenu-label-cmp)) + index-alist) + (setq index-alist (append index-alist + (sort index-var-alist 'haskell-ds-imenu-label-cmp))))) + (message "Sorting declarations in %s...done" bufname) + ;; Return the alist. + index-alist)) + +(defun haskell-ds-imenu-label-cmp (el1 el2) + "Predicate to compare labels in lists from `haskell-ds-create-imenu-index'." + (string< (car el1) (car el2))) + +(defun haskell-ds-imenu () + "Install `imenu' for Haskell scripts." + (setq imenu-create-index-function 'haskell-ds-create-imenu-index) + (when haskell-decl-scan-add-to-menubar + (imenu-add-to-menubar "Declarations"))) + +;; The main functions to turn on declaration scanning. +;;;###autoload +(defun turn-on-haskell-decl-scan () + "Unconditionally activate `haskell-decl-scan-mode'." + (interactive) + (haskell-decl-scan-mode)) + +;;;###autoload +(define-minor-mode haskell-decl-scan-mode + "Toggle Haskell declaration scanning minor mode on or off. +With a prefix argument ARG, enable minor mode if ARG is +positive, and disable it otherwise. If called from Lisp, enable +the mode if ARG is omitted or nil, and toggle it if ARG is `toggle'. + +See also info node `(haskell-mode)haskell-decl-scan-mode' for +more details about this minor mode. + +Top-level declarations are scanned and listed in the menu item +\"Declarations\" (if enabled via option +`haskell-decl-scan-add-to-menubar'). Selecting an item from this +menu will take point to the start of the declaration. + +\\[beginning-of-defun] and \\[end-of-defun] move forward and backward to the start of a declaration. + +This may link with `haskell-doc-mode'. + +For non-literate and LaTeX-style literate scripts, we assume the +common convention that top-level declarations start at the first +column. For Bird-style literate scripts, we assume the common +convention that top-level declarations start at the third column, +ie. after \"> \". + +Anything in `font-lock-comment-face' is not considered for a +declaration. Therefore, using Haskell font locking with comments +coloured in `font-lock-comment-face' improves declaration scanning. + +Literate Haskell scripts are supported: If the value of +`haskell-literate' (set automatically by `literate-haskell-mode') +is `bird', a Bird-style literate script is assumed. If it is nil +or `tex', a non-literate or LaTeX-style literate script is +assumed, respectively. + +Invokes `haskell-decl-scan-mode-hook' on activation." + :group 'haskell-decl-scan + + (kill-local-variable 'beginning-of-defun-function) + (kill-local-variable 'end-of-defun-function) + (kill-local-variable 'imenu-create-index-function) + (unless haskell-decl-scan-mode + ;; How can we cleanly remove the "Declarations" menu? + (when haskell-decl-scan-add-to-menubar + (local-set-key [menu-bar index] nil))) + + (when haskell-decl-scan-mode + (set (make-local-variable 'beginning-of-defun-function) + 'haskell-ds-backward-decl) + (set (make-local-variable 'end-of-defun-function) + 'haskell-ds-forward-decl) + (haskell-ds-imenu))) + + +;; Provide ourselves: + +(provide 'haskell-decl-scan) + +;; Local Variables: +;; byte-compile-warnings: (not cl-functions) +;; End: + +;;; haskell-decl-scan.el ends here diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/haskell-decl-scan.elc Binary file .emacs.d/haskell-mode/haskell-decl-scan.elc has changed diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/haskell-doc.el --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/haskell-mode/haskell-doc.el Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,1981 @@ +;;; haskell-doc.el --- show function types in echo area -*- coding: utf-8 -*- + +;; Copyright (C) 2004, 2005, 2006, 2007, 2009 Free Software Foundation, Inc. +;; Copyright (C) 1997 Hans-Wolfgang Loidl + +;; Author: Hans-Wolfgang Loidl +;; Temporary Maintainer and Hacker: Graeme E Moss +;; Keywords: extensions, minor mode, language mode, Haskell +;; Created: 1997-06-17 +;; URL: http://cvs.haskell.org/cgi-bin/cvsweb.cgi/fptools/CONTRIB/haskell-modes/emacs/haskell-doc.el?rev=HEAD + +;; This file is not part of GNU Emacs. + +;; This program is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; This program is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see . + +;;; Commentary: + +;; This program shows the type of the Haskell function under the cursor in the +;; minibuffer. It acts as a kind of "Emacs background process", by regularly +;; checking the word under the cursor and matching it against a list of +;; prelude, library, local and global functions. + +;; To show types of global functions, i.e. functions defined in a module +;; imported by the current module, call the function +;; `turn-on-haskell-doc-global-types'. This automatically loads all modules +;; and builds `imenu' tables to get the types of all functions. +;; Note: The modules are loaded recursively, so you might pull in +;; many modules by just turning on global function support. +;; This features is currently not very well supported. + +;; This program was inspired by the `eldoc.el' package by Noah Friedman. + +;; Installation: + +;; One useful way to enable this minor mode is to put the following in your +;; .emacs: +;; +;; (autoload 'turn-on-haskell-doc-mode "haskell-doc" nil t) + +;; and depending on the major mode you use for your Haskell programs: +;; (add-hook 'hugs-mode-hook 'turn-on-haskell-doc-mode) ; hugs-mode +;; or +;; (add-hook 'haskell-mode-hook 'turn-on-haskell-doc-mode) ; haskell-mode + +;; Customisation: + +;; You can control what exactly is shown by setting the following variables to +;; either t or nil: +;; `haskell-doc-show-global-types' (default: nil) +;; `haskell-doc-show-reserved' (default: t) +;; `haskell-doc-show-prelude' (default: t) +;; `haskell-doc-show-strategy' (default: t) +;; `haskell-doc-show-user-defined' (default: t) + +;; If you want to define your own strings for some identifiers define an +;; alist of (ID . STRING) and set `haskell-doc-show-user-defined' to t. +;; E.g: +;; +;; (setq haskell-doc-show-user-defined t) +;; (setq haskell-doc-user-defined-ids +;; (list +;; '("main" . "just another pathetic main function") +;; '("foo" . "a very dummy name") +;; '("bar" . "another dummy name"))) + +;; The following two variables are useful to make the type fit on one line: +;; If `haskell-doc-chop-off-context' is non-nil the context part of the type +;; of a local fct will be eliminated (default: t). +;; If `haskell-doc-chop-off-fctname' is non-nil the function name is not +;; shown together with the type (default: nil). + +;; Internals: + +;; `haskell-doc-mode' is implemented as a minor-mode. So, you can combine it +;; with any other mode. To enable it just type +;; M-x turn-on-haskell-doc-mode + +;; These are the names of the functions that can be called directly by the +;; user (with keybindings in `haskell-mode'): +;; `haskell-doc-mode' ... toggle haskell-doc-mode; with prefix turn it on +;; unconditionally if the prefix is greater 0 otherwise +;; turn it off +;; Key: CTRL-c CTRL-o (CTRL-u CTRL-c CTRL-o) +;; `haskell-doc-ask-mouse-for-type' ... show the type of the id under the mouse +;; Key: C-S-M-mouse-3 +;; `haskell-doc-show-reserved' ... toggle echoing of reserved id's types +;; `haskell-doc-show-prelude' ... toggle echoing of prelude id's types +;; `haskell-doc-show-strategy' ... toggle echoing of strategy id's types +;; `haskell-doc-show-user-defined' ... toggle echoing of user def id's types +;; `haskell-doc-check-active' ... check whether haskell-doc is active; +;; Key: CTRL-c ESC-/ + +;; ToDo: + +;; - Fix byte-compile problems in `haskell-doc-prelude-types' for getArgs etc +;; - Write a parser for .hi files. Read library interfaces via this parser. +;; - Indicate kind of object with colours +;; - Handle multi-line types +;; - Encode i-am-fct info in the alist of ids and types. + +;; Bugs: + +;; - Some prelude fcts aren't displayed properly. This might be due to a +;; name clash of Haskell and Elisp functions (e.g. length) which +;; confuses Emacs when reading `haskell-doc-prelude-types' + +;;; Changelog: + +;; $Log: haskell-doc.el,v $ +;; Revision 1.30 2009/02/02 21:00:33 monnier +;; (haskell-doc-imported-list): Don't add current buffer +;; to the imported file list if it is not (yet?) visiting a file. +;; +;; Revision 1.29 2007-12-12 04:04:19 monnier +;; (haskell-doc-in-code-p): New function. +;; (haskell-doc-show-type): Use it. +;; +;; Revision 1.28 2007/08/30 03:10:08 monnier +;; Comment/docs fixes. +;; +;; Revision 1.27 2007/07/30 17:36:50 monnier +;; (displayed-month): Remove declaration since it's not used here. +;; +;; Revision 1.26 2007/02/10 06:28:55 monnier +;; (haskell-doc-get-current-word): Remove. +;; Change all refs to it, to use haskell-ident-at-point instead. +;; +;; Revision 1.25 2007/02/09 21:53:42 monnier +;; (haskell-doc-get-current-word): Correctly distinguish +;; variable identifiers and infix identifiers. +;; (haskell-doc-rescan-files): Avoid switch-to-buffer. +;; (haskell-doc-imported-list): Operate on current buffer. +;; (haskell-doc-make-global-fct-index): Adjust call. +;; +;; Revision 1.24 2006/11/20 20:18:24 monnier +;; (haskell-doc-mode-print-current-symbol-info): Fix thinko. +;; +;; Revision 1.23 2006/10/20 03:12:31 monnier +;; Drop post-command-idle-hook in favor of run-with-idle-timer. +;; (haskell-doc-timer, haskell-doc-buffers): New vars. +;; (haskell-doc-mode): Use them. +;; (haskell-doc-check-active): Update the check. +;; (haskell-doc-mode-print-current-symbol-info): Remove the interactive spec. +;; Don't sit-for unless it's really needed. +;; +;; Revision 1.22 2006/09/20 18:42:35 monnier +;; Doc fix. +;; +;; Revision 1.21 2005/11/21 21:48:52 monnier +;; * haskell-doc.el (haskell-doc-extract-types): Get labelled data working. +;; (haskell-doc-prelude-types): Update via auto-generation. +;; +;; * haskell-doc.el (haskell-doc-extract-types): Get it partly working. +;; (haskell-doc-fetch-lib-urls): Don't use a literal if we apply +;; `nreverse' on it later on. +;; (haskell-doc-prelude-types): Update some parts by auto-generation. +;; (haskell-doc-grab, haskell-doc-string-nub-ws): Simplify. +;; +;; * haskell-doc.el (haskell-doc-maintainer, haskell-doc-varlist) +;; (haskell-doc-submit-bug-report, haskell-doc-ftp-site) +;; (haskell-doc-visit-home): Remove. +;; (haskell-doc-reserved-ids, haskell-doc-fetch-lib-urls) +;; (haskell-doc-extract-and-insert-types): New funs. +;; (haskell-doc-reserved-ids): Fix type of `map'. +;; +;; Revision 1.20 2005/11/21 21:27:57 monnier +;; (haskell-doc-extract-types): Get labelled data working. +;; (haskell-doc-prelude-types): Update via auto-generation. +;; +;; Revision 1.19 2005/11/21 20:44:13 monnier +;; (haskell-doc-extract-types): Get it partly working. +;; (haskell-doc-fetch-lib-urls): Don't use a literal if we apply +;; `nreverse' on it later on. +;; (haskell-doc-prelude-types): Update some parts by auto-generation. +;; (haskell-doc-grab, haskell-doc-string-nub-ws): Simplify. +;; +;; Revision 1.18 2005/11/21 18:02:15 monnier +;; (haskell-doc-maintainer, haskell-doc-varlist) +;; (haskell-doc-submit-bug-report, haskell-doc-ftp-site) +;; (haskell-doc-visit-home): Remove. +;; (haskell-doc-reserved-ids, haskell-doc-fetch-lib-urls) +;; (haskell-doc-extract-and-insert-types): New funs. +;; (haskell-doc-reserved-ids): Fix type of `map'. +;; +;; Revision 1.17 2005/11/20 23:55:09 monnier +;; Add coding cookie. +;; +;; Revision 1.16 2005/11/07 01:28:16 monnier +;; (haskell-doc-xemacs-p, haskell-doc-emacs-p) +;; (haskell-doc-message): Remove. +;; (haskell-doc-is-id-char-at): Remove. +;; (haskell-doc-get-current-word): Rewrite. +;; +;; Revision 1.15 2005/11/04 17:11:12 monnier +;; Add arch-tag. +;; +;; Revision 1.14 2005/08/24 11:36:32 monnier +;; (haskell-doc-message): Paren typo. +;; +;; Revision 1.13 2005/08/23 19:23:27 monnier +;; (haskell-doc-show-type): Assume that the availability +;; of display-message won't change at runtime. +;; +;; Revision 1.12 2005/07/18 21:04:14 monnier +;; (haskell-doc-message): Remove. +;; (haskell-doc-show-type): inline it. Do nothing for if there's no doc to show. +;; +;; Revision 1.11 2004/12/10 17:33:18 monnier +;; (haskell-doc-minor-mode-string): Make it dynamic. +;; (haskell-doc-install-keymap): Remove conflicting C-c C-o binding. +;; (haskell-doc-mode): Make a nil arg turn the mode ON. +;; (turn-on-haskell-doc-mode): Make it an alias for haskell-doc-mode. +;; (haskell-doc-mode): Don't touch haskell-doc-minor-mode-string. +;; (haskell-doc-show-global-types): Don't touch +;; haskell-doc-minor-mode-string. Call haskell-doc-make-global-fct-index. +;; (haskell-doc-check-active): Fix message. +;; (define-key-after): Don't define. +;; (haskell-doc-install-keymap): Check existence of define-key-after. +;; +;; Revision 1.10 2004/11/25 23:03:23 monnier +;; (haskell-doc-sym-doc): Make even the last char bold. +;; +;; Revision 1.9 2004/11/24 22:14:36 monnier +;; (haskell-doc-install-keymap): Don't blindly assume there's a Hugs menu. +;; +;; Revision 1.8 2004/11/22 10:45:35 simonmar +;; Fix type of getLine +;; +;; Revision 1.7 2004/10/14 22:27:47 monnier +;; (turn-off-haskell-doc-mode, haskell-doc-current-info): Don't autoload. +;; +;; Revision 1.6 2004/10/13 22:45:22 monnier +;; (haskell-doc): New group. +;; (haskell-doc-show-reserved, haskell-doc-show-prelude) +;; (haskell-doc-show-strategy, haskell-doc-show-user-defined) +;; (haskell-doc-chop-off-context, haskell-doc-chop-off-fctname): +;; Make them custom vars. +;; (haskell-doc-keymap): Declare and fill it right there. +;; (haskell-doc-mode): Simplify. +;; (haskell-doc-toggle-var): Make it into what it was supposed to be. +;; (haskell-doc-mode-print-current-symbol-info): Simplify. +;; (haskell-doc-current-info): New autoloaded function. +;; (haskell-doc-sym-doc): New fun extracted from haskell-doc-show-type. +;; (haskell-doc-show-type): Use it. +;; (haskell-doc-wrapped-type-p): Remove unused var `lim'. +;; (haskell-doc-forward-sexp-safe, haskell-doc-current-symbol): Remove. Unused. +;; (haskell-doc-visit-home): Don't require ange-ftp, it's autoloaded. +;; (haskell-doc-install-keymap): Simplify. +;; +;; Revision 1.5 2003/01/09 11:56:26 simonmar +;; Patches from Ville Skyttä , the XEmacs maintainer of +;; the haskell-mode: +;; +;; - Make the auto-mode-alist modifications autoload-only. +;; +;; Revision 1.4 2002/10/14 09:55:03 simonmar +;; Patch to update the Prelude/libraries function names and to remove +;; support for older versions of Haskell. +;; +;; Submitted by: Anders Lau Olsen +;; +;; Revision 1.3 2002/04/30 09:34:37 rrt +;; Remove supporting Haskell 1.4 and 1.2 from the ToDo list. It's Far Too Late. +;; +;; Add (require 'imenu). Thanks to N. Y. Kwok. +;; +;; Revision 1.2 2002/04/23 14:45:10 simonmar +;; Tweaks to the doc strings and support for customization, from +;; Ville Skyttä . +;; +;; Revision 1.1 2001/07/19 16:17:36 rrt +;; Add the current version of the Moss/Thorn/Marlow Emacs mode, along with its +;; web pages and sample files. This is now the preferred mode, and the +;; haskell.org pages are being changed to reflect that. Also includes the new +;; GHCi mode from Chris Webb. +;; +;; Revision 1.6 1998/12/10 16:27:25 hwloidl +;; Minor changes ("Doc" as modeline string, mouse-3 moved to C-S-M-mouse-3) +;; +;; Revision 1.5 1998/09/24 14:25:46 gem +;; Fixed minor compatibility bugs with Haskell mode of Moss&Thorn. +;; Disabled M-/ binding. +;; +;; Revision 1.4 1997/11/12 23:51:19 hwloidl +;; Fixed start-up problem under emacs-19.34. +;; Added support for wrapped (multi-line) types and 2 vars to control the +;; behaviour with long fct types +;; +;; Revision 1.3 1997/11/03 00:48:03 hwloidl +;; Major revision for first release. +;; Added alists for showing prelude fcts, haskell syntax, and strategies +;; Added mouse interface to show type under mouse +;; Fixed bug which causes demon to fall over +;; Works now with hugs-mode and haskell-mode under emacs 19.34,20 and xemacs 19.15 +;; + +;;; Code: + +;;@menu +;;* Constants and Variables:: +;;* Install as minor mode:: +;;* Menubar Support:: +;;* Haskell Doc Mode:: +;;* Switch it on or off:: +;;* Check:: +;;* Top level function:: +;;* Mouse interface:: +;;* Print fctsym:: +;;* Movement:: +;;* Bug Reports:: +;;* Visit home site:: +;;* Index:: +;;* Token:: +;;@end menu + +;;@node top, Constants and Variables, (dir), (dir) +;;@top + +;;@node Constants and Variables, Install as minor mode, top, top +;;@section Constants and Variables + +;;@menu +;;* Emacs portability:: +;;* Maintenance stuff:: +;;* Mode Variable:: +;;* Variables:: +;;* Prelude types:: +;;* Test membership:: +;;@end menu + +;;@node Emacs portability, Maintenance stuff, Constants and Variables, Constants and Variables +;;@subsection Emacs portability + +(require 'haskell-mode) +(require 'inf-haskell) +(require 'imenu) +(with-no-warnings (require 'cl)) + +(defgroup haskell-doc nil + "Show Haskell function types in echo area." + :group 'haskell + :prefix "haskell-doc-") + +;;@node Mode Variable, Variables, Maintenance stuff, Constants and Variables +;;@subsection Mode Variable + +(defvar haskell-doc-mode nil + "*If non-nil, show the type of the function near point or a related comment. + +If the identifier near point is a Haskell keyword and the variable +`haskell-doc-show-reserved' is non-nil show a one line summary +of the syntax. + +If the identifier near point is a Prelude or one of the standard library +functions and `haskell-doc-show-prelude' is non-nil show its type. + +If the identifier near point is local \(i.e. defined in this module\) check +the `imenu' list of functions for the type. This obviously requires that +your language mode uses `imenu'. + +If the identifier near point is global \(i.e. defined in an imported module\) +and the variable `haskell-doc-show-global-types' is non-nil show the type of its +function. + +If the identifier near point is a standard strategy or a function, type related +related to strategies and `haskell-doc-show-strategy' is non-nil show the type +of the function. Strategies are special to the parallel execution of Haskell. +If you're not interested in that just turn it off. + +If the identifier near point is a user defined function that occurs as key +in the alist `haskell-doc-user-defined-ids' and the variable +`haskell-doc-show-user-defined' is non-nil show the type of the function. + +This variable is buffer-local.") +(make-variable-buffer-local 'haskell-doc-mode) + +(defvar haskell-doc-mode-hook nil + "Hook invoked when entering `haskell-doc-mode'.") + +(defvar haskell-doc-index nil + "Variable holding an alist matching file names to fct-type alists. +The function `haskell-doc-make-global-fct-index' rebuilds this variables +\(similar to an `imenu' rescan\). +This variable is buffer-local.") +(make-variable-buffer-local 'haskell-doc-index) + +(defcustom haskell-doc-show-global-types nil + "If non-nil, search for the types of global functions by loading the files. +This variable is buffer-local." + :group 'haskell-doc + :type 'boolean) +(make-variable-buffer-local 'haskell-doc-show-global-types) + +(defcustom haskell-doc-show-reserved t + "If non-nil, show a documentation string for reserved ids. +This variable is buffer-local." + :group 'haskell-doc + :type 'boolean) +(make-variable-buffer-local 'haskell-doc-show-reserved) + +(defcustom haskell-doc-show-prelude t + "If non-nil, show a documentation string for prelude functions. +This variable is buffer-local." + :group 'haskell-doc + :type 'boolean) +(make-variable-buffer-local 'haskell-doc-show-prelude) + +(defcustom haskell-doc-show-strategy t + "If non-nil, show a documentation string for strategies. +This variable is buffer-local." + :group 'haskell-doc + :type 'boolean) +(make-variable-buffer-local 'haskell-doc-show-strategy) + +(defcustom haskell-doc-show-user-defined t + "If non-nil, show a documentation string for user defined ids. +This variable is buffer-local." + :group 'haskell-doc + :type 'boolean) +(make-variable-buffer-local 'haskell-doc-show-user-defined) + +(defcustom haskell-doc-chop-off-context t + "If non-nil eliminate the context part in a Haskell type." + :group 'haskell-doc + :type 'boolean) + +(defcustom haskell-doc-chop-off-fctname nil + "If non-nil omit the function name and show only the type." + :group 'haskell-doc + :type 'boolean) + +(defcustom haskell-doc-use-inf-haskell nil + "If non-nil use inf-haskell.el to get type and kind information." + :group 'haskell-doc + :type 'boolean) + +(defvar haskell-doc-search-distance 40 ; distance in characters + "*How far to search when looking for the type declaration of fct under cursor.") + +;;@node Variables, Prelude types, Mode Variable, Constants and Variables +;;@subsection Variables + +(defvar haskell-doc-idle-delay 0.50 + "*Number of seconds of idle time to wait before printing. +If user input arrives before this interval of time has elapsed after the +last input, no documentation will be printed. + +If this variable is set to 0, no idle time is required.") + +(defvar haskell-doc-argument-case 'identity ; 'upcase + "Case to display argument names of functions, as a symbol. +This has two preferred values: `upcase' or `downcase'. +Actually, any name of a function which takes a string as an argument and +returns another string is acceptable.") + +(defvar haskell-doc-mode-message-commands nil + "*Obarray of command names where it is appropriate to print in the echo area. + +This is not done for all commands since some print their own +messages in the echo area, and these functions would instantly overwrite +them. But `self-insert-command' as well as most motion commands are good +candidates. + +It is probably best to manipulate this data structure with the commands +`haskell-doc-add-command' and `haskell-doc-remove-command'.") + +;;(cond ((null haskell-doc-mode-message-commands) +;; ;; If you increase the number of buckets, keep it a prime number. +;; (setq haskell-doc-mode-message-commands (make-vector 31 0)) +;; (let ((list '("self-insert-command" +;; "next-" "previous-" +;; "forward-" "backward-" +;; "beginning-of-" "end-of-" +;; "goto-" +;; "recenter" +;; "scroll-")) +;; (syms nil)) +;; (while list +;; (setq syms (all-completions (car list) obarray 'fboundp)) +;; (setq list (cdr list)) +;; (while syms +;; (set (intern (car syms) haskell-doc-mode-message-commands) t) +;; (setq syms (cdr syms))))))) + +;; Bookkeeping; the car contains the last symbol read from the buffer. +;; The cdr contains the string last displayed in the echo area, so it can +;; be printed again if necessary without reconsing. +(defvar haskell-doc-last-data '(nil . nil)) + +(defvar haskell-doc-minor-mode-string + '(haskell-doc-show-global-types " DOC" " Doc") + "*String to display in mode line when Haskell-Doc Mode is enabled.") + + +;;@node Prelude types, Test membership, Variables, Constants and Variables +;;@subsection Prelude types + +;;@cindex haskell-doc-reserved-ids + +(defvar haskell-doc-reserved-ids + '(("case" . "case exp of { alts [;] }") + ("class" . "class [context =>] simpleclass [where { cbody [;] }]") + ("data" . "data [context =>] simpletype = constrs [deriving]") + ("default" . "default (type1 , ... , typen)") + ("deriving" . "deriving (dclass | (dclass1, ... , dclassn))") ; used with data or newtype + ("do" . "do { stmts [;] } stmts -> exp [; stmts] | pat <- exp ; stmts | let decllist ; stmts") + ("else" . "if exp then exp else exp") + ("if" . "if exp then exp else exp") + ("import" . "import [qualified] modid [as modid] [impspec]") + ("in" . "let decllist in exp") + ("infix" . "infix [digit] ops") + ("infixl" . "infixl [digit] ops") + ("infixr" . "infixr [digit] ops") + ("instance" . "instance [context =>] qtycls inst [where { valdefs [;] }]") + ("let" . "let { decl; ...; decl [;] } in exp") + ("module" . "module modid [exports] where body") + ("newtype" . "newtype [context =>] simpletype = con atype [deriving]") + ("of" . "case exp of { alts [;] }") + ("then" . "if exp then exp else exp") + ("type" . "type simpletype = type") + ("where" . "exp where { decl; ...; decl [;] }") ; check that ; see also class, instance, module + ("as" . "import [qualified] modid [as modid] [impspec]") + ("qualified" . "import [qualified] modid [as modid] [impspec]") + ("hiding" . "hiding ( import1 , ... , importn [ , ] )")) + "An alist of reserved identifiers. +Each element is of the form (ID . DOC) where both ID and DOC are strings. +DOC should be a concise single-line string describing the construct in which +the keyword is used.") + +(eval-and-compile + (defalias 'haskell-doc-split-string + (if (condition-case () + (split-string "" nil t) + (wrong-number-of-arguments nil)) + 'split-string + ;; copied from Emacs 22 + (lambda (string &optional separators omit-nulls) + (let ((keep-nulls (not (if separators omit-nulls t))) + (rexp (or separators "[ \f\t\n\r\v]+")) + (start 0) + notfirst + (list nil)) + (while (and (string-match rexp string + (if (and notfirst + (= start (match-beginning 0)) + (< start (length string))) + (1+ start) start)) + (< start (length string))) + (setq notfirst t) + (if (or keep-nulls (< start (match-beginning 0))) + (setq list + (cons (substring string start (match-beginning 0)) + list))) + (setq start (match-end 0))) + (if (or keep-nulls (< start (length string))) + (setq list + (cons (substring string start) + list))) + (nreverse list)))))) + +;;@cindex haskell-doc-prelude-types + +(defun haskell-doc-extract-types (url) + (with-temp-buffer + (insert-file-contents url) + (goto-char (point-min)) + (while (search-forward " " nil t) (replace-match " " t t)) + + ;; First, focus on the actual code, removing the surrounding HTML text. + (goto-char (point-min)) + (let ((last (point-min)) + (modules nil)) + (while (re-search-forward "^module +\\([[:alnum:]]+\\)" nil t) + (let ((module (match-string 1))) + (if (member module modules) + ;; The library nodes of the HTML doc contain modules twice: + ;; once at the top, with only type declarations, and once at + ;; the bottom with an actual sample implementation which may + ;; include declaration of non-exported values. + ;; We're now at this second occurrence is the implementation + ;; which should thus be ignored. + nil + (push module modules) + (delete-region last (point)) + (search-forward "") + ;; Some of the blocks of code are split. + (while (looking-at "\\(<[^<>]+>[ \t\n]*\\)*") + (goto-char (match-end 0)) + (search-forward "")) + (setq last (point))))) + (delete-region last (point-max)) + + ;; Then process the HTML encoding to get back to pure ASCII. + (goto-char (point-min)) + (while (search-forward "
" nil t) (replace-match "\n" t t)) + ;; (goto-char (point-min)) + ;; (while (re-search-forward "<[^<>]+>" nil t) (replace-match "" t t)) + (goto-char (point-min)) + (while (search-forward ">" nil t) (replace-match ">" t t)) + (goto-char (point-min)) + (while (search-forward "<" nil t) (replace-match "<" t t)) + (goto-char (point-min)) + (while (search-forward "&" nil t) (replace-match "&" t t)) + (goto-char (point-min)) + (if (re-search-forward "&[a-z]+;" nil t) + (error "Unexpected charref %s" (match-string 0))) + ;; Remove TABS. + (goto-char (point-min)) + (while (search-forward "\t" nil t) (replace-match " " t t)) + + ;; Finally, extract the actual data. + (goto-char (point-min)) + (let* ((elems nil) + (space-re "[ \t\n]*\\(?:--.*\n[ \t\n]*\\)*") + (comma-re (concat " *," space-re)) + ;; A list of identifiers. We have to be careful to weed out + ;; entries like "ratPrec = 7 :: Int". Also ignore entries + ;; which start with a < since they're actually in the HTML text + ;; part. And the list may be spread over several lines, cut + ;; after a comma. + (idlist-re + (concat "\\([^< \t\n][^ \t\n]*" + "\\(?:" comma-re "[^ \t\n]+\\)*\\)")) + ;; A type. A few types are spread over 2 lines, + ;; cut after the "=>", so we have to handle these as well. + (type-re "\\(.*[^\n>]\\(?:>[ \t\n]+.*[^\n>]\\)*\\) *$") + ;; A decl of a list of values, possibly indented. + (val-decl-re + (concat "^\\( +\\)?" idlist-re "[ \t\n]*::[ \t\n]*" type-re)) + (re (concat + ;; 3 possibilities: a class decl, a data decl, or val decl. + ;; First, let's match a class decl. + "^class \\(?:.*=>\\)? *\\(.*[^ \t\n]\\)[ \t\n]*where" + + ;; Or a value decl: + "\\|" val-decl-re + + "\\|" ;; Or a data decl. We only handle single-arm + ;; datatypes with labels. + "^data +\\([[:alnum:]][[:alnum:] ]*[[:alnum:]]\\)" + " *=.*{\\([^}]+\\)}" + )) + (re-class (concat "^[^ \t\n]\\|" re)) + curclass) + (while (re-search-forward (if curclass re-class re) nil t) + (cond + ;; A class decl. + ((match-end 1) (setq curclass (match-string 1))) + ;; A value decl. + ((match-end 4) + (let ((type (match-string 4)) + (vars (match-string 3)) + (indented (match-end 2))) + (if (string-match "[ \t\n][ \t\n]+" type) + (setq type (replace-match " " t t type))) + (if (string-match " *\\(--.*\\)?\\'" type) + (setq type (substring type 0 (match-beginning 0)))) + (if indented + (if curclass + (if (string-match "\\`\\(.*[^ \t\n]\\) *=> *" type) + (let ((classes (match-string 1 type))) + (setq type (substring type (match-end 0))) + (if (string-match "\\`(.*)\\'" classes) + (setq classes (substring classes 1 -1))) + (setq type (concat "(" curclass ", " classes + ") => " type))) + (setq type (concat curclass " => " type))) + ;; It's actually not an error: just a type annotation on + ;; some local variable. + ;; (error "Indentation outside a class in %s: %s" + ;; module vars) + nil) + (setq curclass nil)) + (dolist (var (haskell-doc-split-string vars comma-re t)) + (if (string-match "(.*)" var) (setq var (substring var 1 -1))) + (push (cons var type) elems)))) + ;; A datatype decl. + ((match-end 5) + (setq curclass nil) + (let ((name (match-string 5))) + (save-excursion + (save-restriction + (narrow-to-region (match-beginning 6) (match-end 6)) + (goto-char (point-min)) + (while (re-search-forward val-decl-re nil t) + (let ((vars (match-string 2)) + (type (match-string 3))) + (if (string-match "[ \t\n][ \t\n]+" type) + (setq type (replace-match " " t t type))) + (if (string-match " *\\(--.*\\)?\\'" type) + (setq type (substring type 0 (match-beginning 0)))) + (if (string-match ",\\'" type) + (setq type (substring type 0 -1))) + (setq type (concat name " -> " type)) + (dolist (var (haskell-doc-split-string vars comma-re t)) + (if (string-match "(.*)" var) + (setq var (substring var 1 -1))) + (push (cons var type) elems)))))))) + + ;; The end of a class declaration. + (t (setq curclass nil) (beginning-of-line)))) + (cons (car (last modules)) elems))))) + +(defun haskell-doc-fetch-lib-urls (base-url) + (with-temp-buffer + (insert-file-contents base-url) + (goto-char (point-min)) + (search-forward "Part II: Libraries") + (delete-region (point-min) (point)) + (search-forward "") + (delete-region (point) (point-max)) + (goto-char (point-min)) + (let ((libs (list "standard-prelude.html"))) + (while (re-search-forward "" nil t) + (push (match-string 1) libs)) + (mapcar (lambda (s) (expand-file-name s (file-name-directory base-url))) + (nreverse libs))))) + +(defun haskell-doc-extract-and-insert-types (url) + "Fetch the types from the online doc and insert them at point. +URL is the URL of the online doc." + (interactive (if current-prefix-arg + (read-file-name "URL: ") + (list "http://www.haskell.org/onlinereport/"))) + (let ((urls (haskell-doc-fetch-lib-urls url))) + (dolist (url urls) + (let ((data (haskell-doc-extract-types url))) + (insert ";; " (pop data)) (indent-according-to-mode) (newline) + (dolist (elem (sort data (lambda (x y) (string-lessp (car x) (car y))))) + (prin1 elem (current-buffer)) + (indent-according-to-mode) (newline)))))) + +(defvar haskell-doc-prelude-types + ;; This list was auto generated by `haskell-doc-extract-and-insert-types'. + '( + ;; Prelude + ("!!" . "[a] -> Int -> a") + ("$" . "(a -> b) -> a -> b") + ("$!" . "(a -> b) -> a -> b") + ("&&" . "Bool -> Bool -> Bool") + ("*" . "Num a => a -> a -> a") + ("**" . "Floating a => a -> a -> a") + ("+" . "Num a => a -> a -> a") + ("++" . "[a] -> [a] -> [a]") + ("-" . "Num a => a -> a -> a") + ("." . "(b -> c) -> (a -> b) -> a -> c") + ("/" . "Fractional a => a -> a -> a") + ("/=" . "Eq a => a -> a -> Bool") + ("<" . "Ord a => a -> a -> Bool") + ("<=" . "Ord a => a -> a -> Bool") + ("=<<" . "Monad m => (a -> m b) -> m a -> m b") + ("==" . "Eq a => a -> a -> Bool") + (">" . "Ord a => a -> a -> Bool") + (">=" . "Ord a => a -> a -> Bool") + (">>" . "Monad m => m a -> m b -> m b") + (">>=" . "Monad m => m a -> (a -> m b) -> m b") + ("^" . "(Num a, Integral b) => a -> b -> a") + ("^^" . "(Fractional a, Integral b) => a -> b -> a") + ("abs" . "Num a => a -> a") + ("acos" . "Floating a => a -> a") + ("acosh" . "Floating a => a -> a") + ("all" . "(a -> Bool) -> [a] -> Bool") + ("and" . "[Bool] -> Bool") + ("any" . "(a -> Bool) -> [a] -> Bool") + ("appendFile" . "FilePath -> String -> IO ()") + ("asTypeOf" . "a -> a -> a") + ("asin" . "Floating a => a -> a") + ("asinh" . "Floating a => a -> a") + ("atan" . "Floating a => a -> a") + ("atan2" . "RealFloat a => a -> a -> a") + ("atanh" . "Floating a => a -> a") + ("break" . "(a -> Bool) -> [a] -> ([a],[a])") + ("catch" . "IO a -> (IOError -> IO a) -> IO a") + ("ceiling" . "(RealFrac a, Integral b) => a -> b") + ("compare" . "Ord a => a -> a -> Ordering") + ("concat" . "[[a]] -> [a]") + ("concatMap" . "(a -> [b]) -> [a] -> [b]") + ("const" . "a -> b -> a") + ("cos" . "Floating a => a -> a") + ("cosh" . "Floating a => a -> a") + ("curry" . "((a, b) -> c) -> a -> b -> c") + ("cycle" . "[a] -> [a]") + ("decodeFloat" . "RealFloat a => a -> (Integer,Int)") + ("div" . "Integral a => a -> a -> a") + ("divMod" . "Integral a => a -> a -> (a,a)") + ("drop" . "Int -> [a] -> [a]") + ("dropWhile" . "(a -> Bool) -> [a] -> [a]") + ("either" . "(a -> c) -> (b -> c) -> Either a b -> c") + ("elem" . "(Eq a) => a -> [a] -> Bool") + ("encodeFloat" . "RealFloat a => Integer -> Int -> a") + ("enumFrom" . "Enum a => a -> [a]") + ("enumFromThen" . "Enum a => a -> a -> [a]") + ("enumFromThenTo" . "Enum a => a -> a -> a -> [a]") + ("enumFromTo" . "Enum a => a -> a -> [a]") + ("error" . "String -> a") + ("even" . "(Integral a) => a -> Bool") + ("exp" . "Floating a => a -> a") + ("exponent" . "RealFloat a => a -> Int") + ("fail" . "Monad m => String -> m a") + ("filter" . "(a -> Bool) -> [a] -> [a]") + ("flip" . "(a -> b -> c) -> b -> a -> c") + ("floatDigits" . "RealFloat a => a -> Int") + ("floatRadix" . "RealFloat a => a -> Integer") + ("floatRange" . "RealFloat a => a -> (Int,Int)") + ("floor" . "(RealFrac a, Integral b) => a -> b") + ("fmap" . "Functor f => (a -> b) -> f a -> f b") + ("foldl" . "(a -> b -> a) -> a -> [b] -> a") + ("foldl1" . "(a -> a -> a) -> [a] -> a") + ("foldr" . "(a -> b -> b) -> b -> [a] -> b") + ("foldr1" . "(a -> a -> a) -> [a] -> a") + ("fromEnum" . "Enum a => a -> Int") + ("fromInteger" . "Num a => Integer -> a") + ("fromIntegral" . "(Integral a, Num b) => a -> b") + ("fromRational" . "Fractional a => Rational -> a") + ("fst" . "(a,b) -> a") + ("gcd" . "(Integral a) => a -> a -> a") + ("getChar" . "IO Char") + ("getContents" . "IO String") + ("getLine" . "IO String") + ("head" . "[a] -> a") + ("id" . "a -> a") + ("init" . "[a] -> [a]") + ("interact" . "(String -> String) -> IO ()") + ("ioError" . "IOError -> IO a") + ("isDenormalized" . "RealFloat a => a -> Bool") + ("isIEEE" . "RealFloat a => a -> Bool") + ("isInfinite" . "RealFloat a => a -> Bool") + ("isNaN" . "RealFloat a => a -> Bool") + ("isNegativeZero" . "RealFloat a => a -> Bool") + ("iterate" . "(a -> a) -> a -> [a]") + ("last" . "[a] -> a") + ("lcm" . "(Integral a) => a -> a -> a") + ("length" . "[a] -> Int") + ("lex" . "ReadS String") + ("lines" . "String -> [String]") + ("log" . "Floating a => a -> a") + ("logBase" . "Floating a => a -> a -> a") + ("lookup" . "(Eq a) => a -> [(a,b)] -> Maybe b") + ("map" . "(a -> b) -> [a] -> [b]") + ("mapM" . "Monad m => (a -> m b) -> [a] -> m [b]") + ("mapM_" . "Monad m => (a -> m b) -> [a] -> m ()") + ("max" . "Ord a => a -> a -> a") + ("maxBound" . "Bounded a => a") + ("maximum" . "(Ord a) => [a] -> a") + ("maybe" . "b -> (a -> b) -> Maybe a -> b") + ("min" . "Ord a => a -> a -> a") + ("minBound" . "Bounded a => a") + ("minimum" . "(Ord a) => [a] -> a") + ("mod" . "Integral a => a -> a -> a") + ("negate" . "Num a => a -> a") + ("not" . "Bool -> Bool") + ("notElem" . "(Eq a) => a -> [a] -> Bool") + ("null" . "[a] -> Bool") + ("numericEnumFrom" . "(Fractional a) => a -> [a]") + ("numericEnumFromThen" . "(Fractional a) => a -> a -> [a]") + ("numericEnumFromThenTo" . "(Fractional a, Ord a) => a -> a -> a -> [a]") + ("numericEnumFromTo" . "(Fractional a, Ord a) => a -> a -> [a]") + ("odd" . "(Integral a) => a -> Bool") + ("or" . "[Bool] -> Bool") + ("otherwise" . "Bool") + ("pi" . "Floating a => a") + ("pred" . "Enum a => a -> a") + ("print" . "Show a => a -> IO ()") + ("product" . "(Num a) => [a] -> a") + ("properFraction" . "(RealFrac a, Integral b) => a -> (b,a)") + ("putChar" . "Char -> IO ()") + ("putStr" . "String -> IO ()") + ("putStrLn" . "String -> IO ()") + ("quot" . "Integral a => a -> a -> a") + ("quotRem" . "Integral a => a -> a -> (a,a)") + ("read" . "(Read a) => String -> a") + ("readFile" . "FilePath -> IO String") + ("readIO" . "Read a => String -> IO a") + ("readList" . "Read a => ReadS [a]") + ("readLn" . "Read a => IO a") + ("readParen" . "Bool -> ReadS a -> ReadS a") + ("reads" . "(Read a) => ReadS a") + ("readsPrec" . "Read a => Int -> ReadS a") + ("realToFrac" . "(Real a, Fractional b) => a -> b") + ("recip" . "Fractional a => a -> a") + ("rem" . "Integral a => a -> a -> a") + ("repeat" . "a -> [a]") + ("replicate" . "Int -> a -> [a]") + ("return" . "Monad m => a -> m a") + ("reverse" . "[a] -> [a]") + ("round" . "(RealFrac a, Integral b) => a -> b") + ("scaleFloat" . "RealFloat a => Int -> a -> a") + ("scanl" . "(a -> b -> a) -> a -> [b] -> [a]") + ("scanl1" . "(a -> a -> a) -> [a] -> [a]") + ("scanr" . "(a -> b -> b) -> b -> [a] -> [b]") + ("scanr1" . "(a -> a -> a) -> [a] -> [a]") + ("seq" . "a -> b -> b") + ("sequence" . "Monad m => [m a] -> m [a]") + ("sequence_" . "Monad m => [m a] -> m ()") + ("show" . "Show a => a -> String") + ("showChar" . "Char -> ShowS") + ("showList" . "Show a => [a] -> ShowS") + ("showParen" . "Bool -> ShowS -> ShowS") + ("showString" . "String -> ShowS") + ("shows" . "(Show a) => a -> ShowS") + ("showsPrec" . "Show a => Int -> a -> ShowS") + ("significand" . "RealFloat a => a -> a") + ("signum" . "Num a => a -> a") + ("sin" . "Floating a => a -> a") + ("sinh" . "Floating a => a -> a") + ("snd" . "(a,b) -> b") + ("span" . "(a -> Bool) -> [a] -> ([a],[a])") + ("splitAt" . "Int -> [a] -> ([a],[a])") + ("sqrt" . "Floating a => a -> a") + ("subtract" . "(Num a) => a -> a -> a") + ("succ" . "Enum a => a -> a") + ("sum" . "(Num a) => [a] -> a") + ("tail" . "[a] -> [a]") + ("take" . "Int -> [a] -> [a]") + ("takeWhile" . "(a -> Bool) -> [a] -> [a]") + ("tan" . "Floating a => a -> a") + ("tanh" . "Floating a => a -> a") + ("toEnum" . "Enum a => Int -> a") + ("toInteger" . "Integral a => a -> Integer") + ("toRational" . "Real a => a -> Rational") + ("truncate" . "(RealFrac a, Integral b) => a -> b") + ("uncurry" . "(a -> b -> c) -> ((a, b) -> c)") + ("undefined" . "a") + ("unlines" . "[String] -> String") + ("until" . "(a -> Bool) -> (a -> a) -> a -> a") + ("unwords" . "[String] -> String") + ("unzip" . "[(a,b)] -> ([a],[b])") + ("unzip3" . "[(a,b,c)] -> ([a],[b],[c])") + ("userError" . "String -> IOError") + ("words" . "String -> [String]") + ("writeFile" . "FilePath -> String -> IO ()") + ("zip" . "[a] -> [b] -> [(a,b)]") + ("zip3" . "[a] -> [b] -> [c] -> [(a,b,c)]") + ("zipWith" . "(a->b->c) -> [a]->[b]->[c]") + ("zipWith3" . "(a->b->c->d) -> [a]->[b]->[c]->[d]") + ("||" . "Bool -> Bool -> Bool") + ;; Ratio + ("%" . "(Integral a) => a -> a -> Ratio a") + ("approxRational" . "(RealFrac a) => a -> a -> Rational") + ("denominator" . "(Integral a) => Ratio a -> a") + ("numerator" . "(Integral a) => Ratio a -> a") + ;; Complex + ("cis" . "(RealFloat a) => a -> Complex a") + ("conjugate" . "(RealFloat a) => Complex a -> Complex a") + ("imagPart" . "(RealFloat a) => Complex a -> a") + ("magnitude" . "(RealFloat a) => Complex a -> a") + ("mkPolar" . "(RealFloat a) => a -> a -> Complex a") + ("phase" . "(RealFloat a) => Complex a -> a") + ("polar" . "(RealFloat a) => Complex a -> (a,a)") + ("realPart" . "(RealFloat a) => Complex a -> a") + ;; Numeric + ("floatToDigits" . "(RealFloat a) => Integer -> a -> ([Int], Int)") + ("fromRat" . "(RealFloat a) => Rational -> a") + ("lexDigits" . "ReadS String") + ("readDec" . "(Integral a) => ReadS a") + ("readFloat" . "(RealFrac a) => ReadS a") + ("readHex" . "(Integral a) => ReadS a") + ("readInt" . "(Integral a) => a -> (Char -> Bool) -> (Char -> Int) -> ReadS a") + ("readOct" . "(Integral a) => ReadS a") + ("readSigned" . "(Real a) => ReadS a -> ReadS a") + ("showEFloat" . "(RealFloat a) => Maybe Int -> a -> ShowS") + ("showFFloat" . "(RealFloat a) => Maybe Int -> a -> ShowS") + ("showFloat" . "(RealFloat a) => a -> ShowS") + ("showGFloat" . "(RealFloat a) => Maybe Int -> a -> ShowS") + ("showHex" . "Integral a => a -> ShowS") + ("showInt" . "Integral a => a -> ShowS") + ("showIntAtBase" . "Integral a => a -> (Int -> Char) -> a -> ShowS") + ("showOct" . "Integral a => a -> ShowS") + ("showSigned" . "(Real a) => (a -> ShowS) -> Int -> a -> ShowS") + ;; Ix + ("inRange" . "Ix a => (a,a) -> a -> Bool") + ("index" . "Ix a => (a,a) -> a -> Int") + ("range" . "Ix a => (a,a) -> [a]") + ("rangeSize" . "Ix a => (a,a) -> Int") + ;; Array + ("!" . "(Ix a) => Array a b -> a -> b") + ("//" . "(Ix a) => Array a b -> [(a,b)] -> Array a b") + ("accum" . "(Ix a) => (b -> c -> b) -> Array a b -> [(a,c)]") + ("accumArray" . "(Ix a) => (b -> c -> b) -> b -> (a,a) -> [(a,c)]") + ("array" . "(Ix a) => (a,a) -> [(a,b)] -> Array a b") + ("assocs" . "(Ix a) => Array a b -> [(a,b)]") + ("bounds" . "(Ix a) => Array a b -> (a,a)") + ("elems" . "(Ix a) => Array a b -> [b]") + ("indices" . "(Ix a) => Array a b -> [a]") + ("ixmap" . "(Ix a, Ix b) => (a,a) -> (a -> b) -> Array b c") + ("listArray" . "(Ix a) => (a,a) -> [b] -> Array a b") + ;; List + ("\\\\" . "Eq a => [a] -> [a] -> [a]") + ("delete" . "Eq a => a -> [a] -> [a]") + ("deleteBy" . "(a -> a -> Bool) -> a -> [a] -> [a]") + ("deleteFirstsBy" . "(a -> a -> Bool) -> [a] -> [a] -> [a]") + ("elemIndex" . "Eq a => a -> [a] -> Maybe Int") + ("elemIndices" . "Eq a => a -> [a] -> [Int]") + ("find" . "(a -> Bool) -> [a] -> Maybe a") + ("findIndex" . "(a -> Bool) -> [a] -> Maybe Int") + ("findIndices" . "(a -> Bool) -> [a] -> [Int]") + ("genericDrop" . "Integral a => a -> [b] -> [b]") + ("genericIndex" . "Integral a => [b] -> a -> b") + ("genericLength" . "Integral a => [b] -> a") + ("genericReplicate" . "Integral a => a -> b -> [b]") + ("genericSplitAt" . "Integral a => a -> [b] -> ([b],[b])") + ("genericTake" . "Integral a => a -> [b] -> [b]") + ("group" . "Eq a => [a] -> [[a]]") + ("groupBy" . "(a -> a -> Bool) -> [a] -> [[a]]") + ("inits" . "[a] -> [[a]]") + ("insert" . "Ord a => a -> [a] -> [a]") + ("insertBy" . "(a -> a -> Ordering) -> a -> [a] -> [a]") + ("intersect" . "Eq a => [a] -> [a] -> [a]") + ("intersectBy" . "(a -> a -> Bool) -> [a] -> [a] -> [a]") + ("intersperse" . "a -> [a] -> [a]") + ("isPrefixOf" . "Eq a => [a] -> [a] -> Bool") + ("isSuffixOf" . "Eq a => [a] -> [a] -> Bool") + ("mapAccumL" . "(a -> b -> (a, c)) -> a -> [b] -> (a, [c])") + ("mapAccumR" . "(a -> b -> (a, c)) -> a -> [b] -> (a, [c])") + ("maximumBy" . "(a -> a -> Ordering) -> [a] -> a") + ("minimumBy" . "(a -> a -> Ordering) -> [a] -> a") + ("nub" . "Eq a => [a] -> [a]") + ("nubBy" . "(a -> a -> Bool) -> [a] -> [a]") + ("partition" . "(a -> Bool) -> [a] -> ([a],[a])") + ("sort" . "Ord a => [a] -> [a]") + ("sortBy" . "(a -> a -> Ordering) -> [a] -> [a]") + ("tails" . "[a] -> [[a]]") + ("transpose" . "[[a]] -> [[a]]") + ("unfoldr" . "(b -> Maybe (a,b)) -> b -> [a]") + ("union" . "Eq a => [a] -> [a] -> [a]") + ("unionBy" . "(a -> a -> Bool) -> [a] -> [a] -> [a]") + ("unzip4" . "[(a,b,c,d)] -> ([a],[b],[c],[d])") + ("unzip5" . "[(a,b,c,d,e)] -> ([a],[b],[c],[d],[e])") + ("unzip6" . "[(a,b,c,d,e,f)] -> ([a],[b],[c],[d],[e],[f])") + ("unzip7" . "[(a,b,c,d,e,f,g)] -> ([a],[b],[c],[d],[e],[f],[g])") + ("zip4" . "[a] -> [b] -> [c] -> [d] -> [(a,b,c,d)]") + ("zip5" . "[a] -> [b] -> [c] -> [d] -> [e] -> [(a,b,c,d,e)]") + ("zip6" . "[a] -> [b] -> [c] -> [d] -> [e] -> [f]") + ("zip7" . "[a] -> [b] -> [c] -> [d] -> [e] -> [f] -> [g]") + ("zipWith4" . "(a->b->c->d->e) -> [a]->[b]->[c]->[d]->[e]") + ("zipWith5" . "(a->b->c->d->e->f) ->") + ("zipWith6" . "(a->b->c->d->e->f->g) -> [a]->[b]->[c]->[d]->[e]->[f]->[g]") + ("zipWith7" . "(a->b->c->d->e->f->g->h) -> [a]->[b]->[c]->[d]->[e]->[f]->[g]->[h]") + ;; Maybe + ("catMaybes" . "[Maybe a] -> [a]") + ("fromJust" . "Maybe a -> a") + ("fromMaybe" . "a -> Maybe a -> a") + ("isJust" . "Maybe a -> Bool") + ("isNothing" . "Maybe a -> Bool") + ("listToMaybe" . "[a] -> Maybe a") + ("mapMaybe" . "(a -> Maybe b) -> [a] -> [b]") + ("maybeToList" . "Maybe a -> [a]") + ;; Char + ("chr" . "Int -> Char") + ("digitToInt" . "Char -> Int") + ("intToDigit" . "Int -> Char") + ("isAlpha" . "Char -> Bool") + ("isAlphaNum" . "Char -> Bool") + ("isAscii" . "Char -> Bool") + ("isControl" . "Char -> Bool") + ("isDigit" . "Char -> Bool") + ("isHexDigit" . "Char -> Bool") + ("isLatin1" . "Char -> Bool") + ("isLower" . "Char -> Bool") + ("isOctDigit" . "Char -> Bool") + ("isPrint" . "Char -> Bool") + ("isSpace" . "Char -> Bool") + ("isUpper" . "Char -> Bool") + ("lexLitChar" . "ReadS String") + ("ord" . "Char -> Int") + ("readLitChar" . "ReadS Char") + ("showLitChar" . "Char -> ShowS") + ("toLower" . "Char -> Char") + ("toUpper" . "Char -> Char") + ;; Monad + ("ap" . "Monad m => m (a -> b) -> m a -> m b") + ("filterM" . "Monad m => (a -> m Bool) -> [a] -> m [a]") + ("foldM" . "Monad m => (a -> b -> m a) -> a -> [b] -> m a") + ("guard" . "MonadPlus m => Bool -> m ()") + ("join" . "Monad m => m (m a) -> m a") + ("liftM" . "Monad m => (a -> b) -> (m a -> m b)") + ("liftM2" . "Monad m => (a -> b -> c) -> (m a -> m b -> m c)") + ("liftM3" . "Monad m => (a -> b -> c -> d) -> (m a -> m b -> m c -> m d)") + ("liftM4" . "Monad m => (a -> b -> c -> d -> e) -> (m a -> m b -> m c -> m d -> m e)") + ("liftM5" . "Monad m => (a -> b -> c -> d -> e -> f) -> (m a -> m b -> m c -> m d -> m e -> m f)") + ("mapAndUnzipM" . "Monad m => (a -> m (b,c)) -> [a] -> m ([b], [c])") + ("mplus" . "MonadPlus m => m a -> m a -> m a") + ("msum" . "MonadPlus m => [m a] -> m a") + ("mzero" . "MonadPlus m => m a") + ("unless" . "Monad m => Bool -> m () -> m ()") + ("when" . "Monad m => Bool -> m () -> m ()") + ("zipWithM" . "Monad m => (a -> b -> m c) -> [a] -> [b] -> m [c]") + ("zipWithM_" . "Monad m => (a -> b -> m c) -> [a] -> [b] -> m ()") + ;; IO + ("bracket" . "IO a -> (a -> IO b) -> (a -> IO c) -> IO c") + ("bracket_" . "IO a -> (a -> IO b) -> IO c -> IO c") + ("hClose" . "Handle -> IO ()") + ("hFileSize" . "Handle -> IO Integer") + ("hFlush" . "Handle -> IO ()") + ("hGetBuffering" . "Handle -> IO BufferMode") + ("hGetChar" . "Handle -> IO Char") + ("hGetContents" . "Handle -> IO String") + ("hGetLine" . "Handle -> IO String") + ("hGetPosn" . "Handle -> IO HandlePosn") + ("hIsClosed" . "Handle -> IO Bool") + ("hIsEOF" . "Handle -> IO Bool") + ("hIsOpen" . "Handle -> IO Bool") + ("hIsReadable" . "Handle -> IO Bool") + ("hIsSeekable" . "Handle -> IO Bool") + ("hIsWritable" . "Handle -> IO Bool") + ("hLookAhead" . "Handle -> IO Char") + ("hPrint" . "Show a => Handle -> a -> IO ()") + ("hPutChar" . "Handle -> Char -> IO ()") + ("hPutStr" . "Handle -> String -> IO ()") + ("hPutStrLn" . "Handle -> String -> IO ()") + ("hReady" . "Handle -> IO Bool") + ("hSeek" . "Handle -> SeekMode -> Integer -> IO ()") + ("hSetBuffering" . "Handle -> BufferMode -> IO ()") + ("hSetPosn" . "HandlePosn -> IO ()") + ("hWaitForInput" . "Handle -> Int -> IO Bool") + ("ioeGetErrorString" . "IOError -> String") + ("ioeGetFileName" . "IOError -> Maybe FilePath") + ("ioeGetHandle" . "IOError -> Maybe Handle") + ("isAlreadyExistsError" . "IOError -> Bool") + ("isAlreadyInUseError" . "IOError -> Bool") + ("isDoesNotExistError" . "IOError -> Bool") + ("isEOF" . "IO Bool") + ("isEOFError" . "IOError -> Bool") + ("isFullError" . "IOError -> Bool") + ("isIllegalOperation" . "IOError -> Bool") + ("isPermissionError" . "IOError -> Bool") + ("isUserError" . "IOError -> Bool") + ("openFile" . "FilePath -> IOMode -> IO Handle") + ("stderr" . "Handle") + ("stdin" . "Handle") + ("stdout" . "Handle") + ("try" . "IO a -> IO (Either IOError a)") + ;; Directory + ("createDirectory" . "FilePath -> IO ()") + ("doesDirectoryExist" . "FilePath -> IO Bool") + ("doesFileExist" . "FilePath -> IO Bool") + ("executable" . "Permissions -> Bool") + ("getCurrentDirectory" . "IO FilePath") + ("getDirectoryContents" . "FilePath -> IO [FilePath]") + ("getModificationTime" . "FilePath -> IO ClockTime") + ("getPermissions" . "FilePath -> IO Permissions") + ("readable" . "Permissions -> Bool") + ("removeDirectory" . "FilePath -> IO ()") + ("removeFile" . "FilePath -> IO ()") + ("renameDirectory" . "FilePath -> FilePath -> IO ()") + ("renameFile" . "FilePath -> FilePath -> IO ()") + ("searchable" . "Permissions -> Bool") + ("setCurrentDirectory" . "FilePath -> IO ()") + ("setPermissions" . "FilePath -> Permissions -> IO ()") + ("writable" . "Permissions -> Bool") + ;; System + ("exitFailure" . "IO a") + ("exitWith" . "ExitCode -> IO a") + ("getArgs" . "IO [String]") + ("getEnv" . "String -> IO String") + ("getProgName" . "IO String") + ("system" . "String -> IO ExitCode") + ;; Time + ("addToClockTime" . "TimeDiff -> ClockTime -> ClockTime") + ("calendarTimeToString" . "CalendarTime -> String") + ("ctDay" . "CalendarTime -> Int") + ("ctHour" . "CalendarTime -> Int") + ("ctIsDST" . "CalendarTime -> Bool") + ("ctMin" . "CalendarTime -> Int") + ("ctMonth" . "CalendarTime -> Month") + ("ctPicosec" . "CalendarTime -> Integer") + ("ctSec" . "CalendarTime -> Int") + ("ctTZ" . "CalendarTime -> Int") + ("ctTZName" . "CalendarTime -> String") + ("ctWDay" . "CalendarTime -> Day") + ("ctYDay" . "CalendarTime -> Int") + ("ctYear" . "CalendarTime -> Int") + ("diffClockTimes" . "ClockTime -> ClockTime -> TimeDiff") + ("formatCalendarTime" . "TimeLocale -> String -> CalendarTime -> String") + ("getClockTime" . "IO ClockTime") + ("tdDay" . "TimeDiff -> Int") + ("tdHour" . "TimeDiff -> Int") + ("tdMin" . "TimeDiff -> Int") + ("tdMonth" . "TimeDiff -> Int") + ("tdPicosec" . "TimeDiff -> Integer") + ("tdSec" . "TimeDiff -> Int") + ("tdYear" . "TimeDiff -> Int") + ("toCalendarTime" . "ClockTime -> IO CalendarTime") + ("toClockTime" . "CalendarTime -> ClockTime") + ("toUTCTime" . "ClockTime -> CalendarTime") + ;; Locale + ("amPm" . "TimeLocale -> (String, String)") + ("dateFmt" . "TimeLocale -> String") + ("dateTimeFmt" . "TimeLocale -> String") + ("defaultTimeLocale" . "TimeLocale") + ("months" . "TimeLocale -> [(String, String)]") + ("time12Fmt" . "TimeLocale -> String") + ("timeFmt" . "TimeLocale -> String") + ("wDays" . "TimeLocale -> [(String, String)]") + ;; CPUTime + ("cpuTimePrecision" . "Integer") + ("getCPUTime" . "IO Integer") + ;; Random + ("genRange" . "RandomGen g => g -> (Int, Int)") + ("getStdGen" . "IO StdGen") + ("getStdRandom" . "(StdGen -> (a, StdGen)) -> IO a") + ("mkStdGen" . "Int -> StdGen") + ("newStdGen" . "IO StdGen") + ("next" . "RandomGen g => g -> (Int, g)") + ("random" . "(Random a, RandomGen g) => g -> (a, g)") + ("randomIO" . "Random a => IO a") + ("randomR" . "(Random a, RandomGen g) => (a, a) -> g -> (a, g)") + ("randomRIO" . "Random a => (a,a) -> IO a") + ("randomRs" . "(Random a, RandomGen g) => (a, a) -> g -> [a]") + ("randoms" . "(Random a, RandomGen g) => g -> [a]") + ("setStdGen" . "StdGen -> IO ()") + ("split" . "RandomGen g => g -> (g, g)") + ) + "Alist of prelude functions and their types.") + +;;@cindex haskell-doc-strategy-ids + +(defvar haskell-doc-strategy-ids + (list + '("par" . "Done -> Done -> Done ; [infixr 0]") + '("seq" . "Done -> Done -> Done ; [infixr 1]") + + '("using" . "a -> Strategy a -> a ; [infixl 0]") + '("demanding" . "a -> Done -> a ; [infixl 0]") + '("sparking" . "a -> Done -> a ; [infixl 0]") + + '(">||" . "Done -> Done -> Done ; [infixr 2]") + '(">|" . "Done -> Done -> Done ; [infixr 3]") + '("$||" . "(a -> b) -> Strategy a -> a -> b ; [infixl 6]") + '("$|" . "(a -> b) -> Strategy a -> a -> b ; [infixl 6]") + '(".|" . "(b -> c) -> Strategy b -> (a -> b) -> (a -> c) ; [infixl 9]") + '(".||" . "(b -> c) -> Strategy b -> (a -> b) -> (a -> c) ; [infixl 9]") + '("-|" . "(a -> b) -> Strategy b -> (b -> c) -> (a -> c) ; [infixl 9]") + '("-||" . "(a -> b) -> Strategy b -> (b -> c) -> (a -> c) ; [infixl 9]") + + '("Done" . "type Done = ()") + '("Strategy" . "type Strategy a = a -> Done") + + '("r0" . "Strategy a") + '("rwhnf" . "Eval a => Strategy a") + '("rnf" . "Strategy a") + '("NFData" . "class Eval a => NFData a where rnf :: Strategy a") + '("NFDataIntegral" ."class (NFData a, Integral a) => NFDataIntegral a") + '("NFDataOrd" . "class (NFData a, Ord a) => NFDataOrd a") + + '("markStrat" . "Int -> Strategy a -> Strategy a") + + '("seqPair" . "Strategy a -> Strategy b -> Strategy (a,b)") + '("parPair" . "Strategy a -> Strategy b -> Strategy (a,b)") + '("seqTriple" . "Strategy a -> Strategy b -> Strategy c -> Strategy (a,b,c)") + '("parTriple" . "Strategy a -> Strategy b -> Strategy c -> Strategy (a,b,c)") + + '("parList" . "Strategy a -> Strategy [a]") + '("parListN" . "(Integral b) => b -> Strategy a -> Strategy [a]") + '("parListNth" . "Int -> Strategy a -> Strategy [a]") + '("parListChunk" . "Int -> Strategy a -> Strategy [a]") + '("parMap" . "Strategy b -> (a -> b) -> [a] -> [b]") + '("parFlatMap" . "Strategy [b] -> (a -> [b]) -> [a] -> [b]") + '("parZipWith" . "Strategy c -> (a -> b -> c) -> [a] -> [b] -> [c]") + '("seqList" . "Strategy a -> Strategy [a]") + '("seqListN" . "(Integral a) => a -> Strategy b -> Strategy [b]") + '("seqListNth" . "Int -> Strategy b -> Strategy [b]") + + '("parBuffer" . "Int -> Strategy a -> [a] -> [a]") + + '("seqArr" . "(Ix b) => Strategy a -> Strategy (Array b a)") + '("parArr" . "(Ix b) => Strategy a -> Strategy (Array b a)") + + '("fstPairFstList" . "(NFData a) => Strategy [(a,b)]") + '("force" . "(NFData a) => a -> a ") + '("sforce" . "(NFData a) => a -> b -> b") + ) + "Alist of strategy functions and their types as defined in Strategies.lhs.") + +(defvar haskell-doc-user-defined-ids nil + "Alist of functions and strings defined by the user.") + +;;@node Test membership, , Prelude types, Constants and Variables +;;@subsection Test membership + +;;@cindex haskell-doc-is-of +(defsubst haskell-doc-is-of (fn types) + "Check whether FN is one of the functions in the alist TYPES and return the type." + (assoc fn types) ) + +;;@node Install as minor mode, Menubar Support, Constants and Variables, top +;;@section Install as minor mode + +;; Put this minor mode on the global minor-mode-alist. +(or (assq 'haskell-doc-mode (default-value 'minor-mode-alist)) + (setq-default minor-mode-alist + (append (default-value 'minor-mode-alist) + '((haskell-doc-mode haskell-doc-minor-mode-string))))) + + +;;@node Menubar Support, Haskell Doc Mode, Install as minor mode, top +;;@section Menubar Support + +;; a dummy definition needed for XEmacs (I know, it's horrible :-( + +;;@cindex haskell-doc-install-keymap + +(defvar haskell-doc-keymap + (let ((map (make-sparse-keymap))) + (define-key map [visit] + '("Visit FTP home site" . haskell-doc-visit-home)) + (define-key map [submit] + '("Submit bug report" . haskell-doc-submit-bug-report)) + (define-key map [dummy] '("---" . nil)) + (define-key map [make-index] + '("Make global fct index" . haskell-doc-make-global-fct-index)) + (define-key map [global-types-on] + '("Toggle display of global types" . haskell-doc-show-global-types)) + (define-key map [strategy-on] + '("Toggle display of strategy ids" . haskell-doc-show-strategy)) + (define-key map [user-defined-on] + '("Toggle display of user defined ids" . haskell-doc-show-user-defined)) + (define-key map [prelude-on] + '("Toggle display of prelude functions" . haskell-doc-show-prelude)) + (define-key map [reserved-ids-on] + '("Toggle display of reserved ids" . haskell-doc-show-reserved)) + (define-key map [haskell-doc-on] + '("Toggle haskell-doc mode" . haskell-doc-mode)) + map)) + +(defun haskell-doc-install-keymap () + "Install a menu for `haskell-doc-mode' as a submenu of \"Hugs\"." + (interactive) + ;; Add the menu to the hugs menu as last entry. + (let ((hugsmap (lookup-key (current-local-map) [menu-bar Hugs]))) + (if (not (or (featurep 'xemacs) ; XEmacs has problems here + (not (keymapp hugsmap)) + (lookup-key hugsmap [haskell-doc]))) + (if (functionp 'define-key-after) + (define-key-after hugsmap [haskell-doc] + (cons "Haskell-doc" haskell-doc-keymap) + [Haskell-doc mode])))) + ;; Add shortcuts for these commands. + (local-set-key "\C-c\e/" 'haskell-doc-check-active) + ;; Conflicts with the binding of haskell-insert-otherwise. + ;; (local-set-key "\C-c\C-o" 'haskell-doc-mode) + (local-set-key [(control shift meta mouse-3)] + 'haskell-doc-ask-mouse-for-type)) + + +;;@node Haskell Doc Mode, Switch it on or off, Menubar Support, top +;;@section Haskell Doc Mode + +;;@cindex haskell-doc-mode + +(defvar haskell-doc-timer nil) +(defvar haskell-doc-buffers nil) + +;;;###autoload +(defun haskell-doc-mode (&optional arg) + "Enter `haskell-doc-mode' for showing fct types in the echo area. +See variable docstring." + (interactive (list (or current-prefix-arg 'toggle))) + + (setq haskell-doc-mode + (cond + ((eq arg 'toggle) (not haskell-doc-mode)) + (arg (> (prefix-numeric-value arg) 0)) + (t))) + + ;; First, unconditionally turn the mode OFF. + + (setq haskell-doc-buffers (delq (current-buffer) haskell-doc-buffers)) + ;; Refresh the buffers list. + (dolist (buf haskell-doc-buffers) + (unless (and (buffer-live-p buf) + (with-current-buffer buf haskell-doc-mode)) + (setq haskell-doc-buffers (delq buf haskell-doc-buffers)))) + ;; Turn off the idle timer (or idle post-command-hook). + (when (and haskell-doc-timer (null haskell-doc-buffers)) + (cancel-timer haskell-doc-timer) + (setq haskell-doc-timer nil)) + (remove-hook 'post-command-hook + 'haskell-doc-mode-print-current-symbol-info 'local) + + (when haskell-doc-mode + ;; Turning the mode ON. + (push (current-buffer) haskell-doc-buffers) + + (if (fboundp 'run-with-idle-timer) + (unless haskell-doc-timer + (setq haskell-doc-timer + (run-with-idle-timer + haskell-doc-idle-delay t + 'haskell-doc-mode-print-current-symbol-info))) + (add-hook 'post-command-hook + 'haskell-doc-mode-print-current-symbol-info nil 'local)) + (and haskell-doc-show-global-types + (haskell-doc-make-global-fct-index)) ; build type index for global fcts + + (haskell-doc-install-keymap) + + (run-hooks 'haskell-doc-mode-hook)) + + (and (called-interactively-p 'any) + (message "haskell-doc-mode is %s" + (if haskell-doc-mode "enabled" "disabled"))) + haskell-doc-mode) + +(defmacro haskell-doc-toggle-var (id prefix) + ;; toggle variable or set it based on prefix value + `(setq ,id + (if ,prefix + (>= (prefix-numeric-value ,prefix) 0) + (not ,id))) ) + +;;@cindex haskell-doc-show-global-types +(defun haskell-doc-show-global-types (&optional prefix) + "Turn on global types information in `haskell-doc-mode'." + (interactive "P") + (haskell-doc-toggle-var haskell-doc-show-global-types prefix) + (if haskell-doc-show-global-types + (haskell-doc-make-global-fct-index))) + +;;@cindex haskell-doc-show-reserved +(defun haskell-doc-show-reserved (&optional prefix) + "Toggle the automatic display of a doc string for reserved ids." + (interactive "P") + (haskell-doc-toggle-var haskell-doc-show-reserved prefix)) + +;;@cindex haskell-doc-show-prelude +(defun haskell-doc-show-prelude (&optional prefix) + "Toggle the automatic display of a doc string for reserved ids." + (interactive "P") + (haskell-doc-toggle-var haskell-doc-show-prelude prefix)) + +;;@cindex haskell-doc-show-strategy +(defun haskell-doc-show-strategy (&optional prefix) + "Toggle the automatic display of a doc string for strategy ids." + (interactive "P") + (haskell-doc-toggle-var haskell-doc-show-strategy prefix)) + +;;@cindex haskell-doc-show-user-defined +(defun haskell-doc-show-user-defined (&optional prefix) + "Toggle the automatic display of a doc string for user defined ids." + (interactive "P") + (haskell-doc-toggle-var haskell-doc-show-user-defined prefix)) + +;;@node Switch it on or off, Check, Haskell Doc Mode, top +;;@section Switch it on or off + +;;@cindex turn-on-haskell-doc-mode + +;;;###autoload +(defalias 'turn-on-haskell-doc-mode 'haskell-doc-mode) + +;;;###autoload +(defalias 'turn-on-haskell-doc 'haskell-doc-mode) + +;;@cindex turn-off-haskell-doc-mode +(defalias 'turn-off-haskell-doc-mode 'turn-off-haskell-doc) + +(defun turn-off-haskell-doc () + "Unequivocally turn off `haskell-doc-mode' (which see)." + (haskell-doc-mode 0)) + +;;@node Check, Top level function, Switch it on or off, top +;;@section Check + +;;@cindex haskell-doc-check-active + +(defun haskell-doc-check-active () + "Check whether the print function is hooked in. +Should be the same as the value of `haskell-doc-mode' but alas currently it +is not." + (interactive) + (message "%s" + (if (or (and haskell-doc-mode haskell-doc-timer) + (memq 'haskell-doc-mode-print-current-symbol-info + post-command-hook)) + "haskell-doc is ACTIVE" + (substitute-command-keys + "haskell-doc is not ACTIVE \(Use \\[haskell-doc-mode] to turn it on\)")))) + +;;@node Top level function, Mouse interface, Check, top +;;@section Top level function + +;;@cindex haskell-doc-mode-print-current-symbol-info +;; This is the function hooked into the elisp command engine +(defun haskell-doc-mode-print-current-symbol-info () + "Print the type of the symbol under the cursor. + +This function is run by an idle timer to print the type + automatically if `haskell-doc-mode' is turned on." + (and haskell-doc-mode + (not (eobp)) + (not executing-kbd-macro) + ;; Having this mode operate in the minibuffer makes it impossible to + ;; see what you're doing. + (not (eq (selected-window) (minibuffer-window))) + ;; take a nap, if run straight from post-command-hook. + (if (fboundp 'run-with-idle-timer) t + (sit-for haskell-doc-idle-delay)) + ;; good morning! read the word under the cursor for breakfast + (haskell-doc-show-type))) +;; ;; ToDo: find surrounding fct +;; (cond ((eq current-symbol current-fnsym) +;; (haskell-doc-show-type current-fnsym)) +;; (t +;; (or nil ; (haskell-doc-print-var-docstring current-symbol) +;; (haskell-doc-show-type current-fnsym))))))) + +;;;###autoload +(defun haskell-doc-current-info () + "Return the info about symbol at point. +Meant for `eldoc-documentation-function'." + (haskell-doc-sym-doc (haskell-ident-at-point))) + + +;;@node Mouse interface, Print fctsym, Top level function, top +;;@section Mouse interface for interactive query + +;;@cindex haskell-doc-ask-mouse-for-type +(defun haskell-doc-ask-mouse-for-type (event) + "Read the identifier under the mouse and echo its type. +This uses the same underlying function `haskell-doc-show-type' as the hooked +function. Only the user interface is different." + (interactive "e") + (save-excursion + (select-window (posn-window (event-end event))) + (goto-char (posn-point (event-end event))) + (haskell-doc-show-type))) + + +;;@node Print fctsym, Movement, Mouse interface, top +;;@section Print fctsym + +;;@menu +;;* Show type:: +;;* Aux:: +;;* Global fct type:: +;;* Local fct type:: +;;@end menu + +;;@node Show type, Aux, Print fctsym, Print fctsym +;;@subsection Show type + +;;@cindex haskell-doc-show-type + +(defun haskell-doc-in-code-p () + (not (or (and (eq haskell-literate 'bird) + ;; Copied from haskell-indent-bolp. + (<= (current-column) 2) + (eq (char-after (line-beginning-position)) ?\>)) + (nth 8 (syntax-ppss))))) + +;;;###autoload +(defun haskell-doc-show-type (&optional sym) + "Show the type of the function near point. +For the function under point, show the type in the echo area. +This information is extracted from the `haskell-doc-prelude-types' alist +of prelude functions and their types, or from the local functions in the +current buffer." + (interactive) + (unless sym (setq sym (haskell-ident-at-point))) + ;; if printed before do not print it again + (unless (string= sym (car haskell-doc-last-data)) + (let ((doc (haskell-doc-sym-doc sym))) + (when (and doc (haskell-doc-in-code-p)) + ;; In Emacs 19.29 and later, and XEmacs 19.13 and later, all + ;; messages are recorded in a log. Do not put haskell-doc messages + ;; in that log since they are legion. + (if (eval-when-compile (fboundp 'display-message)) + ;; XEmacs 19.13 way of preventing log messages. + ;;(display-message 'no-log (format )) + ;; XEmacs 19.15 seems to be a bit different. + (display-message 'message (format "%s" doc)) + (let ((message-log-max nil)) + (message "%s" doc))))))) + + +(defun haskell-doc-sym-doc (sym) + "Show the type of the function near point. +For the function under point, show the type in the echo area. +This information is extracted from the `haskell-doc-prelude-types' alist +of prelude functions and their types, or from the local functions in the +current buffer. +If `haskell-doc-use-inf-haskell' is non-nil, this function will consult +the inferior Haskell process for type/kind information, rather than using +the haskell-doc database." + (if haskell-doc-use-inf-haskell + (unless (string= "" sym) + (let* ((message-log-max nil) + (result (ignore-errors + (unwind-protect + (inferior-haskell-type sym) + (message ""))))) + (if (and result (string-match " :: " result)) + result + (setq result (unwind-protect + (inferior-haskell-kind sym) + (message ""))) + (and result (string-match " :: " result) result)))) + (let ((i-am-prelude nil) + (i-am-fct nil) + (type nil) + (is-reserved (haskell-doc-is-of sym haskell-doc-reserved-ids)) + (is-prelude (haskell-doc-is-of sym haskell-doc-prelude-types)) + (is-strategy (haskell-doc-is-of sym haskell-doc-strategy-ids)) + (is-user-defined (haskell-doc-is-of sym haskell-doc-user-defined-ids)) + (is-prelude (haskell-doc-is-of sym haskell-doc-prelude-types))) + (cond + ;; if reserved id (i.e. Haskell keyword + ((and haskell-doc-show-reserved + is-reserved) + (setq type (cdr is-reserved)) + (setcdr haskell-doc-last-data type)) + ;; if built-in function get type from docstring + ((and (not (null haskell-doc-show-prelude)) + is-prelude) + (setq type (cdr is-prelude)) ; (cdr (assoc sym haskell-doc-prelude-types))) + (if (= 2 (length type)) ; horrible hack to remove bad formatting + (setq type (car (cdr type)))) + (setq i-am-prelude t) + (setq i-am-fct t) + (setcdr haskell-doc-last-data type)) + ((and haskell-doc-show-strategy + is-strategy) + (setq i-am-fct t) + (setq type (cdr is-strategy)) + (setcdr haskell-doc-last-data type)) + ((and haskell-doc-show-user-defined + is-user-defined) + ;; (setq i-am-fct t) + (setq type (cdr is-user-defined)) + (setcdr haskell-doc-last-data type)) + (t + (let ( (x (haskell-doc-get-and-format-fct-type sym)) ) + (if (null x) + (setcdr haskell-doc-last-data nil) ; if not found reset last data + (setq type (car x)) + (setq i-am-fct (string= "Variables" (cdr x))) + (if (and haskell-doc-show-global-types (null type)) + (setq type (haskell-doc-get-global-fct-type sym))) + (setcdr haskell-doc-last-data type)))) ) + ;; ToDo: encode i-am-fct info into alist of types + (and type + ;; drop `::' if it's not a fct + (let ( (str (cond ((and i-am-fct (not haskell-doc-chop-off-fctname)) + (format "%s :: %s" sym type)) + (t + (format "%s" type)))) ) + (if i-am-prelude + (add-text-properties 0 (length str) '(face bold) str)) + str))))) + + +;; ToDo: define your own notion of `near' to find surrounding fct +;;(defun haskell-doc-fnsym-in-current-sexp () +;; (let* ((p (point)) +;; (sym (progn +;; (forward-word -1) +;; (while (and (forward-word -1) ; (haskell-doc-forward-sexp-safe -1) +;; (> (point) (point-min)))) +;; (cond ((or (= (point) (point-min)) +;; (memq (or (char-after (point)) 0) +;; '(?\( ?\")) +;; ;; If we hit a quotation mark before a paren, we +;; ;; are inside a specific string, not a list of +;; ;; symbols. +;; (eq (or (char-after (1- (point))) 0) ?\")) +;; nil) +;; (t (condition-case nil +;; (read (current-buffer)) +;; (error nil))))))) +;; (goto-char p) +;; (if sym +;; (format "%s" sym) +;; sym))) + +;; (and (symbolp sym) +;; sym))) + +;;@node Aux, Global fct type, Show type, Print fctsym +;;@subsection Aux + +;; ToDo: handle open brackets to decide if it's a wrapped type + +;;@cindex haskell-doc-grab-line +(defun haskell-doc-grab-line (fct-and-pos) + "Get the type of an \(FCT POSITION\) pair from the current buffer." + ;; (if (null fct-and-pos) + ;; "" ; fn is not a local fct + (let ( (str "")) + (goto-char (cdr fct-and-pos)) + (beginning-of-line) + ;; search for start of type (phsp give better bound?) + (if (null (search-forward "::" (+ (point) haskell-doc-search-distance) t)) + "" + (setq str (haskell-doc-grab)) ; leaves point at end of line + (while (haskell-doc-wrapped-type-p) ; while in a multi-line type expr + (forward-line 1) + (beginning-of-line) + (skip-chars-forward " \t") + (setq str (concat str (haskell-doc-grab)))) + (haskell-doc-string-nub-ws ; squeeze string + (if haskell-doc-chop-off-context ; no context + (haskell-doc-chop-off-context str) + str))))) +;; (concat (car fct-and-pos) "::" (haskell-doc-string-nub-ws str)))) + +;;@cindex haskell-doc-wrapped-type-p +(defun haskell-doc-wrapped-type-p () + "Check whether the type under the cursor is wrapped over several lines. +The cursor must be at the end of a line, which contains the type. +Currently, only the following is checked: +If this line ends with a `->' or the next starts with an `->' it is a +multi-line type \(same for `=>'\). +`--' comments are ignored. +ToDo: Check for matching parenthesis!." + (save-excursion + (let ( (here (point)) + (lim (progn (beginning-of-line) (point))) + ;; (foo "") + (res nil) + ) + (goto-char here) + (search-backward "--" lim t) ; skip over `--' comment + (skip-chars-backward " \t") + (if (bolp) ; skip empty lines + (progn + (forward-line 1) + (end-of-line) + (setq res (haskell-doc-wrapped-type-p))) + (forward-char -1) + ;; (setq foo (concat foo (char-to-string (preceding-char)) (char-to-string (following-char)))) + (if (or (and (or (char-equal (preceding-char) ?-) (char-equal (preceding-char) ?=)) + (char-equal (following-char) ?>)) ; (or -!> =!> + (char-equal (following-char) ?,)) ; !,) + (setq res t) + (forward-line) + (let ((here (point))) + (goto-char here) + (skip-chars-forward " \t") + (if (looking-at "--") ; it is a comment line + (progn + (forward-line 1) + (end-of-line) + (setq res (haskell-doc-wrapped-type-p))) + (forward-char 1) + ;; (setq foo (concat foo (char-to-string (preceding-char)) (char-to-string (following-char)))) + ;; (message "|%s|" foo) + (if (and (or (char-equal (preceding-char) ?-) (char-equal (preceding-char) ?=)) + (char-equal (following-char) ?>)) ; -!> or =!> + (setq res t)))))) + res))) + +;;@cindex haskell-doc-grab +(defun haskell-doc-grab () + "Return the text from point to the end of the line, chopping off comments. +Leaves point at end of line." + (let ((str (buffer-substring-no-properties + (point) (progn (end-of-line) (point))))) + (if (string-match "--" str) + (substring str 0 (match-beginning 0)) + str))) + +;;@cindex haskell-doc-string-nub-ws +(defun haskell-doc-string-nub-ws (str) + "Replace all sequences of whitespace in STR by just one space. +ToDo: Also eliminate leading and trailing whitespace." + (let ((i -1)) + (while (setq i (string-match " [ \t\n]+\\|[\t\n]+" str (1+ i))) + (setq str (replace-match " " t t str))) + str)) + +;; ToDo: make this more efficient!! +;;(defun haskell-doc-string-nub-ws (str) +;; "Replace all sequences of whitespaces in STR by just one whitespace." +;; (let ( (res "") +;; (l (length str)) +;; (i 0) +;; (j 0) +;; (in-ws nil)) +;; (while (< i l) +;; (let* ( (c (string-to-char (substring str i (1+ i)))) +;; (is-ws (eq (char-syntax c) ? )) ) +;; (if (not (and in-ws is-ws)) +;; (setq res (concat res (char-to-string c)))) +;; (setq in-ws is-ws) +;; (setq i (1+ i)))) +;; res)) + +;;@cindex haskell-doc-chop-off-context +(defun haskell-doc-chop-off-context (str) + "Eliminate the context in a type represented by the string STR." + (let ((i (string-match "=>" str)) ) + (if (null i) + str + (substring str (+ i 2))))) + +;;@cindex haskell-doc-get-imenu-info +(defun haskell-doc-get-imenu-info (obj kind) + "Return a string describing OBJ of KIND \(Variables, Types, Data\)." + (cond + ((eq major-mode 'haskell-mode) + (let* ((imenu-info-alist (cdr (assoc kind imenu--index-alist))) + ;; (names (mapcar 'car imenu-info-alist)) + (x (assoc obj imenu-info-alist))) + (when x (haskell-doc-grab-line x)))) + + (t ;; (error "Cannot get local functions in %s mode, sorry" major-mode))) + nil))) + +;;@node Global fct type, Local fct type, Aux, Print fctsym +;;@subsection Global fct type + +;; ToDo: +;; - modular way of defining a mapping of module name to file +;; - use a path to search for file (not just current directory) + +;;@cindex haskell-doc-imported-list + +(defun haskell-doc-imported-list () + "Return a list of the imported modules in current buffer." + (interactive "fName of outer `include' file: ") ; (buffer-file-name)) + ;; Don't add current buffer to the imported file list if it is not (yet?) + ;; visiting a file since it leads to errors further down. + (let ((imported-file-list (and buffer-file-name (list buffer-file-name)))) + (widen) + (goto-char (point-min)) + (while (re-search-forward "^\\s-*import\\s-+\\([^ \t\n]+\\)" nil t) + (let ((basename (match-string 1))) + (dolist (ext '(".hs" ".lhs")) + (let ((file (concat basename ext))) + (if (file-exists-p file) + (push file imported-file-list)))))) + (nreverse imported-file-list) + ;;(message imported-file-list) + )) + +;; ToDo: generalise this to "Types" etc (not just "Variables") + +;;@cindex haskell-doc-rescan-files + +(defun haskell-doc-rescan-files (filelist) + "Do an `imenu' rescan on every file in FILELIST and return the fct-list. +This function switches to and potentially loads many buffers." + (save-current-buffer + (mapcar (lambda (f) + (set-buffer (find-file-noselect f)) + (imenu--make-index-alist) + (cons f + (mapcar (lambda (x) + `(,(car x) . ,(haskell-doc-grab-line x))) + (cdr (assoc "Variables" imenu--index-alist))))) + filelist))) + +;;@cindex haskell-doc-make-global-fct-index + +(defun haskell-doc-make-global-fct-index () + "Scan imported files for types of global fcts and update `haskell-doc-index'." + (interactive) + (setq haskell-doc-index + (haskell-doc-rescan-files (haskell-doc-imported-list)))) + +;; ToDo: use a separate munge-type function to format type concisely + +;;@cindex haskell-doc-get-global-fct-type + +(defun haskell-doc-get-global-fct-type (&optional sym) + "Get type for function symbol SYM by examining `haskell-doc-index'." + (interactive) ; "fName of outer `include' file: \nsFct:") + (save-excursion + ;; (switch-to-buffer "*scratch*") + ;; (goto-char (point-max)) + ;; ;; Produces a list of fct-type alists + ;; (if (null sym) + ;; (setq sym (progn (forward-word -1) (read (current-buffer))))) + (or sym + (current-word)) + (let* ( (fn sym) ; (format "%s" sym)) + (fal haskell-doc-index) + (res "") ) + (while (not (null fal)) + (let* ( (l (car fal)) + (f (car l)) + (x (assoc fn (cdr l))) ) + (if (not (null x)) + (let* ( (ty (cdr x)) ; the type as string + (idx (string-match "::" ty)) + (str (if (null idx) + ty + (substring ty (+ idx 2)))) ) + (setq res (format "[%s] %s" f str)))) + (setq fal (cdr fal)))) + res))) ; (message res)) ) + +;;@node Local fct type, , Global fct type, Print fctsym +;;@subsection Local fct type + +;;@cindex haskell-doc-get-and-format-fct-type + +(defun haskell-doc-get-and-format-fct-type (fn) + "Get the type and kind of FN by checking local and global functions." + (save-excursion + (save-match-data + (let ((docstring "") + (doc nil) + ) + ;; is it a local function? + (setq docstring (haskell-doc-get-imenu-info fn "Variables")) + (if (not (null docstring)) + ;; (string-match (format "^%s\\s-+::\\s-+\\(.*\\)$" fn) docstring)) + (setq doc `(,docstring . "Variables"))) ; `(,(match-string 1 docstring) . "Variables") )) + ;; is it a type declaration? + (setq docstring (haskell-doc-get-imenu-info fn "Types")) + (if (not (null docstring)) + ;; (string-match (format "^\\s-*type\\s-+%s.*$" fn) docstring)) + (setq doc `(,docstring . "Types"))) ; `(,(match-string 0 docstring) . "Types")) ) + (if (not (null docstring)) + ;; (string-match (format "^\\s-*data.*%s.*$" fn) docstring)) + (setq doc `(,docstring . "Data"))) ; (setq doc `(,(match-string 0 docstring) . "Data")) ) + ;; return the result + doc )))) + + +;;@appendix + +;;@node Index, Token, Visit home site, top +;;@section Index + +;;@index +;;* haskell-doc-ask-mouse-for-type:: +;;* haskell-doc-check-active:: +;;* haskell-doc-chop-off-context:: +;;* haskell-doc-get-and-format-fct-type:: +;;* haskell-doc-get-global-fct-type:: +;;* haskell-doc-get-imenu-info:: +;;* haskell-doc-grab:: +;;* haskell-doc-grab-line:: +;;* haskell-doc-imported-list:: +;;* haskell-doc-install-keymap:: +;;* haskell-doc-is-of:: +;;* haskell-doc-make-global-fct-index:: +;;* haskell-doc-mode:: +;;* haskell-doc-mode-print-current-symbol-info:: +;;* haskell-doc-prelude-types:: +;;* haskell-doc-rescan-files:: +;;* haskell-doc-reserved-ids:: +;;* haskell-doc-show-global-types:: +;;* haskell-doc-show-prelude:: +;;* haskell-doc-show-reserved:: +;;* haskell-doc-show-strategy:: +;;* haskell-doc-show-type:: +;;* haskell-doc-show-user-defined:: +;;* haskell-doc-strategy-ids:: +;;* haskell-doc-string-nub-ws:: +;;* haskell-doc-submit-bug-report:: +;;* haskell-doc-visit-home:: +;;* haskell-doc-wrapped-type-p:: +;;* turn-off-haskell-doc-mode:: +;;* turn-on-haskell-doc-mode:: +;;@end index + +;;@node Token, , Index, top +;;@section Token + +(provide 'haskell-doc) + +;; Local Variables: +;; byte-compile-warnings: (not cl-functions) +;; End: + +;;; haskell-doc.el ends here diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/haskell-doc.elc Binary file .emacs.d/haskell-mode/haskell-doc.elc has changed diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/haskell-font-lock.el --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/haskell-mode/haskell-font-lock.el Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,647 @@ +;;; haskell-font-lock.el --- Font locking module for Haskell Mode + +;; Copyright 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +;; Copyright 1997-1998 Graeme E Moss, and Tommy Thorn + +;; Author: 1997-1998 Graeme E Moss +;; 1997-1998 Tommy Thorn +;; 2003 Dave Love +;; Keywords: faces files Haskell + +;; This file is not part of GNU Emacs. + +;; This file is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; This file is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see . + +;;; Commentary: + +;; Purpose: +;; +;; To support fontification of standard Haskell keywords, symbols, +;; functions, etc. Supports full Haskell 1.4 as well as LaTeX- and +;; Bird-style literate scripts. +;; +;; Installation: +;; +;; To turn font locking on for all Haskell buffers under the Haskell +;; mode of Moss&Thorn, add this to .emacs: +;; +;; (add-hook 'haskell-mode-hook 'turn-on-haskell-font-lock) +;; +;; Otherwise, call `turn-on-haskell-font-lock'. +;; +;; +;; Customisation: +;; +;; The colours and level of font locking may be customised. See the +;; documentation on `turn-on-haskell-font-lock' for more details. +;; +;; Present Limitations/Future Work (contributions are most welcome!): +;; +;; . Debatable whether `()' `[]' `(->)' `(,)' `(,,)' etc. should be +;; highlighted as constructors or not. Should the `->' in +;; `id :: a -> a' be considered a constructor or a keyword? If so, +;; how do we distinguish this from `\x -> x'? What about the `\'? +;; +;; . XEmacs can support both `--' comments and `{- -}' comments +;; simultaneously. If XEmacs is detected, this should be used. +;; +;; . Support for GreenCard? +;; +;; +;; All functions/variables start with +;; `(turn-(on/off)-)haskell-font-lock' or `haskell-fl-'. + +;;; Change Log: + +;; Version 1.3: +;; From Dave Love: +;; Support for proper behaviour (including with Unicode identifiers) +;; in Emacs 21 only hacked in messily to avoid disturbing the old +;; stuff. Needs integrating more cleanly. Allow literate comment +;; face to be customized. Some support for fontifying definitions. +;; (I'm not convinced the faces should be customizable -- fontlock +;; faces are normally expected to be consistent.) +;; +;; Version 1.2: +;; Added support for LaTeX-style literate scripts. Allow whitespace +;; after backslash to end a line for string continuations. +;; +;; Version 1.1: +;; Use own syntax table. Use backquote (neater). Stop ''' being +;; highlighted as quoted character. Fixed `\"' fontification bug +;; in comments. +;; +;; Version 1.0: +;; Brought over from Haskell mode v1.1. + +;;; Code: + +(require 'haskell-mode) +(require 'font-lock) +(with-no-warnings (require 'cl)) + +(defcustom haskell-font-lock-symbols nil + "Display \\ and -> and such using symbols in fonts. +This may sound like a neat trick, but be extra careful: it changes the +alignment and can thus lead to nasty surprises w.r.t layout. +If t, try to use whichever font is available. Otherwise you can +set it to a particular font of your preference among `japanese-jisx0208' +and `unicode'." + :group 'haskell + :type '(choice (const nil) + (const t) + (const unicode) + (const japanese-jisx0208))) + +(defconst haskell-font-lock-symbols-alist + (append + ;; Prefer single-width Unicode font for lambda. + (and (fboundp 'decode-char) + (memq haskell-font-lock-symbols '(t unicode)) + (list (cons "\\" (decode-char 'ucs 955)))) + ;; The symbols can come from a JIS0208 font. + (and (fboundp 'make-char) (fboundp 'charsetp) (charsetp 'japanese-jisx0208) + (memq haskell-font-lock-symbols '(t japanese-jisx0208)) + (list (cons "not" (make-char 'japanese-jisx0208 34 76)) + (cons "\\" (make-char 'japanese-jisx0208 38 75)) + (cons "->" (make-char 'japanese-jisx0208 34 42)) + (cons "<-" (make-char 'japanese-jisx0208 34 43)) + (cons "=>" (make-char 'japanese-jisx0208 34 77)) + ;; FIXME: I'd like to either use ∀ or ∃ depending on how the + ;; `forall' keyword is used, but currently the rest of the + ;; code assumes that such ambiguity doesn't happen :-( + (cons "forall" (make-char 'japanese-jisx0208 34 79)))) + ;; Or a unicode font. + (and (fboundp 'decode-char) + (memq haskell-font-lock-symbols '(t unicode)) + (list (cons "not" (decode-char 'ucs 172)) + (cons "->" (decode-char 'ucs 8594)) + (cons "<-" (decode-char 'ucs 8592)) + (cons "=>" (decode-char 'ucs 8658)) + (cons "()" (decode-char 'ucs #X2205)) + (cons "==" (decode-char 'ucs #X2261)) + (cons "/=" (decode-char 'ucs #X2262)) + (cons ">=" (decode-char 'ucs #X2265)) + (cons "<=" (decode-char 'ucs #X2264)) + (cons "!!" (decode-char 'ucs #X203C)) + (cons "&&" (decode-char 'ucs #X2227)) + (cons "||" (decode-char 'ucs #X2228)) + (cons "sqrt" (decode-char 'ucs #X221A)) + (cons "undefined" (decode-char 'ucs #X22A5)) + (cons "pi" (decode-char 'ucs #X3C0)) + (cons "~>" (decode-char 'ucs 8669)) ;; Omega language + ;; (cons "~>" (decode-char 'ucs 8605)) ;; less desirable + (cons "-<" (decode-char 'ucs 8610)) ;; Paterson's arrow syntax + ;; (cons "-<" (decode-char 'ucs 10521)) ;; nicer but uncommon + (cons "::" (decode-char 'ucs 8759)) + (list "." (decode-char 'ucs 8728) ; (decode-char 'ucs 9675) + ;; Need a predicate here to distinguish the . used by + ;; forall . . + 'haskell-font-lock-dot-is-not-composition) + (cons "forall" (decode-char 'ucs 8704))))) + "Alist mapping Haskell symbols to chars. +Each element has the form (STRING . CHAR) or (STRING CHAR PREDICATE). +STRING is the Haskell symbol. +CHAR is the character with which to represent this symbol. +PREDICATE if present is a function of one argument (the start position +of the symbol) which should return non-nil if this mapping should be disabled +at that position.") + +(defun haskell-font-lock-dot-is-not-composition (start) + "Return non-nil if the \".\" at START is not a composition operator. +This is the case if the \".\" is part of a \"forall . \"." + (save-excursion + (goto-char start) + (re-search-backward "\\[^.\"]*\\=" + (line-beginning-position) t))) + +;; Use new vars for the font-lock faces. The indirection allows people to +;; use different faces than in other modes, as before. +(defvar haskell-keyword-face 'font-lock-keyword-face) +(defvar haskell-constructor-face 'font-lock-type-face) +;; This used to be `font-lock-variable-name-face' but it doesn't result in +;; a highlighting that's consistent with other modes (it's mostly used +;; for function defintions). +(defvar haskell-definition-face 'font-lock-function-name-face) +;; This is probably just wrong, but it used to use +;; `font-lock-function-name-face' with a result that was not consistent with +;; other major modes, so I just exchanged with `haskell-definition-face'. +(defvar haskell-operator-face 'font-lock-variable-name-face) +(defvar haskell-default-face nil) +(defvar haskell-literate-comment-face 'font-lock-doc-face + "Face with which to fontify literate comments. +Set to `default' to avoid fontification of them.") + +(defconst haskell-emacs21-features (string-match "[[:alpha:]]" "x") + "Non-nil if we have regexp char classes. +Assume this means we have other useful features from Emacs 21.") + +(defun haskell-font-lock-compose-symbol (alist) + "Compose a sequence of ascii chars into a symbol. +Regexp match data 0 points to the chars." + ;; Check that the chars should really be composed into a symbol. + (let* ((start (match-beginning 0)) + (end (match-end 0)) + (syntaxes (cond + ((eq (char-syntax (char-after start)) ?w) '(?w)) + ;; Special case for the . used for qualified names. + ((and (eq (char-after start) ?\.) (= end (1+ start))) + '(?_ ?\\ ?w)) + (t '(?_ ?\\)))) + sym-data) + (if (or (memq (char-syntax (or (char-before start) ?\ )) syntaxes) + (memq (char-syntax (or (char-after end) ?\ )) syntaxes) + (memq (get-text-property start 'face) + '(font-lock-doc-face font-lock-string-face + font-lock-comment-face)) + (and (consp (setq sym-data (cdr (assoc (match-string 0) alist)))) + (let ((pred (cadr sym-data))) + (setq sym-data (car sym-data)) + (funcall pred start)))) + ;; No composition for you. Let's actually remove any composition + ;; we may have added earlier and which is now incorrect. + (remove-text-properties start end '(composition)) + ;; That's a symbol alright, so add the composition. + (compose-region start end sym-data))) + ;; Return nil because we're not adding any face property. + nil) + +(defun haskell-font-lock-symbols-keywords () + (when (fboundp 'compose-region) + (let ((alist nil)) + (dolist (x haskell-font-lock-symbols-alist) + (when (and (if (fboundp 'char-displayable-p) + (char-displayable-p (if (consp (cdr x)) (cadr x) (cdr x))) + (if (fboundp 'latin1-char-displayable-p) + (latin1-char-displayable-p (if (consp (cdr x)) + (cadr x) + (cdr x))) + t)) + (not (assoc (car x) alist))) ; Not yet in alist. + (push x alist))) + (when alist + `((,(regexp-opt (mapcar 'car alist) t) + (0 (haskell-font-lock-compose-symbol ',alist) + ;; In Emacs-21, if the `override' field is nil, the face + ;; expressions is only evaluated if the text has currently + ;; no face. So force evaluation by using `keep'. + keep))))))) + +;; The font lock regular expressions. +(defun haskell-font-lock-keywords-create (literate) + "Create fontification definitions for Haskell scripts. +Returns keywords suitable for `font-lock-keywords'." + (let* (;; Bird-style literate scripts start a line of code with + ;; "^>", otherwise a line of code starts with "^". + (line-prefix (if (eq literate 'bird) "^> ?" "^")) + + ;; Most names are borrowed from the lexical syntax of the Haskell + ;; report. + ;; Some of these definitions have been superseded by using the + ;; syntax table instead. + + ;; (ASCsymbol "-!#$%&*+./<=>?@\\\\^|~") + ;; Put the minus first to make it work in ranges. + + ;; We allow _ as the first char to fit GHC + (varid "\\b[[:lower:]_][[:alnum:]'_]*\\b") + ;; We allow ' preceding conids because of DataKinds/PolyKinds + (conid "\\b'?[[:upper:]][[:alnum:]'_]*\\b") + (modid (concat "\\b" conid "\\(\\." conid "\\)*\\b")) + (qvarid (concat modid "\\." varid)) + (qconid (concat modid "\\." conid)) + (sym + ;; We used to use the below for non-Emacs21, but I think the + ;; regexp based on syntax works for other emacsen as well. -- Stef + ;; (concat "[" symbol ":]+") + ;; Add backslash to the symbol-syntax chars. This seems to + ;; be thrown for some reason by backslash's escape syntax. + "\\(\\s_\\|\\\\\\)+") + + ;; Reserved operations + (reservedsym + (concat "\\S_" + ;; (regexp-opt '(".." "::" "=" "\\" "|" "<-" "->" + ;; "@" "~" "=>") t) + "\\(->\\|\\.\\.\\|::\\|∷\\|<-\\|=>\\|[=@\\|~]\\)" + "\\S_")) + ;; Reserved identifiers + (reservedid + (concat "\\<" + ;; `as', `hiding', and `qualified' are part of the import + ;; spec syntax, but they are not reserved. + ;; `_' can go in here since it has temporary word syntax. + ;; (regexp-opt + ;; '("case" "class" "data" "default" "deriving" "do" + ;; "else" "if" "import" "in" "infix" "infixl" + ;; "infixr" "instance" "let" "module" "newtype" "of" + ;; "then" "type" "where" "_") t) + "\\(_\\|c\\(ase\\|lass\\)\\|d\\(ata\\|e\\(fault\\|riving\\)\\|o\\)\\|else\\|i\\(mport\\|n\\(fix[lr]?\\|stance\\)\\|[fn]\\)\\|let\\|module\\|mdo\\|newtype\\|of\\|rec\\|proc\\|t\\(hen\\|ype\\)\\|where\\)" + "\\>")) + + ;; This unreadable regexp matches strings and character + ;; constants. We need to do this with one regexp to handle + ;; stuff like '"':"'". The regexp is the composition of + ;; "([^"\\]|\\.)*" for strings and '([^\\]|\\.[^']*)' for + ;; characters, allowing for string continuations. + ;; Could probably be improved... + (string-and-char + (concat "\\(\\(\"\\|" line-prefix "[ \t]*\\\\\\)\\([^\"\\\\\n]\\|\\\\.\\)*\\(\"\\|\\\\[ \t]*$\\)\\|'\\([^'\\\\\n]\\|\\\\.[^'\n]*\\)'\\)")) + + ;; Top-level declarations + (topdecl-var + (concat line-prefix "\\(" varid "\\)\\s-*" + ;; optionally allow for a single newline after identifier + ;; NOTE: not supported for bird-style .lhs files + (if (eq literate 'bird) nil "\\([\n]\\s-+\\)?") + ;; A toplevel declaration can be followed by a definition + ;; (=), a type (::) or (∷), a guard, or a pattern which can + ;; either be a variable, a constructor, a parenthesized + ;; thingy, or an integer or a string. + "\\(" varid "\\|" conid "\\|::\\|∷\\|=\\||\\|\\s(\\|[0-9\"']\\)")) + (topdecl-var2 + (concat line-prefix "\\(" varid "\\|" conid "\\)\\s-*`\\(" varid "\\)`")) + (topdecl-sym + (concat line-prefix "\\(" varid "\\|" conid "\\)\\s-*\\(" sym "\\)")) + (topdecl-sym2 (concat line-prefix "(\\(" sym "\\))")) + + keywords) + + (setq keywords + `(;; NOTICE the ordering below is significant + ;; + ("^<<<<<<< .*$" 0 'font-lock-warning-face t) + ("^=======" 0 'font-lock-warning-face t) + ("^>>>>>>> .*$" 0 'font-lock-warning-face t) + ("^#.*$" 0 'font-lock-preprocessor-face t) + ,@(unless haskell-emacs21-features ;Supports nested comments? + ;; Expensive. + `((,string-and-char 1 font-lock-string-face))) + + ;; This was originally at the very end (and needs to be after + ;; all the comment/string/doc highlighting) but it seemed to + ;; trigger a bug in Emacs-21.3 which caused the compositions to + ;; be "randomly" dropped. Moving it earlier seemed to reduce + ;; the occurrence of the bug. + ,@(haskell-font-lock-symbols-keywords) + + (,reservedid 1 (symbol-value 'haskell-keyword-face)) + (,reservedsym 1 (symbol-value 'haskell-operator-face)) + ;; Special case for `as', `hiding', `safe' and `qualified', which are + ;; keywords in import statements but are not otherwise reserved. + ("\\\\)[ \t]*\\)?\\(?:\\(qualified\\>\\)[ \t]*\\)?[^ \t\n()]+[ \t]*\\(?:\\(\\\\)[ \t]*[^ \t\n()]+[ \t]*\\)?\\(\\\\)?" + (1 (symbol-value 'haskell-keyword-face) nil lax) + (2 (symbol-value 'haskell-keyword-face) nil lax) + (3 (symbol-value 'haskell-keyword-face) nil lax) + (4 (symbol-value 'haskell-keyword-face) nil lax)) + + (,reservedsym 1 (symbol-value 'haskell-operator-face)) + ;; Special case for `foreign import' + ;; keywords in foreign import statements but are not otherwise reserved. + ("\\<\\(foreign\\)[ \t]+\\(import\\)[ \t]+\\(?:\\(ccall\\|stdcall\\|cplusplus\\|jvm\\|dotnet\\)[ \t]+\\)?\\(?:\\(safe\\|unsafe\\|interruptible\\)[ \t]+\\)?" + (1 (symbol-value 'haskell-keyword-face) nil lax) + (2 (symbol-value 'haskell-keyword-face) nil lax) + (3 (symbol-value 'haskell-keyword-face) nil lax) + (4 (symbol-value 'haskell-keyword-face) nil lax)) + + (,reservedsym 1 (symbol-value 'haskell-operator-face)) + ;; Special case for `foreign export' + ;; keywords in foreign export statements but are not otherwise reserved. + ("\\<\\(foreign\\)[ \t]+\\(export\\)[ \t]+\\(?:\\(ccall\\|stdcall\\|cplusplus\\|jvm\\|dotnet\\)[ \t]+\\)?" + (1 (symbol-value 'haskell-keyword-face) nil lax) + (2 (symbol-value 'haskell-keyword-face) nil lax) + (3 (symbol-value 'haskell-keyword-face) nil lax)) + + ;; Toplevel Declarations. + ;; Place them *before* generic id-and-op highlighting. + (,topdecl-var (1 (symbol-value 'haskell-definition-face))) + (,topdecl-var2 (2 (symbol-value 'haskell-definition-face))) + (,topdecl-sym (2 (symbol-value 'haskell-definition-face))) + (,topdecl-sym2 (1 (symbol-value 'haskell-definition-face))) + + ;; These four are debatable... + ("(\\(,*\\|->\\))" 0 (symbol-value 'haskell-constructor-face)) + ("\\[\\]" 0 (symbol-value 'haskell-constructor-face)) + ;; Expensive. + (,qvarid 0 (symbol-value 'haskell-default-face)) + (,qconid 0 (symbol-value 'haskell-constructor-face)) + (,(concat "\`" varid "\`") 0 (symbol-value 'haskell-operator-face)) + ;; Expensive. + (,conid 0 (symbol-value 'haskell-constructor-face)) + + ;; Very expensive. + (,sym 0 (if (eq (char-after (match-beginning 0)) ?:) + haskell-constructor-face + haskell-operator-face)))) + (unless (boundp 'font-lock-syntactic-keywords) + (case literate + (bird + (setq keywords + `(("^[^>\n].*$" 0 haskell-comment-face t) + ,@keywords + ("^>" 0 haskell-default-face t)))) + ((latex tex) + (setq keywords + `((haskell-fl-latex-comments 0 'font-lock-comment-face t) + ,@keywords))))) + keywords)) + +;; The next three aren't used in Emacs 21. + +(defvar haskell-fl-latex-cache-pos nil + "Position of cache point used by `haskell-fl-latex-cache-in-comment'. +Should be at the start of a line.") + +(defvar haskell-fl-latex-cache-in-comment nil + "If `haskell-fl-latex-cache-pos' is outside a +\\begin{code}..\\end{code} block (and therefore inside a comment), +this variable is set to t, otherwise nil.") + +(defun haskell-fl-latex-comments (end) + "Sets `match-data' according to the region of the buffer before end +that should be commented under LaTeX-style literate scripts." + (let ((start (point))) + (if (= start end) + ;; We're at the end. No more to fontify. + nil + (if (not (eq start haskell-fl-latex-cache-pos)) + ;; If the start position is not cached, calculate the state + ;; of the start. + (progn + (setq haskell-fl-latex-cache-pos start) + ;; If the previous \begin{code} or \end{code} is a + ;; \begin{code}, then start is not in a comment, otherwise + ;; it is in a comment. + (setq haskell-fl-latex-cache-in-comment + (if (and + (re-search-backward + "^\\(\\(\\\\begin{code}\\)\\|\\(\\\\end{code}\\)\\)$" + (point-min) t) + (match-end 2)) + nil t)) + ;; Restore position. + (goto-char start))) + (if haskell-fl-latex-cache-in-comment + (progn + ;; If start is inside a comment, search for next \begin{code}. + (re-search-forward "^\\\\begin{code}$" end 'move) + ;; Mark start to end of \begin{code} (if present, till end + ;; otherwise), as a comment. + (set-match-data (list start (point))) + ;; Return point, as a normal regexp would. + (point)) + ;; If start is inside a code block, search for next \end{code}. + (if (re-search-forward "^\\\\end{code}$" end t) + ;; If one found, mark it as a comment, otherwise finish. + (point)))))) + +(defconst haskell-basic-syntactic-keywords + '(;; Character constants (since apostrophe can't have string syntax). + ;; Beware: do not match something like 's-}' or '\n"+' since the first ' + ;; might be inside a comment or a string. + ;; This still gets fooled with "'"'"'"'"'"', but ... oh well. + ("\\Sw\\('\\)\\([^\\'\n]\\|\\\\.[^\\'\n \"}]*\\)\\('\\)" (1 "|") (3 "|")) + ;; The \ is not escaping in \(x,y) -> x + y. + ("\\(\\\\\\)(" (1 ".")) + ;; The second \ in a gap does not quote the subsequent char. + ;; It's probably not worth the trouble, tho. + ;; ("^[ \t]*\\(\\\\\\)" (1 ".")) + ;; Deal with instances of `--' which don't form a comment + ("\\s_\\{3,\\}" (0 (cond ((numberp (nth 4 (syntax-ppss))) + ;; There are no such instances inside nestable comments + nil) + ((string-match "\\`-*\\'" (match-string 0)) + ;; Sequence of hyphens. Do nothing in + ;; case of things like `{---'. + nil) + (t "_")))) ; other symbol sequence + )) + +(defconst haskell-bird-syntactic-keywords + (cons '("^[^\n>]" (0 "<")) + haskell-basic-syntactic-keywords)) + +(defconst haskell-latex-syntactic-keywords + (append + '(("^\\\\begin{code}\\(\n\\)" 1 "!") + ;; Note: buffer is widened during font-locking. + ("\\`\\(.\\|\n\\)" (1 "!")) ; start comment at buffer start + ("^\\(\\\\\\)end{code}$" 1 "!")) + haskell-basic-syntactic-keywords)) + +(defcustom haskell-font-lock-haddock (boundp 'font-lock-doc-face) + "If non-nil try to highlight Haddock comments specially." + :type 'boolean + :group 'haskell) + +(defvar haskell-font-lock-seen-haddock nil) +(make-variable-buffer-local 'haskell-font-lock-seen-haddock) + +(defun haskell-syntactic-face-function (state) + "`font-lock-syntactic-face-function' for Haskell." + (cond + ((nth 3 state) font-lock-string-face) ; as normal + ;; Else comment. If it's from syntax table, use default face. + ((or (eq 'syntax-table (nth 7 state)) + (and (eq haskell-literate 'bird) + (memq (char-before (nth 8 state)) '(nil ?\n)))) + haskell-literate-comment-face) + ;; Try and recognize Haddock comments. From what I gather from its + ;; documentation, its comments can take the following forms: + ;; a) {-| ... -} + ;; b) {-^ ... -} + ;; c) -- | ... + ;; d) -- ^ ... + ;; e) -- ... + ;; Where `e' is the tricky one: it is only a Haddock comment if it + ;; follows immediately another Haddock comment. Even an empty line + ;; breaks such a sequence of Haddock comments. It is not clear if `e' + ;; can follow any other case, so I interpreted it as following only cases + ;; c,d,e (not a or b). In any case, this `e' is expensive since it + ;; requires extra work for each and every non-Haddock comment, so I only + ;; go through the more expensive check if we've already seen a Haddock + ;; comment in the buffer. + ((and haskell-font-lock-haddock + (save-excursion + (goto-char (nth 8 state)) + (or (looking-at "\\(-- \\|{-\\)[ \\t]*[|^]") + (and haskell-font-lock-seen-haddock + (looking-at "-- ") + (let ((doc nil) + pos) + (while (and (not doc) + (setq pos (line-beginning-position)) + (forward-comment -1) + (eq (line-beginning-position 2) pos) + (looking-at "--\\( [|^]\\)?")) + (setq doc (match-beginning 1))) + doc))))) + (set (make-local-variable 'haskell-font-lock-seen-haddock) t) + font-lock-doc-face) + (t font-lock-comment-face))) + +(defconst haskell-font-lock-keywords + (haskell-font-lock-keywords-create nil) + "Font lock definitions for non-literate Haskell.") + +(defconst haskell-font-lock-bird-literate-keywords + (haskell-font-lock-keywords-create 'bird) + "Font lock definitions for Bird-style literate Haskell.") + +(defconst haskell-font-lock-latex-literate-keywords + (haskell-font-lock-keywords-create 'latex) + "Font lock definitions for LaTeX-style literate Haskell.") + +;;;###autoload +(defun haskell-font-lock-choose-keywords () + (let ((literate (if (boundp 'haskell-literate) haskell-literate))) + (case literate + (bird haskell-font-lock-bird-literate-keywords) + ((latex tex) haskell-font-lock-latex-literate-keywords) + (t haskell-font-lock-keywords)))) + +(defun haskell-font-lock-choose-syntactic-keywords () + (let ((literate (if (boundp 'haskell-literate) haskell-literate))) + (case literate + (bird haskell-bird-syntactic-keywords) + ((latex tex) haskell-latex-syntactic-keywords) + (t haskell-basic-syntactic-keywords)))) + +(defun haskell-font-lock-defaults-create () + "Locally set `font-lock-defaults' for Haskell." + (set (make-local-variable 'font-lock-defaults) + '(haskell-font-lock-choose-keywords + nil nil ((?\' . "w") (?_ . "w")) nil + (font-lock-syntactic-keywords + . haskell-font-lock-choose-syntactic-keywords) + (font-lock-syntactic-face-function + . haskell-syntactic-face-function) + ;; Get help from font-lock-syntactic-keywords. + (parse-sexp-lookup-properties . t)))) + +;; The main functions. +(defun turn-on-haskell-font-lock () + "Turns on font locking in current buffer for Haskell 1.4 scripts. + +Changes the current buffer's `font-lock-defaults', and adds the +following variables: + + `haskell-keyword-face' for reserved keywords and syntax, + `haskell-constructor-face' for data- and type-constructors, class names, + and module names, + `haskell-operator-face' for symbolic and alphanumeric operators, + `haskell-default-face' for ordinary code. + +The variables are initialised to the following font lock default faces: + + `haskell-keyword-face' `font-lock-keyword-face' + `haskell-constructor-face' `font-lock-type-face' + `haskell-operator-face' `font-lock-function-name-face' + `haskell-default-face' + +Two levels of fontification are defined: level one (the default) +and level two (more colour). The former does not colour operators. +Use the variable `font-lock-maximum-decoration' to choose +non-default levels of fontification. For example, adding this to +.emacs: + + (setq font-lock-maximum-decoration '((haskell-mode . 2) (t . 0))) + +uses level two fontification for `haskell-mode' and default level for +all other modes. See documentation on this variable for further +details. + +To alter an attribute of a face, add a hook. For example, to change +the foreground colour of comments to brown, add the following line to +.emacs: + + (add-hook 'haskell-font-lock-hook + (lambda () + (set-face-foreground 'haskell-comment-face \"brown\"))) + +Note that the colours available vary from system to system. To see +what colours are available on your system, call +`list-colors-display' from emacs. + +To turn font locking on for all Haskell buffers, add this to .emacs: + + (add-hook 'haskell-mode-hook 'turn-on-haskell-font-lock) + +To turn font locking on for the current buffer, call +`turn-on-haskell-font-lock'. To turn font locking off in the current +buffer, call `turn-off-haskell-font-lock'. + +Bird-style literate Haskell scripts are supported: If the value of +`haskell-literate-bird-style' (automatically set by the Haskell mode +of Moss&Thorn) is non-nil, a Bird-style literate script is assumed. + +Invokes `haskell-font-lock-hook' if not nil." + (haskell-font-lock-defaults-create) + (run-hooks 'haskell-font-lock-hook) + (turn-on-font-lock)) + +(defun turn-off-haskell-font-lock () + "Turns off font locking in current buffer." + (font-lock-mode -1)) + +;; Provide ourselves: + +(provide 'haskell-font-lock) + +;; Local Variables: +;; byte-compile-warnings: (not cl-functions) +;; tab-width: 8 +;; End: + +;;; haskell-font-lock.el ends here diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/haskell-font-lock.elc Binary file .emacs.d/haskell-mode/haskell-font-lock.elc has changed diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/haskell-indent.el --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/haskell-mode/haskell-indent.el Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,1590 @@ +;;; haskell-indent.el --- "semi-intelligent" indentation module for Haskell Mode + +;; Copyright 2004, 2005, 2007, 2008, 2009 Free Software Foundation, Inc. +;; Copyright 1997-1998 Guy Lapalme + +;; Author: 1997-1998 Guy Lapalme + +;; Keywords: indentation Haskell layout-rule +;; Version: 1.2 +;; URL: http://www.iro.umontreal.ca/~lapalme/layout/index.html + +;; This file is not part of GNU Emacs. + +;; This file is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; This file is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see . + +;;; Commentary: + +;; Purpose: +;; +;; To support automatic indentation of Haskell programs using +;; the layout rule described in section 1.5 and appendix B.3 of the +;; the Haskell report. The rationale and the implementation principles +;; are described in an article to appear in Journal of Functional Programming. +;; "Dynamic tabbing for automatic indentation with the layout rule" +;; +;; It supports literate scripts. +;; Haskell indentation is performed +;; within \begin{code}...\end{code} sections of a literate script +;; and in lines beginning with > with Bird style literate script +;; TAB aligns to the left column outside of these sections. +;; +;; Installation: +;; +;; To turn indentation on for all Haskell buffers under the Haskell +;; mode of Moss&Thorn +;; add this to .emacs: +;; +;; (add-hook 'haskell-mode-hook 'turn-on-haskell-indent) +;; +;; Otherwise, call `turn-on-haskell-indent'. +;; +;; +;; Customisation: +;; The "standard" offset for statements is 4 spaces. +;; It can be changed by setting the variable "haskell-indent-offset" to +;; another value +;; +;; The default number of blanks after > in a Bird style literate script +;; is 1; it can be changed by setting the variable +;; "haskell-indent-literate-Bird-default-offset" +;; +;; `haskell-indent-hook' is invoked if not nil. +;; +;; All functions/variables start with +;; `(turn-(on/off)-)haskell-indent' or `haskell-indent-'. + +;; This file can also be used as a hook for the Hugs Mode developed by +;; Chris Van Humbeeck +;; It can be obtained at: +;; http://www-i2.informatik.rwth-aachen.de/Forschung/FP/Haskell/hugs-mode.el +;; +;; For the Hugs mode put the following in your .emacs +;; +;;(setq auto-mode-alist (append auto-mode-alist '(("\\.hs\\'" . hugs-mode)))) +;;(autoload 'hugs-mode "hugs-mode" "Go into hugs mode" t) +;; +;; If only the indentation mode is used then replace the two +;; preceding lines with +;;(setq auto-mode-alist (append auto-mode-alist +;; '(("\\.hs\\'" . turn-on-haskell-indent)))) +;;(autoload 'turn-on-haskell-indent "hindent" "Indentation mode for Haskell" t) +;; +;; For indentation in both cases then add the following to your .emacs +;;(add-hook 'hugs-mode-hook 'turn-on-haskell-indent) +;;(autoload 'haskell-indent-cycle "hindent" "Indentation cycle for Haskell" t) +;; + +;;; Code: + +(require 'haskell-string) +(with-no-warnings (require 'cl)) + +(defvar haskell-literate) + +(defgroup haskell-indent nil + "Haskell indentation." + :group 'haskell + :link '(custom-manual "(haskell-mode)Indentation") + :prefix "haskell-indent-") + +(defcustom haskell-indent-offset 4 + "Indentation of Haskell statements with respect to containing block." + :type 'integer + :group 'haskell-indent) + +(defcustom haskell-indent-literate-Bird-default-offset 1 + "Default number of blanks after > in a Bird style literate script." + :type 'integer + :group 'haskell-indent) + +(defcustom haskell-indent-rhs-align-column 0 + "Column on which to align right-hand sides (use 0 for ad-hoc alignment)." + :type 'integer + :group 'haskell-indent) + +(defun haskell-indent-point-to-col (apoint) + "Return the column number of APOINT." + (save-excursion + (goto-char apoint) + (current-column))) + +(defconst haskell-indent-start-keywords-re + (concat "\\<" + (regexp-opt '("class" "data" "import" "infix" "infixl" "infixr" + "instance" "module" "newtype" "primitive" "type") t) + "\\>") + "Regexp for keywords to complete when standing at the first word of a line.") + + +;; Customizations for different kinds of environments +;; in which dealing with low-level events are different. +(defun haskell-indent-mark-active () + (if (featurep 'xemacs) + (if zmacs-regions + zmacs-region-active-p + t) + mark-active)) + +;; for pushing indentation information + +(defvar haskell-indent-info) ;Used with dynamic scoping. + +(defun haskell-indent-push-col (col &optional name) + "Push indentation information for the column COL. +The info is followed by NAME (if present). +Makes sure that the same indentation info is not pushed twice. +Uses free var `haskell-indent-info'." + (let ((tmp (cons col name))) + (if (member tmp haskell-indent-info) + haskell-indent-info + (push tmp haskell-indent-info)))) + +(defun haskell-indent-push-pos (pos &optional name) + "Push indentation information for POS followed by NAME (if present)." + (haskell-indent-push-col (haskell-indent-point-to-col pos) name)) + +;; (defvar haskell-indent-tab-align nil +;; "Align all indentations on TAB stops.") + +(defun haskell-indent-column+offset (column offset) + (unless offset (setq offset haskell-indent-offset)) + (setq column (+ column offset)) + ;; (if (and haskell-indent-tab-align (> offset 0)) + ;; (* 8 (/ (+ column 7) 8)) + column) ;; ) + +(defun haskell-indent-push-pos-offset (pos &optional offset) + "Pushes indentation information for the column corresponding to POS +followed by an OFFSET (if present use its value otherwise use +`haskell-indent-offset')." + (haskell-indent-push-col (haskell-indent-column+offset + (haskell-indent-point-to-col pos) + offset))) + +;; redefinition of some Emacs function for dealing with +;; Bird Style literate scripts + +(defun haskell-indent-bolp () + "`bolp' but dealing with Bird-style literate scripts." + (or (bolp) + (and (eq haskell-literate 'bird) + (<= (current-column) (1+ haskell-indent-literate-Bird-default-offset)) + (eq (char-after (line-beginning-position)) ?\>)))) + +(defun haskell-indent-empty-line-p () + "Checks if the current line is empty; deals with Bird style scripts." + (save-excursion + (beginning-of-line) + (if (and (eq haskell-literate 'bird) + (eq (following-char) ?\>)) + (forward-char 1)) + (looking-at "[ \t]*$"))) + +(defun haskell-indent-back-to-indentation () + "`back-to-indentation' function but dealing with Bird-style literate scripts." + (if (and (eq haskell-literate 'bird) + (progn (beginning-of-line) (eq (following-char) ?\>))) + (progn + (forward-char 1) + (skip-chars-forward " \t")) + (back-to-indentation))) + +(defun haskell-indent-current-indentation () + "`current-indentation' function dealing with Bird-style literate scripts." + (if (eq haskell-literate 'bird) + (save-excursion + (haskell-indent-back-to-indentation) + (current-column)) + (current-indentation))) + +(defun haskell-indent-backward-to-indentation (n) + "`backward-to-indentation' function dealing with Bird-style literate scripts." + (if (eq haskell-literate 'bird) + (progn + (forward-line (- n)) + (haskell-indent-back-to-indentation)) + (backward-to-indentation n))) + +(defun haskell-indent-forward-line (&optional n) + "`forward-line' function but dealing with Bird-style literate scripts." + (prog1 + (forward-line n) + (if (and (eq haskell-literate 'bird) (eq (following-char) ?\>)) + (progn (forward-char 1) ; skip > and initial blanks... + (skip-chars-forward " \t"))))) + +(defun haskell-indent-line-to (n) + "`indent-line-to' function but dealing with Bird-style literate scripts." + (if (eq haskell-literate 'bird) + (progn + (beginning-of-line) + (if (eq (following-char) ?\>) + (delete-char 1)) + (delete-horizontal-space) ; remove any starting TABs so + (indent-line-to n) ; that indent-line only adds spaces + (save-excursion + (beginning-of-line) + (if (> n 0) (delete-char 1)) ; delete the first space before + (insert ?\>))) ; inserting a > + (indent-line-to n))) + +(defun haskell-indent-skip-blanks-and-newlines-forward (end) + "Skip forward blanks, tabs and newlines until END. +Take account of Bird-style literate scripts." + (skip-chars-forward " \t\n" end) + (if (eq haskell-literate 'bird) + (while (and (bolp) (eq (following-char) ?\>)) + (forward-char 1) ; skip > + (skip-chars-forward " \t\n" end)))) + +(defun haskell-indent-skip-blanks-and-newlines-backward (start) + "Skip backward blanks, tabs and newlines up to START. +Take account of Bird-style literate scripts." + (skip-chars-backward " \t\n" start) + (if (eq haskell-literate 'bird) + (while (and (eq (current-column) 1) + (eq (preceding-char) ?\>)) + (forward-char -1) ; skip back > + (skip-chars-backward " \t\n" start)))) + +;; specific functions for literate code + +(defun haskell-indent-within-literate-code () + "Check if point is within a part of literate Haskell code. +If so, return its start; otherwise return nil: +If it is Bird-style, then return the position of the >; +otherwise return the ending position of \\begin{code}." + (save-excursion + (case haskell-literate + (bird + (beginning-of-line) + (if (or (eq (following-char) ?\>) + (and (bolp) (forward-line -1) (eq (following-char) ?\>))) + (progn + (while (and (zerop (forward-line -1)) + (eq (following-char) ?\>))) + (if (not (eq (following-char) ?\>)) + (forward-line)) + (point)))) + ;; Look for a \begin{code} or \end{code} line. + ((latex tex) + (if (re-search-backward + "^\\(\\\\begin{code}$\\)\\|\\(\\\\end{code}$\\)" nil t) + ;; within a literate code part if it was a \\begin{code}. + (match-end 1))) + (t (error "haskell-indent-within-literate-code: should not happen!"))))) + +(defun haskell-indent-put-region-in-literate (beg end &optional arg) + "Put lines of the region as a piece of literate code. +With prefix arg, remove indication that the region is literate code. +It deals with both Bird style and non Bird-style scripts." + (interactive "r\nP") + (unless haskell-literate + (error "Cannot put a region in literate in a non literate script")) + (if (eq haskell-literate 'bird) + (let ((comment-start "> ") ; Change dynamic bindings for + (comment-start-skip "^> ?") ; comment-region. + (comment-end "") + (comment-end-skip "\n") + (comment-style 'plain)) + (comment-region beg end arg)) + ;; Not Bird style. + (if arg ; Remove the literate indication. + (save-excursion + (goto-char end) ; Remove end. + (if (re-search-backward "^\\\\end{code}[ \t\n]*\\=" + (line-beginning-position -2) t) + (delete-region (point) (line-beginning-position 2))) + (goto-char beg) ; Remove end. + (beginning-of-line) + (if (looking-at "\\\\begin{code}") + (kill-line 1))) + (save-excursion ; Add the literate indication. + (goto-char end) + (unless (bolp) (newline)) + (insert "\\end{code}\n") + (goto-char beg) + (unless (bolp) (newline)) + (insert "\\begin{code}\n"))))) + + ;;; Start of indentation code + +(defcustom haskell-indent-look-past-empty-line t + "If nil, indentation engine will not look past an empty line for layout points." + :group 'haskell-indent + :type 'boolean) + +(defun haskell-indent-start-of-def () + "Return the position of the start of a definition. +The start of a def is expected to be recognizable by starting in column 0, +unless `haskell-indent-look-past-empty-line' is nil, in which case we +take a coarser approximation and stop at the first empty line." + (save-excursion + (let ((start-code (and haskell-literate + (haskell-indent-within-literate-code))) + (top-col (if (eq haskell-literate 'bird) 2 0)) + (save-point (point))) + ;; determine the starting point of the current piece of code + (setq start-code (if start-code (1+ start-code) (point-min))) + ;; go backward until the first preceding empty line + (haskell-indent-forward-line -1) + (while (and (if haskell-indent-look-past-empty-line + (or (> (haskell-indent-current-indentation) top-col) + (haskell-indent-empty-line-p)) + (and (> (haskell-indent-current-indentation) top-col) + (not (haskell-indent-empty-line-p)))) + (> (point) start-code) + (= 0 (haskell-indent-forward-line -1)))) + ;; go forward after the empty line + (if (haskell-indent-empty-line-p) + (haskell-indent-forward-line 1)) + (setq start-code (point)) + ;; find the first line of code which is not a comment + (forward-comment (point-max)) + (if (> (point) save-point) + start-code + (point))))) + +(defun haskell-indent-open-structure (start end) + "If any structure (list or tuple) is not closed, between START and END, +returns the location of the opening symbol, nil otherwise." + (save-excursion + (nth 1 (parse-partial-sexp start end)))) + +(defun haskell-indent-in-string (start end) + "If a string is not closed , between START and END, returns the +location of the opening symbol, nil otherwise." + (save-excursion + (let ((pps (parse-partial-sexp start end))) + (if (nth 3 pps) (nth 8 pps))))) + +(defun haskell-indent-in-comment (start end) + "Check, starting from START, if END is at or within a comment. +Returns the location of the start of the comment, nil otherwise." + (let (pps) + (assert (<= start end)) + (cond ((= start end) nil) + ((nth 4 (save-excursion (setq pps (parse-partial-sexp start end)))) + (nth 8 pps)) + ;; We also want to say that we are *at* the beginning of a comment. + ((and (not (nth 8 pps)) + (>= (point-max) (+ end 2)) + (nth 4 (save-excursion + (setq pps (parse-partial-sexp end (+ end 2)))))) + (nth 8 pps))))) + +(defvar haskell-indent-off-side-keywords-re + "\\<\\(do\\|let\\|of\\|where\\|mdo\\|rec\\)\\>[ \t]*") + +(defun haskell-indent-type-at-point () + "Return the type of the line (also puts information in `match-data')." + (cond + ((haskell-indent-empty-line-p) 'empty) + ((haskell-indent-in-comment (point-min) (point)) 'comment) + ((looking-at "\\(\\([[:alpha:]]\\(\\sw\\|'\\)*\\)\\|_\\)[ \t\n]*") + 'ident) + ((looking-at "\\(|[^|]\\)[ \t\n]*") 'guard) + ((looking-at "\\(=[^>=]\\|::\\|->\\|<-\\)[ \t\n]*") 'rhs) + (t 'other))) + +(defvar haskell-indent-current-line-first-ident "" + "Global variable that keeps track of the first ident of the line to indent.") + + +(defun haskell-indent-contour-line (start end) + "Generate contour information between START and END points." + (if (< start end) + (save-excursion + (goto-char end) + (haskell-indent-skip-blanks-and-newlines-backward start) + (let ((cur-col (current-column)) ; maximum column number + (fl 0) ; number of lines that forward-line could not advance + contour) + (while (and (> cur-col 0) (= fl 0) (>= (point) start)) + (haskell-indent-back-to-indentation) + (if (< (point) start) (goto-char start)) + (and (not (member (haskell-indent-type-at-point) + '(empty comment))) ; skip empty and comment lines + (< (current-column) cur-col) ; less indented column found + (push (point) contour) ; new contour point found + (setq cur-col (current-column))) + (setq fl (haskell-indent-forward-line -1))) + contour)))) + +(defun haskell-indent-next-symbol (end) + "Move point to the next symbol." + (skip-syntax-forward ")" end) + (if (< (point) end) + (progn + (forward-sexp 1) + (haskell-indent-skip-blanks-and-newlines-forward end)))) + +(defun haskell-indent-next-symbol-safe (end) + "Puts point to the next following symbol, or to end if there are no more symbols in the sexp." + (condition-case errlist (haskell-indent-next-symbol end) + (error (goto-char end)))) + +(defun haskell-indent-separate-valdef (start end) + "Return a list of positions for important parts of a valdef." + (save-excursion + (let (valname valname-string aft-valname + guard aft-guard + rhs-sign aft-rhs-sign + type) + ;; "parse" a valdef separating important parts + (goto-char start) + (setq type (haskell-indent-type-at-point)) + (if (or (memq type '(ident other))) ; possible start of a value def + (progn + (if (eq type 'ident) + (progn + (setq valname (match-beginning 0)) + (setq valname-string (match-string 0)) + (goto-char (match-end 0))) + (skip-chars-forward " \t" end) + (setq valname (point)) ; type = other + (haskell-indent-next-symbol-safe end)) + (while (and (< (point) end) + (setq type (haskell-indent-type-at-point)) + (or (memq type '(ident other)))) + (if (null aft-valname) + (setq aft-valname (point))) + (haskell-indent-next-symbol-safe end)))) + (if (and (< (point) end) (eq type 'guard)) ; start of a guard + (progn + (setq guard (match-beginning 0)) + (goto-char (match-end 0)) + (while (and (< (point) end) + (setq type (haskell-indent-type-at-point)) + (not (eq type 'rhs))) + (if (null aft-guard) + (setq aft-guard (point))) + (haskell-indent-next-symbol-safe end)))) + (if (and (< (point) end) (eq type 'rhs)) ; start of a rhs + (progn + (setq rhs-sign (match-beginning 0)) + (goto-char (match-end 0)) + (if (< (point) end) + (setq aft-rhs-sign (point))))) + (list valname valname-string aft-valname + guard aft-guard rhs-sign aft-rhs-sign)))) + +(defsubst haskell-indent-no-otherwise (guard) + "Check if there is no otherwise at GUARD." + (save-excursion + (goto-char guard) + (not (looking-at "|[ \t]*otherwise\\>")))) + + +(defun haskell-indent-guard (start end end-visible indent-info) + "Find indentation information for a line starting with a guard." + (save-excursion + (let* ((haskell-indent-info indent-info) + (sep (haskell-indent-separate-valdef start end)) + (valname (nth 0 sep)) + (guard (nth 3 sep)) + (rhs-sign (nth 5 sep))) + ;; push information indentation for the visible part + (if (and guard (< guard end-visible) (haskell-indent-no-otherwise guard)) + (haskell-indent-push-pos guard) + (if rhs-sign + (haskell-indent-push-pos rhs-sign) ; probably within a data definition... + (if valname + (haskell-indent-push-pos-offset valname)))) + haskell-indent-info))) + +(defun haskell-indent-rhs (start end end-visible indent-info) + "Find indentation information for a line starting with a rhs." + (save-excursion + (let* ((haskell-indent-info indent-info) + (sep (haskell-indent-separate-valdef start end)) + (valname (nth 0 sep)) + (guard (nth 3 sep)) + (rhs-sign (nth 5 sep))) + ;; push information indentation for the visible part + (if (and rhs-sign (< rhs-sign end-visible)) + (haskell-indent-push-pos rhs-sign) + (if (and guard (< guard end-visible)) + (haskell-indent-push-pos-offset guard) + (if valname ; always visible !! + (haskell-indent-push-pos-offset valname)))) + haskell-indent-info))) + +(defconst haskell-indent-decision-table + (let ((or "\\)\\|\\(")) + (concat "\\(" + "1.1.11" or ; 1= vn gd rh arh + "1.1.10" or ; 2= vn gd rh + "1.1100" or ; 3= vn gd agd + "1.1000" or ; 4= vn gd + "1.0011" or ; 5= vn rh arh + "1.0010" or ; 6= vn rh + "110000" or ; 7= vn avn + "100000" or ; 8= vn + "001.11" or ; 9= gd rh arh + "001.10" or ;10= gd rh + "001100" or ;11= gd agd + "001000" or ;12= gd + "000011" or ;13= rh arh + "000010" or ;14= rh + "000000" ;15= + "\\)"))) + +(defun haskell-indent-find-case (test) + "Find the index that matches TEST in the decision table." + (if (string-match haskell-indent-decision-table test) + ;; use the fact that the resulting match-data is a list of the form + ;; (0 6 [2*(n-1) nil] 0 6) where n is the number of the matching regexp + ;; so n= ((length match-data)/2)-1 + (- (/ (length (match-data 'integers)) 2) 1) + (error "haskell-indent-find-case: impossible case: %s" test))) + +(defun haskell-indent-empty (start end end-visible indent-info) + "Find indentation points for an empty line." + (save-excursion + (let* ((haskell-indent-info indent-info) + (sep (haskell-indent-separate-valdef start end)) + (valname (pop sep)) + (valname-string (pop sep)) + (aft-valname (pop sep)) + (guard (pop sep)) + (aft-guard (pop sep)) + (rhs-sign (pop sep)) + (aft-rhs-sign (pop sep)) + (last-line (= end end-visible)) + (test (string + (if valname ?1 ?0) + (if (and aft-valname (< aft-valname end-visible)) ?1 ?0) + (if (and guard (< guard end-visible)) ?1 ?0) + (if (and aft-guard (< aft-guard end-visible)) ?1 ?0) + (if (and rhs-sign (< rhs-sign end-visible)) ?1 ?0) + (if (and aft-rhs-sign (< aft-rhs-sign end-visible)) ?1 ?0)))) + (if (and valname-string ; special case for start keywords + (string-match haskell-indent-start-keywords-re valname-string)) + (progn + (haskell-indent-push-pos valname) + ;; very special for data keyword + (if (string-match "\\" valname-string) + (if rhs-sign (haskell-indent-push-pos rhs-sign) + (haskell-indent-push-pos-offset valname)) + (haskell-indent-push-pos-offset valname))) + (case ; general case + (haskell-indent-find-case test) + ;; "1.1.11" 1= vn gd rh arh + (1 (haskell-indent-push-pos valname) + (haskell-indent-push-pos valname valname-string) + (if (haskell-indent-no-otherwise guard) (haskell-indent-push-pos guard "| ")) + (haskell-indent-push-pos aft-rhs-sign)) + ;; "1.1.10" 2= vn gd rh + (2 (haskell-indent-push-pos valname) + (haskell-indent-push-pos valname valname-string) + (if last-line + (haskell-indent-push-pos-offset guard) + (if (haskell-indent-no-otherwise guard) (haskell-indent-push-pos guard "| ")))) + ;; "1.1100" 3= vn gd agd + (3 (haskell-indent-push-pos valname) + (haskell-indent-push-pos aft-guard) + (if last-line (haskell-indent-push-pos-offset valname))) + ;; "1.1000" 4= vn gd + (4 (haskell-indent-push-pos valname) + (if last-line (haskell-indent-push-pos-offset guard 2))) + ;; "1.0011" 5= vn rh arh + (5 (haskell-indent-push-pos valname) + (if (or (and aft-valname (= (char-after rhs-sign) ?\=)) + (= (char-after rhs-sign) ?\:)) + (haskell-indent-push-pos valname valname-string)) + (haskell-indent-push-pos aft-rhs-sign)) + ;; "1.0010" 6= vn rh + (6 (haskell-indent-push-pos valname) + (haskell-indent-push-pos valname valname-string) + (if last-line (haskell-indent-push-pos-offset valname))) + ;; "110000" 7= vn avn + (7 (haskell-indent-push-pos valname) + (if last-line + (haskell-indent-push-pos aft-valname) + (haskell-indent-push-pos valname valname-string))) + ;; "100000" 8= vn + (8 (haskell-indent-push-pos valname)) + ;; "001.11" 9= gd rh arh + (9 (if (haskell-indent-no-otherwise guard) (haskell-indent-push-pos guard "| ")) + (haskell-indent-push-pos aft-rhs-sign)) + ;; "001.10" 10= gd rh + (10 (if (haskell-indent-no-otherwise guard) (haskell-indent-push-pos guard "| ")) + (if last-line (haskell-indent-push-pos-offset guard))) + ;; "001100" 11= gd agd + (11 (if (haskell-indent-no-otherwise guard) (haskell-indent-push-pos guard "| ")) + (haskell-indent-push-pos aft-guard)) + ;; "001000" 12= gd + (12 (if (haskell-indent-no-otherwise guard) (haskell-indent-push-pos guard "| ")) + (if last-line (haskell-indent-push-pos-offset guard 2))) + ;; "000011" 13= rh arh + (13 (haskell-indent-push-pos aft-rhs-sign)) + ;; "000010" 14= rh + (14 (if last-line (haskell-indent-push-pos-offset rhs-sign 2 ))) + ;; "000000" 15= + (t (error "haskell-indent-empty: %s impossible case" test )))) + haskell-indent-info))) + +(defun haskell-indent-ident (start end end-visible indent-info) + "Find indentation points for a line starting with an identifier." + (save-excursion + (let* + ((haskell-indent-info indent-info) + (sep (haskell-indent-separate-valdef start end)) + (valname (pop sep)) + (valname-string (pop sep)) + (aft-valname (pop sep)) + (guard (pop sep)) + (aft-guard (pop sep)) + (rhs-sign (pop sep)) + (aft-rhs-sign (pop sep)) + (last-line (= end end-visible)) + (is-where + (string-match "where[ \t]*" haskell-indent-current-line-first-ident)) + (diff-first ; not a function def with the same name + (or (null valname-string) + (not (string= (haskell-trim valname-string) + (haskell-trim haskell-indent-current-line-first-ident))))) + + ;; (is-type-def + ;; (and rhs-sign (eq (char-after rhs-sign) ?\:))) + (test (string + (if valname ?1 ?0) + (if (and aft-valname (< aft-valname end-visible)) ?1 ?0) + (if (and guard (< guard end-visible)) ?1 ?0) + (if (and aft-guard (< aft-guard end-visible)) ?1 ?0) + (if (and rhs-sign (< rhs-sign end-visible)) ?1 ?0) + (if (and aft-rhs-sign (< aft-rhs-sign end-visible)) ?1 ?0)))) + (if (and valname-string ; special case for start keywords + (string-match haskell-indent-start-keywords-re valname-string)) + (progn + (haskell-indent-push-pos valname) + (if (string-match "\\" valname-string) + ;; very special for data keyword + (if aft-rhs-sign (haskell-indent-push-pos aft-rhs-sign) + (haskell-indent-push-pos-offset valname)) + (if (not (string-match + haskell-indent-start-keywords-re + haskell-indent-current-line-first-ident)) + (haskell-indent-push-pos-offset valname)))) + (if (string= haskell-indent-current-line-first-ident "::") + (if valname (haskell-indent-push-pos valname)) + (case ; general case + (haskell-indent-find-case test) + ;; "1.1.11" 1= vn gd rh arh + (1 (if is-where + (haskell-indent-push-pos guard) + (haskell-indent-push-pos valname) + (if diff-first (haskell-indent-push-pos aft-rhs-sign)))) + ;; "1.1.10" 2= vn gd rh + (2 (if is-where + (haskell-indent-push-pos guard) + (haskell-indent-push-pos valname) + (if last-line + (haskell-indent-push-pos-offset guard)))) + ;; "1.1100" 3= vn gd agd + (3 (if is-where + (haskell-indent-push-pos-offset guard) + (haskell-indent-push-pos valname) + (if diff-first + (haskell-indent-push-pos aft-guard)))) + ;; "1.1000" 4= vn gd + (4 (if is-where + (haskell-indent-push-pos guard) + (haskell-indent-push-pos valname) + (if last-line + (haskell-indent-push-pos-offset guard 2)))) + ;; "1.0011" 5= vn rh arh + (5 (if is-where + (haskell-indent-push-pos-offset valname) + (haskell-indent-push-pos valname) + (if diff-first + (haskell-indent-push-pos aft-rhs-sign)))) + ;; "1.0010" 6= vn rh + (6 (if is-where + (haskell-indent-push-pos-offset valname) + (haskell-indent-push-pos valname) + (if last-line + (haskell-indent-push-pos-offset valname)))) + ;; "110000" 7= vn avn + (7 (if is-where + (haskell-indent-push-pos-offset valname) + (haskell-indent-push-pos valname) + (if last-line + (haskell-indent-push-pos aft-valname)))) + ;; "100000" 8= vn + (8 (if is-where + (haskell-indent-push-pos-offset valname) + (haskell-indent-push-pos valname))) + ;; "001.11" 9= gd rh arh + (9 (if is-where + (haskell-indent-push-pos guard) + (haskell-indent-push-pos aft-rhs-sign))) + ;; "001.10" 10= gd rh + (10 (if is-where + (haskell-indent-push-pos guard) + (if last-line + (haskell-indent-push-pos-offset guard)))) + ;; "001100" 11= gd agd + (11 (if is-where + (haskell-indent-push-pos guard) + (if (haskell-indent-no-otherwise guard) + (haskell-indent-push-pos aft-guard)))) + ;; "001000" 12= gd + (12 (if last-line (haskell-indent-push-pos-offset guard 2))) + ;; "000011" 13= rh arh + (13 (haskell-indent-push-pos aft-rhs-sign)) + ;; "000010" 14= rh + (14 (if last-line (haskell-indent-push-pos-offset rhs-sign 2))) + ;; "000000" 15= + (t (error "haskell-indent-ident: %s impossible case" test ))))) + haskell-indent-info))) + +(defun haskell-indent-other (start end end-visible indent-info) + "Find indentation points for a non-empty line starting with something other +than an identifier, a guard or rhs." + (save-excursion + (let* ((haskell-indent-info indent-info) + (sep (haskell-indent-separate-valdef start end)) + (valname (pop sep)) + (valname-string (pop sep)) + (aft-valname (pop sep)) + (guard (pop sep)) + (aft-guard (pop sep)) + (rhs-sign (pop sep)) + (aft-rhs-sign (pop sep)) + (last-line (= end end-visible)) + (test (string + (if valname ?1 ?0) + (if (and aft-valname (< aft-valname end-visible)) ?1 ?0) + (if (and guard (< guard end-visible)) ?1 ?0) + (if (and aft-guard (< aft-guard end-visible)) ?1 ?0) + (if (and rhs-sign (< rhs-sign end-visible)) ?1 ?0) + (if (and aft-rhs-sign (< aft-rhs-sign end-visible)) ?1 ?0)))) + (if (and valname-string ; special case for start keywords + (string-match haskell-indent-start-keywords-re valname-string)) + (haskell-indent-push-pos-offset valname) + (case ; general case + (haskell-indent-find-case test) + ;; "1.1.11" 1= vn gd rh arh + (1 (haskell-indent-push-pos aft-rhs-sign)) + ;; "1.1.10" 2= vn gd rh + (2 (if last-line + (haskell-indent-push-pos-offset guard) + (haskell-indent-push-pos-offset rhs-sign 2))) + ;; "1.1100" 3= vn gd agd + (3 (haskell-indent-push-pos aft-guard)) + ;; "1.1000" 4= vn gd + (4 (haskell-indent-push-pos-offset guard 2)) + ;; "1.0011" 5= vn rh arh + (5 (haskell-indent-push-pos valname) + (haskell-indent-push-pos aft-rhs-sign)) + ;; "1.0010" 6= vn rh + (6 (if last-line + (haskell-indent-push-pos-offset valname) + (haskell-indent-push-pos-offset rhs-sign 2))) + ;; "110000" 7= vn avn + (7 (haskell-indent-push-pos-offset aft-valname)) + ;; "100000" 8= vn + (8 (haskell-indent-push-pos valname)) + ;; "001.11" 9= gd rh arh + (9 (haskell-indent-push-pos aft-rhs-sign)) + ;; "001.10" 10= gd rh + (10 (if last-line + (haskell-indent-push-pos-offset guard) + (haskell-indent-push-pos-offset rhs-sign 2))) + ;; "001100" 11= gd agd + (11 (if (haskell-indent-no-otherwise guard) + (haskell-indent-push-pos aft-guard))) + ;; "001000" 12= gd + (12 (if last-line (haskell-indent-push-pos-offset guard 2))) + ;; "000011" 13= rh arh + (13 (haskell-indent-push-pos aft-rhs-sign)) + ;; "000010" 14= rh + (14 (if last-line (haskell-indent-push-pos-offset rhs-sign 2))) + ;; "000000" 15= + (t (error "haskell-indent-other: %s impossible case" test )))) + haskell-indent-info))) + +(defun haskell-indent-valdef-indentation (start end end-visible curr-line-type + indent-info) + "Find indentation information for a value definition." + (let ((haskell-indent-info indent-info)) + (if (< start end-visible) + (case curr-line-type + (empty (haskell-indent-empty start end end-visible indent-info)) + (ident (haskell-indent-ident start end end-visible indent-info)) + (guard (haskell-indent-guard start end end-visible indent-info)) + (rhs (haskell-indent-rhs start end end-visible indent-info)) + (comment (error "Comment indent should never happen")) + (other (haskell-indent-other start end end-visible indent-info))) + haskell-indent-info))) + +(defun haskell-indent-line-indentation (line-start line-end end-visible + curr-line-type indent-info) + "Compute indentation info between LINE-START and END-VISIBLE. +Separate a line of program into valdefs between offside keywords +and find indentation info for each part." + (save-excursion + ;; point is (already) at line-start + (assert (eq (point) line-start)) + (let ((haskell-indent-info indent-info) + (start (or (haskell-indent-in-comment line-start line-end) + (haskell-indent-in-string line-start line-end)))) + (if start ; if comment at the end + (setq line-end start)) ; end line before it + ;; loop on all parts separated by off-side-keywords + (while (and (re-search-forward haskell-indent-off-side-keywords-re + line-end t) + (not (or (haskell-indent-in-comment line-start (point)) + (haskell-indent-in-string line-start (point))))) + (let ((beg-match (match-beginning 0)) ; save beginning of match + (end-match (match-end 0))) ; save end of match + ;; Do not try to find indentation points if off-side-keyword at + ;; the start... + (if (or (< line-start beg-match) + ;; Actually, if we're looking at a "let" inside a "do", we + ;; should add the corresponding indentation point. + (eq (char-after beg-match) ?l)) + (setq haskell-indent-info + (haskell-indent-valdef-indentation line-start beg-match + end-visible + curr-line-type + haskell-indent-info))) + ;; ...but keep the start of the line if keyword alone on the line + (if (= line-end end-match) + (haskell-indent-push-pos beg-match)) + (setq line-start end-match) + (goto-char line-start))) + (haskell-indent-valdef-indentation line-start line-end end-visible + curr-line-type haskell-indent-info)))) + + +(defun haskell-indent-layout-indent-info (start contour-line) + (let ((haskell-indent-info nil) + (curr-line-type (haskell-indent-type-at-point)) + line-start line-end end-visible) + (save-excursion + (if (eq curr-line-type 'ident) + (let ; guess the type of line + ((sep + (haskell-indent-separate-valdef + (point) (line-end-position)))) + ;; if the first ident is where or the start of a def + ;; keep it in a global variable + (setq haskell-indent-current-line-first-ident + (if (string-match "where[ \t]*" (nth 1 sep)) + (nth 1 sep) + (if (nth 5 sep) ; is there a rhs-sign + (if (= (char-after (nth 5 sep)) ?\:) ;is it a typdef + "::" (nth 1 sep)) + ""))))) + (while contour-line ; explore the contour points + (setq line-start (pop contour-line)) + (goto-char line-start) + (setq line-end (line-end-position)) + (setq end-visible ; visible until the column of the + (if contour-line ; next contour point + (save-excursion + (move-to-column + (haskell-indent-point-to-col (car contour-line))) + (point)) + line-end)) + (unless (or (haskell-indent-open-structure start line-start) + (haskell-indent-in-comment start line-start)) + (setq haskell-indent-info + (haskell-indent-line-indentation line-start line-end + end-visible curr-line-type + haskell-indent-info))))) + haskell-indent-info)) + +(defun haskell-indent-find-matching-start (regexp limit &optional pred start) + (let ((open (haskell-indent-open-structure limit (point)))) + (if open (setq limit (1+ open)))) + (unless start (setq start (point))) + (when (re-search-backward regexp limit t) + (let ((nestedcase (match-end 1)) + (outer (or (haskell-indent-in-string limit (point)) + (haskell-indent-in-comment limit (point)) + (haskell-indent-open-structure limit (point)) + (if (and pred (funcall pred start)) (point))))) + (cond + (outer + (goto-char outer) + (haskell-indent-find-matching-start regexp limit pred start)) + (nestedcase + ;; Nested case. + (and (haskell-indent-find-matching-start regexp limit pred) + (haskell-indent-find-matching-start regexp limit pred start))) + (t (point)))))) + +(defun haskell-indent-filter-let-no-in (start) + "Return non-nil if point is in front of a `let' that has no `in'. +START is the position of the presumed `in'." + ;; We're looking at either `in' or `let'. + (when (looking-at "let") + (ignore-errors + (save-excursion + (forward-word 1) + (forward-comment (point-max)) + (if (looking-at "{") + (progn + (forward-sexp 1) + (forward-comment (point-max)) + (< (point) start)) + ;; Use the layout rule to see whether this let is already closed + ;; without an `in'. + (let ((col (current-column))) + (while (progn (forward-line 1) (haskell-indent-back-to-indentation) + (< (point) start)) + (when (< (current-column) col) + (setq col nil) + (goto-char start))) + (null col))))))) + +(defun haskell-indent-comment (open start) + "Compute indent info for comments and text inside comments. +OPEN is the start position of the comment in which point is." + ;; Ideally we'd want to guess whether it's commented out code or + ;; whether it's text. Instead, we'll assume it's text. + (save-excursion + (if (= open (point)) + ;; We're actually just in front of a comment: align with following + ;; code or with comment on previous line. + (let ((prev-line-info + (cond + ((eq (char-after) ?\{) nil) ;Align as if it were code. + ((and (forward-comment -1) + (> (line-beginning-position 3) open)) + ;; We're after another comment and there's no empty line + ;; between us. + (list (list (haskell-indent-point-to-col (point))))) + (t nil)))) ;Else align as if it were code + ;; Align with following code. + (forward-comment (point-max)) + ;; There are several possible indentation points for this code-line, + ;; but the only valid indentation point for the comment is the one + ;; that the user will select for the code-line. Obviously we can't + ;; know that, so we just assume that the code-line is already at its + ;; proper place. + ;; Strictly speaking "assume it's at its proper place" would mean + ;; we'd just use (current-column), but since this is using info from + ;; lines further down and it's common to reindent line-by-line, + ;; we'll align not with the current indentation, but with the + ;; one that auto-indentation "will" select. + (append + prev-line-info + (let ((indent-info (save-excursion + (haskell-indent-indentation-info start))) + (col (current-column))) + ;; Sort the indent-info so that the current indentation comes + ;; out first. + (setq indent-info + (sort indent-info + (lambda (x y) + (<= (abs (- col (car x))) (abs (- col (car y))))))) + indent-info))) + + ;; We really are inside a comment. + (if (looking-at "-}") + (progn + (forward-char 2) + (forward-comment -1) + (list (list (1+ (haskell-indent-point-to-col (point)))))) + (let ((offset (if (looking-at "--?") + (- (match-beginning 0) (match-end 0))))) + (forward-line -1) ;Go to previous line. + (haskell-indent-back-to-indentation) + (if (< (point) start) (goto-char start)) + + (list (list (if (looking-at comment-start-skip) + (if offset + (+ 2 offset (haskell-indent-point-to-col (point))) + (haskell-indent-point-to-col (match-end 0))) + (haskell-indent-point-to-col (point)))))))))) + +(defcustom haskell-indent-thenelse 0 + "If non-nil, \"then\" and \"else\" are indented. +This is necessary in the \"do\" layout under Haskell-98. +See http://hackage.haskell.org/trac/haskell-prime/wiki/DoAndIfThenElse" + :group 'haskell-indent + :type 'integer) + +(defun haskell-indent-closing-keyword (start) + (let ((open (save-excursion + (haskell-indent-find-matching-start + (case (char-after) + (?i "\\<\\(?:\\(in\\)\\|let\\)\\>") + (?o "\\<\\(?:\\(of\\)\\|case\\)\\>") + (?t "\\<\\(?:\\(then\\)\\|if\\)\\>") + (?e "\\<\\(?:\\(else\\)\\|if\\)\\>")) + start + (if (eq (char-after) ?i) + ;; Filter out the `let's that have no `in'. + 'haskell-indent-filter-let-no-in))))) + ;; For a "hanging let/case/if at EOL" we should use a different + ;; indentation scheme. + (save-excursion + (goto-char open) + (if (haskell-indent-hanging-p) + (setq open (haskell-indent-virtual-indentation start)))) + ;; FIXME: we should try and figure out if the `if' is in a `do' layout + ;; before using haskell-indent-thenelse. + (list (list (+ (if (memq (char-after) '(?t ?e)) haskell-indent-thenelse 0) + (haskell-indent-point-to-col open)))))) + +(defcustom haskell-indent-after-keywords + '(("where" 2 0) + ("of" 2) + ("do" 2) + ("mdo" 2) + ("rec" 2) + ("in" 2 0) + ("{" 2) + "if" + "then" + "else" + "let") + "Keywords after which indentation should be indented by some offset. +Each keyword info can have the following forms: + + KEYWORD | (KEYWORD OFFSET [OFFSET-HANGING]) + +If absent OFFSET-HANGING defaults to OFFSET. +If absent OFFSET defaults to `haskell-indent-offset'. + +OFFSET-HANGING is the offset to use in the case where the keyword +is at the end of an otherwise-non-empty line." + :group 'haskell-indent + :type '(repeat (choice string + (cons :tag "" (string :tag "keyword:") + (cons :tag "" (integer :tag "offset") + (choice (const nil) + (list :tag "" + (integer :tag "offset-pending")))))))) + +(defun haskell-indent-skip-lexeme-forward () + (and (zerop (skip-syntax-forward "w")) + (skip-syntax-forward "_") + (skip-syntax-forward "(") + (skip-syntax-forward ")"))) + +(defvar haskell-indent-inhibit-after-offset nil) + +(defun haskell-indent-offset-after-info () + "Return the info from `haskell-indent-after-keywords' for keyword at point." + (let ((id (buffer-substring + (point) + (save-excursion + (haskell-indent-skip-lexeme-forward) + (point))))) + (or (assoc id haskell-indent-after-keywords) + (car (member id haskell-indent-after-keywords))))) + +(defcustom haskell-indent-dont-hang '("(") + "Lexemes that should never be considered as hanging." + :group 'haskell-indent + :type '(repeat string)) + +(defun haskell-indent-hanging-p () + ;; A Hanging keyword is one that's at the end of a line except it's not at + ;; the beginning of a line. + (not (or (= (current-column) (haskell-indent-current-indentation)) + (save-excursion + (let ((lexeme + (buffer-substring + (point) + (progn (haskell-indent-skip-lexeme-forward) (point))))) + (or (member lexeme haskell-indent-dont-hang) + (> (line-end-position) + (progn (forward-comment (point-max)) (point))))))))) + +(defun haskell-indent-after-keyword-column (offset-info start &optional default) + (unless offset-info + (setq offset-info (haskell-indent-offset-after-info))) + (unless default (setq default haskell-indent-offset)) + (setq offset-info + (if haskell-indent-inhibit-after-offset '(0) (cdr-safe offset-info))) + (if (not (haskell-indent-hanging-p)) + (haskell-indent-column+offset (current-column) + (or (car offset-info) default)) + ;; The keyword is hanging at the end of the line. + (haskell-indent-column+offset + (haskell-indent-virtual-indentation start) + (or (cadr offset-info) (car offset-info) default)))) + +(defun haskell-indent-inside-paren (open) + ;; there is an open structure to complete + (if (looking-at "\\s)\\|[;,]") + ;; A close-paren or a , or ; can only correspond syntactically to + ;; the open-paren at `open'. So there is no ambiguity. + (progn + (if (or (and (eq (char-after) ?\;) (eq (char-after open) ?\()) + (and (eq (char-after) ?\,) (eq (char-after open) ?\{))) + (message "Mismatched punctuation: `%c' in %c...%c" + (char-after) (char-after open) + (if (eq (char-after open) ?\() ?\) ?\}))) + (save-excursion + (goto-char open) + (list (list + (if (haskell-indent-hanging-p) + (haskell-indent-virtual-indentation nil) + (haskell-indent-point-to-col open)))))) + ;; There might still be layout within the open structure. + (let* ((end (point)) + (basic-indent-info + ;; Anything else than a ) is subject to layout. + (if (looking-at "\\s.\\|\\$ ") + (haskell-indent-point-to-col open) ; align a punct with ( + (let ((follow (save-excursion + (goto-char (1+ open)) + (haskell-indent-skip-blanks-and-newlines-forward end) + (point)))) + (if (= follow end) + (save-excursion + (goto-char open) + (haskell-indent-after-keyword-column nil nil 1)) + (haskell-indent-point-to-col follow))))) + (open-column (haskell-indent-point-to-col open)) + (contour-line (haskell-indent-contour-line (1+ open) end))) + (if (null contour-line) + (list (list basic-indent-info)) + (let ((indent-info + (haskell-indent-layout-indent-info + (1+ open) contour-line))) + ;; Fix up indent info. + (let ((base-elem (assoc open-column indent-info))) + (if base-elem + (progn (setcar base-elem basic-indent-info) + (setcdr base-elem nil)) + (setq indent-info + (append indent-info (list (list basic-indent-info))))) + indent-info)))))) + +(defun haskell-indent-virtual-indentation (start) + "Compute the \"virtual indentation\" of text at point. +The \"virtual indentation\" is the indentation that text at point would have +had, if it had been placed on its own line." + (let ((col (current-column)) + (haskell-indent-inhibit-after-offset (haskell-indent-hanging-p))) + (if (save-excursion (skip-chars-backward " \t") (bolp)) + ;; If the text is indeed on its own line, than the virtual indent is + ;; the current indentation. + col + ;; Else, compute the indentation that it would have had. + (let ((info (haskell-indent-indentation-info start)) + (max -1)) + ;; `info' is a list of possible indent points. Each indent point is + ;; assumed to correspond to a different parse. So we need to find + ;; the parse that corresponds to the case at hand (where there's no + ;; line break), which is assumed to always be the + ;; deepest indentation. + (dolist (x info) + (setq x (car x)) + ;; Sometimes `info' includes the current indentation (or yet + ;; deeper) by mistake, because haskell-indent-indentation-info + ;; wasn't designed to be called on a piece of text that is not at + ;; BOL. So ignore points past `col'. + (if (and (> x max) (not (>= x col))) + (setq max x))) + ;; In case all the indent points are past `col', just use `col'. + (if (>= max 0) max col))))) + +(defun haskell-indent-indentation-info (&optional start) + "Return a list of possible indentations for the current line. +These are then used by `haskell-indent-cycle'. +START if non-nil is a presumed start pos of the current definition." + (unless start (setq start (haskell-indent-start-of-def))) + (let (open contour-line) + (cond + ;; in string? + ((setq open (haskell-indent-in-string start (point))) + (list (list (+ (haskell-indent-point-to-col open) + (if (looking-at "\\\\") 0 1))))) + + ;; in comment ? + ((setq open (haskell-indent-in-comment start (point))) + (haskell-indent-comment open start)) + + ;; Closing the declaration part of a `let' or the test exp part of a case. + ((looking-at "\\(?:in\\|of\\|then\\|else\\)\\>") + (haskell-indent-closing-keyword start)) + + ;; Right after a special keyword. + ((save-excursion + (forward-comment (- (point-max))) + (when (and (not (zerop (skip-syntax-backward "w"))) + (setq open (haskell-indent-offset-after-info))) + (list (list (haskell-indent-after-keyword-column open start)))))) + + ;; open structure? ie ( { [ + ((setq open (haskell-indent-open-structure start (point))) + (haskell-indent-inside-paren open)) + + ;; full indentation + ((setq contour-line (haskell-indent-contour-line start (point))) + (haskell-indent-layout-indent-info start contour-line)) + + (t + ;; simple contour just one indentation at start + (list (list (if (and (eq haskell-literate 'bird) + (eq (haskell-indent-point-to-col start) 1)) + ;; for a Bird style literate script put default offset + ;; in the case of no indentation + (1+ haskell-indent-literate-Bird-default-offset) + (haskell-indent-point-to-col start)))))))) + +(defvar haskell-indent-last-info nil) + + +(defun haskell-indent-cycle () + "Indentation cycle. +We stay in the cycle as long as the TAB key is pressed." + (interactive "*") + (if (and haskell-literate + (not (haskell-indent-within-literate-code))) + ;; use the ordinary tab for text... + (funcall (default-value 'indent-line-function)) + (let ((marker (if (> (current-column) (haskell-indent-current-indentation)) + (point-marker))) + (bol (progn (beginning-of-line) (point)))) + (haskell-indent-back-to-indentation) + (unless (and (eq last-command this-command) + (eq bol (car haskell-indent-last-info))) + (save-excursion + (setq haskell-indent-last-info + (list bol (haskell-indent-indentation-info) 0 0)))) + + (let* ((il (nth 1 haskell-indent-last-info)) + (index (nth 2 haskell-indent-last-info)) + (last-insert-length (nth 3 haskell-indent-last-info)) + (indent-info (nth index il))) + + (haskell-indent-line-to (car indent-info)) ; insert indentation + (delete-char last-insert-length) + (setq last-insert-length 0) + (let ((text (cdr indent-info))) + (if text + (progn + (insert text) + (setq last-insert-length (length text))))) + + (setq haskell-indent-last-info + (list bol il (% (1+ index) (length il)) last-insert-length)) + + (if (= (length il) 1) + (message "Sole indentation") + (message "Indent cycle (%d)..." (length il))) + + (if marker + (goto-char (marker-position marker))))))) + +(defun haskell-indent-region (start end) + (error "Auto-reindentation of a region is not supported")) + +;;; alignment functions + +(defun haskell-indent-shift-columns (dest-column region-stack) + "Shift columns in REGION-STACK to go to DEST-COLUMN. +Elements of the stack are pairs of points giving the start and end +of the regions to move." + (let (reg col diffcol reg-end) + (while (setq reg (pop region-stack)) + (setq reg-end (copy-marker (cdr reg))) + (goto-char (car reg)) + (setq col (current-column)) + (setq diffcol (- dest-column col)) + (if (not (zerop diffcol)) + (catch 'end-of-buffer + (while (<= (point) (marker-position reg-end)) + (if (< diffcol 0) + (backward-delete-char-untabify (- diffcol) nil) + (insert-char ?\ diffcol)) + (end-of-line 2) ; should be (forward-line 1) + (if (eobp) ; but it adds line at the end... + (throw 'end-of-buffer nil)) + (move-to-column col))))))) + +(defun haskell-indent-align-def (p-arg type) + "Align guards or rhs within the current definition before point. +If P-ARG is t align all defs up to the mark. +TYPE is either 'guard or 'rhs." + (save-excursion + (let (start-block end-block + (maxcol (if (eq type 'rhs) haskell-indent-rhs-align-column 0)) + contour sep defname defnamepos + defcol pos lastpos + regstack eqns-start start-found) + ;; find the starting and ending boundary points for alignment + (if p-arg + (if (mark) ; aligning everything in the region + (progn + (when (> (mark) (point)) (exchange-point-and-mark)) + (setq start-block + (save-excursion + (goto-char (mark)) + (line-beginning-position))) + (setq end-block + (progn (if (haskell-indent-bolp) + (haskell-indent-forward-line -1)) + (line-end-position)))) + (error "The mark is not set for aligning definitions")) + ;; aligning the current definition + (setq start-block (haskell-indent-start-of-def)) + (setq end-block (line-end-position))) + ;; find the start of the current valdef using the contour line + ;; in reverse order because we need the nearest one from the end + (setq contour + (reverse (haskell-indent-contour-line start-block end-block))) + (setq pos (car contour)) ; keep the start of the first contour + ;; find the nearest start of a definition + (while (and (not defname) contour) + (goto-char (pop contour)) + (if (haskell-indent-open-structure start-block (point)) + nil + (setq sep (haskell-indent-separate-valdef (point) end-block)) + (if (nth 5 sep) ; is there a rhs? + (progn (setq defnamepos (nth 0 sep)) + (setq defname (nth 1 sep)))))) + ;; start building the region stack + (if defnamepos + (progn ; there is a valdef + ;; find the start of each equation or guard + (if p-arg ; when indenting a region + ;; accept any start of id or pattern as def name + (setq defname "\\<\\|(")) + (setq defcol (haskell-indent-point-to-col defnamepos)) + (goto-char pos) + (setq end-block (line-end-position)) + (catch 'top-of-buffer + (while (and (not start-found) + (>= (point) start-block)) + (if (<= (haskell-indent-current-indentation) defcol) + (progn + (move-to-column defcol) + (if (and (looking-at defname) ; start of equation + (not (haskell-indent-open-structure start-block (point)))) + (push (cons (point) 'eqn) eqns-start) + ;; found a less indented point not starting an equation + (setq start-found t))) + ;; more indented line + (haskell-indent-back-to-indentation) + (if (and (eq (haskell-indent-type-at-point) 'guard) ; start of a guard + (not (haskell-indent-open-structure start-block (point)))) + (push (cons (point) 'gd) eqns-start))) + (if (bobp) + (throw 'top-of-buffer nil) + (haskell-indent-backward-to-indentation 1)))) + ;; remove the spurious guards before the first equation + (while (and eqns-start (eq (cdar eqns-start) 'gd)) + (pop eqns-start)) + ;; go through each equation to find the region to indent + (while eqns-start + (let ((eqn (caar eqns-start))) + (setq lastpos (if (cdr eqns-start) + (save-excursion + (goto-char (caadr eqns-start)) + (haskell-indent-forward-line -1) + (line-end-position)) + end-block)) + (setq sep (haskell-indent-separate-valdef eqn lastpos))) + (if (eq type 'guard) + (setq pos (nth 3 sep)) + ;; check if what follows a rhs sign is more indented or not + (let ((rhs (nth 5 sep)) + (aft-rhs (nth 6 sep))) + (if (and rhs aft-rhs + (> (haskell-indent-point-to-col rhs) + (haskell-indent-point-to-col aft-rhs))) + (setq pos aft-rhs) + (setq pos rhs)))) + (if pos + (progn ; update region stack + (push (cons pos (or lastpos pos)) regstack) + (setq maxcol ; find the highest column number + (max maxcol + (progn ;find the previous non-empty column + (goto-char pos) + (skip-chars-backward + " \t" + (line-beginning-position)) + (if (haskell-indent-bolp) + ;;if on an empty prefix + (haskell-indent-point-to-col pos) ;keep original indent + (1+ (haskell-indent-point-to-col (point))))))))) + (pop eqns-start)) + ;; now shift according to the region stack + (if regstack + (haskell-indent-shift-columns maxcol regstack))))))) + +(defun haskell-indent-align-guards-and-rhs (start end) + "Align the guards and rhs of functions in the region, which must be active." + ;; The `start' and `end' args are dummys right now: they're just there so + ;; we can use the "r" interactive spec which properly signals an error. + (interactive "*r") + (haskell-indent-align-def t 'guard) + (haskell-indent-align-def t 'rhs)) + +;;; insertion functions + +(defun haskell-indent-insert-equal () + "Insert an = sign and align the previous rhs of the current function." + (interactive "*") + (if (or (haskell-indent-bolp) + (/= (preceding-char) ?\ )) + (insert ?\ )) + (insert "= ") + (haskell-indent-align-def (haskell-indent-mark-active) 'rhs)) + +(defun haskell-indent-insert-guard (&optional text) + "Insert and align a guard sign (|) followed by optional TEXT. +Alignment works only if all guards are to the south-east of their |." + (interactive "*") + (let ((pc (if (haskell-indent-bolp) ?\012 + (preceding-char))) + (pc1 (or (char-after (- (point) 2)) 0))) + ;; check what guard to insert depending on the previous context + (if (= pc ?\ ) ; x = any char other than blank or | + (if (/= pc1 ?\|) + (insert "| ") ; after " x" + ()) ; after " |" + (if (= pc ?\|) + (if (= pc1 ?\|) + (insert " | ") ; after "||" + (insert " ")) ; after "x|" + (insert " | "))) ; general case + (if text (insert text)) + (haskell-indent-align-def (haskell-indent-mark-active) 'guard))) + +(defun haskell-indent-insert-otherwise () + "Insert a guard sign (|) followed by `otherwise'. +Also align the previous guards of the current function." + (interactive "*") + (haskell-indent-insert-guard "otherwise") + (haskell-indent-insert-equal)) + +(defun haskell-indent-insert-where () + "Insert a where keyword at point and indent resulting line. +One indentation cycle is used." + (interactive "*") + (insert "where ") + (haskell-indent-cycle)) + + +;;; haskell-indent-mode + +(defvar haskell-indent-mode nil + "Non-nil if the semi-intelligent Haskell indentation mode is in effect.") +(make-variable-buffer-local 'haskell-indent-mode) + +(defvar haskell-indent-map + (let ((map (make-sparse-keymap))) + ;; Removed: remapping DEL seems a bit naughty --SDM + ;; (define-key map "\177" 'backward-delete-char-untabify) + ;; The binding to TAB is already handled by indent-line-function. --Stef + ;; (define-key map "\t" 'haskell-indent-cycle) + (define-key map [?\C-c ?\C-=] 'haskell-indent-insert-equal) + (define-key map [?\C-c ?\C-|] 'haskell-indent-insert-guard) + ;; Alternate binding, in case C-c C-| is too inconvenient to type. + ;; Duh, C-g is a special key, let's not use it here. + ;; (define-key map [?\C-c ?\C-g] 'haskell-indent-insert-guard) + (define-key map [?\C-c ?\C-o] 'haskell-indent-insert-otherwise) + (define-key map [?\C-c ?\C-w] 'haskell-indent-insert-where) + (define-key map [?\C-c ?\C-.] 'haskell-indent-align-guards-and-rhs) + (define-key map [?\C-c ?\C->] 'haskell-indent-put-region-in-literate) + map)) + +;;;###autoload +(defun turn-on-haskell-indent () + "Turn on ``intelligent'' Haskell indentation mode." + (set (make-local-variable 'indent-line-function) 'haskell-indent-cycle) + (set (make-local-variable 'indent-region-function) 'haskell-indent-region) + (setq haskell-indent-mode t) + ;; Activate our keymap. + (let ((map (current-local-map))) + (while (and map (not (eq map haskell-indent-map))) + (setq map (keymap-parent map))) + (if map + ;; haskell-indent-map is already active: nothing to do. + nil + ;; Put our keymap on top of the others. We could also put it in + ;; second place, or in a minor-mode. The minor-mode approach would be + ;; easier, but it's harder for the user to override it. This approach + ;; is the closest in behavior compared to the previous code that just + ;; used a bunch of local-set-key. + (set-keymap-parent haskell-indent-map (current-local-map)) + ;; Protect our keymap. + (setq map (make-sparse-keymap)) + (set-keymap-parent map haskell-indent-map) + (use-local-map map))) + (run-hooks 'haskell-indent-hook)) + +(defun turn-off-haskell-indent () + "Turn off ``intelligent'' Haskell indentation mode." + (kill-local-variable 'indent-line-function) + ;; Remove haskell-indent-map from the local map. + (let ((map (current-local-map))) + (while map + (let ((parent (keymap-parent map))) + (if (eq haskell-indent-map parent) + (set-keymap-parent map (keymap-parent parent)) + (setq map parent))))) + (setq haskell-indent-mode nil)) + +;; Put this minor mode on the global minor-mode-alist. +(or (assq 'haskell-indent-mode (default-value 'minor-mode-alist)) + (setq-default minor-mode-alist + (append (default-value 'minor-mode-alist) + '((haskell-indent-mode " Ind"))))) + +;;;###autoload +(defun haskell-indent-mode (&optional arg) + "``Intelligent'' Haskell indentation mode. +This deals with the layout rule of Haskell. +\\[haskell-indent-cycle] starts the cycle which proposes new +possibilities as long as the TAB key is pressed. Any other key +or mouse click terminates the cycle and is interpreted except for +RET which merely exits the cycle. +Other special keys are: + \\[haskell-indent-insert-equal] + inserts an = + \\[haskell-indent-insert-guard] + inserts an | + \\[haskell-indent-insert-otherwise] + inserts an | otherwise = +these functions also align the guards and rhs of the current definition + \\[haskell-indent-insert-where] + inserts a where keyword + \\[haskell-indent-align-guards-and-rhs] + aligns the guards and rhs of the region + \\[haskell-indent-put-region-in-literate] + makes the region a piece of literate code in a literate script + +Invokes `haskell-indent-hook' if not nil." + (interactive "P") + (setq haskell-indent-mode + (if (null arg) (not haskell-indent-mode) + (> (prefix-numeric-value arg) 0))) + (if haskell-indent-mode + (turn-on-haskell-indent) + (turn-off-haskell-indent))) + +(provide 'haskell-indent) + +;; Local Variables: +;; byte-compile-warnings: (not cl-functions) +;; End: + +;;; haskell-indent.el ends here diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/haskell-indent.elc Binary file .emacs.d/haskell-mode/haskell-indent.elc has changed diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/haskell-indentation.el --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/haskell-mode/haskell-indentation.el Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,1048 @@ +;;; haskell-indentation.el -- indentation module for Haskell Mode + +;; Copyright (C) 2009 Kristof Bastiaensen + +;; Author: Kristof Bastiaensen + +;; This file is not part of GNU Emacs. + +;; This file is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; This file is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see . + +;;; Commentary: + +;; Installation: +;; +;; To turn indentation on for all Haskell buffers under Haskell mode +;; add this to .emacs: +;; +;; (add-hook haskell-mode-hook 'turn-on-haskell-indentation) +;; +;; Otherwise, call `haskell-indentation-mode'. + +;;; Code: + +(require 'syntax) +(with-no-warnings (require 'cl)) + +(defvar delete-active-region) + +;; Dynamically scoped variables. +(defvar following-token) +(defvar current-token) +(defvar left-indent) +(defvar starter-indent) +(defvar current-indent) +(defvar layout-indent) +(defvar parse-line-number) +(defvar possible-indentations) +(defvar indentation-point) +(defvar haskell-literate) + +(defgroup haskell-indentation nil + "Haskell indentation." + :link '(custom-manual "(haskell-mode)Indentation") + :group 'haskell + :prefix "haskell-indentation-") + +(defcustom haskell-indentation-cycle-warn t + "Warn before moving to the leftmost indentation, if you tab at the rightmost one." + :type 'boolean + :group 'haskell-indentation) + +(defcustom haskell-indentation-delete-backward-indentation t + "Delete backward removes indentation." + :type 'boolean + :group 'haskell-indentation) + +(defcustom haskell-indentation-delete-backward-jump-line nil + "Delete backward jumps to the previous line when removing last indentation." + :type 'boolean + :group 'haskell-indentation) + +(defcustom haskell-indentation-delete-indentation t + "Delete removes indentation." + :type 'boolean + :group 'haskell-indentation) + +(defcustom haskell-indentation-layout-offset 2 + "Extra indentation to add before expressions in a haskell layout list." + :type 'integer + :group 'haskell-indentation) + +(defcustom haskell-indentation-starter-offset 1 + "Extra indentation after an opening keyword (e.g. let)." + :type 'integer + :group 'haskell-indentation) + +(defcustom haskell-indentation-left-offset 2 + "Extra indentation after an indentation to the left (e.g. after do)." + :type 'integer + :group 'haskell-indentation) + +(defcustom haskell-indentation-ifte-offset 2 + "Extra indentation after the keywords `if' `then' or `else'." + :type 'integer + :group 'haskell-indentation) + +(defcustom haskell-indentation-where-pre-offset 2 + "Extra indentation before the keyword `where'." + :type 'integer + :group 'haskell-indentation) + +(defcustom haskell-indentation-where-post-offset 2 + "Extra indentation after the keyword `where'." + :type 'integer + :group 'haskell-indentation) + +(defcustom haskell-indentation-birdtrack-extra-space t + "Append a space after every birdtrack in literate mode." + :type 'boolean + :group 'haskell-indentation) + + +;; Avoid a global bogus definition (which the original run-time +;; `defun' made), and support Emacs 21 without the syntax.el add-on. +(eval-when-compile + (unless (fboundp 'syntax-ppss) + (defsubst syntax-ppss (&rest pos) + (parse-partial-sexp (point-min) (or pos (point)))))) + +(defconst haskell-indentation-mode-map + (let ((keymap (make-sparse-keymap))) + (define-key keymap [?\r] 'haskell-newline-and-indent) + (define-key keymap [backspace] 'haskell-indentation-delete-backward-char) + (define-key keymap [?\C-d] 'haskell-indentation-delete-char) + keymap)) + +;; Used internally +(defvar haskell-indent-last-position) + +;;;###autoload +(define-minor-mode haskell-indentation-mode + "Haskell indentation mode that deals with the layout rule. +It rebinds RET, DEL and BACKSPACE, so that indentations can be +set and deleted as if they were real tabs. It supports +autofill-mode." + :lighter " Ind" + :keymap haskell-indentation-mode-map + (kill-local-variable 'indent-line-function) + (kill-local-variable 'normal-auto-fill-function) + (when haskell-indentation-mode + (setq max-lisp-eval-depth (max max-lisp-eval-depth 600)) ;; set a higher limit for recursion + (set (make-local-variable 'indent-line-function) + 'haskell-indentation-indent-line) + (set (make-local-variable 'normal-auto-fill-function) + 'haskell-indentation-auto-fill-function) + (set (make-local-variable 'haskell-indent-last-position) + nil))) + +;;;###autoload +(defun turn-on-haskell-indentation () + "Turn on the haskell-indentation minor mode." + (interactive) + (haskell-indentation-mode t)) + +(put 'parse-error + 'error-conditions + '(error parse-error)) +(put 'parse-error 'error-message "Parse error") + +(defun parse-error (&rest args) + (signal 'parse-error (apply 'format args))) + +(defmacro on-parse-error (except &rest body) + `(condition-case parse-error-string + (progn ,@body) + (parse-error + ,except + (message "%s" (cdr parse-error-string))))) + +(defun haskell-current-column () + "Compute current column according to haskell syntax rules, + correctly ignoring composition." + (save-excursion + (let ((start (point)) + (cc 0)) + (beginning-of-line) + (while (< (point) start) + (if (= (char-after) ?\t) + (setq cc (* 8 (+ 1 (/ cc 8)))) + (incf cc)) + (forward-char)) + cc))) + +(defun kill-indented-line (&optional arg) + "`kill-line' for indented text. +Preserves indentation and removes extra whitespace" + (interactive "P") + (let ((col (haskell-current-column)) + (old-point (point))) + (cond ((or (and (numberp arg) (< arg 0)) + (and (not (looking-at "[ \t]*$")) + (or (not (numberp arg)) (zerop arg)))) + ;use default behavior when calling with a negative argument + ;or killing (once) from the middle of a line + (kill-line arg)) + ((and (skip-chars-backward " \t") ;always true + (bolp) + (save-excursion + (forward-line arg) + (not (looking-at "[ \t]*$")))) + ; killing from an empty line: + ; preserve indentation of the next line + (kill-region (point) + (save-excursion + (forward-line arg) + (point))) + (skip-chars-forward " \t") + (if (> (haskell-current-column) col) + (move-to-column col))) + (t ; killing from not empty line: + ; kill all indentation + (goto-char old-point) + (kill-region (point) + (save-excursion + (forward-line arg) + (skip-chars-forward " \t") + (point))))))) + +(defun haskell-indentation-auto-fill-function () + (when (> (haskell-current-column) fill-column) + (while (> (haskell-current-column) fill-column) + (skip-syntax-backward "-") + (skip-syntax-backward "^-")) + (let ((auto-fill-function nil) + (indent (car (last (haskell-indentation-find-indentations))))) + (newline) + (when (eq haskell-literate 'bird) + (insert ">")) + (indent-to indent) + (end-of-line)))) + +(defun haskell-indentation-reindent (col) + (beginning-of-line) + (delete-region (point) + (progn + (when (and (eq haskell-literate 'bird) + (eq (char-after) ?>)) + (forward-char)) + (skip-syntax-forward "-") + (point))) + (when (eq haskell-literate 'bird) + (insert ">")) + (indent-to col)) + +(defun haskell-indentation-current-indentation () + (if (eq haskell-literate 'bird) + (save-excursion + (beginning-of-line) + (forward-char) + (skip-syntax-forward "-") + (current-column)) + (current-indentation))) + +(defun haskell-indentation-outside-bird-line () + (and (eq haskell-literate 'bird) + (or (< (current-column) 2) + (save-excursion + (beginning-of-line) + (not (eq (char-after) ?>)))))) + +(defun haskell-newline-and-indent () + (interactive) + (if (haskell-indentation-outside-bird-line) + (progn + (delete-horizontal-space) + (newline)) + (on-parse-error + (newline) + (let* ((cc (haskell-current-column)) + (ci (haskell-indentation-current-indentation)) + (indentations (haskell-indentation-find-indentations))) + (skip-syntax-forward "-") + (if (prog1 (and (eolp) + (not (= (haskell-current-column) ci))) + (delete-horizontal-space) + (if (not (eq haskell-literate 'bird)) + (newline) + (when haskell-indentation-birdtrack-extra-space + (indent-to 2)) + (newline) + (insert "> "))) + (haskell-indentation-reindent + (max (haskell-indentation-butlast indentations) + (haskell-indentation-matching-indentation + ci indentations))) + (haskell-indentation-reindent (haskell-indentation-matching-indentation + cc indentations))))))) + +(defun haskell-indentation-one-indentation (col indentations) + (let* ((last-pair (last indentations))) + (cond ((null indentations) + col) + ((null (cdr indentations)) + (car indentations)) + ((<= col (car last-pair)) + col) + (t (car last-pair))))) + +(defun haskell-indentation-butlast (indentations) + (when (consp (cdr indentations)) + (while (cddr indentations) + (setq indentations (cdr indentations)))) + (car indentations)) + +(defun haskell-indentation-next-indentation (col indentations) + "Find the lefmost indentation which is greater than COL." + (catch 'return + (while indentations + (if (or (< col (car indentations)) + (null (cdr indentations))) + (throw 'return (car indentations)) + (setq indentations (cdr indentations)))) + col)) + +(defun haskell-indentation-previous-indentation (col indentations) + "Find the rightmost indentation which is less than COL." + (and indentations + (> col (car indentations)) + (catch 'return + (while indentations + (if (or (null (cdr indentations)) + (<= col (cadr indentations))) + (throw 'return (car indentations)) + (setq indentations (cdr indentations)))) + col))) + +(defun haskell-indentation-matching-indentation (col indentations) + "Find the leftmost indentation which is greater than or equal to COL." + (catch 'return + (while indentations + (if (or (<= col (car indentations)) + (null (cdr indentations))) + (throw 'return (car indentations)) + (setq indentations (cdr indentations)))) + col)) + +(defun haskell-indentation-indent-line () + (when (save-excursion + (beginning-of-line) + (not (nth 8 (syntax-ppss)))) + (let ((ci (haskell-indentation-current-indentation)) + (start-column (haskell-current-column))) + (cond ((> (haskell-current-column) ci) + (save-excursion + (move-to-column ci) + (haskell-indentation-reindent + (haskell-indentation-one-indentation + ci (haskell-indentation-find-indentations))))) + + ((= (haskell-current-column) ci) + (haskell-indentation-reindent + (haskell-indentation-next-indentation + ci (haskell-indentation-find-indentations)))) + + (t (move-to-column ci) + (haskell-indentation-reindent + (haskell-indentation-matching-indentation + ci (haskell-indentation-find-indentations))))) + (cond ((not (= (haskell-current-column) start-column)) + (setq haskell-indent-last-position nil)) + ((not haskell-indentation-cycle-warn) + (haskell-indentation-reindent + (haskell-indentation-next-indentation + -1 + (haskell-indentation-find-indentations)))) + ((not (equal (point) haskell-indent-last-position)) + (message "Press TAB again to go to the leftmost indentation") + (setq haskell-indent-last-position (point))) + (t + (haskell-indentation-reindent + (haskell-indentation-next-indentation + -1 + (haskell-indentation-find-indentations)))))))) + +(defun haskell-indentation-delete-backward-char (n) + (interactive "p") + (on-parse-error + (delete-char (- n)) + (cond + ((haskell-indentation-outside-bird-line) + (delete-char (- n))) + ((and (use-region-p) + delete-active-region + (not (= (point) (mark)))) + (delete-region (mark) (point))) + ((or (= (haskell-current-column) 0) + (> (haskell-current-column) (haskell-indentation-current-indentation)) + (nth 8 (syntax-ppss))) + (delete-char (- n))) + (haskell-indentation-delete-backward-indentation + (let* ((ci (haskell-indentation-current-indentation)) + (pi (haskell-indentation-previous-indentation + ci (haskell-indentation-find-indentations)))) + (save-excursion + (cond (pi + (move-to-column pi) + (delete-region (point) + (progn (move-to-column ci) + (point)))) + (t + (if (not haskell-indentation-delete-backward-jump-line) + (delete-char (- 1)) + (beginning-of-line) + (delete-region (max (point-min) (- (point) 1)) + (progn (move-to-column ci) + (point))))))))) + (t (delete-char (- n)))))) + +(defun haskell-indentation-delete-char (n) + (interactive "p") + (if (haskell-indentation-outside-bird-line) + (delete-char n) + (on-parse-error (delete-char n) + (cond + ((and delete-selection-mode + mark-active + (not (= (point) (mark)))) + (delete-region (mark) (point))) + ((and (eq haskell-literate 'bird) + (looking-at "\n> ")) + (delete-char (+ n 2))) + ((or (eolp) + (>= (haskell-current-column) (haskell-indentation-current-indentation)) + (nth 8 (syntax-ppss))) + (delete-char n)) + (haskell-indentation-delete-indentation + (let* ((ci (haskell-indentation-current-indentation)) + (pi (haskell-indentation-previous-indentation + ci (haskell-indentation-find-indentations)))) + (save-excursion + (if (and pi (> pi (haskell-current-column))) + (move-to-column pi)) + (delete-region (point) + (progn (move-to-column ci) + (point)))))) + (t (delete-char (- n))))))) + +(defun haskell-indentation-goto-least-indentation () + (beginning-of-line) + (if (eq haskell-literate 'bird) + (catch 'return + (while t + (when (not (eq (char-after) ?>)) + (forward-line) + (forward-char 2) + (throw 'return nil)) + (let ((ps (nth 8 (syntax-ppss)))) + (when ps ;; inside comment or string + (goto-char ps) + (beginning-of-line))) + (when (and (>= 2 (haskell-indentation-current-indentation)) + (not (looking-at ">\\s-*$"))) + (forward-char 2) + (throw 'return nil)) + (when (bobp) + (forward-char 2) + (throw 'return nil)) + (forward-line -1))) + ;; not bird style + (catch 'return + (while (not (bobp)) + (forward-comment (- (buffer-size))) + (beginning-of-line) + (let ((ps (nth 8 (syntax-ppss)))) + (when ps ;; inside comment or string + (goto-char ps))) + (when (= 0 (haskell-indentation-current-indentation)) + (throw 'return nil)))) + (beginning-of-line) + (when (bobp) + (forward-comment (buffer-size))))) + +(defun haskell-indentation-parse-to-indentations () + (save-excursion + (skip-syntax-forward "-") + (let ((indentation-point (point)) + (layout-indent 0) + (parse-line-number 0) + (current-indent haskell-indentation-layout-offset) + (starter-indent haskell-indentation-layout-offset) + (left-indent haskell-indentation-layout-offset) + (case-fold-search nil) + current-token + following-token + possible-indentations) + (haskell-indentation-goto-least-indentation) + (if (<= indentation-point (point)) + (haskell-indentation-first-indentation) + (setq current-token (haskell-indentation-peek-token)) + (catch 'parse-end + (haskell-indentation-toplevel) + (unless (eq current-token 'end-tokens) + (parse-error "Illegal token: %s" current-token))) + possible-indentations)))) + +(defun haskell-indentation-first-indentation () + (if (eq haskell-literate 'bird) '(2) '(0))) + +(defun haskell-indentation-find-indentations () + (let ((ppss (syntax-ppss))) + (cond + ((nth 3 ppss) + (haskell-indentation-first-indentation)) + ((nth 4 ppss) + (if (save-excursion + (and (skip-syntax-forward "-") + (eolp) + (not (> (forward-line 1) 0)) + (not (nth 4 (syntax-ppss))))) + (haskell-indentation-parse-to-indentations) + (haskell-indentation-first-indentation))) + (t + (haskell-indentation-parse-to-indentations))))) + +(defconst haskell-indentation-unicode-tokens + '(("→" . "->") ;; #x2192 RIGHTWARDS ARROW + ("∷" . "::") ;; #x2237 PROPORTION + ("←" . "<-") ;; #x2190 LEFTWARDS ARROW + ("⇒" . "=>") ;; #x21D2 RIGHTWARDS DOUBLE ARROW + ("∀" . "forall") ;; #x2200 FOR ALL + ("↢" . "-<") ;; #x2919 LEFTWARDS ARROW-TAIL + ("↣" . ">-") ;; #x291A RIGHTWARDS ARROW-TAIL + ("⤛" . "-<<") ;; #x291B LEFTWARDS DOUBLE ARROW-TAIL + ("⤜" . ">>-") ;; #x291C RIGHTWARDS DOUBLE ARROW-TAIL + ("★" . "*")) ;; #x2605 BLACK STAR + "Translation dictionary from UnicodeSyntax tokens to their ASCII representation.") + +(defconst haskell-indentation-toplevel-list + '(("module" . haskell-indentation-module) + ("data" . (lambda () (haskell-indentation-statement-right #'haskell-indentation-data))) + ("type" . (lambda () (haskell-indentation-statement-right #'haskell-indentation-data))) + ("newtype" . (lambda () (haskell-indentation-statement-right #'haskell-indentation-data))) + ("class" . haskell-indentation-class-declaration) + ("instance" . haskell-indentation-class-declaration ))) + +(defconst haskell-indentation-type-list + '(("::" . (lambda () (haskell-indentation-with-starter + (lambda () (haskell-indentation-separated #'haskell-indentation-type "->" nil)) nil))) + ("(" . (lambda () (haskell-indentation-list #'haskell-indentation-type + ")" "," nil))) + ("[" . (lambda () (haskell-indentation-list #'haskell-indentation-type + "]" "," nil))) + ("{" . (lambda () (haskell-indentation-list #'haskell-indentation-type + "}" "," nil))))) + +(defconst haskell-indentation-expression-list + '(("data" . haskell-indentation-data) + ("type" . haskell-indentation-data) + ("newtype" . haskell-indentation-data) + ("if" . (lambda () (haskell-indentation-phrase + '(haskell-indentation-expression + "then" haskell-indentation-expression + "else" haskell-indentation-expression)))) + ("let" . (lambda () (haskell-indentation-phrase + '(haskell-indentation-declaration-layout + "in" haskell-indentation-expression)))) + ("do" . (lambda () (haskell-indentation-with-starter + #'haskell-indentation-expression-layout nil))) + ("mdo" . (lambda () (haskell-indentation-with-starter + #'haskell-indentation-expression-layout nil))) + ("rec" . (lambda () (haskell-indentation-with-starter + #'haskell-indentation-expression-layout nil))) + ("case" . (lambda () (haskell-indentation-phrase + '(haskell-indentation-expression + "of" haskell-indentation-case-layout)))) + ("\\" . (lambda () (haskell-indentation-with-starter + #'haskell-indentation-lambda-maybe-lambdacase nil))) + ("proc" . (lambda () (haskell-indentation-phrase + '(haskell-indentation-expression + "->" haskell-indentation-expression)))) + ("where" . (lambda () (haskell-indentation-with-starter + #'haskell-indentation-declaration-layout nil t))) + ("::" . (lambda () (haskell-indentation-with-starter + (lambda () (haskell-indentation-separated #'haskell-indentation-type "->" nil)) nil))) + ("=" . (lambda () (haskell-indentation-statement-right #'haskell-indentation-expression))) + ("<-" . (lambda () (haskell-indentation-statement-right #'haskell-indentation-expression))) + ("(" . (lambda () (haskell-indentation-list #'haskell-indentation-expression + ")" '(list "," "->") nil))) + ("[" . (lambda () (haskell-indentation-list #'haskell-indentation-expression + "]" "," "|"))) + ("{" . (lambda () (haskell-indentation-list #'haskell-indentation-expression + "}" "," nil))))) + +(defun haskell-indentation-expression-layout () + (haskell-indentation-layout #'haskell-indentation-expression)) + +(defun haskell-indentation-declaration-layout () + (haskell-indentation-layout #'haskell-indentation-declaration)) + +(defun haskell-indentation-case-layout () + (haskell-indentation-layout #'haskell-indentation-case)) + +;; After a lambda (backslash) there are two possible cases: +;; - the new lambdacase expression, that can be recognized by the +;; next token being "case", +;; - or simply an anonymous function definition in the form of +;; "expression -> expression". +(defun haskell-indentation-lambda-maybe-lambdacase () + (if (string= current-token "case") + (haskell-indentation-with-starter + #'haskell-indentation-case-layout nil) + (haskell-indentation-phrase-rest + '(haskell-indentation-expression "->" haskell-indentation-expression)))) + +(defun haskell-indentation-fundep () + (haskell-indentation-with-starter + (lambda () (haskell-indentation-separated + #'haskell-indentation-fundep1 "," nil)) + nil)) + +(defun haskell-indentation-fundep1 () + (let ((current-indent (haskell-current-column))) + (while (member current-token '(value "->")) + (haskell-indentation-read-next-token)) + (when (and (eq current-token 'end-tokens) + (member following-token '(value "->"))) + (haskell-indentation-add-indentation current-indent)))) + +(defun haskell-indentation-toplevel () + (haskell-indentation-layout + (lambda () + (let ((parser (assoc current-token haskell-indentation-toplevel-list))) + (if parser + (funcall (cdr parser)) + (haskell-indentation-declaration)))))) + +(defun haskell-indentation-type () + (let ((current-indent (haskell-current-column))) + (catch 'return + (while t + (cond + ((member current-token '(value operator "->")) + (haskell-indentation-read-next-token)) + + ((eq current-token 'end-tokens) + (when (member following-token + '(value operator no-following-token + "->" "(" "[" "{" "::")) + (haskell-indentation-add-indentation current-indent)) + (throw 'return nil)) + + (t (let ((parser (assoc current-token haskell-indentation-type-list))) + (if (not parser) + (throw 'return nil) + (funcall (cdr parser)))))))))) + +(defun haskell-indentation-data () + (haskell-indentation-with-starter + (lambda () + (when (string= current-token "instance") + (haskell-indentation-read-next-token)) + (haskell-indentation-type) + (cond ((string= current-token "=") + (haskell-indentation-with-starter + (lambda () (haskell-indentation-separated #'haskell-indentation-type "|" "deriving")) + nil)) + ((string= current-token "where") + (haskell-indentation-with-starter + #'haskell-indentation-expression-layout nil)))) + nil)) + +(defun haskell-indentation-class-declaration () + (haskell-indentation-with-starter + (lambda () + (haskell-indentation-type) + (when (string= current-token "|") + (haskell-indentation-fundep)) + (when (string= current-token "where") + (haskell-indentation-with-starter + #'haskell-indentation-expression-layout nil))) + nil)) + +(defun haskell-indentation-module () + (haskell-indentation-with-starter + (lambda () + (let ((current-indent (haskell-current-column))) + (haskell-indentation-read-next-token) + (when (string= current-token "(") + (haskell-indentation-list + #'haskell-indentation-module-export + ")" "," nil)) + (when (eq current-token 'end-tokens) + (haskell-indentation-add-indentation current-indent) + (throw 'parse-end nil)) + (when (string= current-token "where") + (haskell-indentation-read-next-token) + (when (eq current-token 'end-tokens) + (haskell-indentation-add-layout-indent) + (throw 'parse-end nil)) + (haskell-indentation-layout #'haskell-indentation-toplevel)))) + nil)) + +(defun haskell-indentation-module-export () + (cond ((string= current-token "module") + (let ((current-indent (haskell-current-column))) + (haskell-indentation-read-next-token) + (cond ((eq current-token 'end-tokens) + (haskell-indentation-add-indentation current-indent)) + ((eq current-token 'value) + (haskell-indentation-read-next-token))))) + (t (haskell-indentation-type)))) + +(defun haskell-indentation-list (parser end sep stmt-sep) + (haskell-indentation-with-starter + `(lambda () (haskell-indentation-separated #',parser + ,sep + ,stmt-sep)) + end)) + +(defun haskell-indentation-with-starter (parser end &optional where-expr?) + (let ((starter-column (haskell-current-column)) + (current-indent current-indent) + (left-indent (if (= (haskell-current-column) (haskell-indentation-current-indentation)) + (haskell-current-column) left-indent))) + (haskell-indentation-read-next-token) + (when (eq current-token 'end-tokens) + (if (equal following-token end) + (haskell-indentation-add-indentation starter-column) + (if where-expr? + (haskell-indentation-add-where-post-indent left-indent) + (haskell-indentation-add-indentation + (+ left-indent haskell-indentation-left-offset)))) + (throw 'parse-end nil)) + (let* ((current-indent (haskell-current-column)) + (starter-indent (min starter-column current-indent)) + (left-indent (if end (+ current-indent haskell-indentation-starter-offset) + left-indent))) + (funcall parser) + (cond ((eq current-token 'end-tokens) + (when (equal following-token end) + (haskell-indentation-add-indentation starter-indent)) + (when end (throw 'parse-end nil))) ;; add no indentations + ((equal current-token end) + (haskell-indentation-read-next-token)) ;; continue + (end (parse-error "Illegal token: %s" current-token)))))) + +(defun haskell-indentation-case () + (haskell-indentation-expression) + (cond ((eq current-token 'end-tokens) + (haskell-indentation-add-indentation current-indent)) + ((string= current-token "|") + (haskell-indentation-with-starter + (lambda () (haskell-indentation-separated #'haskell-indentation-case "|" nil)) + nil)) + ((string= current-token "->") + (haskell-indentation-statement-right #'haskell-indentation-expression)) + ;; otherwise fallthrough + )) + +(defun haskell-indentation-statement-right (parser) + (haskell-indentation-read-next-token) + (when (eq current-token 'end-tokens) + (haskell-indentation-add-indentation + (+ left-indent haskell-indentation-left-offset)) + (throw 'parse-end nil)) + (let ((current-indent (haskell-current-column))) + (funcall parser))) + +(defun haskell-indentation-simple-declaration () + (haskell-indentation-expression) + (cond ((string= current-token "=") + (haskell-indentation-statement-right #'haskell-indentation-expression)) + ((string= current-token "::") + (haskell-indentation-statement-right #'haskell-indentation-type)) + ((and (eq current-token 'end-tokens) + (string= following-token "=")) + (haskell-indentation-add-indentation current-indent) + (throw 'parse-end nil)))) + +(defun haskell-indentation-declaration () + (haskell-indentation-expression) + (cond ((string= current-token "|") + (haskell-indentation-with-starter + (lambda () (haskell-indentation-separated #'haskell-indentation-expression "," "|")) + nil)) + ((eq current-token 'end-tokens) + (when (member following-token '("|" "=" "::" ",")) + (haskell-indentation-add-indentation current-indent) + (throw 'parse-end nil))))) + +(defun haskell-indentation-layout (parser) + (if (string= current-token "{") + (haskell-indentation-list parser "}" ";" nil) + (haskell-indentation-implicit-layout-list parser))) + +(defun haskell-indentation-expression-token (token) + (member token '("if" "let" "do" "case" "\\" "(" "[" "::" + value operator no-following-token))) + +(defun haskell-indentation-expression () + (let ((current-indent (haskell-current-column))) + (catch 'return + (while t + (cond + ((memq current-token '(value operator)) + (haskell-indentation-read-next-token)) + + ((eq current-token 'end-tokens) + (cond ((string= following-token "where") + (haskell-indentation-add-where-pre-indent)) + ((haskell-indentation-expression-token following-token) + (haskell-indentation-add-indentation + current-indent))) + (throw 'return nil)) + + (t (let ((parser (assoc current-token haskell-indentation-expression-list))) + (when (null parser) + (throw 'return nil)) + (funcall (cdr parser)) + (when (and (eq current-token 'end-tokens) + (string= (car parser) "let") + (= haskell-indentation-layout-offset current-indent) + (haskell-indentation-expression-token following-token)) + ;; inside a layout, after a let construct + (haskell-indentation-add-layout-indent) + (throw 'parse-end nil)) + (unless (member (car parser) '("(" "[" "{" "do" "case")) + (throw 'return nil))))))))) + +(defun haskell-indentation-test-indentations () + (interactive) + (let ((indentations (save-excursion (haskell-indentation-find-indentations))) + (str "") + (pos 0)) + (while indentations + (when (>= (car indentations) pos) + (setq str (concat str (make-string (- (car indentations) pos) ?\ ) + "|")) + (setq pos (+ 1 (car indentations)))) + (setq indentations (cdr indentations))) + (end-of-line) + (newline) + (insert str))) + +(defun haskell-indentation-separated (parser separator stmt-separator) + (catch 'return + (while t + (funcall parser) + (cond ((if (listp separator) (member current-token separator) (equal current-token separator)) + (haskell-indentation-at-separator)) + + ((equal current-token stmt-separator) + (setq starter-indent (haskell-current-column)) + (haskell-indentation-at-separator)) + + ((eq current-token 'end-tokens) + (cond ((or (equal following-token separator) + (equal following-token stmt-separator)) + (haskell-indentation-add-indentation starter-indent) + (throw 'parse-end nil))) + (throw 'return nil)) + + (t (throw 'return nil)))))) + +(defun haskell-indentation-at-separator () + (let ((separator-column + (and (= (haskell-current-column) (haskell-indentation-current-indentation)) + (haskell-current-column)))) + (haskell-indentation-read-next-token) + (cond ((eq current-token 'end-tokens) + (haskell-indentation-add-indentation current-indent) + (throw 'return nil)) + (separator-column ;; on the beginning of the line + (setq current-indent (haskell-current-column)) + (setq starter-indent separator-column))))) + +(defun haskell-indentation-implicit-layout-list (parser) + (let* ((layout-indent (haskell-current-column)) + (current-indent (haskell-current-column)) + (left-indent (haskell-current-column))) + (catch 'return + (while t + (let ((left-indent left-indent)) + (funcall parser)) + (cond ((member current-token '(layout-next ";")) + (haskell-indentation-read-next-token)) + ((eq current-token 'end-tokens) + (when (or (haskell-indentation-expression-token following-token) + (string= following-token ";")) + (haskell-indentation-add-layout-indent)) + (throw 'return nil)) + (t (throw 'return nil)))))) + ;; put haskell-indentation-read-next-token outside the current-indent definition + ;; so it will not return 'layout-end again + (when (eq current-token 'layout-end) + (haskell-indentation-read-next-token))) ;; leave layout at 'layout-end or illegal token + +(defun haskell-indentation-phrase (phrase) + (haskell-indentation-with-starter + `(lambda () (haskell-indentation-phrase-rest ',phrase)) + nil)) + +(defun haskell-indentation-phrase-rest (phrase) + (let ((starter-line parse-line-number)) + (let ((current-indent (haskell-current-column))) + (funcall (car phrase))) + (cond + ((eq current-token 'end-tokens) + (cond ((null (cdr phrase))) ;; fallthrough + ((equal following-token (cadr phrase)) + (haskell-indentation-add-indentation starter-indent) + (throw 'parse-end nil)) + ((string= (cadr phrase) "in") + (when (= left-indent layout-indent) + (haskell-indentation-add-layout-indent) + (throw 'parse-end nil))) + (t (throw 'parse-end nil)))) + + ((null (cdr phrase))) + + ((equal (cadr phrase) current-token) + (let* ((on-new-line (= (haskell-current-column) (haskell-indentation-current-indentation))) + (lines-between (- parse-line-number starter-line)) + (left-indent (if (<= lines-between 0) + left-indent + starter-indent))) + (haskell-indentation-read-next-token) + (when (eq current-token 'end-tokens) + (haskell-indentation-add-indentation + (cond ((member (cadr phrase) '("then" "else")) + (+ starter-indent haskell-indentation-ifte-offset)) + ((member (cadr phrase) '("in" "->")) + ;; expression ending in another expression + (if on-new-line + (+ left-indent haskell-indentation-starter-offset) + left-indent)) + (t (+ left-indent haskell-indentation-left-offset)))) + (throw 'parse-end nil)) + (haskell-indentation-phrase-rest (cddr phrase)))) + + ((string= (cadr phrase) "in")) ;; fallthrough + (t (parse-error "Expecting %s" (cadr phrase)))))) + +(defun haskell-indentation-add-indentation (indent) + (haskell-indentation-push-indentation + (if (<= indent layout-indent) + (+ layout-indent haskell-indentation-layout-offset) + indent))) + +(defun haskell-indentation-add-layout-indent () + (haskell-indentation-push-indentation layout-indent)) + +(defun haskell-indentation-add-where-pre-indent () + (haskell-indentation-push-indentation + (+ layout-indent haskell-indentation-where-pre-offset)) + (if (= layout-indent haskell-indentation-layout-offset) + (haskell-indentation-push-indentation + haskell-indentation-where-pre-offset))) + +(defun haskell-indentation-add-where-post-indent (indent) + (haskell-indentation-push-indentation + (+ indent haskell-indentation-where-post-offset))) + +(defun haskell-indentation-push-indentation (indent) + (when (or (null possible-indentations) + (< indent (car possible-indentations))) + (setq possible-indentations + (cons indent possible-indentations)))) + +(defun haskell-indentation-token-test () + (let ((current-token nil) + (following-token nil) + (layout-indent 0) + (parse-line-number 0) + (indentation-point (mark))) + (haskell-indentation-read-next-token))) + +(defun haskell-indentation-read-next-token () + (cond ((eq current-token 'end-tokens) + 'end-tokens) + ((eq current-token 'layout-end) + (cond ((> layout-indent (haskell-current-column)) + 'layout-end) + ((= layout-indent (haskell-current-column)) + (setq current-token 'layout-next)) + ((< layout-indent (haskell-current-column)) + (setq current-token (haskell-indentation-peek-token))))) + ((eq current-token 'layout-next) + (setq current-token (haskell-indentation-peek-token))) + ((> layout-indent (haskell-current-column)) + (setq current-token 'layout-end)) + (t + (haskell-indentation-skip-token) + (if (>= (point) indentation-point) + (progn + (setq following-token + (if (= (point) indentation-point) + (haskell-indentation-peek-token) + 'no-following-token)) + (setq current-token 'end-tokens)) + (when (= (haskell-current-column) (haskell-indentation-current-indentation)) + ;; on a new line + (setq current-indent (haskell-current-column)) + (setq left-indent (haskell-current-column)) + (setq parse-line-number (+ parse-line-number 1))) + (cond ((> layout-indent (haskell-current-column)) + (setq current-token 'layout-end)) + ((= layout-indent (haskell-current-column)) + (setq current-token 'layout-next)) + (t (setq current-token (haskell-indentation-peek-token)))))))) + +(defun haskell-indentation-peek-token () + "Return token starting at point." + (cond ((looking-at "\\(if\\|then\\|else\\|let\\|in\\|mdo\\|rec\\|do\\|proc\\|case\\|of\\|where\\|module\\|deriving\\|data\\|type\\|newtype\\|class\\|instance\\)\\([^[:alnum:]'_]\\|$\\)") + (match-string-no-properties 1)) + ((looking-at "[][(){}[,;]") + (match-string-no-properties 0)) + ((looking-at "\\(\\\\\\|->\\|<-\\|::\\|=\\||\\)\\([^-:!#$%&*+./<=>?@\\\\^|~]\\|$\\)") + (match-string-no-properties 1)) + ((looking-at "\\(→\\|←\\|∷\\)\\([^-:!#$%&*+./<=>?@\\\\^|~]\\|$\\)") + (let ((tok (match-string-no-properties 1))) + (or (cdr (assoc tok haskell-indentation-unicode-tokens)) tok))) + ((looking-at"[-:!#$%&*+./<=>?@\\\\^|~`]" ) + 'operator) + (t 'value))) + +(defun haskell-indentation-skip-token () + "Skip to the next token." + (let ((case-fold-search nil)) + + (if (or (looking-at "'\\([^\\']\\|\\\\.\\)*'") + (looking-at "\"\\([^\\\"]\\|\\\\.\\)*\"") + (looking-at ; Hierarchical names always start with uppercase + "[[:upper:]]\\(\\sw\\|'\\)*\\(\\.\\(\\sw\\|'\\)+\\)*") + (looking-at "\\sw\\(\\sw\\|'\\)*") ; Only unqualified vars can start with lowercase + (looking-at "[0-9][0-9oOxXeE+-]*") + (looking-at "[-:!#$%&*+./<=>?@\\\\^|~]+") + (looking-at "[](){}[,;]") + (looking-at "`[[:alnum:]']*`")) + (goto-char (match-end 0)) + ;; otherwise skip until space found + (skip-syntax-forward "^-")) + (forward-comment (buffer-size)) + (while (and (eq haskell-literate 'bird) + (bolp) + (eq (char-after) ?>)) + (forward-char) + (forward-comment (buffer-size))))) + +(provide 'haskell-indentation) + +;; Local Variables: +;; byte-compile-warnings: (not cl-functions) +;; tab-width: 8 +;; End: + +;;; haskell-indentation.el ends here diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/haskell-indentation.elc Binary file .emacs.d/haskell-mode/haskell-indentation.elc has changed diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/haskell-interactive-mode.el --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/haskell-mode/haskell-interactive-mode.el Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,732 @@ +;;; haskell-interactive-mode.el --- The interactive Haskell mode + +;; Copyright (C) 2011-2012 Chris Done + +;; Author: Chris Done + +;; This file is not part of GNU Emacs. + +;; This file is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; This file is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to +;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. + +;;; Commentary: + +;;; Todo: + +;;; Code: + +(require 'haskell-process) +(require 'haskell-session) +(require 'haskell-show) +(with-no-warnings (require 'cl)) + +(defcustom haskell-interactive-mode-eval-pretty + nil + "Print eval results that can be parsed as Show instances prettily. Requires sexp-show (on Hackage)." + :type 'boolean + :group 'haskell-interactive) + +(defvar haskell-interactive-prompt "λ> " + "The prompt to use.") + +(defun haskell-interactive-prompt-regex () + "Generate a regex for searching for any occurence of the prompt +at the beginning of the line. This should prevent any +interference with prompts that look like haskell expressions." + (concat "^" (regexp-quote haskell-interactive-prompt))) + +(defvar haskell-interactive-mode-prompt-start + nil + "Mark used for the beginning of the prompt.") + +(defcustom haskell-interactive-mode-eval-mode + nil + "Use the given mode's font-locking to render some text." + :type '(choice function (const :tag "None" nil)) + :group 'haskell-interactive) + +(defcustom haskell-interactive-mode-hide-multi-line-errors + nil + "Hide collapsible multi-line compile messages by default." + :type 'boolean + :group 'haskell-interactive) + +(defcustom haskell-interactive-mode-delete-superseded-errors + t + "Whether to delete compile messages superseded by recompile/reloads." + :type 'boolean + :group 'haskell-interactive) + +(defcustom haskell-interactive-mode-include-file-name + t + "Include the file name of the module being compiled when +printing compilation messages." + :type 'boolean + :group 'haskell-interactive) + +(defvar haskell-interactive-mode-map + (let ((map (make-sparse-keymap))) + (define-key map (kbd "RET") 'haskell-interactive-mode-return) + (define-key map (kbd "SPC") 'haskell-interactive-mode-space) + (define-key map (kbd "C-j") 'haskell-interactive-mode-newline-indent) + (define-key map (kbd "C-a") 'haskell-interactive-mode-beginning) + (define-key map (kbd "") 'haskell-interactive-mode-beginning) + (define-key map (kbd "C-c C-k") 'haskell-interactive-mode-clear) + (define-key map (kbd "C-c C-c") 'haskell-process-interrupt) + (define-key map (kbd "C-c C-f") 'next-error-follow-minor-mode) + (define-key map (kbd "M-p") 'haskell-interactive-mode-history-previous) + (define-key map (kbd "M-n") 'haskell-interactive-mode-history-next) + (define-key map (kbd "C-") 'haskell-interactive-mode-history-previous) + (define-key map (kbd "C-") 'haskell-interactive-mode-history-next) + (define-key map (kbd "TAB") 'haskell-interactive-mode-tab) + map) + "Interactive Haskell mode map.") + +;; buffer-local variables used internally by `haskell-interactive-mode' +(defvar haskell-interactive-mode-history) +(defvar haskell-interactive-mode-history-index) +(defvar haskell-interactive-mode-completion-cache) + +;;;###autoload +(define-derived-mode haskell-interactive-mode fundamental-mode "Interactive-Haskell" + "Interactive mode for Haskell. + +See Info node `(haskell-mode)haskell-interactive-mode' for more +information. + +Key bindings: +\\{haskell-interactive-mode-map}" + :group 'haskell-interactive + (set (make-local-variable 'haskell-interactive-mode-history) (list)) + (set (make-local-variable 'haskell-interactive-mode-history-index) 0) + (set (make-local-variable 'haskell-interactive-mode-completion-cache) nil) + + (setq next-error-function 'haskell-interactive-next-error-function) + (setq completion-at-point-functions '(haskell-interactive-mode-completion-at-point-function)) + + (haskell-interactive-mode-prompt)) + +(defface haskell-interactive-face-prompt + '((t :inherit 'font-lock-function-name-face)) + "Face for the prompt." + :group 'haskell-interactive) + +(defface haskell-interactive-face-compile-error + '((t :inherit 'compilation-error)) + "Face for compile errors." + :group 'haskell-interactive) + +(defface haskell-interactive-face-compile-warning + '((t :inherit 'compilation-warning)) + "Face for compiler warnings." + :group 'haskell-interactive) + +(defface haskell-interactive-face-result + '((t :inherit 'font-lock-string-face)) + "Face for the result." + :group 'haskell-interactive) + +(defun haskell-interactive-mode-newline-indent () + "Make newline and indent." + (interactive) + (newline) + (indent-according-to-mode)) + +;;;###autoload +(defun haskell-interactive-bring () + "Bring up the interactive mode for this session." + (interactive) + (let* ((session (haskell-session)) + (buffer (haskell-session-interactive-buffer session))) + (unless (and (find-if (lambda (window) (equal (window-buffer window) buffer)) + (window-list)) + (= 2 (length (window-list)))) + (delete-other-windows) + (display-buffer buffer) + (other-window 1)))) + +;;;###autoload +(defun haskell-interactive-switch () + "Switch to the interactive mode for this session." + (interactive) + (let ((buffer (haskell-session-interactive-buffer (haskell-session)))) + (unless (eq buffer (window-buffer)) + (switch-to-buffer-other-window buffer)))) + +(defun haskell-interactive-mode-return () + "Handle the return key." + (interactive) + (cond + ((haskell-interactive-at-compile-message) + (next-error-internal)) + (t + (haskell-interactive-handle-expr)))) + +(defun haskell-interactive-mode-space (n) + "Handle the space key." + (interactive "p") + (if (and (bound-and-true-p god-local-mode) + (fboundp 'god-mode-self-insert)) + (call-interactively 'god-mode-self-insert) + (if (haskell-interactive-at-compile-message) + (next-error-no-select 0) + (self-insert-command n)))) + +(defun haskell-interactive-at-prompt () + "If at prompt, returns start position of user-input, otherwise returns nil." + (if (>= (point) + haskell-interactive-mode-prompt-start) + haskell-interactive-mode-prompt-start + nil)) + + +(defun haskell-interactive-handle-expr () + "Handle an inputted expression at the REPL." + (when (haskell-interactive-at-prompt) + (let ((expr (haskell-interactive-mode-input))) + (when (not (string= "" (replace-regexp-in-string " " "" expr))) + (set-marker haskell-interactive-mode-prompt-start (point-max)) + (haskell-interactive-mode-history-add expr) + (haskell-interactive-mode-run-expr expr))))) + +(defun haskell-interactive-mode-run-expr (expr) + "Run the given expression." + (let ((session (haskell-session)) + (process (haskell-process)) + (lines (length (split-string expr "\n")))) + (goto-char (point-max)) + (haskell-process-queue-command + process + (make-haskell-command + :state (list session process expr 0) + :go (lambda (state) + (haskell-process-send-string (cadr state) + (haskell-interactive-mode-multi-line (caddr state)))) + :live (lambda (state buffer) + (unless (and (string-prefix-p ":q" (caddr state)) + (string-prefix-p (caddr state) ":quit")) + (let* ((cursor (cadddr state)) + (next (replace-regexp-in-string + haskell-process-prompt-regex + "\n" + (substring buffer cursor)))) + (when (= 0 cursor) (insert "\n")) + (haskell-interactive-mode-eval-result (car state) next) + + (setf (cdddr state) (list (length buffer))) + nil))) + :complete (lambda (state response) + (let ((response (haskell-interactive-mode-cleanup-response + (caddr state) response))) + (cond + (haskell-interactive-mode-eval-mode + (haskell-interactive-mode-eval-as-mode (car state) response)) + ((haskell-interactive-mode-line-is-query (elt state 2)) + (let ((haskell-interactive-mode-eval-mode 'haskell-mode)) + (haskell-interactive-mode-eval-as-mode (car state) response))) + (haskell-interactive-mode-eval-pretty + (haskell-interactive-mode-eval-pretty-result (car state) response)))) + (haskell-interactive-mode-prompt (car state))))))) + +(defun haskell-interactive-mode-cleanup-response (expr response) + "Ignore the mess that GHCi outputs on multi-line input." + (if (not (string-match "\n" expr)) + response + (let ((i 0) + (out "") + (lines (length (split-string expr "\n")))) + (loop for part in (split-string response "| ") + do (setq out + (concat out + (if (> i lines) + (concat (if (or (= i 0) (= i (1+ lines))) "" "| ") part) + ""))) + do (setq i (1+ i))) + out))) + +(defun haskell-interactive-mode-multi-line (expr) + "If a multi-line expression has been entered, then reformat it to be: + +:{ +do the + multi-liner + expr +:} +" + (if (not (string-match "\n" expr)) + expr + (let* ((i 0) + (lines (split-string expr "\n")) + (len (length lines)) + (indent (make-string (length haskell-interactive-prompt) + ? ))) + (mapconcat 'identity + (loop for line in lines + collect (cond ((= i 0) + (concat ":{" "\n" line)) + ((= i (1- len)) + (concat (haskell-interactive-trim line) "\n" ":}")) + (t + (haskell-interactive-trim line))) + do (setq i (1+ i))) + "\n")))) + +(defun haskell-interactive-trim (line) + "Trim indentation off of lines in the REPL." + (if (and (string-match "^[ ]+" line) + (> (length line) + (length haskell-interactive-prompt))) + (substring line + (length haskell-interactive-prompt)) + line)) + +(defun haskell-interactive-mode-line-is-query (line) + "Is LINE actually a :t/:k/:i?" + (and (string-match "^:[itk] " line) + t)) + +(defun haskell-interactive-jump-to-error-line () + "Jump to the error line." + (let ((orig-line (buffer-substring-no-properties (line-beginning-position) + (line-end-position)))) + (and (string-match "^\\([^:]+\\):\\([0-9]+\\):\\([0-9]+\\)\\(-[0-9]+\\)?:" orig-line) + (let* ((file (match-string 1 orig-line)) + (line (match-string 2 orig-line)) + (col (match-string 3 orig-line)) + (session (haskell-session)) + (cabal-path (haskell-session-cabal-dir session)) + (src-path (haskell-session-current-dir session)) + (cabal-relative-file (expand-file-name file cabal-path)) + (src-relative-file (expand-file-name file src-path))) + (let ((file (cond ((file-exists-p cabal-relative-file) + cabal-relative-file) + ((file-exists-p src-relative-file) + src-relative-file)))) + (when file + (other-window 1) + (find-file file) + (haskell-interactive-bring) + (goto-char (point-min)) + (forward-line (1- (string-to-number line))) + (goto-char (+ (point) (string-to-number col) -1)) + (haskell-mode-message-line orig-line) + t)))))) + +(defun haskell-interactive-mode-beginning () + "Go to the start of the line." + (interactive) + (if (haskell-interactive-at-prompt) + (goto-char haskell-interactive-mode-prompt-start) + (move-beginning-of-line nil))) + +(defun haskell-interactive-mode-clear () + "Clear the screen and put any current input into the history." + (interactive) + (let ((session (haskell-session))) + (with-current-buffer (haskell-session-interactive-buffer session) + (let ((inhibit-read-only t)) + (set-text-properties (point-min) (point-max) nil)) + (delete-region (point-min) (point-max)) + (remove-overlays) + (haskell-interactive-mode-prompt session) + (haskell-session-set session 'next-error-region nil) + (haskell-session-set session 'next-error-locus nil)))) + +(defun haskell-interactive-mode-input-partial () + "Get the interactive mode input up to point." + (let ((input-start (haskell-interactive-at-prompt))) + (unless input-start + (error "not at prompt")) + (buffer-substring-no-properties input-start (point)))) + +(defun haskell-interactive-mode-input () + "Get the interactive mode input." + (buffer-substring-no-properties + haskell-interactive-mode-prompt-start + (point-max))) + +(defun haskell-interactive-mode-prompt (&optional session) + "Show a prompt at the end of the REPL buffer. +If SESSION is non-nil, use the REPL buffer associated with +SESSION, otherwise operate on the current buffer. +" + (with-current-buffer (if session + (haskell-session-interactive-buffer session) + (current-buffer)) + (goto-char (point-max)) + (insert (propertize haskell-interactive-prompt + 'face 'haskell-interactive-face-prompt + 'read-only t + 'rear-nonsticky t + 'prompt t)) + (let ((marker (set (make-local-variable 'haskell-interactive-mode-prompt-start) + (make-marker)))) + (set-marker marker + (point) + (current-buffer)) + (when nil + (let ((o (make-overlay (point) (point-max) nil nil t))) + (overlay-put o 'line-prefix (make-string (length haskell-interactive-prompt) + ? ))))))) + +(defun haskell-interactive-mode-eval-result (session text) + "Insert the result of an eval as plain text." + (with-current-buffer (haskell-session-interactive-buffer session) + (goto-char (point-max)) + (insert (propertize text + 'face 'haskell-interactive-face-result + 'rear-nonsticky t + 'read-only t + 'prompt t + 'result t)))) + +(defun haskell-interactive-mode-eval-as-mode (session text) + "Insert TEXT font-locked according to `haskell-interactive-mode-eval-mode'." + (with-current-buffer (haskell-session-interactive-buffer session) + (let ((inhibit-read-only t)) + (delete-region (1+ haskell-interactive-mode-prompt-start) (point)) + (goto-char (point-max)) + (insert (haskell-fontify-as-mode (concat text "\n") + haskell-interactive-mode-eval-mode))))) + +(defun haskell-interactive-mode-eval-pretty-result (session text) + "Insert the result of an eval as a pretty printed Showable, if + parseable, or otherwise just as-is." + (with-current-buffer (haskell-session-interactive-buffer session) + (let ((inhibit-read-only t)) + (delete-region haskell-interactive-mode-prompt-start (point)) + (goto-char (point-max)) + (haskell-show-parse-and-insert text) + (insert "\n")))) + +;;;###autoload +(defun haskell-interactive-mode-echo (session message &optional mode) + "Echo a read only piece of text before the prompt." + (with-current-buffer (haskell-session-interactive-buffer session) + (save-excursion + (haskell-interactive-mode-goto-end-point) + (insert (if mode + (haskell-fontify-as-mode + (concat message "\n") + mode) + (propertize (concat message "\n") + 'read-only t + 'rear-nonsticky t)))))) + +(defun haskell-interactive-mode-compile-error (session message) + "Echo an error." + (haskell-interactive-mode-compile-message + session message 'haskell-interactive-face-compile-error)) + +(defun haskell-interactive-mode-compile-warning (session message) + "Warning message." + (haskell-interactive-mode-compile-message + session message 'haskell-interactive-face-compile-warning)) + +(defun haskell-interactive-mode-compile-message (session message type) + "Echo a compiler warning." + (with-current-buffer (haskell-session-interactive-buffer session) + (setq next-error-last-buffer (current-buffer)) + (save-excursion + (haskell-interactive-mode-goto-end-point) + (let ((lines (string-match "^\\(.*\\)\n\\([[:unibyte:][:nonascii:]]+\\)" message))) + (when lines + (insert (propertize (concat (match-string 1 message) " …\n") + 'face type + 'read-only t + 'rear-nonsticky t + 'expandable t)) + (insert (propertize (concat (match-string 2 message) "\n") + 'face type + 'read-only t + 'rear-nonsticky t + 'collapsible t + 'invisible haskell-interactive-mode-hide-multi-line-errors + 'message-length (length (match-string 2 message))))) + (unless lines + (insert (propertize (concat message "\n") + 'face type + 'read-only t + 'rear-nonsticky t))))))) + +(defun haskell-interactive-mode-insert (session message) + "Echo a read only piece of text before the prompt." + (with-current-buffer (haskell-session-interactive-buffer session) + (save-excursion + (haskell-interactive-mode-goto-end-point) + (insert (propertize message + 'read-only t + 'rear-nonsticky t))))) + +(defun haskell-interactive-mode-goto-end-point () + "Go to the 'end' of the buffer (before the prompt.)" + (goto-char haskell-interactive-mode-prompt-start) + (goto-char (line-beginning-position))) + +(defun haskell-interactive-mode-history-add (input) + "Add item to the history." + (setq haskell-interactive-mode-history + (cons "" + (cons input + (remove-if (lambda (i) (or (string= i input) (string= i ""))) + haskell-interactive-mode-history)))) + (setq haskell-interactive-mode-history-index + 0)) + +(defun haskell-interactive-mode-history-toggle (n) + "Toggle the history n items up or down." + (unless (null haskell-interactive-mode-history) + (setq haskell-interactive-mode-history-index + (mod (+ haskell-interactive-mode-history-index n) + (length haskell-interactive-mode-history))) + (unless (zerop haskell-interactive-mode-history-index) + (message "History item: %d" haskell-interactive-mode-history-index)) + (haskell-interactive-mode-set-prompt + (nth haskell-interactive-mode-history-index + haskell-interactive-mode-history)))) + +(defun haskell-interactive-mode-history-previous (arg) + "Cycle backwards through input history." + (interactive "*p") + (when (haskell-interactive-at-prompt) + (if (not (zerop arg)) + (haskell-interactive-mode-history-toggle arg) + (setq haskell-interactive-mode-history-index 0) + (haskell-interactive-mode-history-toggle 1)))) + +(defun haskell-interactive-mode-history-next (arg) + "Cycle forward through input history." + (interactive "*p") + (when (haskell-interactive-at-prompt) + (if (not (zerop arg)) + (haskell-interactive-mode-history-toggle (- arg)) + (setq haskell-interactive-mode-history-index 0) + (haskell-interactive-mode-history-toggle -1)))) + +(defun haskell-interactive-mode-set-prompt (p) + "Set (and overwrite) the current prompt." + (with-current-buffer (haskell-session-interactive-buffer (haskell-session)) + (goto-char haskell-interactive-mode-prompt-start) + (delete-region (point) (point-max)) + (insert p))) + +(defun haskell-interactive-buffer () + "Get the interactive buffer of the session." + (haskell-session-interactive-buffer (haskell-session))) + +(defun haskell-interactive-show-load-message (session type module-name file-name echo) + "Show the '(Compiling|Loading) X' message." + (let ((msg (ecase type + ('compiling + (if haskell-interactive-mode-include-file-name + (format "Compiling: %s (%s)" module-name file-name) + (format "Compiling: %s" module-name))) + ('loading (format "Loading: %s" module-name))))) + (haskell-mode-message-line msg) + (when haskell-interactive-mode-delete-superseded-errors + (haskell-interactive-mode-delete-compile-messages session file-name)) + (when echo + (haskell-interactive-mode-echo session msg)))) + +(defun haskell-interactive-mode-completion-at-point-function () + "Offer completions for partial expression between prompt and point" + (when (haskell-interactive-at-prompt) + (let* ((process (haskell-process)) + (session (haskell-session)) + (inp (haskell-interactive-mode-input-partial))) + (if (string= inp (car-safe haskell-interactive-mode-completion-cache)) + (cdr haskell-interactive-mode-completion-cache) + (let* ((resp2 (haskell-process-get-repl-completions process inp)) + (rlen (- (length inp) (length (car resp2)))) + (coll (append (if (string-prefix-p inp "import") '("import")) + (if (string-prefix-p inp "let") '("let")) + (cdr resp2))) + (result (list (- (point) rlen) (point) coll))) + (setq haskell-interactive-mode-completion-cache (cons inp result)) + result))))) + +(defun haskell-interactive-mode-tab () + "Do completion if at prompt or else try collapse/expand." + (interactive) + (cond + ((haskell-interactive-at-prompt) + (completion-at-point)) + ((get-text-property (point) 'collapsible) + (let ((column (current-column))) + (search-backward-regexp "^[^ ]") + (haskell-interactive-mode-tab-expand) + (goto-char (+ column (line-beginning-position))))) + (t (haskell-interactive-mode-tab-expand)))) + +(defun haskell-interactive-mode-tab-expand () + "Expand the rest of the message." + (cond ((get-text-property (point) 'expandable) + (let* ((pos (1+ (line-end-position))) + (visibility (get-text-property pos 'invisible)) + (length (1+ (get-text-property pos 'message-length)))) + (let ((inhibit-read-only t)) + (put-text-property pos + (+ pos length) + 'invisible + (not visibility))))))) + +(defconst haskell-interactive-mode-error-regexp + "^\\([^\r\n:]+\\):\\([0-9]+\\):\\([0-9]+\\)\\(-[0-9]+\\)?:") + +(defun haskell-interactive-at-compile-message () + "Am I on a compile message?" + (save-excursion + (goto-char (line-beginning-position)) + (looking-at haskell-interactive-mode-error-regexp))) + +(defun haskell-interactive-mode-error-backward (&optional count) + "Go backward to the previous error." + (interactive) + (search-backward-regexp haskell-interactive-mode-error-regexp nil t count)) + +(defun haskell-interactive-mode-error-forward (&optional count) + "Go forward to the next error, or return to the REPL." + (interactive) + (goto-char (line-end-position)) + (if (search-forward-regexp haskell-interactive-mode-error-regexp nil t count) + (progn (goto-char (line-beginning-position)) + t) + (progn (goto-char (point-max)) + nil))) + +(defun haskell-interactive-next-error-function (&optional n reset) + "See `next-error-function' for more information." + + (let* ((session (haskell-session)) + (next-error-region (haskell-session-get session 'next-error-region)) + (next-error-locus (haskell-session-get session 'next-error-locus)) + (reset-locus nil)) + + (when (and next-error-region (or reset (and (/= n 0) (not next-error-locus)))) + (goto-char (car next-error-region)) + (unless (looking-at haskell-interactive-mode-error-regexp) + (haskell-interactive-mode-error-forward)) + + (setq reset-locus t) + (unless (looking-at haskell-interactive-mode-error-regexp) + (error "no errors found"))) + + ;; move point if needed + (cond + (reset-locus nil) + ((> n 0) (unless (haskell-interactive-mode-error-forward n) + (error "no more errors"))) + + ((< n 0) (unless (haskell-interactive-mode-error-backward (- n)) + (error "no more errors")))) + + (let ((orig-line (buffer-substring-no-properties (line-beginning-position) (line-end-position)))) + + (when (string-match haskell-interactive-mode-error-regexp orig-line) + (let* ((msgmrk (set-marker (make-marker) (line-beginning-position))) + (file (match-string 1 orig-line)) + (line (match-string 2 orig-line)) + (col1 (match-string 3 orig-line)) + (col2 (match-string 4 orig-line)) + + (cabal-relative-file (expand-file-name file (haskell-session-cabal-dir session))) + (src-relative-file (expand-file-name file (haskell-session-current-dir session))) + + (real-file (cond ((file-exists-p cabal-relative-file) cabal-relative-file) + ((file-exists-p src-relative-file) src-relative-file)))) + + (haskell-session-set session 'next-error-locus msgmrk) + + (if real-file + (let ((m1 (make-marker)) + (m2 (make-marker))) + (with-current-buffer (find-file-noselect real-file) + (save-excursion + (goto-char (point-min)) + (forward-line (1- (string-to-number line))) + (set-marker m1 (+ (string-to-number col1) (point) -1)) + + (when col2 + (set-marker m2 (- (point) (string-to-number col2)))))) + ;; ...finally select&hilight error locus + (compilation-goto-locus msgmrk m1 (and (marker-position m2) m2))) + (error "don't know where to find %S" file))))))) + +(defun haskell-interactive-mode-delete-compile-messages (session &optional file-name) + "Delete compile messages in REPL buffer. +If FILE-NAME is non-nil, restrict to removing messages concerning +FILE-NAME only." + (with-current-buffer (haskell-session-interactive-buffer session) + (save-excursion + (goto-char (point-min)) + (when (search-forward-regexp "^Compilation failed.$" nil t 1) + (let ((inhibit-read-only t)) + (delete-region (line-beginning-position) + (1+ (line-end-position)))) + (goto-char (point-min))) + (while (when (re-search-forward haskell-interactive-mode-error-regexp nil t) + (let ((msg-file-name (match-string-no-properties 1)) + (msg-startpos (line-beginning-position))) + ;; skip over hanging continuation message lines + (while (progn (forward-line) (looking-at "^ "))) + + (when (or (not file-name) (string= file-name msg-file-name)) + (let ((inhibit-read-only t)) + (set-text-properties msg-startpos (point) nil)) + (delete-region msg-startpos (point)) + )) + t))))) + +(defun haskell-interactive-mode-visit-error () + "Visit the buffer of the current (or last) error message." + (interactive) + (with-current-buffer (haskell-session-interactive-buffer (haskell-session)) + (if (progn (goto-char (line-beginning-position)) + (looking-at haskell-interactive-mode-error-regexp)) + (progn (forward-line -1) + (haskell-interactive-jump-to-error-line)) + (progn (goto-char (point-max)) + (haskell-interactive-mode-error-backward) + (haskell-interactive-jump-to-error-line))))) + +;;;###autoload +(defun haskell-interactive-mode-reset-error (session) + "Reset the error cursor position." + (interactive) + (with-current-buffer (haskell-session-interactive-buffer session) + (haskell-interactive-mode-goto-end-point) + (let ((mrk (point-marker))) + (haskell-session-set session 'next-error-locus nil) + (haskell-session-set session 'next-error-region (cons mrk (copy-marker mrk t)))) + (goto-char (point-max)))) + +(defun haskell-interactive-kill () + "Kill the buffer and (maybe) the session." + (interactive) + (when (eq major-mode 'haskell-interactive-mode) + (when (and (boundp 'haskell-session) + haskell-session + (y-or-n-p "Kill the whole session?")) + (haskell-session-kill t)))) + +(add-hook 'kill-buffer-hook 'haskell-interactive-kill) + +(provide 'haskell-interactive-mode) + +;; Local Variables: +;; byte-compile-warnings: (not cl-functions) +;; End: + +;;; haskell-interactive-mode.el ends here diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/haskell-interactive-mode.elc Binary file .emacs.d/haskell-mode/haskell-interactive-mode.elc has changed diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/haskell-menu.el --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/haskell-mode/haskell-menu.el Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,164 @@ +;;; haskell-menu.el --- A Haskell sessions menu + +;; Copyright (C) 2013 Chris Done + +;; Author: Chris Done + +;; This file is not part of GNU Emacs. + +;; This file is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; This file is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to +;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. + +;;; Commentary: + +;;; Todo: + +;;; Code: + +(require 'haskell-compat) +(require 'haskell-session) +(require 'haskell-process) +(with-no-warnings (require 'cl)) + +(defcustom haskell-menu-buffer-name "*haskell-menu*" + "The name of the Haskell session menu buffer" + :group 'haskell-interactive + :type 'string) + +;;;###autoload +(defun haskell-menu () + "Launch the Haskell sessions menu." + (interactive) + (or (get-buffer haskell-menu-buffer-name) + (with-current-buffer (get-buffer-create haskell-menu-buffer-name) + (haskell-menu-mode))) + (switch-to-buffer-other-window (get-buffer haskell-menu-buffer-name))) + +(define-derived-mode haskell-menu-mode special-mode "Haskell Session Menu" + "Major mode for managing Haskell sessions. +Each line describes one session. +Letters do not insert themselves; instead, they are commands." + (setq buffer-read-only t) + (set (make-local-variable 'revert-buffer-function) + 'haskell-menu-revert-function) + (setq truncate-lines t) + (haskell-menu-revert-function nil t)) + +(defvar haskell-menu-mode-map + (let ((map (make-keymap))) + (suppress-keymap map t) + (define-key map (kbd "n") 'next-line) + (define-key map (kbd "p") 'previous-line) + (define-key map (kbd "RET") 'haskell-menu-mode-ret) + map) + "Key map for haskell-menu-mode.") + +(defun haskell-menu-revert-function (arg1 arg2) + "Function to refresh the display." + (let ((buffer-read-only nil) + (orig-line (line-number-at-pos)) + (orig-col (current-column))) + (or (eq buffer-undo-list t) + (setq buffer-undo-list nil)) + (erase-buffer) + (haskell-menu-insert-menu) + (goto-char (point-min)) + (forward-line (1- orig-line)) + (forward-char orig-col))) + +(defun haskell-menu-insert-menu () + "Insert the Haskell sessions menu to the current buffer." + (if (null haskell-sessions) + (insert "No Haskell sessions.") + (haskell-menu-tabulate + (list "Name" "PID" "Time" "RSS" "Cabal directory" "Working directory" "Command") + (mapcar (lambda (session) + (let ((process (haskell-process-process (haskell-session-process session)))) + (cond + (process + (let ((id (process-id process))) + (list (propertize (haskell-session-name session) 'face 'buffer-menu-buffer) + (if (process-live-p process) (number-to-string id) "-") + (if (process-live-p process) + (format-time-string "%H:%M:%S" + (encode-time (caddr (assoc 'etime (process-attributes id))) + 0 0 0 0 0)) + "-") + (if (process-live-p process) + (concat (number-to-string (/ (cdr (assoc 'rss (process-attributes id))) + 1024)) + "MB") + "-") + (haskell-session-cabal-dir session) + (haskell-session-current-dir session) + (mapconcat 'identity (process-command process) " ")))) + (t (list (propertize (haskell-session-name session) 'face 'buffer-menu-buffer) + "—" + "—" + "—" + (haskell-session-cabal-dir session) + (haskell-session-current-dir session)))))) + haskell-sessions)))) + +(defun haskell-menu-tabulate (headings rows) + "Prints a list of lists as a formatted table to the current buffer." + (let* ((columns (length headings)) + (widths (make-list columns 0))) + ;; Calculate column widths. This is kind of hideous. + (dolist (row rows) + (setq widths + (let ((list (list))) + (dotimes (i columns) + (setq list (cons (max (nth i widths) + (1+ (length (nth i row))) + (1+ (length (nth i headings)))) + list))) + (reverse list)))) + ;; Print headings. + (let ((heading (propertize " " 'display '(space :align-to 0)))) + (dotimes (i columns) + (setq heading (concat heading + (format (concat "%-" (number-to-string (nth i widths)) "s") + (nth i headings))))) + (setq header-line-format heading)) + ;; Print tabulated rows. + (dolist (row rows) + (dotimes (i columns) + (insert (format (concat "%-" (number-to-string (nth i widths)) "s") + (nth i row)))) + (insert "\n")))) + +(defun haskell-menu-mode-ret () + "Handle RET key." + (interactive) + (let* ((name (save-excursion + (goto-char (line-beginning-position)) + (buffer-substring-no-properties (point) + (progn (search-forward " ") + (forward-char -1) + (point))))) + (session (car (remove-if-not (lambda (session) + (string= (haskell-session-name session) + name)) + haskell-sessions)))) + (switch-to-buffer (haskell-session-interactive-buffer session)))) + +(provide 'haskell-menu) + +;; Local Variables: +;; byte-compile-warnings: (not cl-functions) +;; End: + +;;; haskell-menu.el ends here diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/haskell-menu.elc Binary file .emacs.d/haskell-mode/haskell-menu.elc has changed diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/haskell-mode-autoloads.el --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/haskell-mode/haskell-mode-autoloads.el Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,729 @@ +;;; haskell-mode-autoloads.el --- automatically extracted autoloads +;; +;;; Code: + + +;;;### (autoloads (ghc-core-mode ghc-core-create-core) "ghc-core" +;;;;;; "ghc-core.el" (21298 32076 0 0)) +;;; Generated autoloads from ghc-core.el + +(autoload 'ghc-core-create-core "ghc-core" "\ +Compile and load the current buffer as tidy core. + +\(fn)" t nil) + +(add-to-list 'auto-mode-alist '("\\.hcr\\'" . ghc-core-mode)) + +(autoload 'ghc-core-mode "ghc-core" "\ +Major mode for GHC Core files. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (haskell-align-imports) "haskell-align-imports" +;;;;;; "haskell-align-imports.el" (21298 32076 0 0)) +;;; Generated autoloads from haskell-align-imports.el + +(autoload 'haskell-align-imports "haskell-align-imports" "\ +Align all the imports in the buffer. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (haskell-c-mode) "haskell-c" "haskell-c.el" (21298 +;;;;;; 32076 0 0)) +;;; Generated autoloads from haskell-c.el + +(add-to-list 'auto-mode-alist '("\\.hsc\\'" . haskell-c-mode)) + +(autoload 'haskell-c-mode "haskell-c" "\ +Major mode for Haskell FFI files. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (haskell-cabal-visit-file haskell-cabal-get-dir +;;;;;; haskell-cabal-mode) "haskell-cabal" "haskell-cabal.el" (21298 +;;;;;; 32076 0 0)) +;;; Generated autoloads from haskell-cabal.el + +(add-to-list 'auto-mode-alist '("\\.cabal\\'" . haskell-cabal-mode)) + +(autoload 'haskell-cabal-mode "haskell-cabal" "\ +Major mode for Cabal package description files. + +\(fn)" t nil) + +(autoload 'haskell-cabal-get-dir "haskell-cabal" "\ +Get the Cabal dir for a new project. Various ways of figuring this out, + and indeed just prompting the user. Do them all. + +\(fn)" nil nil) + +(autoload 'haskell-cabal-visit-file "haskell-cabal" "\ +Locate and visit package description file for file visited by current buffer. +This uses `haskell-cabal-find-file' to locate the closest +\".cabal\" file and open it. This command assumes a common Cabal +project structure where the \".cabal\" file is in the top-folder +of the project, and all files related to the project are in or +below the top-folder. If called with non-nil prefix argument +OTHER-WINDOW use `find-file-other-window'. + +\(fn OTHER-WINDOW)" t nil) + +;;;*** + +;;;### (autoloads (haskell-compile) "haskell-compile" "haskell-compile.el" +;;;;;; (21298 32076 0 0)) +;;; Generated autoloads from haskell-compile.el + +(autoload 'haskell-compile "haskell-compile" "\ +Compile the Haskell program including the current buffer. +Tries to locate the next cabal description in current or parent +folders via `haskell-cabal-find-dir' and if found, invoke +`haskell-compile-cabal-build-command' from the cabal package root +folder. If no cabal package could be detected, +`haskell-compile-command' is used instead. + +If prefix argument EDIT-COMMAND is non-nil (and not a negative +prefix `-'), `haskell-compile' prompts for custom compile +command. + +If EDIT-COMMAND contains the negative prefix argument `-', +`haskell-compile' calls the alternative command defined in +`haskell-compile-cabal-build-alt-command' if a cabal package was +detected. + +`haskell-compile' uses `haskell-compilation-mode' which is +derived from `compilation-mode'. See Info +node `(haskell-mode)compilation' for more details. + +\(fn &optional EDIT-COMMAND)" t nil) + +;;;*** + +;;;### (autoloads (haskell-decl-scan-mode turn-on-haskell-decl-scan +;;;;;; haskell-ds-create-imenu-index) "haskell-decl-scan" "haskell-decl-scan.el" +;;;;;; (21298 32076 0 0)) +;;; Generated autoloads from haskell-decl-scan.el + +(autoload 'haskell-ds-create-imenu-index "haskell-decl-scan" "\ +Function for finding `imenu' declarations in Haskell mode. +Finds all declarations (classes, variables, imports, instances and +datatypes) in a Haskell file for the `imenu' package. + +\(fn)" nil nil) + +(autoload 'turn-on-haskell-decl-scan "haskell-decl-scan" "\ +Unconditionally activate `haskell-decl-scan-mode'. + +\(fn)" t nil) + +(autoload 'haskell-decl-scan-mode "haskell-decl-scan" "\ +Toggle Haskell declaration scanning minor mode on or off. +With a prefix argument ARG, enable minor mode if ARG is +positive, and disable it otherwise. If called from Lisp, enable +the mode if ARG is omitted or nil, and toggle it if ARG is `toggle'. + +See also info node `(haskell-mode)haskell-decl-scan-mode' for +more details about this minor mode. + +Top-level declarations are scanned and listed in the menu item +\"Declarations\" (if enabled via option +`haskell-decl-scan-add-to-menubar'). Selecting an item from this +menu will take point to the start of the declaration. + +\\[beginning-of-defun] and \\[end-of-defun] move forward and backward to the start of a declaration. + +This may link with `haskell-doc-mode'. + +For non-literate and LaTeX-style literate scripts, we assume the +common convention that top-level declarations start at the first +column. For Bird-style literate scripts, we assume the common +convention that top-level declarations start at the third column, +ie. after \"> \". + +Anything in `font-lock-comment-face' is not considered for a +declaration. Therefore, using Haskell font locking with comments +coloured in `font-lock-comment-face' improves declaration scanning. + +Literate Haskell scripts are supported: If the value of +`haskell-literate' (set automatically by `literate-haskell-mode') +is `bird', a Bird-style literate script is assumed. If it is nil +or `tex', a non-literate or LaTeX-style literate script is +assumed, respectively. + +Invokes `haskell-decl-scan-mode-hook' on activation. + +\(fn &optional ARG)" t nil) + +;;;*** + +;;;### (autoloads (haskell-doc-show-type haskell-doc-current-info +;;;;;; haskell-doc-mode) "haskell-doc" "haskell-doc.el" (21298 32076 +;;;;;; 0 0)) +;;; Generated autoloads from haskell-doc.el + +(autoload 'haskell-doc-mode "haskell-doc" "\ +Enter `haskell-doc-mode' for showing fct types in the echo area. +See variable docstring. + +\(fn &optional ARG)" t nil) + +(defalias 'turn-on-haskell-doc-mode 'haskell-doc-mode) + +(defalias 'turn-on-haskell-doc 'haskell-doc-mode) + +(autoload 'haskell-doc-current-info "haskell-doc" "\ +Return the info about symbol at point. +Meant for `eldoc-documentation-function'. + +\(fn)" nil nil) + +(autoload 'haskell-doc-show-type "haskell-doc" "\ +Show the type of the function near point. +For the function under point, show the type in the echo area. +This information is extracted from the `haskell-doc-prelude-types' alist +of prelude functions and their types, or from the local functions in the +current buffer. + +\(fn &optional SYM)" t nil) + +;;;*** + +;;;### (autoloads (haskell-font-lock-choose-keywords) "haskell-font-lock" +;;;;;; "haskell-font-lock.el" (21298 32076 0 0)) +;;; Generated autoloads from haskell-font-lock.el + +(autoload 'haskell-font-lock-choose-keywords "haskell-font-lock" "\ + + +\(fn)" nil nil) + +;;;*** + +;;;### (autoloads (haskell-indent-mode turn-on-haskell-indent) "haskell-indent" +;;;;;; "haskell-indent.el" (21298 32076 0 0)) +;;; Generated autoloads from haskell-indent.el + +(autoload 'turn-on-haskell-indent "haskell-indent" "\ +Turn on ``intelligent'' Haskell indentation mode. + +\(fn)" nil nil) + +(autoload 'haskell-indent-mode "haskell-indent" "\ +``Intelligent'' Haskell indentation mode. +This deals with the layout rule of Haskell. +\\[haskell-indent-cycle] starts the cycle which proposes new +possibilities as long as the TAB key is pressed. Any other key +or mouse click terminates the cycle and is interpreted except for +RET which merely exits the cycle. +Other special keys are: + \\[haskell-indent-insert-equal] + inserts an = + \\[haskell-indent-insert-guard] + inserts an | + \\[haskell-indent-insert-otherwise] + inserts an | otherwise = +these functions also align the guards and rhs of the current definition + \\[haskell-indent-insert-where] + inserts a where keyword + \\[haskell-indent-align-guards-and-rhs] + aligns the guards and rhs of the region + \\[haskell-indent-put-region-in-literate] + makes the region a piece of literate code in a literate script + +Invokes `haskell-indent-hook' if not nil. + +\(fn &optional ARG)" t nil) + +;;;*** + +;;;### (autoloads (turn-on-haskell-indentation haskell-indentation-mode) +;;;;;; "haskell-indentation" "haskell-indentation.el" (21298 32076 +;;;;;; 0 0)) +;;; Generated autoloads from haskell-indentation.el + +(autoload 'haskell-indentation-mode "haskell-indentation" "\ +Haskell indentation mode that deals with the layout rule. +It rebinds RET, DEL and BACKSPACE, so that indentations can be +set and deleted as if they were real tabs. It supports +autofill-mode. + +\(fn &optional ARG)" t nil) + +(autoload 'turn-on-haskell-indentation "haskell-indentation" "\ +Turn on the haskell-indentation minor mode. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (haskell-interactive-mode-reset-error haskell-interactive-mode-echo +;;;;;; haskell-interactive-switch haskell-interactive-bring haskell-interactive-mode) +;;;;;; "haskell-interactive-mode" "haskell-interactive-mode.el" +;;;;;; (21298 32076 0 0)) +;;; Generated autoloads from haskell-interactive-mode.el + +(autoload 'haskell-interactive-mode "haskell-interactive-mode" "\ +Interactive mode for Haskell. + +See Info node `(haskell-mode)haskell-interactive-mode' for more +information. + +Key bindings: +\\{haskell-interactive-mode-map} + +\(fn)" t nil) + +(autoload 'haskell-interactive-bring "haskell-interactive-mode" "\ +Bring up the interactive mode for this session. + +\(fn)" t nil) + +(autoload 'haskell-interactive-switch "haskell-interactive-mode" "\ +Switch to the interactive mode for this session. + +\(fn)" t nil) + +(autoload 'haskell-interactive-mode-echo "haskell-interactive-mode" "\ +Echo a read only piece of text before the prompt. + +\(fn SESSION MESSAGE &optional MODE)" nil nil) + +(autoload 'haskell-interactive-mode-reset-error "haskell-interactive-mode" "\ +Reset the error cursor position. + +\(fn SESSION)" t nil) + +;;;*** + +;;;### (autoloads (haskell-menu) "haskell-menu" "haskell-menu.el" +;;;;;; (21298 32076 0 0)) +;;; Generated autoloads from haskell-menu.el + +(autoload 'haskell-menu "haskell-menu" "\ +Launch the Haskell sessions menu. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (haskell-hayoo haskell-hoogle literate-haskell-mode +;;;;;; haskell-mode haskell-customize haskell-mode-view-news haskell-version) +;;;;;; "haskell-mode" "haskell-mode.el" (21298 32076 0 0)) +;;; Generated autoloads from haskell-mode.el + +(autoload 'haskell-version "haskell-mode" "\ +Show the `haskell-mode` version in the echo area. +With prefix argument HERE, insert it at point. +When FULL is non-nil, use a verbose version string. +When MESSAGE is non-nil, display a message with the version. + +\(fn &optional HERE)" t nil) + +(autoload 'haskell-mode-view-news "haskell-mode" "\ +Display information on recent changes to haskell-mode. + +\(fn)" t nil) + +(autoload 'haskell-customize "haskell-mode" "\ +Browse the haskell customize sub-tree. +This calls 'customize-browse' with haskell as argument and makes +sure all haskell customize definitions have been loaded. + +\(fn)" t nil) + +(defvar haskell-mode-map (let ((map (make-sparse-keymap))) (define-key map [24 4] 'inferior-haskell-send-decl) (define-key map [3 26] 'switch-to-haskell) (define-key map [3 12] 'inferior-haskell-load-file) (define-key map [3 2] 'switch-to-haskell) (define-key map (kbd "C-c C-t") 'inferior-haskell-type) (define-key map (kbd "C-c C-i") 'inferior-haskell-info) (define-key map (kbd "C-c M-.") 'inferior-haskell-find-definition) (define-key map (kbd "C-c C-d") 'inferior-haskell-find-haddock) (define-key map [3 22] 'haskell-check) (define-key map (kbd "C-c C-.") 'haskell-mode-format-imports) (define-key map [remap delete-indentation] 'haskell-delete-indentation) map) "\ +Keymap used in Haskell mode.") + +(autoload 'haskell-mode "haskell-mode" "\ +Major mode for editing Haskell programs. + +See also Info node `(haskell-mode)Getting Started' for more +information about this mode. + +\\ +Literate scripts are supported via `literate-haskell-mode'. +The variable `haskell-literate' indicates the style of the script in the +current buffer. See the documentation on this variable for more details. + +Use `haskell-version' to find out what version of Haskell mode you are +currently using. + +Additional Haskell mode modules can be hooked in via `haskell-mode-hook'; +see documentation for that variable for more details. + +\(fn)" t nil) + +(autoload 'literate-haskell-mode "haskell-mode" "\ +As `haskell-mode' but for literate scripts. + +\(fn)" t nil) +(add-to-list 'auto-mode-alist '("\\.\\(?:[gh]s\\|hi\\)\\'" . haskell-mode)) +(add-to-list 'auto-mode-alist '("\\.l[gh]s\\'" . literate-haskell-mode)) +(add-to-list 'interpreter-mode-alist '("runghc" . haskell-mode)) +(add-to-list 'interpreter-mode-alist '("runhaskell" . haskell-mode)) + +(autoload 'haskell-hoogle "haskell-mode" "\ +Do a Hoogle search for QUERY. + +\(fn QUERY)" t nil) + +(defalias 'hoogle 'haskell-hoogle) + +(autoload 'haskell-hayoo "haskell-mode" "\ +Do a Hayoo search for QUERY. + +\(fn QUERY)" t nil) + +(defalias 'hayoo 'haskell-hayoo) + +;;;*** + +;;;### (autoloads (haskell-move-nested-left haskell-move-nested-right +;;;;;; haskell-move-nested) "haskell-move-nested" "haskell-move-nested.el" +;;;;;; (21298 32076 0 0)) +;;; Generated autoloads from haskell-move-nested.el + +(autoload 'haskell-move-nested "haskell-move-nested" "\ +Shift the nested off-side-rule block adjacent to point by COLS columns to the right. + +In Transient Mark mode, if the mark is active, operate on the contents +of the region instead. + +\(fn COLS)" nil nil) + +(autoload 'haskell-move-nested-right "haskell-move-nested" "\ +Increase indentation of the following off-side-rule block adjacent to point. + +Use a numeric prefix argument to indicate amount of indentation to apply. + +In Transient Mark mode, if the mark is active, operate on the contents +of the region instead. + +\(fn COLS)" t nil) + +(autoload 'haskell-move-nested-left "haskell-move-nested" "\ +Decrease indentation of the following off-side-rule block adjacent to point. + +Use a numeric prefix argument to indicate amount of indentation to apply. + +In Transient Mark mode, if the mark is active, operate on the contents +of the region instead. + +\(fn COLS)" t nil) + +;;;*** + +;;;### (autoloads (haskell-navigate-imports-return haskell-navigate-imports-go +;;;;;; haskell-navigate-imports) "haskell-navigate-imports" "haskell-navigate-imports.el" +;;;;;; (21298 32076 0 0)) +;;; Generated autoloads from haskell-navigate-imports.el + +(autoload 'haskell-navigate-imports "haskell-navigate-imports" "\ +Cycle the Haskell import lines or return to point (with prefix arg). + +\(fn &optional RETURN)" t nil) + +(autoload 'haskell-navigate-imports-go "haskell-navigate-imports" "\ +Go to the first line of a list of consequtive import lines. Cycles. + +\(fn)" t nil) + +(autoload 'haskell-navigate-imports-return "haskell-navigate-imports" "\ +Return to the non-import point we were at before going to the module list. + If we were originally at an import list, we can just cycle through easily. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (haskell-process haskell-process-start haskell-process-cabal +;;;;;; haskell-process-cabal-build haskell-process-load-or-reload +;;;;;; haskell-process-reload-file haskell-process-load-file haskell-process-do-info +;;;;;; haskell-process-do-type haskell-process-generate-tags) "haskell-process" +;;;;;; "haskell-process.el" (21298 32076 0 0)) +;;; Generated autoloads from haskell-process.el + +(autoload 'haskell-process-generate-tags "haskell-process" "\ +Regenerate the TAGS table. + +\(fn &optional AND-THEN-FIND-THIS-TAG)" t nil) + +(autoload 'haskell-process-do-type "haskell-process" "\ +Print the type of the given expression. + +\(fn &optional INSERT-VALUE)" t nil) + +(autoload 'haskell-process-do-info "haskell-process" "\ +Print info on the identifier at point. +If PROMPT-VALUE is non-nil, request identifier via mini-buffer. + +\(fn &optional PROMPT-VALUE)" t nil) + +(autoload 'haskell-process-load-file "haskell-process" "\ +Load the current buffer file. + +\(fn)" t nil) + +(autoload 'haskell-process-reload-file "haskell-process" "\ +Re-load the current buffer file. + +\(fn)" t nil) + +(autoload 'haskell-process-load-or-reload "haskell-process" "\ +Load or reload. Universal argument toggles which. + +\(fn &optional TOGGLE)" t nil) + +(autoload 'haskell-process-cabal-build "haskell-process" "\ +Build the Cabal project. + +\(fn)" t nil) + +(autoload 'haskell-process-cabal "haskell-process" "\ +Prompts for a Cabal command to run. + +\(fn)" t nil) + +(autoload 'haskell-process-start "haskell-process" "\ +Start the inferior Haskell process. + +\(fn SESSION)" nil nil) + +(autoload 'haskell-process "haskell-process" "\ +Get the current process from the current session. + +\(fn)" nil nil) + +;;;*** + +;;;### (autoloads (haskell-session-process haskell-session haskell-session-maybe +;;;;;; haskell-session-installed-modules haskell-session-all-modules) +;;;;;; "haskell-session" "haskell-session.el" (21298 32076 0 0)) +;;; Generated autoloads from haskell-session.el + +(autoload 'haskell-session-all-modules "haskell-session" "\ +Get all modules -- installed or in the current project. +If DONTCREATE is non-nil don't create a new session. + +\(fn &optional DONTCREATE)" nil nil) + +(autoload 'haskell-session-installed-modules "haskell-session" "\ +Get the modules installed in the current package set. +If DONTCREATE is non-nil don't create a new session. + +\(fn &optional DONTCREATE)" nil nil) + +(autoload 'haskell-session-maybe "haskell-session" "\ +Maybe get the Haskell session, return nil if there isn't one. + +\(fn)" nil nil) + +(autoload 'haskell-session "haskell-session" "\ +Get the Haskell session, prompt if there isn't one or fail. + +\(fn)" nil nil) + +(autoload 'haskell-session-process "haskell-session" "\ +Get the session process. + +\(fn S)" nil nil) + +;;;*** + +;;;### (autoloads (haskell-show-parse haskell-show-parse-and-insert +;;;;;; haskell-show-replace) "haskell-show" "haskell-show.el" (21298 +;;;;;; 32076 0 0)) +;;; Generated autoloads from haskell-show.el + +(autoload 'haskell-show-replace "haskell-show" "\ +Replace the given region containing a Show value with a pretty + printed collapsible version. + +\(fn START END)" nil nil) + +(autoload 'haskell-show-parse-and-insert "haskell-show" "\ +Parse a `string' containing a Show instance value and insert + it pretty printed into the current buffer. + +\(fn GIVEN)" nil nil) + +(autoload 'haskell-show-parse "haskell-show" "\ +Parse the given input into a tree. + +\(fn GIVEN)" nil nil) + +;;;*** + +;;;### (autoloads (turn-on-haskell-simple-indent haskell-simple-indent-mode) +;;;;;; "haskell-simple-indent" "haskell-simple-indent.el" (21298 +;;;;;; 32076 0 0)) +;;; Generated autoloads from haskell-simple-indent.el + +(autoload 'haskell-simple-indent-mode "haskell-simple-indent" "\ +Simple Haskell indentation mode that uses simple heuristic. +In this minor mode, `indent-for-tab-command' (bound to by +default) will move the cursor to the next indent point in the +previous nonblank line, whereas `haskell-simple-indent-backtab' +\(bound to by default) will move the cursor the +previous indent point. An indent point is a non-whitespace +character following whitespace. + +Runs `haskell-simple-indent-hook' on activation. + +\(fn &optional ARG)" t nil) + +(autoload 'turn-on-haskell-simple-indent "haskell-simple-indent" "\ +Turn on function `haskell-simple-indent-mode'. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (haskell-sort-imports) "haskell-sort-imports" "haskell-sort-imports.el" +;;;;;; (21298 32076 0 0)) +;;; Generated autoloads from haskell-sort-imports.el + +(autoload 'haskell-sort-imports "haskell-sort-imports" "\ +Sort the import list at the point. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (haskell-is-prefix-of haskell-string-take haskell-trim) +;;;;;; "haskell-string" "haskell-string.el" (21298 32076 0 0)) +;;; Generated autoloads from haskell-string.el + +(autoload 'haskell-trim "haskell-string" "\ + + +\(fn STRING)" nil nil) + +(autoload 'haskell-string-take "haskell-string" "\ +Take n chars from string. + +\(fn STRING N)" nil nil) + +(autoload 'haskell-is-prefix-of "haskell-string" "\ +Is x string a prefix of y string? + +\(fn X Y)" nil nil) + +;;;*** + +;;;### (autoloads (turn-on-haskell-unicode-input-method) "haskell-unicode-input-method" +;;;;;; "haskell-unicode-input-method.el" (21298 32076 0 0)) +;;; Generated autoloads from haskell-unicode-input-method.el + +(autoload 'turn-on-haskell-unicode-input-method "haskell-unicode-input-method" "\ +Set input method `haskell-unicode'. +See Info node `Unicode(haskell-mode)' for more details. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (haskell-yas-complete) "haskell-yas" "haskell-yas.el" +;;;;;; (21298 32076 0 0)) +;;; Generated autoloads from haskell-yas.el + +(autoload 'haskell-yas-complete "haskell-yas" "\ + + +\(fn &rest ARGS)" nil nil) + +;;;*** + +;;;### (autoloads (inferior-haskell-find-haddock inferior-haskell-find-definition +;;;;;; inferior-haskell-info inferior-haskell-kind inferior-haskell-type +;;;;;; inferior-haskell-send-decl inferior-haskell-load-and-run +;;;;;; inferior-haskell-load-file switch-to-haskell) "inf-haskell" +;;;;;; "inf-haskell.el" (21298 32076 0 0)) +;;; Generated autoloads from inf-haskell.el + +(defalias 'run-haskell 'switch-to-haskell) + +(autoload 'switch-to-haskell "inf-haskell" "\ +Show the inferior-haskell buffer. Start the process if needed. + +\(fn &optional ARG)" t nil) + +(autoload 'inferior-haskell-load-file "inf-haskell" "\ +Pass the current buffer's file to the inferior haskell process. +If prefix arg \\[universal-argument] is given, just reload the previous file. + +\(fn &optional RELOAD)" t nil) + +(autoload 'inferior-haskell-load-and-run "inf-haskell" "\ +Pass the current buffer's file to haskell and then run a COMMAND. + +\(fn COMMAND)" t nil) + +(autoload 'inferior-haskell-send-decl "inf-haskell" "\ +Send current declaration to inferior-haskell process. + +\(fn)" t nil) + +(autoload 'inferior-haskell-type "inf-haskell" "\ +Query the haskell process for the type of the given expression. +If optional argument `insert-value' is non-nil, insert the type above point +in the buffer. This can be done interactively with the \\[universal-argument] prefix. +The returned info is cached for reuse by `haskell-doc-mode'. + +\(fn EXPR &optional INSERT-VALUE)" t nil) + +(autoload 'inferior-haskell-kind "inf-haskell" "\ +Query the haskell process for the kind of the given expression. + +\(fn TYPE)" t nil) + +(autoload 'inferior-haskell-info "inf-haskell" "\ +Query the haskell process for the info of the given expression. + +\(fn SYM)" t nil) + +(autoload 'inferior-haskell-find-definition "inf-haskell" "\ +Attempt to locate and jump to the definition of the given expression. + +\(fn SYM)" t nil) + +(autoload 'inferior-haskell-find-haddock "inf-haskell" "\ +Find and open the Haddock documentation of SYM. +Make sure to load the file into GHCi or Hugs first by using C-c C-l. +Only works for functions in a package installed with ghc-pkg, or +whatever the value of `haskell-package-manager-name' is. + +This function needs to find which package a given module belongs +to. In order to do this, it computes a module-to-package lookup +alist, which is expensive to compute (it takes upwards of five +seconds with more than about thirty installed packages). As a +result, we cache it across sessions using the cache file +referenced by `inferior-haskell-module-alist-file'. We test to +see if this is newer than `haskell-package-conf-file' every time +we load it. + +\(fn SYM)" t nil) + +;;;*** + +;;;### (autoloads nil nil ("haskell-bot.el" "haskell-checkers.el" +;;;;;; "haskell-compat.el" "haskell-debug.el" "haskell-package.el" +;;;;;; "haskell-presentation-mode.el" "haskell-str.el" "haskell-utils.el" +;;;;;; "w3m-haddock.el") (21298 32851 395559 0)) + +;;;*** + +(provide 'haskell-mode-autoloads) +;; Local Variables: +;; version-control: never +;; no-byte-compile: t +;; no-update-autoloads: t +;; coding: utf-8 +;; End: +;;; haskell-mode-autoloads.el ends here diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/haskell-mode-pkg.el.in --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/haskell-mode/haskell-mode-pkg.el.in Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,1 @@ +(define-package "haskell-mode" "@VERSION@" "A Haskell editing mode") diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/haskell-mode.el --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/haskell-mode/haskell-mode.el Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,909 @@ +;;; haskell-mode.el --- A Haskell editing mode -*- coding: utf-8 -*- + +;; Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc +;; Copyright (C) 1992, 1997-1998 Simon Marlow, Graeme E Moss, and Tommy Thorn + +;; Author: 1992 Simon Marlow +;; 1997-1998 Graeme E Moss and +;; Tommy Thorn , +;; 2001-2002 Reuben Thomas (>=v1.4) +;; 2003 Dave Love +;; Keywords: faces files Haskell +;; URL: https://github.com/haskell/haskell-mode + +;; This file is not part of GNU Emacs. + +;; This file is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; This file is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see . + +;;; Commentary: + +;; A major mode for editing Haskell (the functional programming +;; language, see URL `http://www.haskell.org') in Emacs. +;; +;; Some of its major features include: +;; +;; - syntax highlighting (font lock), +;; +;; - automatic indentation, +;; +;; - on-the-fly documentation, +;; +;; - interaction with inferior GHCi/Hugs instance, +;; +;; - scans declarations and places them in a menu. +;; +;; See URL `https://github.com/haskell/haskell-mode' and/or +;; Info node `(haskell-mode)Introduction' for more information. +;; +;; Use `M-x haskell-mode-view-news` (after Haskell Mode is installed) +;; to show information on recent changes in Haskell Mode. + +;;; Change Log: + +;; This mode is based on an editing mode by Simon Marlow 11/1/92 +;; and heavily modified by Graeme E Moss and Tommy Thorn 7/11/98. +;; +;; Version 1.5: +;; Added autoload for haskell-indentation +;; +;; Version 1.43: +;; Various tweaks to doc strings and customization support from +;; Ville Skyttä . +;; +;; Version 1.42: +;; Added autoload for GHCi inferior mode (thanks to Scott +;; Williams for the bug report and fix). +;; +;; Version 1.41: +;; Improved packaging, and made a couple more variables +;; interactively settable. +;; +;; Version 1.4: +;; Added GHCi mode from Chris Webb, and tidied up a little. +;; +;; Version 1.3: +;; The literate or non-literate style of a buffer is now indicated +;; by just the variable haskell-literate: nil, `bird', or `tex'. +;; For literate buffers with ambiguous style, the value of +;; haskell-literate-default is used. +;; +;; Version 1.2: +;; Separated off font locking, declaration scanning and simple +;; indentation, and made them separate modules. Modules can be +;; added easily now. Support for modules haskell-doc, +;; haskell-indent, and haskell-hugs. Literate and non-literate +;; modes integrated into one mode, and literate buffer indicated by +;; value of haskell-literate(-bird-style). +;; +;; Version 1.1: +;; Added support for declaration scanning under XEmacs via +;; func-menu. Moved operators to level two fontification. +;; +;; Version 1.0: +;; Added a nice indention support from Heribert Schuetz +;; : +;; +;; I have just hacked an Emacs Lisp function which you might prefer +;; to `indent-relative' in haskell-mode.el. See below. It is not +;; really Haskell-specific because it does not take into account +;; keywords like `do', `of', and `let' (where the layout rule +;; applies), but I already find it useful. +;; +;; Cleaned up the imenu support. Added support for literate scripts. +;; +;; Version 0.103 [HWL]: +;; From Hans Wolfgang Loidl : +;; +;; I (HWL) added imenu support by copying the appropriate functions +;; from hugs-mode. A menu-bar item "Declarations" is now added in +;; haskell mode. The new code, however, needs some clean-up. +;; +;; Version 0.102: +;; +;; Moved C-c C-c key binding to comment-region. Leave M-g M-g to do +;; the work. comment-start-skip is changed to comply with comment-start. +;; +;; Version 0.101: +;; +;; Altered indent-line-function to indent-relative. +;; +;; Version 0.100: +;; +;; First official release. + +;;; Code: + +(require 'dabbrev) +(require 'compile) +(require 'flymake) +(require 'outline) +(require 'haskell-align-imports) +(require 'haskell-sort-imports) +(require 'haskell-string) +(with-no-warnings (require 'cl)) + +;; FIXME: code-smell: too many forward decls for haskell-session are required here +(defvar haskell-session) +(declare-function haskell-process-do-try-info "haskell-process" (sym)) +(declare-function haskell-process-generate-tags "haskell-process" (&optional and-then-find-this-tag)) +(declare-function haskell-session "haskell-session" ()) +(declare-function haskell-session-all-modules "haskell-session" (&optional DONTCREATE)) +(declare-function haskell-session-cabal-dir "haskell-session" (session)) +(declare-function haskell-session-maybe "haskell-session" ()) +(declare-function haskell-session-tags-filename "haskell-session" (session)) +(declare-function haskell-session-current-dir "haskell-session" (session)) + +;; All functions/variables start with `(literate-)haskell-'. + +;; Version of mode. +(defconst haskell-version "@VERSION@" + "The release version of `haskell-mode'.") + +(defconst haskell-git-version "@GIT_VERSION@" + "The Git version of `haskell-mode'.") + +(defvar haskell-mode-pkg-base-dir (file-name-directory load-file-name) + "Package base directory of installed `haskell-mode'. +Used for locating additional package data files.") + +;;;###autoload +(defun haskell-version (&optional here) + "Show the `haskell-mode` version in the echo area. +With prefix argument HERE, insert it at point. +When FULL is non-nil, use a verbose version string. +When MESSAGE is non-nil, display a message with the version." + (interactive "P") + (let* ((haskell-mode-dir (ignore-errors + (file-name-directory (or (locate-library "haskell-mode") "")))) + (_version (format "haskell-mode version %s (%s @ %s)" + haskell-version + haskell-git-version + haskell-mode-dir))) + (if here + (insert _version) + (message "%s" _version)))) + +;;;###autoload +(defun haskell-mode-view-news () + "Display information on recent changes to haskell-mode." + (interactive) + (with-current-buffer (find-file-read-only (expand-file-name "NEWS" haskell-mode-pkg-base-dir)) + (goto-char (point-min)) + (hide-sublevels 1) + (outline-next-visible-heading 1) + (show-subtree))) + +(defgroup haskell nil + "Major mode for editing Haskell programs." + :link '(custom-manual "(haskell-mode)") + :group 'languages + :prefix "haskell-") + +;;;###autoload +(defun haskell-customize () + "Browse the haskell customize sub-tree. +This calls 'customize-browse' with haskell as argument and makes +sure all haskell customize definitions have been loaded." + (interactive) + ;; make sure all modules with (defcustom ...)s are loaded + (mapc 'require + '(haskell-checkers haskell-compile haskell-doc haskell-font-lock haskell-indentation haskell-indent haskell-interactive-mode haskell-menu haskell-process haskell-yas inf-haskell)) + (customize-browse 'haskell)) + +;; Are we looking at a literate script? +(defvar haskell-literate nil + "*If not nil, the current buffer contains a literate Haskell script. +Possible values are: `bird' and `tex', for Bird-style and LaTeX-style +literate scripts respectively. Set by `haskell-mode' and +`literate-haskell-mode'. For an ambiguous literate buffer -- i.e. does +not contain either \"\\begin{code}\" or \"\\end{code}\" on a line on +its own, nor does it contain \">\" at the start of a line -- the value +of `haskell-literate-default' is used.") +(make-variable-buffer-local 'haskell-literate) +(put 'haskell-literate 'safe-local-variable 'symbolp) +;; Default literate style for ambiguous literate buffers. +(defcustom haskell-literate-default 'bird + "Default value for `haskell-literate'. +Used if the style of a literate buffer is ambiguous. This variable should +be set to the preferred literate style." + :group 'haskell + :type '(choice (const bird) (const tex) (const nil))) + +;;;###autoload +(defvar haskell-mode-map + (let ((map (make-sparse-keymap))) + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + ;; For inferior haskell mode, use the below bindings + ;; (define-key map [?\M-C-x] 'inferior-haskell-send-defun) + ;; (define-key map [?\C-x ?\C-e] 'inferior-haskell-send-last-sexp) + ;; (define-key map [?\C-c ?\C-r] 'inferior-haskell-send-region) + (define-key map [?\C-x ?\C-d] 'inferior-haskell-send-decl) + (define-key map [?\C-c ?\C-z] 'switch-to-haskell) + (define-key map [?\C-c ?\C-l] 'inferior-haskell-load-file) + ;; I think it makes sense to bind inferior-haskell-load-and-run to C-c + ;; C-r, but since it used to be bound to `reload' until June 2007, I'm + ;; going to leave it out for now. + ;; (define-key map [?\C-c ?\C-r] 'inferior-haskell-load-and-run) + (define-key map [?\C-c ?\C-b] 'switch-to-haskell) + ;; (define-key map [?\C-c ?\C-s] 'inferior-haskell-start-process) + ;; That's what M-; is for. + ;; (define-key map "\C-c\C-c" 'comment-region) + (define-key map (kbd "C-c C-t") 'inferior-haskell-type) + (define-key map (kbd "C-c C-i") 'inferior-haskell-info) + (define-key map (kbd "C-c M-.") 'inferior-haskell-find-definition) + (define-key map (kbd "C-c C-d") 'inferior-haskell-find-haddock) + (define-key map [?\C-c ?\C-v] 'haskell-check) + + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + ;; Editing-specific commands + (define-key map (kbd "C-c C-.") 'haskell-mode-format-imports) + (define-key map [remap delete-indentation] 'haskell-delete-indentation) + + map) + "Keymap used in Haskell mode.") + +(easy-menu-define haskell-mode-menu haskell-mode-map + "Menu for the Haskell major mode." + ;; Suggestions from Pupeno : + ;; - choose the underlying interpreter + ;; - look up docs + `("Haskell" + ["Indent line" indent-according-to-mode] + ["Indent region" indent-region mark-active] + ["(Un)Comment region" comment-region mark-active] + "---" + ["Start interpreter" switch-to-haskell] + ["Load file" inferior-haskell-load-file] + "---" + ["Load tidy core" ghc-core-create-core] + "---" + ,(if (default-boundp 'eldoc-documentation-function) + ["Doc mode" eldoc-mode + :style toggle :selected (bound-and-true-p eldoc-mode)] + ["Doc mode" haskell-doc-mode + :style toggle :selected (and (boundp 'haskell-doc-mode) haskell-doc-mode)]) + ["Customize" (customize-group 'haskell)] + )) + +;; Syntax table. +(defvar haskell-mode-syntax-table + (let ((table (make-syntax-table))) + (modify-syntax-entry ?\ " " table) + (modify-syntax-entry ?\t " " table) + (modify-syntax-entry ?\" "\"" table) + (modify-syntax-entry ?\' "\'" table) + (modify-syntax-entry ?_ "w" table) + (modify-syntax-entry ?\( "()" table) + (modify-syntax-entry ?\) ")(" table) + (modify-syntax-entry ?\[ "(]" table) + (modify-syntax-entry ?\] ")[" table) + + (cond ((featurep 'xemacs) + ;; I don't know whether this is equivalent to the below + ;; (modulo nesting). -- fx + (modify-syntax-entry ?{ "(}5" table) + (modify-syntax-entry ?} "){8" table) + (modify-syntax-entry ?- "_ 1267" table)) + (t + ;; In Emacs 21, the `n' indicates that they nest. + ;; The `b' annotation is actually ignored because it's only + ;; meaningful on the second char of a comment-starter, so + ;; on Emacs 20 and before we get wrong results. --Stef + (modify-syntax-entry ?\{ "(}1nb" table) + (modify-syntax-entry ?\} "){4nb" table) + (modify-syntax-entry ?- "_ 123" table))) + (modify-syntax-entry ?\n ">" table) + + (let (i lim) + (map-char-table + (lambda (k v) + (when (equal v '(1)) + ;; The current Emacs 22 codebase can pass either a char + ;; or a char range. + (if (consp k) + (setq i (car k) + lim (cdr k)) + (setq i k + lim k)) + (while (<= i lim) + (when (> i 127) + (modify-syntax-entry i "_" table)) + (setq i (1+ i))))) + (standard-syntax-table))) + + (modify-syntax-entry ?\` "$`" table) + (modify-syntax-entry ?\\ "\\" table) + (mapc (lambda (x) + (modify-syntax-entry x "_" table)) + ;; Some of these are actually OK by default. + "!#$%&*+./:<=>?@^|~") + (unless (featurep 'mule) + ;; Non-ASCII syntax should be OK, at least in Emacs. + (mapc (lambda (x) + (modify-syntax-entry x "_" table)) + (concat "¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿" + "×÷")) + (mapc (lambda (x) + (modify-syntax-entry x "w" table)) + (concat "ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ" + "ØÙÚÛÜÝÞß" + "àáâãäåæçèéêëìíîïðñòóôõö" + "øùúûüýþÿ"))) + table) + "Syntax table used in Haskell mode.") + +(defun haskell-ident-at-point () + "Return the identifier under point, or nil if none found. +May return a qualified name." + (let ((reg (haskell-ident-pos-at-point))) + (when reg + (buffer-substring-no-properties (car reg) (cdr reg))))) + +(defun haskell-ident-pos-at-point () + "Return the span of the identifier under point, or nil if none found. +May return a qualified name." + (save-excursion + ;; Skip whitespace if we're on it. That way, if we're at "map ", we'll + ;; see the word "map". + (if (and (not (eobp)) + (eq ? (char-syntax (char-after)))) + (skip-chars-backward " \t")) + + (let ((case-fold-search nil)) + (multiple-value-bind (start end) + (if (looking-at "\\s_") + (list (progn (skip-syntax-backward "_") (point)) + (progn (skip-syntax-forward "_") (point))) + (list + (progn (skip-syntax-backward "w'") + (skip-syntax-forward "'") (point)) + (progn (skip-syntax-forward "w'") (point)))) + ;; If we're looking at a module ID that qualifies further IDs, add + ;; those IDs. + (goto-char start) + (while (and (looking-at "[[:upper:]]") (eq (char-after end) ?.) + ;; It's a module ID that qualifies further IDs. + (goto-char (1+ end)) + (save-excursion + (when (not (zerop (skip-syntax-forward + (if (looking-at "\\s_") "_" "w'")))) + (setq end (point)))))) + ;; If we're looking at an ID that's itself qualified by previous + ;; module IDs, add those too. + (goto-char start) + (if (eq (char-after) ?.) (forward-char 1)) ;Special case for "." + (while (and (eq (char-before) ?.) + (progn (forward-char -1) + (not (zerop (skip-syntax-backward "w'")))) + (skip-syntax-forward "'") + (looking-at "[[:upper:]]")) + (setq start (point))) + ;; This is it. + (cons start end))))) + +(defun haskell-delete-indentation (&optional arg) + "Like `delete-indentation' but ignoring Bird-style \">\"." + (interactive "*P") + (let ((fill-prefix (or fill-prefix (if (eq haskell-literate 'bird) ">")))) + (delete-indentation arg))) + +;; Various mode variables. + +(defcustom haskell-mode-hook nil + "Hook run after entering `haskell-mode'. + +Some of the supported modules that can be activated via this hook: + + `haskell-decl-scan', Graeme E Moss + Scans top-level declarations, and places them in a menu. + + `haskell-doc', Hans-Wolfgang Loidl + Echoes types of functions or syntax of keywords when the cursor is idle. + + `haskell-indentation', Kristof Bastiaensen + Intelligent semi-automatic indentation Mk2 + + `haskell-indent', Guy Lapalme + Intelligent semi-automatic indentation. + + `haskell-simple-indent', Graeme E Moss and Heribert Schuetz + Simple indentation. + +Module X is activated using the command `turn-on-X'. For example, +`haskell-doc' is activated using `turn-on-haskell-doc'. +For more information on a specific module, see the help for its `X-mode' +function. Some modules can be deactivated using `turn-off-X'. + +See Info node `(haskell-mode)haskell-mode-hook' for more details. + +Warning: do not enable more than one of the three indentation +modes. See Info node `(haskell-mode)indentation' for more +details." + :type 'hook + :group 'haskell + :link '(info-link "(haskell-mode)haskell-mode-hook") + :link '(function-link haskell-mode) + :options `(capitalized-words-mode + imenu-add-menubar-index + turn-on-eldoc-mode + turn-on-haskell-decl-scan + turn-on-haskell-doc + turn-on-haskell-indent + turn-on-haskell-indentation + turn-on-haskell-simple-indent + turn-on-haskell-unicode-input-method)) + +(defvar eldoc-print-current-symbol-info-function) + +;; For compatibility with Emacs < 24, derive conditionally +(defalias 'haskell-parent-mode + (if (fboundp 'prog-mode) 'prog-mode 'fundamental-mode)) + +;; The main mode functions +;;;###autoload +(define-derived-mode haskell-mode haskell-parent-mode "Haskell" + "Major mode for editing Haskell programs. + +See also Info node `(haskell-mode)Getting Started' for more +information about this mode. + +\\ +Literate scripts are supported via `literate-haskell-mode'. +The variable `haskell-literate' indicates the style of the script in the +current buffer. See the documentation on this variable for more details. + +Use `haskell-version' to find out what version of Haskell mode you are +currently using. + +Additional Haskell mode modules can be hooked in via `haskell-mode-hook'; +see documentation for that variable for more details." + :group 'haskell + (set (make-local-variable 'paragraph-start) (concat "^$\\|" page-delimiter)) + (set (make-local-variable 'paragraph-separate) paragraph-start) + (set (make-local-variable 'fill-paragraph-function) 'haskell-fill-paragraph) + ;; (set (make-local-variable 'adaptive-fill-function) 'haskell-adaptive-fill) + (set (make-local-variable 'adaptive-fill-mode) nil) + (set (make-local-variable 'comment-start) "-- ") + (set (make-local-variable 'comment-padding) 0) + (set (make-local-variable 'comment-start-skip) "[-{]-[ \t]*") + (set (make-local-variable 'comment-end) "") + (set (make-local-variable 'comment-end-skip) "[ \t]*\\(-}\\|\\s>\\)") + (set (make-local-variable 'parse-sexp-ignore-comments) nil) + (set (make-local-variable 'indent-line-function) 'haskell-mode-suggest-indent-choice) + ;; Set things up for eldoc-mode. + (set (make-local-variable 'eldoc-documentation-function) + 'haskell-doc-current-info) + ;; Set things up for imenu. + (set (make-local-variable 'imenu-create-index-function) + 'haskell-ds-create-imenu-index) + ;; Set things up for font-lock. + (set (make-local-variable 'font-lock-defaults) + '(haskell-font-lock-choose-keywords + nil nil ((?\' . "w") (?_ . "w")) nil + (font-lock-syntactic-keywords + . haskell-font-lock-choose-syntactic-keywords) + (font-lock-syntactic-face-function + . haskell-syntactic-face-function) + ;; Get help from font-lock-syntactic-keywords. + (parse-sexp-lookup-properties . t))) + ;; Haskell's layout rules mean that TABs have to be handled with extra care. + ;; The safer option is to avoid TABs. The second best is to make sure + ;; TABs stops are 8 chars apart, as mandated by the Haskell Report. --Stef + (set (make-local-variable 'indent-tabs-mode) nil) + (set (make-local-variable 'tab-width) 8) + ;; dynamic abbrev support: recognize Haskell identifiers + ;; Haskell is case-sensitive language + (set (make-local-variable 'dabbrev-case-fold-search) nil) + (set (make-local-variable 'dabbrev-case-distinction) nil) + (set (make-local-variable 'dabbrev-case-replace) nil) + (set (make-local-variable 'dabbrev-abbrev-char-regexp) "\\sw\\|[.]") + (setq haskell-literate nil) + (add-hook 'before-save-hook 'haskell-mode-before-save-handler nil t) + (add-hook 'after-save-hook 'haskell-mode-after-save-handler nil t) + ) + +(defun haskell-fill-paragraph (justify) + (save-excursion + ;; Fill paragraph should only work in comments. + ;; The -- comments are handled properly by default + ;; The {- -} comments need some extra love. + (let* ((syntax-values (syntax-ppss)) + (comment-num (nth 4 syntax-values))) + (cond + ((eq t comment-num) + ;; standard fill works wonders inside a non-nested comment + (fill-comment-paragraph justify)) + + ((integerp comment-num) + ;; we are in a nested comment. lets narrow to comment content + ;; and use plain paragraph fill for that + (let* ((comment-start-point (nth 8 syntax-values)) + (comment-end-point + (save-excursion + (re-search-forward "-}" (point-max) t comment-num) + (point))) + (fill-paragraph-handle-comment nil)) + (save-restriction + (narrow-to-region (+ 2 comment-start-point) (- comment-end-point 2)) + (fill-paragraph justify)))) + ((eolp) + ;; do nothing outside of a comment + t) + (t + ;; go to end of line and try again + (end-of-line) + (haskell-fill-paragraph justify)))))) + + +;; (defun haskell-adaptive-fill () +;; ;; We want to use "-- " as the prefix of "-- |", etc. +;; (let* ((line-end (save-excursion (end-of-line) (point))) +;; (line-start (point))) +;; (save-excursion +;; (unless (in-comment) +;; ;; Try to find the start of a comment. We only fill comments. +;; (search-forward-regexp comment-start-skip line-end t)) +;; (when (in-comment) +;; (let ();(prefix-start (point))) +;; (skip-syntax-forward "^w") +;; (make-string (- (point) line-start) ?\s)))))) + + + +;;;###autoload +(define-derived-mode literate-haskell-mode haskell-mode "LitHaskell" + "As `haskell-mode' but for literate scripts." + (setq haskell-literate + (save-excursion + (goto-char (point-min)) + (cond + ((re-search-forward "^\\\\\\(begin\\|end\\){code}$" nil t) 'tex) + ((re-search-forward "^>" nil t) 'bird) + (t haskell-literate-default)))) + (if (eq haskell-literate 'bird) + ;; fill-comment-paragraph isn't much use there, and even gets confused + ;; by the syntax-table text-properties we add to mark the first char + ;; of each line as a comment-starter. + (set (make-local-variable 'fill-paragraph-handle-comment) nil)) + (set (make-local-variable 'mode-line-process) + '("/" (:eval (symbol-name haskell-literate))))) + +;;;###autoload(add-to-list 'auto-mode-alist '("\\.\\(?:[gh]s\\|hi\\)\\'" . haskell-mode)) +;;;###autoload(add-to-list 'auto-mode-alist '("\\.l[gh]s\\'" . literate-haskell-mode)) +;;;###autoload(add-to-list 'interpreter-mode-alist '("runghc" . haskell-mode)) +;;;###autoload(add-to-list 'interpreter-mode-alist '("runhaskell" . haskell-mode)) + +(defcustom haskell-hoogle-command + (if (executable-find "hoogle") "hoogle") + "Name of the command to use to query Hoogle. +If nil, use the Hoogle web-site." + :group 'haskell + :type '(choice (const :tag "Use Web-site" nil) + string)) + +;;;###autoload +(defun haskell-hoogle (query) + "Do a Hoogle search for QUERY." + (interactive + (let ((def (haskell-ident-at-point))) + (if (and def (symbolp def)) (setq def (symbol-name def))) + (list (read-string (if def + (format "Hoogle query (default %s): " def) + "Hoogle query: ") + nil nil def)))) + (if (null haskell-hoogle-command) + (browse-url (format "http://haskell.org/hoogle/?q=%s" query)) + (lexical-let ((temp-buffer (help-buffer))) + (with-output-to-temp-buffer temp-buffer + (with-current-buffer standard-output + (let ((hoogle-process + (start-process "hoogle" (current-buffer) haskell-hoogle-command query)) + (scroll-to-top + (lambda (process event) + (set-window-start (get-buffer-window temp-buffer t) 1)))) + (set-process-sentinel hoogle-process scroll-to-top))))))) + +;;;###autoload +(defalias 'hoogle 'haskell-hoogle) + +;;;###autoload +(defun haskell-hayoo (query) + "Do a Hayoo search for QUERY." + (interactive + (let ((def (haskell-ident-at-point))) + (if (and def (symbolp def)) (setq def (symbol-name def))) + (list (read-string (if def + (format "Hayoo query (default %s): " def) + "Hayoo query: ") + nil nil def)))) + (browse-url (format "http://holumbus.fh-wedel.de/hayoo/hayoo.html?query=%s" query))) + +;;;###autoload +(defalias 'hayoo 'haskell-hayoo) + +(defcustom haskell-check-command "hlint" + "*Command used to check a Haskell file." + :group 'haskell + :type '(choice (const "hlint") + (const "ghc -fno-code") + (string :tag "Other command"))) + +(defcustom haskell-completing-read-function 'ido-completing-read + "Default function to use for completion." + :group 'haskell + :type '(choice + (function-item :tag "ido" :value ido-completing-read) + (function-item :tag "helm" :value helm--completing-read-default) + (function-item :tag "completing-read" :value completing-read) + (function :tag "Custom function"))) + +(defcustom haskell-stylish-on-save nil + "Whether to run stylish-haskell on the buffer before saving." + :group 'haskell + :type 'boolean) + +(defcustom haskell-tags-on-save nil + "Generate tags via hasktags after saving." + :group 'haskell + :type 'boolean) + +(defvar haskell-saved-check-command nil + "Internal use.") + +(defcustom haskell-indent-spaces 2 + "Number of spaces to indent inwards.") + +;; Like Python. Should be abstracted, sigh. +(defun haskell-check (command) + "Check a Haskell file (default current buffer's file). +Runs COMMAND, a shell command, as if by `compile'. +See `haskell-check-command' for the default." + (interactive + (list (read-string "Checker command: " + (or haskell-saved-check-command + (concat haskell-check-command " " + (let ((name (buffer-file-name))) + (if name + (file-name-nondirectory name)))))))) + (setq haskell-saved-check-command command) + (save-some-buffers (not compilation-ask-about-save) nil) + (compilation-start command)) + +(defun haskell-flymake-init () + "Flymake init function for Haskell. +To be added to `flymake-init-create-temp-buffer-copy'." + (let ((checker-elts (and haskell-saved-check-command + (split-string haskell-saved-check-command)))) + (list (car checker-elts) + (append (cdr checker-elts) + (list (flymake-init-create-temp-buffer-copy + 'flymake-create-temp-inplace)))))) + +(add-to-list 'flymake-allowed-file-name-masks '("\\.l?hs\\'" haskell-flymake-init)) + +(defun haskell-mode-suggest-indent-choice () + "Ran when the user tries to indent in the buffer but no indentation mode has been selected. +Brings up the documentation for haskell-mode-hook." + (describe-variable 'haskell-mode-hook)) + +(defun haskell-mode-format-imports () + "Format the imports by aligning and sorting them." + (interactive) + (let ((col (current-column))) + (haskell-sort-imports) + (haskell-align-imports) + (goto-char (+ (line-beginning-position) + col)))) + +(defun haskell-mode-message-line (str) + "Message only one line, multiple lines just disturbs the programmer." + (let ((lines (split-string str "\n" t))) + (when (and (car lines) (stringp (car lines))) + (message "%s" + (concat (car lines) + (if (and (cdr lines) (stringp (cadr lines))) + (format " [ %s .. ]" (haskell-string-take (haskell-trim (cadr lines)) 10)) + "")))))) + +(defun haskell-mode-contextual-space () + "Contextually do clever stuff when hitting space." + (interactive) + (if (not (haskell-session-maybe)) + (self-insert-command 1) + (cond ((save-excursion (forward-word -1) + (looking-at "^import$")) + (insert " ") + (let ((module (funcall haskell-completing-read-function "Module: " (haskell-session-all-modules)))) + (insert module) + (haskell-mode-format-imports))) + ((not (string= "" (save-excursion (forward-char -1) (haskell-ident-at-point)))) + (let ((ident (save-excursion (forward-char -1) (haskell-ident-at-point)))) + (insert " ") + (haskell-process-do-try-info ident))) + (t (insert " "))))) + +(defun haskell-mode-before-save-handler () + "Function that will be called before buffer's saving." + ) + +(defun haskell-mode-after-save-handler () + "Function that will be called after buffer's saving." + (when haskell-tags-on-save + (ignore-errors (when (and (boundp 'haskell-session) haskell-session) + (haskell-process-generate-tags)))) + (when haskell-stylish-on-save + (ignore-errors (haskell-mode-stylish-buffer))) + (let ((before-save-hook '()) + (after-save-hook '())) + (basic-save-buffer)) + ) + +(defun haskell-mode-buffer-apply-command (cmd) + "Execute shell command CMD with current buffer as input and +replace the whole buffer with the output. If CMD fails the buffer +remains unchanged." + (set-buffer-modified-p t) + (let* ((chomp (lambda (str) + (while (string-match "\\`\n+\\|^\\s-+\\|\\s-+$\\|\n+\\'" str) + (setq str (replace-match "" t t str))) + str)) + (errout (lambda (fmt &rest args) + (let* ((warning-fill-prefix " ")) + (display-warning cmd (apply 'format fmt args) :warning)))) + (filename (buffer-file-name (current-buffer))) + (cmd-prefix (replace-regexp-in-string " .*" "" cmd)) + (tmp-file (make-temp-file cmd-prefix)) + (err-file (make-temp-file cmd-prefix)) + (default-directory (if (and (boundp 'haskell-session) + haskell-session) + (haskell-session-cabal-dir haskell-session) + default-directory)) + (errcode (with-temp-file tmp-file + (call-process cmd filename + (list (current-buffer) err-file) nil))) + (stderr-output + (with-temp-buffer + (insert-file-contents err-file) + (funcall chomp (buffer-substring-no-properties (point-min) (point-max))))) + (stdout-output + (with-temp-buffer + (insert-file-contents tmp-file) + (buffer-substring-no-properties (point-min) (point-max))))) + (if (string= "" stderr-output) + (if (string= "" stdout-output) + (funcall errout + "Error: %s produced no output, leaving buffer alone" cmd) + (save-restriction + (widen) + ;; command successful, insert file with replacement to preserve + ;; markers. + (insert-file-contents tmp-file nil nil nil t))) + ;; non-null stderr, command must have failed + (funcall errout "%s failed: %s" cmd stderr-output) + ) + (delete-file tmp-file) + (delete-file err-file) + )) + +(defun haskell-mode-stylish-buffer () + "Apply stylish-haskell to the current buffer." + (interactive) + (let ((column (current-column)) + (line (line-number-at-pos))) + (haskell-mode-buffer-apply-command "stylish-haskell") + (goto-char (point-min)) + (forward-line (1- line)) + (goto-char (+ column (point))))) + +(defun haskell-mode-tag-find (&optional next-p) + "The tag find function, specific for the particular session." + (interactive "P") + (cond + ((eq 'font-lock-string-face + (get-text-property (point) 'face)) + (let* ((string (save-excursion + (buffer-substring-no-properties + (1+ (search-backward-regexp "\"" (line-beginning-position) nil 1)) + (1- (progn (forward-char 1) + (search-forward-regexp "\"" (line-end-position) nil 1)))))) + (fp (expand-file-name string + (haskell-session-cabal-dir (haskell-session))))) + (find-file + (read-file-name + "" + fp + fp)))) + (t (let ((tags-file-name (haskell-session-tags-filename (haskell-session))) + (tags-revert-without-query t) + (ident (haskell-ident-at-point))) + (when (not (string= "" (haskell-trim ident))) + (cond ((file-exists-p tags-file-name) + (find-tag ident next-p)) + (t (haskell-process-generate-tags ident)))))))) + +;; From Bryan O'Sullivan's blog: +;; http://www.serpentine.com/blog/2007/10/09/using-emacs-to-insert-scc-annotations-in-haskell-code/ +(defun haskell-mode-insert-scc-at-point () + "Insert an SCC annotation at point." + (interactive) + (if (or (looking-at "\\b\\|[ \t]\\|$") (and (not (bolp)) + (save-excursion + (forward-char -1) + (looking-at "\\b\\|[ \t]")))) + (let ((space-at-point (looking-at "[ \t]"))) + (unless (and (not (bolp)) (save-excursion + (forward-char -1) + (looking-at "[ \t]"))) + (insert " ")) + (insert "{-# SCC \"\" #-}") + (unless space-at-point + (insert " ")) + (forward-char (if space-at-point -5 -6))) + (error "Not over an area of whitespace"))) + +;; Also Bryan O'Sullivan's. +(defun haskell-mode-kill-scc-at-point () + "Kill the SCC annotation at point." + (interactive) + (save-excursion + (let ((old-point (point)) + (scc "\\({-#[ \t]*SCC \"[^\"]*\"[ \t]*#-}\\)[ \t]*")) + (while (not (or (looking-at scc) (bolp))) + (forward-char -1)) + (if (and (looking-at scc) + (<= (match-beginning 1) old-point) + (> (match-end 1) old-point)) + (kill-region (match-beginning 0) (match-end 0)) + (error "No SCC at point"))))) + +(defun haskell-rgrep (&optional prompt) + "Grep the effective project for the symbol at point. Very +useful for codebase navigation. Prompts for an arbitrary regexp +given a prefix arg." + (interactive "P") + (let ((sym (if prompt + (read-from-minibuffer "Look for: ") + (haskell-ident-at-point)))) + (rgrep sym + "*.hs" ;; TODO: common Haskell extensions. + (haskell-session-current-dir (haskell-session))))) + +(defun haskell-fontify-as-mode (text mode) + "Fontify TEXT as MODE, returning the fontified text." + (with-temp-buffer + (funcall mode) + (insert text) + (font-lock-fontify-buffer) + (buffer-substring (point-min) (point-max)))) + +(defun haskell-guess-module-name () + "Guess the current module name of the buffer." + (interactive) + (let ((components (loop for part + in (reverse (split-string (buffer-file-name) "/")) + while (let ((case-fold-search nil)) + (string-match "^[A-Z]+" part)) + collect (replace-regexp-in-string "\\.l?hs$" "" part)))) + (mapconcat 'identity (reverse components) "."))) + + +;; Provide ourselves: + +(provide 'haskell-mode) + +;; Local Variables: +;; byte-compile-warnings: (not cl-functions) +;; End: + +;;; haskell-mode.el ends here diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/haskell-mode.elc Binary file .emacs.d/haskell-mode/haskell-mode.elc has changed diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/haskell-mode.info Binary file .emacs.d/haskell-mode/haskell-mode.info has changed diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/haskell-mode.texi --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/haskell-mode/haskell-mode.texi Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,435 @@ +\input texinfo @c -*-texinfo-*- +@c %**start of header +@setfilename haskell-mode.info +@documentencoding UTF-8 +@settitle Haskell Mode @@VERSION@@ +@c %**end of header + +@dircategory Emacs +@direntry +* Haskell Mode: (haskell-mode). Haskell Development Environment for Emacs(en) +@end direntry + +@copying +This manual is for Haskell mode, version @@GIT_VERSION@@ + +Copyright @copyright{} 2013 Haskell Mode contributors. + +@quotation +Permission is granted to copy, distribute and/or modify this document under the terms of the @uref{http://www.gnu.org/licenses/fdl.html,GNU Free Documentation License}, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts and no Back-Cover Texts. +@end quotation +@end copying + +@iftex +@titlepage +@title Haskell Mode +@subtitle Haskell Development Environment for Emacs + +@page +@vskip 0pt plus 1filll +@insertcopying +@end titlepage + +@contents +@end iftex + +@ifhtml +@titlepage +@title Haskell Mode +@subtitle Haskell Development Environment for Emacs + +@end titlepage +@insertcopying +@end ifhtml + +@ifnottex +@node Top +@top Haskell Mode + +Haskell Mode is an Haskell development Environment for GNU Emacs version 23 or later. It provides syntax-based indentation, font locking, editing cabal files, and supports running an inferior Haskell interpreter (e.g. GHCi). + +@end ifnottex + +@menu +* Introduction:: +* Getting Help and Reporting Bugs:: +* Getting Started:: +* Editing Haskell Code:: +* Unicode:: +* Indentation:: +* Compilation:: +* haskell-decl-scan-mode:: +* inferior-haskell-mode:: +* haskell-interactive-mode:: +* haskell-cabal-mode:: +* Concept index:: +* Function index:: +* Variable index:: + +@end menu + +@node Introduction +@chapter Introduction + +@dfn{Haskell Mode} is a major mode providing a convenient environment for editing @uref{http://www.haskell.org,Haskell} programs. + +Some of its major features are: + +@itemize +@item +Syntax highlighting (font lock), +@item +automatic indentation, +@item +on-the-fly documentation, +@item +interaction with inferior GHCi/Hugs instance, and +@item +scanning declarations and placing them in a menu. +@end itemize + +@node Getting Help and Reporting Bugs +@chapter Getting Help and Reporting Bugs + +This Info manual is work in progress and incomplete. However, you can find more information at these locations in the meantime: + +@itemize +@item +@uref{https://github.com/haskell/haskell-mode,Haskell Mode's GitHub Home} +@item +@uref{http://www.haskell.org/haskellwiki/Haskell_mode_for_Emacs,Haskell Wiki Emacs Page} +@end itemize + +If you have any questions or like to discuss something regarding Haskell Mode, please consider sending an email to the @uref{http://projects.haskell.org/cgi-bin/mailman/listinfo/haskellmode-emacs, Haskellmode-emacs mailing list}. The mailing list is also available on @uref{http://gmane.org/, Gmane} via the @uref{http://dir.gmane.org/gmane.comp.lang.haskell.emacs, gmane.comp.lang.haskell.emacs} newsgroup. + +If you have discovered a bug or wish to request a new feature, you can @uref{https://github.com/haskell/haskell-mode/issues/new, file a new issue} with Haskell Mode's issue tracker. When filing a bug, please state your currently used software version (@kbd{M-x haskell-version}, @kbd{M-x version}) and what steps to perform in order to reproduce the bug you're experiencing. Finally, if you happen to be proficient in @ref{Top,Emacs Lisp,,elisp} you are welcome to submit patches via @uref{https://help.github.com/articles/using-pull-requests, GitHub Pull Requests}. + +@node Getting Started +@chapter Getting Started + +If you are reading this, you have most likely already managed to install Haskell Mode in one way or another. However, just for the record, the officially recommended way is to install Haskell Mode via the @uref{http://marmalade-repo.org/packages/haskell-mode,Marmalade package archive} which contains the latest stable release of Haskell Mode. + +@findex haskell-customize +Most of Haskell Mode's settings are configurable via customizable variables (@pxref{Easy Customization,,,emacs}, for details). You can use @kbd{M-x haskell-customize} to browse the @code{haskell} customization sub-tree. + +@vindex haskell-mode-hook +One of the important setting you should customize is the @code{haskell-mode-hook} variable (@pxref{Hooks,,,emacs}) which gets run right after the @code{haskell-mode} major mode is initialized for a buffer. You can customize @code{haskell-mode-hook} by @kbd{M-x customize-variable @key{RET} haskell-mode-hook}. It's highly recommended you set up indentation to match your preferences; @xref{Indentation}, for more details about the indentation modes included with Haskell Mode. + +@c TODO: +@c provide basic instructions to get up and running with haskell-mode +@c tell about the most important commands + +@node Editing Haskell Code +@chapter Editing Haskell Code + +@findex haskell-mode +@cindex @code{haskell-mode} + +@dfn{Haskell Mode} is actually a collection of so-called major modes@footnote{for more information about the concept of @dfn{major modes} @pxref{Major Modes,,,emacs}} one of which is called @code{haskell-mode}. To avoid confusion, when referring to this package the name ``Haskell mode'' is written in a normal font, whereas when referring the major mode of the same name @code{haskell-mode} written with a dash in-between in a typewriter font is used. + +As one might guess, @code{haskell-mode} is the (programming language@footnote{@code{haskell-mode} is derived from @code{prog-mode}}) major mode for editing (non-literate) Haskell source code. @code{haskell-mode} is associated with the file extensions listed below by default@footnote{for more information about file associations, @pxref{Choosing Modes,,,emacs}}. + +@table @file +@item .hs +official file extension for (non-literate) Haskell 98/2010 files +@item .hsc +``almost-Haskell'' input file for the @uref{http://www.haskell.org/ghc/docs/latest/html/users_guide/hsc2hs.html,hsc2hs} pre-processor +@item .cpphs +input file for the @uref{http://projects.haskell.org/cpphs/,cpphs} pre-processor +@end table + +@cindex literate programming +@findex literate-haskell-mode + +@noindent +The major mode @code{literate-haskell-mode} (which is derived from @code{haskell-mode} and thus transitively from @code{prog-mode}) provides support for @uref{http://www.haskell.org/haskellwiki/Literate_programming,literate Haskell programs} and is associated with the @file{.lhs} file extension by default. + +@code{literate-haskell-mode} supports Bird-style as well as @TeX{}-style literate Haskell files. The currently detected literate Haskell variant is shown in the mode line (@pxref{Mode Line,,,emacs}) as either @samp{LitHaskell/bird} or @samp{LitHaskell/tex}. + +@section Font Lock Support + +@code{haskell-mode} supports @dfn{syntax highlighting} via Emacs' Font Lock minor mode which should be enabled by default in current Emacsen. @xref{Font Lock,,,emacs}, for more information on how to control @code{font-lock-mode}. + +@node Unicode +@chapter Unicode support + +@cindex Unicode + +See the Haskell Wiki's entry on @uref{http://www.haskell.org/haskellwiki/Unicode-symbols, Unicode Symbols} for general information about Unicode support in Haskell. + +As Emacs supports editing files containing Unicode out of the box, so does Haskell Mode. As an add-on, Haskell Mode includes the @code{haskell-unicode} input method which allows you to easily type a number of Unicode symbols that are useful when writing Haskell code; @xref{Input Methods,,,emacs}, for more details. + +To automatically enable the @code{haskell-unicode} input method in haskell-mode buffers use @kbd{M-x customize-variable @key{RET} haskell-mode-hook} or put the following code in your @file{.emacs} file: + +@lisp +(add-hook 'haskell-mode-hook 'turn-on-haskell-unicode-input-method) +@end lisp + +@noindent +To temporarily enable this input method for a single buffer you can use @kbd{M-x turn-on-haskell-unicode-input-method}. + +When the @code{haskell-unicode} input method is active, you can simply type @samp{->} and it is immediately replaced with @samp{→}. Use @kbd{C-\} to toggle the input method. To see a table of all key sequences use @kbd{M-x describe-input-method @key{RET} haskell-unicode}. A sequence like @samp{<=} is ambiguous and can mean either @samp{⇐} or @samp{≤}. Typing it presents you with a choice. Type @kbd{1} or @kbd{2} to select an option or keep typing to use the default option. + +If you don't like the highlighting of partially matching tokens you can turn it off by setting @code{input-method-highlight-flag} to @code{nil} via @kbd{M-x customize-variable}. + +@node Indentation +@chapter Indentation + +@cindex indentation +@cindex layout rule +@cindex off-side rule + +For general information about indentation support in GNU Emacs, @pxref{Indentation,,,emacs}. + +In Haskell, code indentation has semantic meaning as it defines the block structure@footnote{Haskell also supports braces and semicolons notation for conveying the block structure. However, most Haskell programs written by humans use indentation for block structuring.}. + +As GNU Emacs' default indentation function (i.e. @code{indent-relative}) is not designed for use with Haskell's layout rule, Haskell mode includes three different indentation minor modes with different trade-offs: + +@ftable @code + +@item turn-on-haskell-simple-indent + +A very simple indentation scheme; In this scheme, @key{TAB} will now move the cursor to the next indent point in the previous non-blank line. An indent point is a non-whitespace character following whitespace. + +@item turn-on-haskell-indent + +Intelligent semi-automatic indentation for Haskell's layout rule. The basic idea is to have @key{TAB} cycle through possibilities indentation points based on some clever heuristics. + +The rationale and the implementation principles are described in more detail in the article @cite{Dynamic tabbing for automatic indentation with the layout rule} published in the Journal of Functional Programming 8.5 (1998). + +@item turn-on-haskell-indentation + +Improved variation of @code{turn-on-haskell-indent} indentation mode. Rebinds @key{RET} and @key{DEL}, so that indentations can be set and deleted as if they were real tabs. + +@end ftable + +To enable one of these three mutually exclusive indentation schemes, you just need call one (and only one!) of the @code{turn-on-*} commands while in the buffer you want the indentation scheme to be activated for. + +The recommended way is to add one of @code{turn-on-*} commands to @code{haskell-mode-hook}. This can be done either by using @kbd{M-x customize-variable @key{RET} haskell-mode-hook} which provides a convenient user interface or by adding @emph{one} of the following three lines to your @file{.emacs} file: + +@lisp +(add-hook 'haskell-mode-hook 'turn-on-haskell-simple-indent) +(add-hook 'haskell-mode-hook 'turn-on-haskell-indent) +(add-hook 'haskell-mode-hook 'turn-on-haskell-indentation) +@end lisp + +@section Interactive Block Indentation + +By inserting the key bindings for @kbd{C-,} and @kbd{C-.} (these bindings are convenient on keyboard layouts where @key{,} and @key{.} are adjacent keys) as shown below you can interactively de/indent either the following nested block or, if a region is active while in Transient Mark Mode (@pxref{Disabled Transient Mark,,,emacs}), de/indent the active region. + +By using a numeric prefix argument (@pxref{Prefix Command Arguments,,,elisp}) you can modify the shift-amount; for instance, @kbd{C-u C-,} increases indentation by 4 characters at once. + +@findex haskell-move-nested-left +@findex haskell-move-nested-right + +@lisp +(eval-after-load "haskell-mode" + '(progn + (define-key haskell-mode-map (kbd "C-,") 'haskell-move-nested-left) + (define-key haskell-mode-map (kbd "C-.") 'haskell-move-nested-right))) +@end lisp + +@section Rectangle Commands + +@cindex rectangle +@cindex CUA mode + +GNU Emacs provides so-called @dfn{rectangle commands} which operate on rectangular areas of text, which are particularly useful for languages with a layout rule such as Haskell. @xref{Rectangles,,,emacs}, to learn more about rectangle commands. + +Moreover, CUA mode (@pxref{CUA Bindings,,,emacs}) provides enhanced rectangle support with visible rectangle highlighting. When CUA mode is active, you can initiate a rectangle selection by @kbd{C-RET} and extend it simply by movement commands. You don't have to enable full CUA mode to benefit from these enhanced rectangle commands; you can activate CUA selection mode (without redefining @kbd{C-x},@kbd{C-c},@kbd{C-v}, and @kbd{C-z}) by calling @kbd{M-x cua-selection-mode} (or adding @code{(cua-selection-mode nil)} to your @code{haskell-mode-hook}). + +@node haskell-decl-scan-mode +@chapter @code{haskell-decl-scan-mode} + +@findex turn-on-haskell-decl-scan +@findex haskell-decl-scan-mode +@vindex haskell-decl-scan-mode-hook + +@code{haskell-decl-scan-mode} is a minor mode which performs declaration scanning and provides @kbd{M-x imenu} support (@pxref{Imenu,,,emacs} for more information). + +For non-literate and @TeX{}-style literate scripts, the common convention that top-level declarations start at the first column is assumed. For Bird-style literate scripts, the common convention that top-level declarations start at the third column, ie. after @samp{> }, is assumed. + +When @code{haskell-decl-scan-mode} is active, the standard Emacs top-level definition movement commands (@pxref{Moving by Defuns,,,emacs}) are enabled to operate on Haskell declarations: + +@table @kbd +@item C-M-a +Move to beginning of current or preceding declaration (@code{beginning-of-defun}). + +@item C-M-e +Move to end of current or following declaration (@code{end-of-defun}). + +@item C-M-h +Select whole current or following declaration (@code{mark-defun}). +@end table + +Moreover, if enabled via the option @code{haskell-decl-scan-add-to-menubar}, a menu item ``Declarations'' is added to the menu bar listing the scanned declarations and allowing to jump to declarations in the source buffer. + +It's recommended to have font lock mode enabled (@pxref{Font Lock,,,emacs}) as @code{haskell-decl-scan-mode} ignores text highlighted with @code{font-lock-comment-face}. + +As usual, in order to activate @code{haskell-decl-scan-mode} automatically for Haskell buffers, add @code{turn-on-haskell-decl-scan} to @code{haskell-mode-hook}: + +@lisp +(add-hook 'haskell-mode-hook 'turn-on-haskell-decl-scan) +@end lisp + +@code{haskell-decl-scan-mode} enables the use of features that build upon @code{imenu} support such as Speedbar Frames (@pxref{Speedbar,,,emacs}) or the global ``Which Function'' minor mode (@pxref{Which Function,,,emacs}). + +In order to enable @code{which-function-mode} for Haskell buffers you need to add the following to your Emacs initialization: + +@lisp +(eval-after-load "which-func" + '(add-to-list 'which-func-modes 'haskell-mode)) +@end lisp + +@node Compilation +@chapter Compilation + +@findex haskell-compile + +Haskell mode comes equipped with a specialized @dfn{Compilation mode} tailored to GHC's compiler messages with optional support for Cabal projects. @xref{Compilation Mode,,,emacs}, for more information about the basic commands provided by the Compilation mode which are available in the Haskell compilation sub-mode as well. The additional features provided compared to Emacs' basic Compilation mode are: + +@itemize +@item +DWIM-style auto-detection of compile command (including support for CABAL projects) +@item +Support for GHC's compile messages and recognizing error, warning and info source locations (including @option{-ferror-spans} syntax) +@item +Support for filtering out GHC's uninteresting @samp{Loading package...} linker messages +@end itemize + +In order to use it, invoke the @code{haskell-compile} command instead of @code{compile} as you would for the ordinary Compilation mode. It's recommended to bind @code{haskell-compile} to a convenient key binding. For instance, you can add the following to your Emacs initialization to bind @code{haskell-compile} to @kbd{C-c C-c}. + +@lisp +(eval-after-load "haskell-mode" + '(define-key haskell-mode-map (kbd "C-c C-c") 'haskell-compile)) + +(eval-after-load "haskell-cabal" + '(define-key haskell-cabal-mode-map (kbd "C-c C-c") 'haskell-compile)) +@end lisp + +@noindent +The following description assumes that @code{haskell-compile} has been bound to @kbd{C-c C-c}. + +@vindex haskell-compile-cabal-build-command +@vindex haskell-compile-cabal-build-command-alt +@vindex haskell-compile-command + +When invoked, @code{haskell-compile} tries to guess how to compile the Haskell program your currently visited buffer belongs to, by searching for a @file{.cabal} file in the current of enclosing parent folders. If a @file{.cabal} file was found, the command defined in the @code{haskell-compile-cabal-build-command} option is used. Moreover, when requesting to compile a @file{.cabal}-file is detected and a negative prefix argument (e.g. @kbd{C-- C-c C-c}) was given, the alternative @code{haskell-compile-cabal-build-command-alt} is invoked. By default, @code{haskell-compile-cabal-build-command-alt} contains a @samp{cabal clean -s} command in order to force a full rebuild. + +Otherwise if no @file{.cabal} could be found, a single-module compilation is assumed and @code{haskell-compile-command} is used (@emph{if} the currently visited buffer contains Haskell source code). + +You can also inspect and modify the compile command to be invoked temporarily by invoking @code{haskell-compile} with a prefix argument (e.g. @kbd{C-u C-c C-c}). If later-on you want to recompile using the same customized compile command, invoke @code{recompile} (bound to @kbd{g}) inside the @samp{*haskell-compilation*} buffer. + +@node inferior-haskell-mode +@chapter @code{inferior-haskell-mode} + +@findex inferior-haskell-find-definition +@findex inferior-haskell-find-haddock +@findex inferior-haskell-info +@findex inferior-haskell-load-and-run +@findex inferior-haskell-load-file +@findex inferior-haskell-mode +@findex inferior-haskell-reload-file +@findex inferior-haskell-start-process +@findex inferior-haskell-type +@vindex haskell-program-name +@vindex inferior-haskell-mode-hook + +The major mode @code{inferior-haskell-mode} provides support for interacting with an inferior Haskell process based on @code{comint-mode}. + +By default the @code{haskell-mode-map} keymap is setup to use this mode: + +@table @kbd +@item C-c C-z +is bound to @code{switch-to-haskell} +@item C-c C-b +is bound to @code{switch-to-haskell} +@item C-c C-l +is bound to @code{inferior-haskell-load-file} +@item C-c C-t +is bound to @code{inferior-haskell-type} +@item C-c C-i +is bound to @code{inferior-haskell-info} +@end table + +The Haskell interpreter used by the inferior Haskell mode is auto-detected by default, but is customizable via the @code{haskell-program-name} variable. + +Currently, GHCi and Hugs are support as Haskell interpreter. + +TODO/WRITEME +@c write about supported features + +@node haskell-interactive-mode +@chapter @code{haskell-interactive-mode} + +An alternative mode providing a @acronym{REPL,read–eval–print loop} via GHCi sessions is called @code{haskell-interactive-mode}, which effectively replaces @code{inferior-haskell-mode}, but comes with a different set of features: + +@itemize +@item +Separate sessions per Cabal project @file{haskell-session.el}. +@item +A new inferior Haskell process handling code @file{haskell-process.el}. +@item +New REPL implementation similiar to SLIME/IELM @file{haskell-interactive-mode.el}. +@end itemize + +In order to use @code{haskell-interactive-mode} instead of the default @code{inferior-haskell-mode}, you need to replace some of the default keybindings in the @code{haskell-mode-map} keymap with the respective @code{haskell-interactive-mode} counterparts: + +@lisp +(eval-after-load "haskell-mode" + '(progn + (define-key haskell-mode-map (kbd "C-x C-d") nil) + (define-key haskell-mode-map (kbd "C-c C-z") 'haskell-interactive-switch) + (define-key haskell-mode-map (kbd "C-c C-l") 'haskell-process-load-file) + (define-key haskell-mode-map (kbd "C-c C-b") 'haskell-interactive-switch) + (define-key haskell-mode-map (kbd "C-c C-t") 'haskell-process-do-type) + (define-key haskell-mode-map (kbd "C-c C-i") 'haskell-process-do-info) + (define-key haskell-mode-map (kbd "C-c M-.") nil) + (define-key haskell-mode-map (kbd "C-c C-d") nil))) +@end lisp + +With @code{haskell-interactive-mode}, each Haskell source buffer is associated with at most one GHCi session, so when you call @code{haskell-process-load-file} for a Haskell source buffer which has no session associated yet, you're asked which GHCi session to create or associate with. + +TODO/WRITEME + +@node haskell-cabal-mode +@chapter @code{haskell-cabal-mode} + +@findex haskell-cabal-mode +@vindex haskell-cabal-mode-hook + +@code{haskell-cabal-mode} is a major mode for editing @uref{http://www.haskell.org/cabal/users-guide/developing-packages.html,Cabal package description files} and is automatically associated with files having a @file{.cabal} extension. + +@findex haskell-cabal-visit-file + +For quickly locating and jumping to the nearest @file{.cabal} file from a Haskell source buffer, you can use @kbd{M-x haskell-cabal-visit-file}; with a prefix argument (i.e. @kbd{C-u}) @code{find-file-other-window} is used to visit the @file{.cabal} file. If you wish, you can bind @code{haskell-cabal-visit-file} to a convenient key sequence, e.g. + +@lisp +(eval-after-load "haskell-mode" + (define-key haskell-mode-map (kbd "C-c v c") 'haskell-cabal-visit-file)) +@end lisp + +TODO/WRITEME + +@node Concept index +@unnumbered Concept index + +@printindex cp + +@node Function index +@unnumbered Function index + +@printindex fn + +@node Variable index +@unnumbered Variable index + +@printindex vr + +@bye + +@c Local Variables: +@c eval: (visual-line-mode t) +@c eval: (linum-mode t) +@c eval: (hl-line-mode t) +@c End: diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/haskell-mode.tmp.texi --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/haskell-mode/haskell-mode.tmp.texi Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,435 @@ +\input texinfo @c -*-texinfo-*- +@c %**start of header +@setfilename haskell-mode.info +@documentencoding UTF-8 +@settitle Haskell Mode 13.10 +@c %**end of header + +@dircategory Emacs +@direntry +* Haskell Mode: (haskell-mode). Haskell Development Environment for Emacs(en) +@end direntry + +@copying +This manual is for Haskell mode, version 13.10-65-ge9587d9 + +Copyright @copyright{} 2013 Haskell Mode contributors. + +@quotation +Permission is granted to copy, distribute and/or modify this document under the terms of the @uref{http://www.gnu.org/licenses/fdl.html,GNU Free Documentation License}, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts and no Back-Cover Texts. +@end quotation +@end copying + +@iftex +@titlepage +@title Haskell Mode +@subtitle Haskell Development Environment for Emacs + +@page +@vskip 0pt plus 1filll +@insertcopying +@end titlepage + +@contents +@end iftex + +@ifhtml +@titlepage +@title Haskell Mode +@subtitle Haskell Development Environment for Emacs + +@end titlepage +@insertcopying +@end ifhtml + +@ifnottex +@node Top +@top Haskell Mode + +Haskell Mode is an Haskell development Environment for GNU Emacs version 23 or later. It provides syntax-based indentation, font locking, editing cabal files, and supports running an inferior Haskell interpreter (e.g. GHCi). + +@end ifnottex + +@menu +* Introduction:: +* Getting Help and Reporting Bugs:: +* Getting Started:: +* Editing Haskell Code:: +* Unicode:: +* Indentation:: +* Compilation:: +* haskell-decl-scan-mode:: +* inferior-haskell-mode:: +* haskell-interactive-mode:: +* haskell-cabal-mode:: +* Concept index:: +* Function index:: +* Variable index:: + +@end menu + +@node Introduction +@chapter Introduction + +@dfn{Haskell Mode} is a major mode providing a convenient environment for editing @uref{http://www.haskell.org,Haskell} programs. + +Some of its major features are: + +@itemize +@item +Syntax highlighting (font lock), +@item +automatic indentation, +@item +on-the-fly documentation, +@item +interaction with inferior GHCi/Hugs instance, and +@item +scanning declarations and placing them in a menu. +@end itemize + +@node Getting Help and Reporting Bugs +@chapter Getting Help and Reporting Bugs + +This Info manual is work in progress and incomplete. However, you can find more information at these locations in the meantime: + +@itemize +@item +@uref{https://github.com/haskell/haskell-mode,Haskell Mode's GitHub Home} +@item +@uref{http://www.haskell.org/haskellwiki/Haskell_mode_for_Emacs,Haskell Wiki Emacs Page} +@end itemize + +If you have any questions or like to discuss something regarding Haskell Mode, please consider sending an email to the @uref{http://projects.haskell.org/cgi-bin/mailman/listinfo/haskellmode-emacs, Haskellmode-emacs mailing list}. The mailing list is also available on @uref{http://gmane.org/, Gmane} via the @uref{http://dir.gmane.org/gmane.comp.lang.haskell.emacs, gmane.comp.lang.haskell.emacs} newsgroup. + +If you have discovered a bug or wish to request a new feature, you can @uref{https://github.com/haskell/haskell-mode/issues/new, file a new issue} with Haskell Mode's issue tracker. When filing a bug, please state your currently used software version (@kbd{M-x haskell-version}, @kbd{M-x version}) and what steps to perform in order to reproduce the bug you're experiencing. Finally, if you happen to be proficient in @ref{Top,Emacs Lisp,,elisp} you are welcome to submit patches via @uref{https://help.github.com/articles/using-pull-requests, GitHub Pull Requests}. + +@node Getting Started +@chapter Getting Started + +If you are reading this, you have most likely already managed to install Haskell Mode in one way or another. However, just for the record, the officially recommended way is to install Haskell Mode via the @uref{http://marmalade-repo.org/packages/haskell-mode,Marmalade package archive} which contains the latest stable release of Haskell Mode. + +@findex haskell-customize +Most of Haskell Mode's settings are configurable via customizable variables (@pxref{Easy Customization,,,emacs}, for details). You can use @kbd{M-x haskell-customize} to browse the @code{haskell} customization sub-tree. + +@vindex haskell-mode-hook +One of the important setting you should customize is the @code{haskell-mode-hook} variable (@pxref{Hooks,,,emacs}) which gets run right after the @code{haskell-mode} major mode is initialized for a buffer. You can customize @code{haskell-mode-hook} by @kbd{M-x customize-variable @key{RET} haskell-mode-hook}. It's highly recommended you set up indentation to match your preferences; @xref{Indentation}, for more details about the indentation modes included with Haskell Mode. + +@c TODO: +@c provide basic instructions to get up and running with haskell-mode +@c tell about the most important commands + +@node Editing Haskell Code +@chapter Editing Haskell Code + +@findex haskell-mode +@cindex @code{haskell-mode} + +@dfn{Haskell Mode} is actually a collection of so-called major modes@footnote{for more information about the concept of @dfn{major modes} @pxref{Major Modes,,,emacs}} one of which is called @code{haskell-mode}. To avoid confusion, when referring to this package the name ``Haskell mode'' is written in a normal font, whereas when referring the major mode of the same name @code{haskell-mode} written with a dash in-between in a typewriter font is used. + +As one might guess, @code{haskell-mode} is the (programming language@footnote{@code{haskell-mode} is derived from @code{prog-mode}}) major mode for editing (non-literate) Haskell source code. @code{haskell-mode} is associated with the file extensions listed below by default@footnote{for more information about file associations, @pxref{Choosing Modes,,,emacs}}. + +@table @file +@item .hs +official file extension for (non-literate) Haskell 98/2010 files +@item .hsc +``almost-Haskell'' input file for the @uref{http://www.haskell.org/ghc/docs/latest/html/users_guide/hsc2hs.html,hsc2hs} pre-processor +@item .cpphs +input file for the @uref{http://projects.haskell.org/cpphs/,cpphs} pre-processor +@end table + +@cindex literate programming +@findex literate-haskell-mode + +@noindent +The major mode @code{literate-haskell-mode} (which is derived from @code{haskell-mode} and thus transitively from @code{prog-mode}) provides support for @uref{http://www.haskell.org/haskellwiki/Literate_programming,literate Haskell programs} and is associated with the @file{.lhs} file extension by default. + +@code{literate-haskell-mode} supports Bird-style as well as @TeX{}-style literate Haskell files. The currently detected literate Haskell variant is shown in the mode line (@pxref{Mode Line,,,emacs}) as either @samp{LitHaskell/bird} or @samp{LitHaskell/tex}. + +@section Font Lock Support + +@code{haskell-mode} supports @dfn{syntax highlighting} via Emacs' Font Lock minor mode which should be enabled by default in current Emacsen. @xref{Font Lock,,,emacs}, for more information on how to control @code{font-lock-mode}. + +@node Unicode +@chapter Unicode support + +@cindex Unicode + +See the Haskell Wiki's entry on @uref{http://www.haskell.org/haskellwiki/Unicode-symbols, Unicode Symbols} for general information about Unicode support in Haskell. + +As Emacs supports editing files containing Unicode out of the box, so does Haskell Mode. As an add-on, Haskell Mode includes the @code{haskell-unicode} input method which allows you to easily type a number of Unicode symbols that are useful when writing Haskell code; @xref{Input Methods,,,emacs}, for more details. + +To automatically enable the @code{haskell-unicode} input method in haskell-mode buffers use @kbd{M-x customize-variable @key{RET} haskell-mode-hook} or put the following code in your @file{.emacs} file: + +@lisp +(add-hook 'haskell-mode-hook 'turn-on-haskell-unicode-input-method) +@end lisp + +@noindent +To temporarily enable this input method for a single buffer you can use @kbd{M-x turn-on-haskell-unicode-input-method}. + +When the @code{haskell-unicode} input method is active, you can simply type @samp{->} and it is immediately replaced with @samp{→}. Use @kbd{C-\} to toggle the input method. To see a table of all key sequences use @kbd{M-x describe-input-method @key{RET} haskell-unicode}. A sequence like @samp{<=} is ambiguous and can mean either @samp{⇐} or @samp{≤}. Typing it presents you with a choice. Type @kbd{1} or @kbd{2} to select an option or keep typing to use the default option. + +If you don't like the highlighting of partially matching tokens you can turn it off by setting @code{input-method-highlight-flag} to @code{nil} via @kbd{M-x customize-variable}. + +@node Indentation +@chapter Indentation + +@cindex indentation +@cindex layout rule +@cindex off-side rule + +For general information about indentation support in GNU Emacs, @pxref{Indentation,,,emacs}. + +In Haskell, code indentation has semantic meaning as it defines the block structure@footnote{Haskell also supports braces and semicolons notation for conveying the block structure. However, most Haskell programs written by humans use indentation for block structuring.}. + +As GNU Emacs' default indentation function (i.e. @code{indent-relative}) is not designed for use with Haskell's layout rule, Haskell mode includes three different indentation minor modes with different trade-offs: + +@ftable @code + +@item turn-on-haskell-simple-indent + +A very simple indentation scheme; In this scheme, @key{TAB} will now move the cursor to the next indent point in the previous non-blank line. An indent point is a non-whitespace character following whitespace. + +@item turn-on-haskell-indent + +Intelligent semi-automatic indentation for Haskell's layout rule. The basic idea is to have @key{TAB} cycle through possibilities indentation points based on some clever heuristics. + +The rationale and the implementation principles are described in more detail in the article @cite{Dynamic tabbing for automatic indentation with the layout rule} published in the Journal of Functional Programming 8.5 (1998). + +@item turn-on-haskell-indentation + +Improved variation of @code{turn-on-haskell-indent} indentation mode. Rebinds @key{RET} and @key{DEL}, so that indentations can be set and deleted as if they were real tabs. + +@end ftable + +To enable one of these three mutually exclusive indentation schemes, you just need call one (and only one!) of the @code{turn-on-*} commands while in the buffer you want the indentation scheme to be activated for. + +The recommended way is to add one of @code{turn-on-*} commands to @code{haskell-mode-hook}. This can be done either by using @kbd{M-x customize-variable @key{RET} haskell-mode-hook} which provides a convenient user interface or by adding @emph{one} of the following three lines to your @file{.emacs} file: + +@lisp +(add-hook 'haskell-mode-hook 'turn-on-haskell-simple-indent) +(add-hook 'haskell-mode-hook 'turn-on-haskell-indent) +(add-hook 'haskell-mode-hook 'turn-on-haskell-indentation) +@end lisp + +@section Interactive Block Indentation + +By inserting the key bindings for @kbd{C-,} and @kbd{C-.} (these bindings are convenient on keyboard layouts where @key{,} and @key{.} are adjacent keys) as shown below you can interactively de/indent either the following nested block or, if a region is active while in Transient Mark Mode (@pxref{Disabled Transient Mark,,,emacs}), de/indent the active region. + +By using a numeric prefix argument (@pxref{Prefix Command Arguments,,,elisp}) you can modify the shift-amount; for instance, @kbd{C-u C-,} increases indentation by 4 characters at once. + +@findex haskell-move-nested-left +@findex haskell-move-nested-right + +@lisp +(eval-after-load "haskell-mode" + '(progn + (define-key haskell-mode-map (kbd "C-,") 'haskell-move-nested-left) + (define-key haskell-mode-map (kbd "C-.") 'haskell-move-nested-right))) +@end lisp + +@section Rectangle Commands + +@cindex rectangle +@cindex CUA mode + +GNU Emacs provides so-called @dfn{rectangle commands} which operate on rectangular areas of text, which are particularly useful for languages with a layout rule such as Haskell. @xref{Rectangles,,,emacs}, to learn more about rectangle commands. + +Moreover, CUA mode (@pxref{CUA Bindings,,,emacs}) provides enhanced rectangle support with visible rectangle highlighting. When CUA mode is active, you can initiate a rectangle selection by @kbd{C-RET} and extend it simply by movement commands. You don't have to enable full CUA mode to benefit from these enhanced rectangle commands; you can activate CUA selection mode (without redefining @kbd{C-x},@kbd{C-c},@kbd{C-v}, and @kbd{C-z}) by calling @kbd{M-x cua-selection-mode} (or adding @code{(cua-selection-mode nil)} to your @code{haskell-mode-hook}). + +@node haskell-decl-scan-mode +@chapter @code{haskell-decl-scan-mode} + +@findex turn-on-haskell-decl-scan +@findex haskell-decl-scan-mode +@vindex haskell-decl-scan-mode-hook + +@code{haskell-decl-scan-mode} is a minor mode which performs declaration scanning and provides @kbd{M-x imenu} support (@pxref{Imenu,,,emacs} for more information). + +For non-literate and @TeX{}-style literate scripts, the common convention that top-level declarations start at the first column is assumed. For Bird-style literate scripts, the common convention that top-level declarations start at the third column, ie. after @samp{> }, is assumed. + +When @code{haskell-decl-scan-mode} is active, the standard Emacs top-level definition movement commands (@pxref{Moving by Defuns,,,emacs}) are enabled to operate on Haskell declarations: + +@table @kbd +@item C-M-a +Move to beginning of current or preceding declaration (@code{beginning-of-defun}). + +@item C-M-e +Move to end of current or following declaration (@code{end-of-defun}). + +@item C-M-h +Select whole current or following declaration (@code{mark-defun}). +@end table + +Moreover, if enabled via the option @code{haskell-decl-scan-add-to-menubar}, a menu item ``Declarations'' is added to the menu bar listing the scanned declarations and allowing to jump to declarations in the source buffer. + +It's recommended to have font lock mode enabled (@pxref{Font Lock,,,emacs}) as @code{haskell-decl-scan-mode} ignores text highlighted with @code{font-lock-comment-face}. + +As usual, in order to activate @code{haskell-decl-scan-mode} automatically for Haskell buffers, add @code{turn-on-haskell-decl-scan} to @code{haskell-mode-hook}: + +@lisp +(add-hook 'haskell-mode-hook 'turn-on-haskell-decl-scan) +@end lisp + +@code{haskell-decl-scan-mode} enables the use of features that build upon @code{imenu} support such as Speedbar Frames (@pxref{Speedbar,,,emacs}) or the global ``Which Function'' minor mode (@pxref{Which Function,,,emacs}). + +In order to enable @code{which-function-mode} for Haskell buffers you need to add the following to your Emacs initialization: + +@lisp +(eval-after-load "which-func" + '(add-to-list 'which-func-modes 'haskell-mode)) +@end lisp + +@node Compilation +@chapter Compilation + +@findex haskell-compile + +Haskell mode comes equipped with a specialized @dfn{Compilation mode} tailored to GHC's compiler messages with optional support for Cabal projects. @xref{Compilation Mode,,,emacs}, for more information about the basic commands provided by the Compilation mode which are available in the Haskell compilation sub-mode as well. The additional features provided compared to Emacs' basic Compilation mode are: + +@itemize +@item +DWIM-style auto-detection of compile command (including support for CABAL projects) +@item +Support for GHC's compile messages and recognizing error, warning and info source locations (including @option{-ferror-spans} syntax) +@item +Support for filtering out GHC's uninteresting @samp{Loading package...} linker messages +@end itemize + +In order to use it, invoke the @code{haskell-compile} command instead of @code{compile} as you would for the ordinary Compilation mode. It's recommended to bind @code{haskell-compile} to a convenient key binding. For instance, you can add the following to your Emacs initialization to bind @code{haskell-compile} to @kbd{C-c C-c}. + +@lisp +(eval-after-load "haskell-mode" + '(define-key haskell-mode-map (kbd "C-c C-c") 'haskell-compile)) + +(eval-after-load "haskell-cabal" + '(define-key haskell-cabal-mode-map (kbd "C-c C-c") 'haskell-compile)) +@end lisp + +@noindent +The following description assumes that @code{haskell-compile} has been bound to @kbd{C-c C-c}. + +@vindex haskell-compile-cabal-build-command +@vindex haskell-compile-cabal-build-command-alt +@vindex haskell-compile-command + +When invoked, @code{haskell-compile} tries to guess how to compile the Haskell program your currently visited buffer belongs to, by searching for a @file{.cabal} file in the current of enclosing parent folders. If a @file{.cabal} file was found, the command defined in the @code{haskell-compile-cabal-build-command} option is used. Moreover, when requesting to compile a @file{.cabal}-file is detected and a negative prefix argument (e.g. @kbd{C-- C-c C-c}) was given, the alternative @code{haskell-compile-cabal-build-command-alt} is invoked. By default, @code{haskell-compile-cabal-build-command-alt} contains a @samp{cabal clean -s} command in order to force a full rebuild. + +Otherwise if no @file{.cabal} could be found, a single-module compilation is assumed and @code{haskell-compile-command} is used (@emph{if} the currently visited buffer contains Haskell source code). + +You can also inspect and modify the compile command to be invoked temporarily by invoking @code{haskell-compile} with a prefix argument (e.g. @kbd{C-u C-c C-c}). If later-on you want to recompile using the same customized compile command, invoke @code{recompile} (bound to @kbd{g}) inside the @samp{*haskell-compilation*} buffer. + +@node inferior-haskell-mode +@chapter @code{inferior-haskell-mode} + +@findex inferior-haskell-find-definition +@findex inferior-haskell-find-haddock +@findex inferior-haskell-info +@findex inferior-haskell-load-and-run +@findex inferior-haskell-load-file +@findex inferior-haskell-mode +@findex inferior-haskell-reload-file +@findex inferior-haskell-start-process +@findex inferior-haskell-type +@vindex haskell-program-name +@vindex inferior-haskell-mode-hook + +The major mode @code{inferior-haskell-mode} provides support for interacting with an inferior Haskell process based on @code{comint-mode}. + +By default the @code{haskell-mode-map} keymap is setup to use this mode: + +@table @kbd +@item C-c C-z +is bound to @code{switch-to-haskell} +@item C-c C-b +is bound to @code{switch-to-haskell} +@item C-c C-l +is bound to @code{inferior-haskell-load-file} +@item C-c C-t +is bound to @code{inferior-haskell-type} +@item C-c C-i +is bound to @code{inferior-haskell-info} +@end table + +The Haskell interpreter used by the inferior Haskell mode is auto-detected by default, but is customizable via the @code{haskell-program-name} variable. + +Currently, GHCi and Hugs are support as Haskell interpreter. + +TODO/WRITEME +@c write about supported features + +@node haskell-interactive-mode +@chapter @code{haskell-interactive-mode} + +An alternative mode providing a @acronym{REPL,read–eval–print loop} via GHCi sessions is called @code{haskell-interactive-mode}, which effectively replaces @code{inferior-haskell-mode}, but comes with a different set of features: + +@itemize +@item +Separate sessions per Cabal project @file{haskell-session.el}. +@item +A new inferior Haskell process handling code @file{haskell-process.el}. +@item +New REPL implementation similiar to SLIME/IELM @file{haskell-interactive-mode.el}. +@end itemize + +In order to use @code{haskell-interactive-mode} instead of the default @code{inferior-haskell-mode}, you need to replace some of the default keybindings in the @code{haskell-mode-map} keymap with the respective @code{haskell-interactive-mode} counterparts: + +@lisp +(eval-after-load "haskell-mode" + '(progn + (define-key haskell-mode-map (kbd "C-x C-d") nil) + (define-key haskell-mode-map (kbd "C-c C-z") 'haskell-interactive-switch) + (define-key haskell-mode-map (kbd "C-c C-l") 'haskell-process-load-file) + (define-key haskell-mode-map (kbd "C-c C-b") 'haskell-interactive-switch) + (define-key haskell-mode-map (kbd "C-c C-t") 'haskell-process-do-type) + (define-key haskell-mode-map (kbd "C-c C-i") 'haskell-process-do-info) + (define-key haskell-mode-map (kbd "C-c M-.") nil) + (define-key haskell-mode-map (kbd "C-c C-d") nil))) +@end lisp + +With @code{haskell-interactive-mode}, each Haskell source buffer is associated with at most one GHCi session, so when you call @code{haskell-process-load-file} for a Haskell source buffer which has no session associated yet, you're asked which GHCi session to create or associate with. + +TODO/WRITEME + +@node haskell-cabal-mode +@chapter @code{haskell-cabal-mode} + +@findex haskell-cabal-mode +@vindex haskell-cabal-mode-hook + +@code{haskell-cabal-mode} is a major mode for editing @uref{http://www.haskell.org/cabal/users-guide/developing-packages.html,Cabal package description files} and is automatically associated with files having a @file{.cabal} extension. + +@findex haskell-cabal-visit-file + +For quickly locating and jumping to the nearest @file{.cabal} file from a Haskell source buffer, you can use @kbd{M-x haskell-cabal-visit-file}; with a prefix argument (i.e. @kbd{C-u}) @code{find-file-other-window} is used to visit the @file{.cabal} file. If you wish, you can bind @code{haskell-cabal-visit-file} to a convenient key sequence, e.g. + +@lisp +(eval-after-load "haskell-mode" + (define-key haskell-mode-map (kbd "C-c v c") 'haskell-cabal-visit-file)) +@end lisp + +TODO/WRITEME + +@node Concept index +@unnumbered Concept index + +@printindex cp + +@node Function index +@unnumbered Function index + +@printindex fn + +@node Variable index +@unnumbered Variable index + +@printindex vr + +@bye + +@c Local Variables: +@c eval: (visual-line-mode t) +@c eval: (linum-mode t) +@c eval: (hl-line-mode t) +@c End: diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/haskell-move-nested.el --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/haskell-mode/haskell-move-nested.el Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,130 @@ +;;; haskell-move-nested.el --- Change the column of text nested below a line + +;; Copyright (C) 2010 Chris Done + +;; Author: Chris Done + +;; This file is not part of GNU Emacs. + +;; This program is free software: you can redistribute it and/or +;; modify it under the terms of the GNU General Public License as +;; published by the Free Software Foundation, either version 3 of +;; the License, or (at your option) any later version. + +;; This program is distributed in the hope that it will be +;; useful, but WITHOUT ANY WARRANTY; without even the implied +;; warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +;; PURPOSE. See the GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public +;; License along with this program. If not, see +;; . + +;;; Commentary: + +;; This module is intended for Haskell mode users, but is +;; independent of Haskell mode. + +;; Example usage: + +;; (define-key haskell-mode-map (kbd "C-,") 'haskell-move-nested-left) +;; (define-key haskell-mode-map (kbd "C-.") 'haskell-move-nested-right) + +;;; Code: + +;;;###autoload +(defun haskell-move-nested (cols) + "Shift the nested off-side-rule block adjacent to point by COLS columns to the right. + +In Transient Mark mode, if the mark is active, operate on the contents +of the region instead. +" + (save-excursion + (if (and transient-mark-mode mark-active) + (progn + (indent-rigidly (region-beginning) (region-end) cols) + (setq deactivate-mark nil)) + (let ((region (haskell-move-nested-region))) + (when region + (indent-rigidly (car region) (cdr region) cols)))))) + +;;;###autoload +(defun haskell-move-nested-right (cols) + "Increase indentation of the following off-side-rule block adjacent to point. + +Use a numeric prefix argument to indicate amount of indentation to apply. + +In Transient Mark mode, if the mark is active, operate on the contents +of the region instead." + (interactive "p") + (haskell-move-nested cols) + ) + +;;;###autoload +(defun haskell-move-nested-left (cols) + "Decrease indentation of the following off-side-rule block adjacent to point. + +Use a numeric prefix argument to indicate amount of indentation to apply. + +In Transient Mark mode, if the mark is active, operate on the contents +of the region instead." + (interactive "p") + (haskell-move-nested (- cols)) + ) + +(defun haskell-move-nested-region () + "Infer region off-side-rule block adjacent to point. +Used by `haskell-move-nested'. +" + (save-excursion + (let ((starting-level (current-column))) + (forward-line) + (let ((current-level (haskell-move-nested-indent-level))) + (let ((start-point (line-beginning-position)) + (start-end-point (line-end-position)) + (end-point nil) + (last-line 0)) + (forward-line) + (while (and (not (= (line-beginning-position) last-line)) + (or (> (haskell-move-nested-indent-level) starting-level) + (and (> current-level starting-level) + (>= (haskell-move-nested-indent-level) current-level)))) + (setq last-line (line-beginning-position)) + (setq end-point (line-end-position)) + (forward-line)) + (cons start-point (or end-point + start-end-point))))))) + +(defun haskell-move-nested-indent-level () + (max + 0 + (1- (length + (buffer-substring-no-properties + (line-beginning-position) + (or (save-excursion (goto-char (line-beginning-position)) + (search-forward-regexp "[^ ]" (line-end-position) t 1)) + (line-beginning-position))))))) + +(defun haskell-kill-nested () + "Kill the nested region after point." + (interactive) + (let ((start (point)) + (reg (save-excursion + (search-backward-regexp "^[ ]+" (line-beginning-position) t 1) + (search-forward-regexp "[^ ]" (line-end-position) t 1) + (haskell-move-nested-region)))) + (kill-region start (cdr reg)))) + +(defun haskell-delete-nested () + "Kill the nested region after point." + (interactive) + (let ((start (point)) + (reg (save-excursion + (search-backward-regexp "^[ ]+" (line-beginning-position) t 1) + (search-forward-regexp "[^ ]" (line-end-position) t 1) + (haskell-move-nested-region)))) + (delete-region start (cdr reg)))) + +(provide 'haskell-move-nested) + +;;; haskell-move-nested.el ends here diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/haskell-move-nested.elc Binary file .emacs.d/haskell-mode/haskell-move-nested.elc has changed diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/haskell-navigate-imports.el --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/haskell-mode/haskell-navigate-imports.el Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,123 @@ +;;; haskell-navigate-imports.el --- A function for cycling through Haskell import lists + +;; Copyright (C) 2010 Chris Done + +;; Author: Chris Done + +;; This file is not part of GNU Emacs. + +;; This program is free software: you can redistribute it and/or +;; modify it under the terms of the GNU General Public License as +;; published by the Free Software Foundation, either version 3 of +;; the License, or (at your option) any later version. + +;; This program is distributed in the hope that it will be +;; useful, but WITHOUT ANY WARRANTY; without even the implied +;; warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +;; PURPOSE. See the GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public +;; License along with this program. If not, see +;; . + +;;; Commentary: + +;; The cycling step will stop once at the last import list so +;; that it is easy to add a new import list. + +;; This module works completely independently of any libraries +;; (including haskell-mode). + +;; Exports three interactive functions: +;; 1. haskell-navigate-imports +;; 2. haskell-navigate-imports-go +;; 3. haskell-navigate-imports-return + +;; Example usage: + +;; (require 'haskell-navigate-imports) +;; (define-key haskell-mode-map [f8] 'haskell-navigate-imports) + +;;; Code: + +(defvar haskell-navigate-imports-start-point nil) + +;;;###autoload +(defun haskell-navigate-imports (&optional return) + "Cycle the Haskell import lines or return to point (with prefix arg)." + (interactive "P") + (if return + (haskell-navigate-imports-return) + (haskell-navigate-imports-go))) + +;;;###autoload +(defun haskell-navigate-imports-go () + "Go to the first line of a list of consequtive import lines. Cycles." + (interactive) + (unless (or (haskell-navigate-imports-line) + (equal (line-beginning-position) (point-min)) + (save-excursion (forward-line -1) + (haskell-navigate-imports-line))) + (setq haskell-navigate-imports-start-point (point))) + (haskell-navigate-imports-go-internal)) + +;;;###autoload +(defun haskell-navigate-imports-return () + "Return to the non-import point we were at before going to the module list. + If we were originally at an import list, we can just cycle through easily." + (interactive) + (when haskell-navigate-imports-start-point + (goto-char haskell-navigate-imports-start-point))) + +(defun haskell-navigate-imports-go-internal () + "Go to the first line of a list of consequtive import lines. Cycle." + (if (haskell-navigate-imports-line) + (progn (haskell-navigate-imports-goto-end) + (when (haskell-navigate-imports-find-forward-line) + (haskell-navigate-imports-go-internal))) + (let ((point (haskell-navigate-imports-find-forward-line))) + (if point + (goto-char point) + (progn (goto-char (point-min)) + (if (haskell-navigate-imports-find-forward-line) + (haskell-navigate-imports-go-internal) + (when (search-forward-regexp "^module" nil t 1) + (search-forward "\n\n" nil t 1)))))))) + +(defun haskell-navigate-imports-goto-end () + "Skip a bunch of consequtive import lines." + (while (not (or (equal (point) + (point-max)) + (not (haskell-navigate-imports-line)))) + (forward-line))) + +(defun haskell-navigate-imports-find-forward-line () + "Return a point with at an import line, or nothing." + (save-excursion + (while (not (or (equal (point) (point-max)) + (haskell-navigate-imports-after-imports-p) ;; This one just speeds it up. + (haskell-navigate-imports-line))) + (forward-line)) + (let ((point (point))) + (if (haskell-navigate-imports-line) + (point) + nil)))) + +(defun haskell-navigate-imports-line () + "Try to match the current line as a regexp." + (let ((line (buffer-substring-no-properties (line-beginning-position) + (line-end-position)))) + (if (string-match "^import " line) + line + nil))) + +(defun haskell-navigate-imports-after-imports-p () + "Are we after the imports list? Just for a speed boost." + (save-excursion + (goto-char (line-beginning-position)) + (not (not (search-forward-regexp "\\( = \\|\\\\| :: \\)" + (line-end-position) t 1))))) + +(provide 'haskell-navigate-imports) + +;;; haskell-navigate-imports.el ends here diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/haskell-navigate-imports.elc Binary file .emacs.d/haskell-mode/haskell-navigate-imports.elc has changed diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/haskell-package.el --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/haskell-mode/haskell-package.el Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,161 @@ +;;; haskell-package.el --- Interface for working with Cabal packages + +;; Copyright (C) 2011 Chris Done + +;; Author: Chris Done + +;; This file is not part of GNU Emacs. + +;; This file is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; This file is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to +;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. + +;;; Commentary: + +;;; Todo: + +;;; Code: + +(with-no-warnings (require 'cl)) + +;; Dynamically scoped variables. +;; TODO What actually sets this? +(defvar haskell-config-use-cabal-dev) + +;; (defun haskell-package-conf-path-get (&optional project) +;; "Gets the user conf or the cabal-dev conf. Get the global conf elsewhere." +;; (if haskell-config-use-cabal-dev +;; (if project +;; (let* ((cabal-path (haskell-project-cabal-dir project))) +;; (format "%scabal-dev/packages-%s.conf/" +;; (if (string-match "/$" cabal-path) +;; cabal-path +;; (concat cabal-path "/")) +;; (haskell-ghc-version))) +;; (haskell-package-conf-user-path-get)) +;; (haskell-package-conf-user-path-get))) + +(defun haskell-package-conf-user-path-get () + "Get the user conf path." + (let ((out (shell-command-to-string "ghc-pkg --user list no-results-please"))) + (string-match "\n\\(.*\\):\n" out) (match-string 1 out))) + +(defun haskell-package-conf-global-path-get () + "Get the global conf path." + (let ((out (shell-command-to-string "ghc-pkg --global list no-results-please"))) + (string-match "\n\\(.*\\):\n" out) (match-string 1 out))) + +(defun haskell-package-get-all (conf) + "Get all package descriptions for the given `conf'." + (let ((all (shell-command-to-string (format "ghc-pkg -f %s dump" conf)))) + (mapcar (lambda (text) + (haskell-package-parse text)) + (split-string all "\n---\n")))) + +(defun haskell-package-get (conf name version) + "Get a package description for the given `name' and `version' in the given `conf'." + (haskell-package-parse + (shell-command-to-string + (format "ghc-pkg -f %s describe %s-%s" + conf + name + version)))) + +(defstruct haskell-package "Haskell package object.") + +(defun haskell-package-parse (text) + "Parse a package into a package object." + (let ((pkg (haskell-package-read-description text))) + (make-haskell-package + :name (cdr (assoc "name" pkg)) + :version (cdr (assoc "version" pkg)) + :id (cdr (assoc "id" pkg)) + :license (cdr (assoc "license" pkg)) + :copyright (cdr (assoc "copyright" pkg)) + :maintainer (cdr (assoc "maintainer" pkg)) + :stability (cdr (assoc "stability" pkg)) + :homepage (cdr (assoc "homepage" pkg)) + :package-url (cdr (assoc "package-url" pkg)) + :description (cdr (assoc "description" pkg)) + :categories (cdr (assoc "category" pkg)) + :authors (cdr (assoc "author" pkg)) + :is-exposed (equal "True" (cdr (assoc "exposed" pkg))) + :exposed-modules (split-string (or (cdr (assoc "exposed-modules" pkg)) "") + "[\n ]") + :hidden-modules (split-string (or (cdr (assoc "hidden-modules" pkg)) "") + "[\n ]") + :imports-dirs (cdr (assoc "imports-dirs" pkg)) + :library-dirs (cdr (assoc "library-dirs" pkg)) + :haskell-libraries (cdr (assoc "haskell-libraries" pkg)) + :extra-libraries (cdr (assoc "extra-libraries" pkg)) + :extra-ghci-libraries (cdr (assoc "extra-ghci-libraries" pkg)) + :include-dirs (cdr (assoc "include-dirs" pkg)) + :includes (cdr (assoc "includes" pkg)) + :depends (cdr (assoc "depends" pkg)) + :hugs-options (cdr (assoc "hugs-options" pkg)) + :cc-options (cdr (assoc "cc-options" pkg)) + :ld-options (cdr (assoc "ld-options" pkg)) + :framework-dirs (cdr (assoc "framework-dirs" pkg)) + :frameworks (cdr (assoc "frameworks" pkg)) + :haddock-interfaces (cdr (assoc "haddock-interfaces" pkg)) + :haddock-html (cdr (assoc "haddock-html" pkg))))) + +(defun haskell-package-read-description (text) + "Return an association list of key-values from a pkg description string." + (let* ((marked (replace-regexp-in-string + "\n\\([^ ]\\)" + (lambda (match) + (concat "\n:" (substring match 1))) + text)) + (alist (mapcar 'haskell-package-key-value + (split-string marked "\n:")))) + alist)) + +(defun haskell-package-key-value (entry) + "Return a (key . value) pair from an entry." + (let ((key-values (split-string entry ": "))) + (if (listp key-values) + (cons (car key-values) + (replace-regexp-in-string + "\n[ ]*" + " " + (mapconcat 'identity (cdr key-values) ": "))) + key-values))) + +(defun haskell-package-list-get (conf) + "Get the list of packages in the given config." + (haskell-package-list-parse + (shell-command-to-string + (format "ghc-pkg -f %s list" + conf)))) + +(defun haskell-package-list-parse (text) + "Parse the list of installed packges." + (let* ((lines (split-string text "\n "))) + (mapcar + (lambda (line) + (string-match "^{?\\([a-zA-Z0-9-_]+\\)-\\([0-9.]+\\)}?$" line) + (cons (match-string 1 line) (match-string 2 line))) + (delete-if + (lambda (line) + (not (string-match "^{?[a-zA-Z0-9-_]+-[0-9.]+}?$" line))) + lines)))) + +(provide 'haskell-package) + +;; Local Variables: +;; byte-compile-warnings: (not cl-functions) +;; End: + +;;; haskell-package.el ends here diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/haskell-package.elc Binary file .emacs.d/haskell-mode/haskell-package.elc has changed diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/haskell-presentation-mode.el --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/haskell-mode/haskell-presentation-mode.el Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,63 @@ +;;; haskell-presentation-mode.el --- Presenting Haskell things + +;; Copyright (C) 2013 Chris Done + +;; Author: Chris Done + +;; This file is not part of GNU Emacs. + +;; This file is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; This file is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to +;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. + +;;; Commentary: + +;;; Code: + +(require 'haskell-mode) + +(define-derived-mode haskell-presentation-mode + haskell-mode "Presentation" + "Major mode for viewing Haskell snippets. + \\{hypertext-mode-map}" + (setq case-fold-search nil)) + +(define-key haskell-presentation-mode-map (kbd "q") 'quit-window) + +(defun haskell-present (name session code) + "Present CODE in a popup buffer suffixed with NAME and set +SESSION as the current haskell-session." + (let* ((name (format "*Haskell Presentation%s*" name)) + (buffer (get-buffer-create name))) + (with-current-buffer buffer + (haskell-presentation-mode) + (if (boundp 'shm-display-quarantine) + (set (make-local-variable 'shm-display-quarantine) nil)) + (let ((buffer-read-only nil)) + (erase-buffer) + (insert (propertize "-- Hit `q' to close this window.\n\n" + 'face + 'font-lock-comment-face)) + (let ((point (point))) + (insert code "\n\n") + (font-lock-fontify-region point (point)) + (goto-char point)))) + (if (and (boundp 'haskell-presentation-mode) + haskell-presentation-mode) + (switch-to-buffer buffer) + (pop-to-buffer buffer)))) + +(provide 'haskell-presentation-mode) + +;;; haskell-presentation-mode.el ends here diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/haskell-presentation-mode.elc Binary file .emacs.d/haskell-mode/haskell-presentation-mode.elc has changed diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/haskell-process.el --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/haskell-mode/haskell-process.el Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,1425 @@ +;;; haskell-process.el --- Communicating with the inferior Haskell process + +;; Copyright (C) 2011-2012 Chris Done + +;; Author: Chris Done + +;; This file is not part of GNU Emacs. + +;; This file is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; This file is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to +;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. + +;;; Commentary: + +;;; Todo: + +;;; Code: + +(require 'haskell-mode) +(require 'haskell-session) +(require 'haskell-compat) +(require 'haskell-str) +(require 'haskell-utils) +(require 'haskell-presentation-mode) +(require 'haskell-navigate-imports) +(with-no-warnings (require 'cl)) + +;; FIXME: haskell-process shouldn't depend on haskell-interactive-mode to avoid module-dep cycles +(declare-function haskell-interactive-mode-echo "haskell-interactive-mode" (session message &optional mode)) +(declare-function haskell-interactive-mode-compile-error "haskell-interactive-mode" (session message)) +(declare-function haskell-interactive-mode-compile-warning "haskell-interactive-mode" (session message)) +(declare-function haskell-interactive-mode-insert "haskell-interactive-mode" (session message)) +(declare-function haskell-interactive-mode-reset-error "haskell-interactive-mode" (session)) +(declare-function haskell-interactive-show-load-message "haskell-interactive-mode" (session type module-name file-name echo)) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Configuration +(defgroup haskell-interactive nil + "Settings for REPL interaction via `haskell-interactive-mode'" + :link '(custom-manual "(haskell-mode)haskell-interactive-mode") + :group 'haskell) + +(defcustom haskell-process-path-ghci + "ghci" + "The path for starting ghci." + :group 'haskell-interactive + :type '(choice string (repeat string))) + +(defcustom haskell-process-path-cabal + "cabal" + "Path to the `cabal' executable." + :group 'haskell-interactive + :type '(choice string (repeat string))) + +(defcustom haskell-process-path-cabal-ghci + "cabal-ghci" + "The path for starting cabal-ghci." + :group 'haskell-interactive + :type '(choice string (repeat string))) + +(defcustom haskell-process-path-cabal-dev + "cabal-dev" + "The path for starting cabal-dev." + :group 'haskell-interactive + :type '(choice string (repeat string))) + +(defcustom haskell-process-args-ghci + '("-ferror-spans") + "Any arguments for starting ghci." + :group 'haskell-interactive + :type '(repeat (string :tag "Argument"))) + +(defcustom haskell-process-args-cabal-repl + '("--ghc-option=-ferror-spans") + "Additional arguments to for `cabal repl' invocation. +Note: The settings in `haskell-process-path-ghci' and +`haskell-process-args-ghci' are not automatically reused as `cabal repl' +currently invokes `ghc --interactive'. Use +`--with-ghc=' if you want to use a different +interactive GHC frontend; use `--ghc-option=' to +pass additional flags to `ghc'." + :group 'haskell-interactive + :type '(repeat (string :tag "Argument"))) + +(defcustom haskell-process-do-cabal-format-string + ":!cd %s && %s" + "The way to run cabal comands. It takes two arguments -- the directory and the command. +See `haskell-process-do-cabal' for more details." + :group 'haskell-interactive + :type 'string) + +(defcustom haskell-process-type + 'ghci + "The inferior Haskell process type to use." + :type '(choice (const ghci) (const cabal-repl) (const cabal-dev) (const cabal-ghci)) + :group 'haskell-interactive) + +(defcustom haskell-process-log + nil + "Enable debug logging to \"*haskell-process-log*\" buffer." + :type 'boolean + :group 'haskell-interactive) + +(defcustom haskell-process-show-debug-tips + t + "Show debugging tips when starting the process." + :type 'boolean + :group 'haskell-interactive) + +(defcustom haskell-notify-p + nil + "Notify using notifications.el (if loaded)?" + :type 'boolean + :group 'haskell-interactive) + +(defcustom haskell-process-suggest-no-warn-orphans + t + "Suggest adding -fno-warn-orphans pragma to file when getting orphan warnings." + :type 'boolean + :group 'haskell-interactive) + +(defcustom haskell-process-suggest-hoogle-imports + nil + "Suggest to add import statements using Hoogle as a backend." + :type 'boolean + :group 'haskell-interactive) + +(defcustom haskell-process-suggest-add-package + t + "Suggest to add packages to your .cabal file when Cabal says it +is a member of the hidden package, blah blah." + :type 'boolean + :group 'haskell-interactive) + +(defcustom haskell-process-suggest-language-pragmas + t + "Suggest adding LANGUAGE pragmas recommended by GHC." + :type 'boolean + :group 'haskell-interactive) + +(defcustom haskell-process-suggest-remove-import-lines + nil + "Suggest removing import lines as warned by GHC." + :type 'boolean + :group 'haskell-interactive) + +(defcustom haskell-process-suggest-overloaded-strings + t + "Suggest adding OverloadedStrings pragma to file when getting type mismatches with [Char]." + :type 'boolean + :group 'haskell-interactive) + +(defcustom haskell-process-check-cabal-config-on-load + t + "Check changes cabal config on loading Haskell files and +restart the GHCi process if changed.." + :type 'boolean + :group 'haskell-interactive) + +(defcustom haskell-process-prompt-restart-on-cabal-change + t + "Ask whether to restart the GHCi process when the Cabal file +has changed?" + :type 'boolean + :group 'haskell-interactive) + +(defcustom haskell-process-auto-import-loaded-modules + nil + "Auto import the modules reported by GHC to have been loaded?" + :type 'boolean + :group 'haskell-interactive) + +(defcustom haskell-process-reload-with-fbytecode + nil + "When using -fobject-code, auto reload with -fbyte-code (and +then restore the -fobject-code) so that all module info and +imports become available?" + :type 'boolean + :group 'haskell-interactive) + +(defcustom haskell-process-use-presentation-mode + nil + "Use presentation mode to show things like type info instead of + printing to the message area." + :type 'boolean + :group 'haskell-interactive) + +(defvar haskell-imported-suggested nil) +(defvar haskell-process-prompt-regex "\\(^[> ]*> $\\|\n[> ]*> $\\)") +(defvar haskell-reload-p nil) + +(defvar haskell-process-greetings + (list "Hello, Haskell!" + "The lambdas must flow." + "Hours of hacking await!" + "The next big Haskell project is about to start!" + "Your wish is my IO ().") + "Greetings for when the Haskell process starts up.") + +(defconst haskell-process-logo + (expand-file-name "logo.svg" haskell-mode-pkg-base-dir) + "Haskell logo for notifications.") + + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Accessing commands -- using cl 'defstruct' +(defstruct haskell-command + "Data structure representing a command to be executed when with + a custom state and three callback." + ;; hold the custom command state + ;; state :: a + state + ;; called when to execute a command + ;; go :: a -> () + go + ;; called whenever output was collected from the haskell process + ;; live :: a -> Response -> Bool + live + ;; called when the output from the haskell process indicates that the command + ;; is complete + ;; complete :: a -> Response -> () + complete) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Accessing commands + + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Specialised commands + +;;;###autoload +(defun haskell-process-generate-tags (&optional and-then-find-this-tag) + "Regenerate the TAGS table." + (interactive) + (let ((process (haskell-process))) + (haskell-process-queue-command + process + (make-haskell-command + :state (cons process and-then-find-this-tag) + :go (lambda (state) + (haskell-process-send-string + (car state) + (format ":!cd %s && %s | %s | %s" + (haskell-session-cabal-dir + (haskell-process-session (car state))) + "find . -name '*.hs*'" + "grep -v '#'" ; To avoid Emacs back-up files. Yeah. + "xargs hasktags -e -x"))) + :complete (lambda (state response) + (when (cdr state) + (let ((tags-file-name + (haskell-session-tags-filename + (haskell-process-session (car state))))) + (find-tag (cdr state)))) + (haskell-mode-message-line "Tags generated.")))))) + +;;;###autoload +(defun haskell-process-do-type (&optional insert-value) + "Print the type of the given expression." + (interactive "P") + (if insert-value + (haskell-process-insert-type) + (haskell-process-do-simple-echo + (let ((ident (haskell-ident-at-point))) + ;; TODO: Generalize all these `string-match' of ident calls into + ;; one function. + (format (if (string-match "^[_[:lower:][:upper:]]" ident) + ":type %s" + ":type (%s)") + ident)) + 'haskell-mode))) + +(defun haskell-process-insert-type () + "Get the identifer at the point and insert its type, if +possible, using GHCi's :type." + (let ((process (haskell-process)) + (query (let ((ident (haskell-ident-at-point))) + (format (if (string-match "^[_[:lower:][:upper:]]" ident) + ":type %s" + ":type (%s)") + ident)))) + (haskell-process-queue-command + process + (make-haskell-command + :state (list process query (current-buffer)) + :go (lambda (state) + (haskell-process-send-string (nth 0 state) + (nth 1 state))) + :complete (lambda (state response) + (cond + ;; TODO: Generalize this into a function. + ((or (string-match "^Top level" response) + (string-match "^" response)) + (message response)) + (t + (with-current-buffer (nth 2 state) + (goto-char (line-beginning-position)) + (insert (format "%s\n" response)))))))))) + +;;;###autoload +(defun haskell-process-do-info (&optional prompt-value) + "Print info on the identifier at point. +If PROMPT-VALUE is non-nil, request identifier via mini-buffer." + (interactive "P") + (haskell-process-do-simple-echo + (let ((ident (if prompt-value + (read-from-minibuffer "Info: " (haskell-ident-at-point)) + (haskell-ident-at-point))) + (modname (unless prompt-value + (haskell-utils-parse-import-statement-at-point)))) + (if modname + (format ":browse! %s" modname) + (format (if (string-match "^[a-zA-Z_]" ident) + ":info %s" + ":info (%s)") + (or ident + (haskell-ident-at-point))))) + 'haskell-mode)) + +(defun haskell-process-do-try-info (sym) + "Get info of `sym' and echo in the minibuffer." + (let ((process (haskell-process))) + (haskell-process-queue-command + process + (make-haskell-command + :state (cons process sym) + :go (lambda (state) + (haskell-process-send-string + (car state) + (if (string-match "^[A-Za-z_]" (cdr state)) + (format ":info %s" (cdr state)) + (format ":info (%s)" (cdr state))))) + :complete (lambda (state response) + (unless (or (string-match "^Top level" response) + (string-match "^" response)) + (haskell-mode-message-line response))))))) + +(defun haskell-process-do-simple-echo (line &optional mode) + "Send LINE to the GHCi process and echo the result in some +fashion, such as printing in the minibuffer, or using +haskell-present, depending on configuration." + (let ((process (haskell-process))) + (haskell-process-queue-command + process + (make-haskell-command + :state (list process line mode) + :go (lambda (state) + (haskell-process-send-string (car state) (cadr state))) + :complete (lambda (state response) + ;; TODO: TBD: don't do this if + ;; `haskell-process-use-presentation-mode' is t. + (haskell-interactive-mode-echo + (haskell-process-session (car state)) + response + (caddr state)) + (if haskell-process-use-presentation-mode + (progn (haskell-present (cadr state) + (haskell-process-session (car state)) + response) + (haskell-session-assign + (haskell-process-session (car state)))) + (haskell-mode-message-line response))))))) + +(defun haskell-process-look-config-changes (session) + "Checks whether a cabal configuration file has +changed. Restarts the process if that is the case." + (let ((current-checksum (haskell-session-get session 'cabal-checksum)) + (new-checksum (haskell-cabal-compute-checksum + (haskell-session-get session 'cabal-dir)))) + (when (not (string= current-checksum new-checksum)) + (haskell-interactive-mode-echo session (format "Cabal file changed: %s" new-checksum)) + (haskell-session-set-cabal-checksum session + (haskell-session-get session 'cabal-dir)) + (unless (and haskell-process-prompt-restart-on-cabal-change + (not (y-or-n-p "Cabal file changed; restart GHCi process? "))) + (haskell-process-start (haskell-session)))))) + +;;;###autoload +(defun haskell-process-load-file () + "Load the current buffer file." + (interactive) + (save-buffer) + (haskell-interactive-mode-reset-error (haskell-session)) + (haskell-process-file-loadish (concat "load " (buffer-file-name)) + nil + (current-buffer))) + +;;;###autoload +(defun haskell-process-reload-file () + "Re-load the current buffer file." + (interactive) + (save-buffer) + (haskell-interactive-mode-reset-error (haskell-session)) + (haskell-process-file-loadish "reload" t nil)) + +;;;###autoload +(defun haskell-process-load-or-reload (&optional toggle) + "Load or reload. Universal argument toggles which." + (interactive "P") + (if toggle + (progn (setq haskell-reload-p (not haskell-reload-p)) + (message "%s (No action taken this time)" + (if haskell-reload-p + "Now running :reload." + "Now running :load ."))) + (if haskell-reload-p (haskell-process-reload-file) (haskell-process-load-file)))) + +(defun haskell-process-file-loadish (command reload-p module-buffer) + "Run a loading-ish COMMAND that wants to pick up type errors +and things like that. RELOAD-P indicates whether the notification +should say 'reloaded' or 'loaded'. MODULE-BUFFER may be used +for various things, but is optional." + (let ((session (haskell-session))) + (haskell-session-current-dir session) + (when haskell-process-check-cabal-config-on-load + (haskell-process-look-config-changes session)) + (let ((process (haskell-process))) + (haskell-process-queue-command + process + (make-haskell-command + :state (list session process command reload-p module-buffer) + :go (lambda (state) + (haskell-process-send-string + (cadr state) (format ":%s" (caddr state)))) + :live (lambda (state buffer) + (haskell-process-live-build + (cadr state) buffer nil)) + :complete (lambda (state response) + (haskell-process-load-complete + (car state) + (cadr state) + response + (cadddr state) + (cadddr (cdr state))))))))) + +;;;###autoload +(defun haskell-process-cabal-build () + "Build the Cabal project." + (interactive) + (haskell-process-do-cabal "build") + (haskell-process-add-cabal-autogen)) + +;;;###autoload +(defun haskell-process-cabal () + "Prompts for a Cabal command to run." + (interactive) + (haskell-process-do-cabal + (funcall haskell-completing-read-function "Cabal command: " + haskell-cabal-commands))) + +(defun haskell-process-add-cabal-autogen () + "Add /dist/build/autogen/ to the ghci search +path. This allows modules such as 'Path_...', generated by cabal, +to be loaded by ghci." + (unless (eq 'cabal-repl haskell-process-type) ;; redundant with "cabal repl" + (let* + ((session (haskell-session)) + (cabal-dir (haskell-session-cabal-dir session)) + (ghci-gen-dir (format "%sdist/build/autogen/" cabal-dir))) + (haskell-process-queue-without-filters + (haskell-process) + (format ":set -i%s" ghci-gen-dir))))) + +(defun haskell-process-do-cabal (command) + "Run a Cabal command." + (let ((process (haskell-process))) + (haskell-process-queue-command + process + (make-haskell-command + :state (list (haskell-session) process command 0) + + :go + (lambda (state) + (haskell-process-send-string + (cadr state) + (format haskell-process-do-cabal-format-string + (haskell-session-cabal-dir (car state)) + (format "%s %s" + (ecase haskell-process-type + ('ghci "cabal") + ('cabal-repl "cabal") + ('cabal-ghci "cabal") + ('cabal-dev "cabal-dev")) + (caddr state))))) + + :live + (lambda (state buffer) + (let ((cmd (replace-regexp-in-string "^\\([a-z]+\\).*" + "\\1" + (caddr state)))) + (cond ((or (string= cmd "build") + (string= cmd "install")) + (haskell-process-live-build (cadr state) buffer t)) + (t + (haskell-process-cabal-live state buffer))))) + + :complete + (lambda (state response) + (let* ((process (cadr state)) + (session (haskell-process-session process)) + (message-count 0) + (cursor (haskell-process-response-cursor process)) + (haskell-imported-suggested (list))) + (haskell-process-set-response-cursor process 0) + (while (haskell-process-errors-warnings session process response) + (setq message-count (1+ message-count))) + (haskell-process-set-response-cursor process cursor) + (let ((msg (format "Complete: cabal %s (%s compiler messages)" + (caddr state) + message-count))) + (haskell-interactive-mode-echo session msg) + (haskell-mode-message-line msg) + (when (and haskell-notify-p + (fboundp 'notifications-notify)) + (notifications-notify + :title (format "*%s*" (haskell-session-name (car state))) + :body msg + :app-name (ecase haskell-process-type + ('ghci "cabal") + ('cabal-repl "cabal") + ('cabal-ghci "cabal") + ('cabal-dev "cabal-dev")) + :app-icon haskell-process-logo + ))))))))) + +(defun haskell-process-cabal-live (state buffer) + "Do live updates for Cabal processes." + (haskell-interactive-mode-insert + (haskell-process-session (cadr state)) + (replace-regexp-in-string + haskell-process-prompt-regex + "" + (substring buffer (cadddr state)))) + (setf (cdddr state) (list (length buffer))) + nil) + +(defun haskell-process-load-complete (session process buffer reload module-buffer &optional cont) + "Handle the complete loading response. BUFFER is the string of +text being sent over the process pipe. MODULE-BUFFER is the +actual Emacs buffer of the module being loaded." + (cond ((haskell-process-consume process "Ok, modules loaded: \\(.+\\)\\.$") + (let* ((modules (haskell-process-extract-modules buffer)) + (cursor (haskell-process-response-cursor process))) + (haskell-process-set-response-cursor process 0) + (let ((warning-count 0)) + (while (haskell-process-errors-warnings session process buffer) + (setq warning-count (1+ warning-count))) + (haskell-process-set-response-cursor process cursor) + (if (and (not reload) + haskell-process-reload-with-fbytecode) + (haskell-process-reload-with-fbytecode process module-buffer) + (haskell-process-import-modules process (car modules))) + (haskell-mode-message-line + (if reload "Reloaded OK." "OK.")) + (when cont + (funcall cont t))))) + ((haskell-process-consume process "Failed, modules loaded: \\(.+\\)\\.$") + (let* ((modules (haskell-process-extract-modules buffer)) + (cursor (haskell-process-response-cursor process)) + (haskell-imported-suggested (list))) + (haskell-process-set-response-cursor process 0) + (while (haskell-process-errors-warnings session process buffer)) + (haskell-process-set-response-cursor process cursor) + (if (and (not reload) haskell-process-reload-with-fbytecode) + (haskell-process-reload-with-fbytecode process module-buffer) + (haskell-process-import-modules process (car modules))) + (haskell-interactive-mode-compile-error session "Compilation failed.") + (when cont + (funcall cont nil)))))) + +(defun haskell-process-reload-with-fbytecode (process module-buffer) + "Reload FILE-NAME with -fbyte-code set, and then restore -fobject-code." + (haskell-process-queue-without-filters process ":set -fbyte-code") + (haskell-process-touch-buffer process module-buffer) + (haskell-process-queue-without-filters process ":reload") + (haskell-process-queue-without-filters process ":set -fobject-code")) + +(defun haskell-process-touch-buffer (process buffer) + "Updates mtime on the file for BUFFER by queing a touch on +PROCESS." + (interactive) + (haskell-process-queue-command + process + (make-haskell-command + :state (cons process buffer) + :go (lambda (state) + (haskell-process-send-string + (car state) + (format ":!%s %s" + "touch" + (shell-quote-argument (buffer-file-name + (cdr state)))))) + :complete (lambda (state _) + (with-current-buffer (cdr state) + (clear-visited-file-modtime)))))) + +(defun haskell-process-extract-modules (buffer) + "Extract the modules from the process buffer." + (let* ((modules-string (match-string 1 buffer)) + (modules (split-string modules-string ", "))) + (cons modules modules-string))) + +(defun haskell-process-import-modules (process modules) + "Import `modules' with :m +, and send any import statements +from `module-buffer'." + (when haskell-process-auto-import-loaded-modules + (haskell-process-queue-command + process + (make-haskell-command + :state (cons process modules) + :go (lambda (state) + (haskell-process-send-string + (car state) + (format ":m + %s" (mapconcat 'identity (cdr state) " ")))))))) + +(defun haskell-process-live-build (process buffer echo-in-repl) + "Show live updates for loading files." + (cond ((haskell-process-consume + process + (concat "\\[[ ]*\\([0-9]+\\) of \\([0-9]+\\)\\]" + " Compiling \\([^ ]+\\)[ ]+" + "( \\([^ ]+\\), \\([^ ]+\\) )[^\r\n]*[\r\n]+")) + (let ((session (haskell-process-session process)) + (module-name (match-string 3 buffer)) + (file-name (match-string 4 buffer))) + (haskell-interactive-show-load-message + session + 'compiling + module-name + (haskell-session-strip-dir session file-name) + echo-in-repl)) + t) + ((haskell-process-consume process "Loading package \\([^ ]+\\) ... linking ... done.\n") + (haskell-mode-message-line + (format "Loading: %s" + (match-string 1 buffer))) + t) + ((haskell-process-consume + process + "^Preprocessing executables for \\(.+?\\)\\.\\.\\.") + (let ((msg (format "Preprocessing: %s" (match-string 1 buffer)))) + (haskell-interactive-mode-echo + (haskell-process-session process) + msg) + (haskell-mode-message-line msg))) + ((haskell-process-consume process "Linking \\(.+?\\) \\.\\.\\.") + (let ((msg (format "Linking: %s" (match-string 1 buffer)))) + (haskell-interactive-mode-echo (haskell-process-session process) msg) + (haskell-mode-message-line msg))) + ((haskell-process-consume process "\nBuilding \\(.+?\\)\\.\\.\\.") + (let ((msg (format "Building: %s" (match-string 1 buffer)))) + (haskell-interactive-mode-echo + (haskell-process-session process) + msg) + (haskell-mode-message-line msg))))) + +(defun haskell-process-errors-warnings (session process buffer) + "Trigger handling type errors or warnings." + (cond + ((haskell-process-consume + process + (concat "[\r\n]\\([^ \r\n:][^:\n\r]+\\):\\([0-9]+\\):\\([0-9]+\\)\\(-[0-9]+\\)?:" + "[ \n\r]+\\([[:unibyte:][:nonascii:]]+?\\)\n[^ ]")) + (haskell-process-set-response-cursor process + (- (haskell-process-response-cursor process) 1)) + (let* ((buffer (haskell-process-response process)) + (file (match-string 1 buffer)) + (line (string-to-number (match-string 2 buffer))) + (col (match-string 3 buffer)) + (col2 (match-string 4 buffer)) + (error-msg (match-string 5 buffer)) + (warning (string-match "^Warning:" error-msg)) + (final-msg (format "%s:%s:%s%s: %s" + (haskell-session-strip-dir session file) + line + col (or col2 "") + error-msg))) + (funcall (if warning + 'haskell-interactive-mode-compile-warning + 'haskell-interactive-mode-compile-error) + session final-msg) + (unless warning + (haskell-mode-message-line final-msg)) + (haskell-process-trigger-suggestions session error-msg file line)) + t))) + +(defun haskell-process-trigger-suggestions (session msg file line) + "Trigger prompting to add any extension suggestions." + (cond ((let ((case-fold-search nil)) (string-match " -X\\([A-Z][A-Za-z]+\\)" msg)) + (when haskell-process-suggest-language-pragmas + (haskell-process-suggest-pragma session "LANGUAGE" (match-string 1 msg) file))) + ((string-match " The \\(qualified \\)?import of[ ]`\\([^ ]+\\)' is redundant" msg) + (when haskell-process-suggest-remove-import-lines + (haskell-process-suggest-remove-import session + file + (match-string 2 msg) + line))) + ((string-match "Warning: orphan instance: " msg) + (when haskell-process-suggest-no-warn-orphans + (haskell-process-suggest-pragma session "OPTIONS" "-fno-warn-orphans" file))) + ((string-match "against inferred type `\\[Char\\]'" msg) + (when haskell-process-suggest-overloaded-strings + (haskell-process-suggest-pragma session "LANGUAGE" "OverloadedStrings" file))) + ((string-match "^Not in scope: .*`\\(.+\\)'$" msg) + (when haskell-process-suggest-hoogle-imports + (haskell-process-suggest-hoogle-imports session msg file))) + ((string-match "^[ ]+It is a member of the hidden package `\\(.+\\)'.$" msg) + (when haskell-process-suggest-add-package + (haskell-process-suggest-add-package session msg))))) + +(defun haskell-process-suggest-add-package (session msg) + "Add the (matched) module to your cabal file." + (let* ((suggested-package (match-string 1 msg)) + (package-name (replace-regexp-in-string "-[^-]+$" "" suggested-package)) + (version (progn (string-match "\\([^-]+\\)$" suggested-package) + (match-string 1 suggested-package))) + (cabal-file (concat (haskell-session-name session) + ".cabal"))) + (when (y-or-n-p + (format "Add `%s' to %s?" + package-name + cabal-file)) + (haskell-process-add-dependency package-name version)))) + +(defun haskell-process-add-dependency (package &optional version no-prompt) + "Add PACKAGE (and optionally suffix -VERSION) to the cabal +file. Prompts the user before doing so." + (interactive + (list (read-from-minibuffer "Package entry: ") + nil + t)) + (let ((buffer (current-buffer))) + (find-file (haskell-cabal-find-file)) + (let ((entry (if no-prompt + package + (read-from-minibuffer "Package entry: " + (concat package + (if version + (concat " >= " + version) + "")))))) + (save-excursion + (goto-char (point-min)) + (when (search-forward-regexp "^library$" nil t 1) + (search-forward-regexp "build-depends:[ ]+") + (let ((column (current-column))) + (when (y-or-n-p "Add to library?") + (insert entry ",\n") + (indent-to column)))) + (goto-char (point-min)) + (while (search-forward-regexp "^executable " nil t 1) + (let ((name (buffer-substring-no-properties (point) (line-end-position)))) + (search-forward-regexp "build-depends:[ ]+") + (let ((column (current-column))) + (when (y-or-n-p (format "Add to executable `%s'?" name)) + (insert entry ",\n") + (indent-to column))))) + (save-buffer) + (switch-to-buffer buffer))))) + +(defun haskell-process-suggest-hoogle-imports (session msg file) + "Given an out of scope identifier, Hoogle for that identifier, +and if a result comes back, suggest to import that identifier +now." + (let* ((ident (let ((i (match-string 1 msg))) + (if (string-match "^[A-Z]\\.\\(.+\\)$" i) + (match-string 1 i) + i))) + (modules (haskell-process-hoogle-ident ident)) + (module + (cond + ((> (length modules) 1) + (when (y-or-n-p (format "Identifier `%s' not in scope, choose module to import?" + ident)) + (funcall haskell-completing-read-function "Module: " modules))) + ((= (length modules) 1) + (when (y-or-n-p (format "Identifier `%s' not in scope, import `%s'?" + ident + (car modules))) + (car modules)))))) + (when module + (unless (member module haskell-imported-suggested) + (push module haskell-imported-suggested) + (haskell-process-find-file session file) + (save-excursion + (goto-char (point-max)) + (haskell-navigate-imports) + (insert (read-from-minibuffer "Import line: " (concat "import " module)) + "\n") + (haskell-sort-imports) + (haskell-align-imports)))))) + +(defun haskell-process-hoogle-ident (ident) + "Hoogle for IDENT, returns a list of modules." + (with-temp-buffer + (call-process "hoogle" nil t nil "search" "--exact" ident) + (goto-char (point-min)) + (unless (or (looking-at "^No results found") + (looking-at "^package ")) + (while (re-search-forward "^\\([^ ]+\\).*$" nil t) + (replace-match "\\1" nil nil)) + (remove-if (lambda (a) (string= "" a)) + (split-string (buffer-string) + "\n"))))) + +(defun haskell-process-suggest-remove-import (session file import line) + "Suggest removing or commenting out IMPORT on LINE." + (case (read-key (propertize (format "The import line `%s' is redundant. Remove? (y, n, c: comment out) " + import) + 'face 'minibuffer-prompt)) + (?y + (haskell-process-find-file session file) + (save-excursion + (goto-char (point-min)) + (forward-line (1- line)) + (goto-char (line-beginning-position)) + (delete-region (line-beginning-position) + (line-end-position)))) + (?c + (haskell-process-find-file session file) + (save-excursion + (goto-char (point-min)) + (forward-line (1- line)) + (goto-char (line-beginning-position)) + (insert "-- "))))) + +(defun haskell-process-suggest-pragma (session pragma extension file) + "Suggest to add something to the top of the file." + (let ((string (format "{-# %s %s #-}" pragma extension))) + (when (y-or-n-p (format "Add %s to the top of the file? " string)) + (haskell-process-find-file session file) + (save-excursion + (goto-char (point-min)) + (insert (concat string "\n")))))) + +(defun haskell-process-find-file (session file) + "Find the given file in the project." + (find-file (cond ((file-exists-p (concat (haskell-session-current-dir session) "/" file)) + (concat (haskell-session-current-dir session) "/" file)) + ((file-exists-p (concat (haskell-session-cabal-dir session) "/" file)) + (concat (haskell-session-cabal-dir session) "/" file)) + (t file)))) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Building the process + +;;;###autoload +(defun haskell-process-start (session) + "Start the inferior Haskell process." + (let ((existing-process (get-process (haskell-session-name (haskell-session))))) + (when (processp existing-process) + (haskell-interactive-mode-echo session "Restarting process ...") + (haskell-process-set (haskell-session-process session) 'is-restarting t) + (delete-process existing-process))) + (let ((process (or (haskell-session-process session) + (haskell-process-make (haskell-session-name session)))) + (old-queue (haskell-process-get (haskell-session-process session) + 'command-queue))) + (haskell-session-set-process session process) + (haskell-process-set-session process session) + (haskell-process-set-cmd process nil) + (haskell-process-set (haskell-session-process session) 'is-restarting nil) + (let ((default-directory (haskell-session-cabal-dir session))) + (haskell-session-pwd session) + (haskell-process-set-process + process + (ecase haskell-process-type + ('ghci + (haskell-process-log (format "Starting inferior GHCi process %s ..." + haskell-process-path-ghci)) + (apply #'start-process + (append (list (haskell-session-name session) + nil + haskell-process-path-ghci) + haskell-process-args-ghci))) + ('cabal-repl + (haskell-process-log (format "Starting inferior `cabal repl' process using %s ..." + haskell-process-path-cabal)) + + (apply #'start-process + (append (list (haskell-session-name session) + nil + haskell-process-path-cabal) + '("repl") haskell-process-args-cabal-repl + (let ((target (haskell-session-target session))) + (if target (list target) nil))))) + ('cabal-ghci + (haskell-process-log (format "Starting inferior cabal-ghci process using %s ..." + haskell-process-path-cabal-ghci)) + (start-process (haskell-session-name session) + nil + haskell-process-path-cabal-ghci)) + ('cabal-dev + (let ((dir (concat (haskell-session-cabal-dir session) + "/cabal-dev"))) + (haskell-process-log (format "Starting inferior cabal-dev process %s -s %s ..." + haskell-process-path-cabal-dev + dir)) + (start-process (haskell-session-name session) + nil + haskell-process-path-cabal-dev + "ghci" + "-s" + dir)))))) + (progn (set-process-sentinel (haskell-process-process process) 'haskell-process-sentinel) + (set-process-filter (haskell-process-process process) 'haskell-process-filter)) + (haskell-process-send-startup process) + (unless (eq 'cabal-repl haskell-process-type) ;; "cabal repl" sets the proper CWD + (haskell-process-change-dir session + process + (haskell-session-current-dir session))) + (haskell-process-set process 'command-queue + (append (haskell-process-get (haskell-session-process session) + 'command-queue) + old-queue)) + process)) + +(defun haskell-process-clear () + "Clear the current process." + (interactive) + (haskell-process-reset (haskell-process)) + (haskell-process-set (haskell-process) 'command-queue nil)) + +(defun haskell-process-restart () + "Restart the inferior Haskell process." + (interactive) + (haskell-process-reset (haskell-process)) + (haskell-process-set (haskell-process) 'command-queue nil) + (haskell-process-start (haskell-session))) + +(defun haskell-kill-session-process (&optional session) + "Kill the process." + (interactive) + (let* ((session (or session (haskell-session))) + (existing-process (get-process (haskell-session-name session)))) + (when (processp existing-process) + (haskell-interactive-mode-echo session "Killing process ...") + (haskell-process-set (haskell-session-process session) 'is-restarting t) + (delete-process existing-process)))) + +(defun haskell-process-make (name) + "Make an inferior Haskell process." + (list (cons 'name name))) + +;;;###autoload +(defun haskell-process () + "Get the current process from the current session." + (haskell-session-process (haskell-session))) + +(defun haskell-process-interrupt () + "Interrupt the process (SIGINT)." + (interactive) + (interrupt-process (haskell-process-process (haskell-process)))) + +(defun haskell-process-cd (&optional not-interactive) + "Change directory." + (interactive) + (let* ((session (haskell-session)) + (dir (haskell-session-pwd session t))) + (haskell-process-log (format "Changing directory to %s ...\n" dir)) + (haskell-process-change-dir session + (haskell-process) + dir))) + +(defun haskell-session-pwd (session &optional change) + "Prompt for the current directory." + (or (unless change + (haskell-session-get session 'current-dir)) + (progn (haskell-session-set-current-dir + session + (haskell-utils-read-directory-name + (if change "Change directory: " "Set current directory: ") + (or (haskell-session-get session 'current-dir) + (haskell-session-get session 'cabal-dir) + (if (buffer-file-name) + (file-name-directory (buffer-file-name)) + "~/")))) + (haskell-session-get session 'current-dir)))) + +(defun haskell-process-change-dir (session process dir) + "Change the directory of the current process." + (haskell-process-queue-command + process + (make-haskell-command + :state (list session process dir) + + :go + (lambda (state) + (haskell-process-send-string + (cadr state) (format ":cd %s" (caddr state)))) + + :complete + (lambda (state _) + (haskell-session-set-current-dir (car state) (caddr state)) + (haskell-interactive-mode-echo (car state) + (format "Changed directory: %s" + (caddr state))))))) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Process communication + +(defun haskell-process-send-startup (process) + "Send the necessary start messages." + (haskell-process-queue-command + process + (make-haskell-command + :state process + + :go (lambda (process) + (haskell-process-send-string process ":set prompt \"> \"") + (haskell-process-send-string process "Prelude.putStrLn \"\"") + (haskell-process-send-string process ":set -v1")) + + :live (lambda (process buffer) + (when (haskell-process-consume + process + "^\*\*\* WARNING: \\(.+\\) is writable by someone else, IGNORING!$") + (let ((path (match-string 1 buffer))) + (haskell-session-modify + (haskell-process-session process) + 'ignored-files + (lambda (files) + (remove-duplicates (cons path files) :test 'string=))) + (haskell-interactive-mode-compile-warning + (haskell-process-session process) + (format "GHCi is ignoring: %s (run M-x haskell-process-unignore)" + path))))) + + :complete (lambda (process _) + (haskell-interactive-mode-echo + (haskell-process-session process) + (concat (nth (random (length haskell-process-greetings)) + haskell-process-greetings) + (when haskell-process-show-debug-tips + " +If I break, you can: + 1. Restart: M-x haskell-process-restart + 2. Configure logging: C-h v haskell-process-log (useful for debugging) + 3. General config: M-x customize-mode + 4. Hide these tips: C-h v haskell-process-show-debug-tips"))))))) + +(defun haskell-process-sentinel (proc event) + "The sentinel for the process pipe." + (let ((session (haskell-process-project-by-proc proc))) + (when session + (let* ((process (haskell-session-process session))) + (unless (haskell-process-restarting process) + (haskell-process-log (format "Event: %S\n" event)) + (haskell-process-log "Process reset.\n") + (haskell-process-prompt-restart process)))))) + +(defun haskell-process-filter (proc response) + "The filter for the process pipe." + (haskell-process-log (format "<- %S\n" response)) + (let ((session (haskell-process-project-by-proc proc))) + (when session + (when (haskell-process-cmd (haskell-session-process session)) + (haskell-process-collect session + response + (haskell-session-process session)))))) + +(defun haskell-process-log (msg) + "Write MSG to the process log (if enabled)." + (when haskell-process-log + (with-current-buffer (get-buffer-create "*haskell-process-log*") + (goto-char (point-max)) + (insert msg)))) + +(defun haskell-process-project-by-proc (proc) + "Find project by process." + (find-if (lambda (project) + (string= (haskell-session-name project) + (process-name proc))) + haskell-sessions)) + +(defun haskell-process-collect (session response process) + "Collect input for the response until receives a prompt." + (haskell-process-set-response process + (concat (haskell-process-response process) response)) + (while (haskell-process-live-updates process)) + (when (string-match haskell-process-prompt-regex + (haskell-process-response process)) + (haskell-command-exec-complete + (haskell-process-cmd process) + (replace-regexp-in-string + haskell-process-prompt-regex + "" + (haskell-process-response process))) + (haskell-process-reset process) + (haskell-process-trigger-queue process))) + +(defun haskell-process-reset (process) + "Reset the process's state, ready for the next send/reply." + (progn (haskell-process-set-response-cursor process 0) + (haskell-process-set-response process "") + (haskell-process-set-cmd process nil))) + +(defun haskell-process-consume (process regex) + "Consume a regex from the response and move the cursor along if succeed." + (when (string-match regex + (haskell-process-response process) + (haskell-process-response-cursor process)) + (haskell-process-set-response-cursor process (match-end 0)) + t)) + +(defun haskell-process-send-string (process string) + "Try to send a string to the process's process. Ask to restart if it's not running." + (let ((child (haskell-process-process process))) + (if (equal 'run (process-status child)) + (let ((out (concat string "\n"))) + (haskell-process-log (format "-> %S\n" out)) + (process-send-string child out)) + (unless (haskell-process-restarting process) + (haskell-process-prompt-restart process))))) + +(defun haskell-process-prompt-restart (process) + "Prompt to restart the died process." + (when (y-or-n-p (format "The Haskell process `%s' has died. Restart? " + (haskell-process-name process))) + (haskell-process-start (haskell-process-session process)))) + +(defun haskell-process-live-updates (process) + "Process live updates." + (haskell-command-exec-live (haskell-process-cmd process) + (haskell-process-response process))) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Making commands + +(defun haskell-process-queue-without-filters (process line) + "Queue LINE to be sent to PROCESS without bothering to look at +the response." + (haskell-process-queue-command + process + (make-haskell-command + :state (cons process line) + :go (lambda (state) + (haskell-process-send-string (car state) + (cdr state)))))) + +(defun haskell-process-queue-command (process command) + "Add a command to the process command queue." + (haskell-process-cmd-queue-add process command) + (haskell-process-trigger-queue process)) + +(defun haskell-process-trigger-queue (process) + "Trigger the next command in the queue to be ran if there is no current command." + (if (and (haskell-process-process process) + (process-live-p (haskell-process-process process))) + (unless (haskell-process-cmd process) + (let ((cmd (haskell-process-cmd-queue-pop process))) + (when cmd + (haskell-process-set-cmd process cmd) + (haskell-command-exec-go cmd)))) + (progn (haskell-process-reset process) + (haskell-process-set (haskell-process) 'command-queue nil) + (haskell-process-prompt-restart process)))) + +(defun haskell-process-queue-flushed-p (process) + "Return t if command queue has been completely processed." + (not (or (haskell-process-cmd-queue process) + (haskell-process-cmd process)))) + +(defun haskell-process-queue-flush (process) + "Block till PROCESS' command queue has been completely processed. +This uses `accept-process-output' internally." + (while (not (haskell-process-queue-flushed-p process)) + (haskell-process-trigger-queue process) + (accept-process-output (haskell-process-process process) 1))) + +(defun haskell-process-queue-sync-request (process reqstr) + "Queue submitting REQSTR to PROCESS and return response blockingly." + (let ((cmd (make-haskell-command + :state (cons nil process) + :go `(lambda (s) (haskell-process-send-string (cdr s) ,reqstr)) + :complete 'setcar))) + (haskell-process-queue-command process cmd) + (haskell-process-queue-flush process) + (car-safe (haskell-command-state cmd)))) + +(defun haskell-process-get-repl-completions (process inputstr) + "Perform `:complete repl ...' query for INPUTSTR using PROCESS." + (let* ((reqstr (concat ":complete repl " + (haskell-str-literal-encode inputstr))) + (rawstr (haskell-process-queue-sync-request process reqstr))) + (if (string-prefix-p "unknown command " rawstr) + (error "GHCi lacks `:complete' support") + (let* ((s1 (split-string rawstr "\r?\n")) + (cs (mapcar #'haskell-str-literal-decode (cdr s1))) + (h0 (car s1))) ;; " " + (unless (string-match "\\`\\([0-9]+\\) \\([0-9]+\\) \\(\".*\"\\)\\'" h0) + (error "Invalid `:complete' response")) + (let ((cnt1 (match-string 1 h0)) + (h1 (haskell-str-literal-decode (match-string 3 h0)))) + (unless (= (string-to-number cnt1) (length cs)) + (error "Lengths inconsistent in `:complete' reponse")) + (cons h1 cs)))))) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Accessing the process + +(defun haskell-process-get (process key) + "Get the PROCESS's KEY value. +Returns nil if KEY not set." + (cdr (assq key process))) + +(defun haskell-process-set (process key value) + "Set the PROCESS's KEY to VALUE. +Returns newly set VALUE." + (if process + (let ((cell (assq key process))) + (if cell + (setcdr cell value) ; modify cell in-place + (setcdr process (cons (cons key value) (cdr process))) ; new cell + value)) + (display-warning 'haskell-interactive + "`haskell-process-set' called with nil process"))) + +;; Wrappers using haskell-process-{get,set} + +(defun haskell-process-set-process (p v) + "Set the process's inferior process." + (haskell-process-set p 'inferior-process v)) + +(defun haskell-process-process (p) + "Get the process child." + (haskell-process-get p 'inferior-process)) + +(defun haskell-process-name (p) + "Get the process name." + (haskell-process-get p 'name)) + +(defun haskell-process-cmd (p) + "Get the process's current command. +Return nil if no current command." + (haskell-process-get p 'current-command)) + +(defun haskell-process-set-cmd (p v) + "Set the process's current command." + (haskell-process-set p 'current-command v)) + +(defun haskell-process-response (p) + "Get the process's current response." + (haskell-process-get p 'current-response)) + +(defun haskell-process-session (p) + "Get the process's current session." + (haskell-process-get p 'session)) + +(defun haskell-process-set-response (p v) + "Set the process's current response." + (haskell-process-set p 'current-response v)) + +(defun haskell-process-set-session (p v) + "Set the process's current session." + (haskell-process-set p 'session v)) + +(defun haskell-process-response-cursor (p) + "Get the process's current response cursor." + (haskell-process-get p 'current-response-cursor)) + +(defun haskell-process-set-response-cursor (p v) + "Set the process's response cursor." + (haskell-process-set p 'current-response-cursor v)) + +;; low-level command queue operations + +(defun haskell-process-restarting (process) + "Is the PROCESS restarting?" + (haskell-process-get process 'is-restarting)) + +(defun haskell-process-cmd-queue (process) + "Get the PROCESS' command queue. +New entries get added to the end of the list. Use +`haskell-process-cmd-queue-add' and +`haskell-process-cmd-queue-pop' to modify the command queue." + (haskell-process-get process 'command-queue)) + +(defun haskell-process-cmd-queue-add (process cmd) + "Add CMD to end of PROCESS's command queue." + (check-type cmd haskell-command) + (haskell-process-set process + 'command-queue + (append (haskell-process-cmd-queue process) + (list cmd)))) + +(defun haskell-process-cmd-queue-pop (process) + "Pop the PROCESS' next entry from command queue. +Returns nil if queue is empty." + (let ((queue (haskell-process-cmd-queue process))) + (when queue + (haskell-process-set process 'command-queue (cdr queue)) + (car queue)))) + +(defun haskell-process-unignore () + "Unignore any files that were specified as being ignored by the + inferior GHCi process." + (interactive) + (let ((session (haskell-session)) + (changed nil)) + (if (null (haskell-session-get session + 'ignored-files)) + (message "Nothing to unignore!") + (loop for file in (haskell-session-get session + 'ignored-files) + do (case (read-key + (propertize (format "Set permissions? %s (y, n, v: stop and view file)" + file) + 'face 'minibuffer-prompt)) + (?y + (haskell-process-unignore-file session file) + (setq changed t)) + (?v + (find-file file) + (return)))) + (when (and changed + (y-or-n-p "Restart GHCi process now? ")) + (haskell-process-restart))))) + +(defun haskell-process-reload-devel-main () + "Reload the module `DevelMain' and then run +`DevelMain.update'. This is for doing live update of the code of +servers or GUI applications. Put your development version of the +program in `DevelMain', and define `update' to auto-start the +program on a new thread, and use the `foreign-store' package to +access the running context across :load/:reloads in GHCi." + (interactive) + (with-current-buffer (get-buffer "DevelMain.hs") + (let ((session (haskell-session))) + (let ((process (haskell-process))) + (haskell-process-queue-command + process + (make-haskell-command + :state (list :session session + :process process + :buffer (current-buffer)) + :go (lambda (state) + (haskell-process-send-string (plist-get state ':process) + ":l DevelMain")) + :live (lambda (state buffer) + (haskell-process-live-build (plist-get state ':process) + buffer + nil)) + :complete (lambda (state response) + (haskell-process-load-complete + (plist-get state ':session) + (plist-get state ':process) + response + nil + (plist-get state ':buffer) + (lambda (ok) + (when ok + (haskell-process-queue-without-filters + (haskell-process) + "DevelMain.update") + (message "DevelMain updated."))))))))))) + +(defun haskell-process-unignore-file (session file) + " + +Note to Windows Emacs hackers: + +chmod is how to change the mode of files in POSIX +systems. This will not work on your operating +system. + +There is a command a bit like chmod called \"Calcs\" +that you can try using here: + +http://technet.microsoft.com/en-us/library/bb490872.aspx + +If it works, you can submit a patch to this +function and remove this comment. +" + (shell-command (read-from-minibuffer "Permissions command: " + (concat "chmod 700 " + file))) + (haskell-session-modify + (haskell-session) + 'ignored-files + (lambda (files) + (remove-if (lambda (path) + (string= path file)) + files)))) + +(defun haskell-command-exec-go (command) + "Call the command's go function." + (let ((go-func (haskell-command-go command))) + (when go-func + (funcall go-func (haskell-command-state command))))) + +(defun haskell-command-exec-complete (command response) + "Call the command's complete function." + (let ((comp-func (haskell-command-complete command))) + (when comp-func + (funcall comp-func + (haskell-command-state command) + response)))) + +(defun haskell-command-exec-live (command response) + "Trigger the command's live updates callback." + (let ((live-func (haskell-command-live command))) + (when live-func + (funcall live-func + (haskell-command-state command) + response)))) + +(provide 'haskell-process) + +;; Local Variables: +;; byte-compile-warnings: (not cl-functions) +;; End: + +;;; haskell-process.el ends here diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/haskell-process.elc Binary file .emacs.d/haskell-mode/haskell-process.elc has changed diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/haskell-session.el --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/haskell-mode/haskell-session.el Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,367 @@ +;;; haskell-session.el --- Haskell sessions + +;; Copyright (C) 2011-2012 Chris Done + +;; Author: Chris Done + +;; This file is not part of GNU Emacs. + +;; This file is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; This file is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to +;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. + +;;; Commentary: + +;;; Todo: + +;;; Code: + +(require 'haskell-cabal) +(require 'haskell-string) +(require 'haskell-mode) +(with-no-warnings (require 'cl)) + +(declare-function haskell-interactive-mode "haskell-interactive-mode" ()) +(declare-function haskell-kill-session-process "haskell-process" (&optional session)) +(declare-function haskell-process-start "haskell-process" (session)) +(declare-function haskell-process-cd "haskell-process" (&optional not-interactive)) + +;; Dynamically scoped variables. +(defvar haskell-process-type) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Globals + +(defvar haskell-sessions (list) + "All Haskell sessions in the Emacs session.") + +(defun haskell-session-tags-filename (session) + "Get the filename for the TAGS file." + (concat (haskell-session-cabal-dir session) "/TAGS")) + +;;;###autoload +(defun haskell-session-all-modules (&optional dontcreate) + "Get all modules -- installed or in the current project. +If DONTCREATE is non-nil don't create a new session." + (append (haskell-session-installed-modules dontcreate) + (haskell-session-project-modules dontcreate))) + +;;;###autoload +(defun haskell-session-installed-modules (&optional dontcreate) + "Get the modules installed in the current package set. +If DONTCREATE is non-nil don't create a new session." + ;; TODO: Again, this makes HEAVY use of unix utilities. It'll work + ;; fine in Linux, probably okay on OS X, and probably not at all on + ;; Windows. Again, if someone wants to test on Windows and come up + ;; with alternatives that's OK. + ;; + ;; Ideally all these package queries can be provided by a Haskell + ;; program based on the Cabal API. Possibly as a nice service. Such + ;; a service could cache and do nice things like that. For now, this + ;; simple shell script takes us far. + ;; + ;; Probably also we can take the code from inferior-haskell-mode. + ;; + ;; Ugliness aside, if it saves us time to type it's a winner. + ;; + ;; FIXME/TODO: add support for (eq 'cabal-repl haskell-process-type) + (require 'haskell-process) ; hack for accessing haskell-process-type + (let ((modules (shell-command-to-string + (format "%s | %s | %s" + (if (eq 'cabal-dev haskell-process-type) + (if (or (not dontcreate) (haskell-session-maybe)) + (format "cabal-dev -s %s/cabal-dev ghc-pkg dump" + (haskell-session-cabal-dir (haskell-session))) + "echo ''") + "ghc-pkg dump") + "egrep '^(exposed-modules: | )[A-Z]'" + "cut -c18-")))) + (split-string modules))) + +(defun haskell-session-project-modules (&optional dontcreate) + "Get the modules of the current project. +If DONTCREATE is non-nil don't create a new session." + (if (or (not dontcreate) (haskell-session-maybe)) + (let* ((session (haskell-session)) + (modules + (shell-command-to-string + (format "%s && %s" + (format "cd %s" (haskell-session-cabal-dir session)) + ;; TODO: Use a different, better source. Possibly hasktags or some such. + ;; TODO: At least make it cross-platform. Linux + ;; (and possibly OS X) have egrep, Windows + ;; doesn't -- or does it via Cygwin or MinGW? + ;; This also doesn't handle module\nName. But those gits can just cut it out! + "egrep '^module[\t\r ]+[^(\t\r ]+' . -r -I --include='*.*hs' --include='*.hsc' -s -o -h | sed 's/^module[\t\r ]*//' | sort | uniq")))) + (split-string modules)))) + +(defun haskell-session-kill (&optional leave-interactive-buffer) + "Kill the session process and buffer, delete the session. +0. Prompt to kill all associated buffers. +1. Kill the process. +2. Kill the interactive buffer. +3. Walk through all the related buffers and set their haskell-session to nil. +4. Remove the session from the sessions list." + (interactive) + (let* ((session (haskell-session)) + (name (haskell-session-name session)) + (also-kill-buffers (y-or-n-p (format "Killing `%s'. Also kill all associated buffers?" name)))) + (haskell-kill-session-process session) + (unless leave-interactive-buffer + (kill-buffer (haskell-session-interactive-buffer session))) + (loop for buffer in (buffer-list) + do (with-current-buffer buffer + (when (and (boundp 'haskell-session) + (string= (haskell-session-name haskell-session) name)) + (setq haskell-session nil) + (when also-kill-buffers + (kill-buffer))))) + (setq haskell-sessions + (remove-if (lambda (session) + (string= (haskell-session-name session) + name)) + haskell-sessions)))) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Finding/clearing the session + +;; Used internally +(defvar haskell-session) + +;;;###autoload +(defun haskell-session-maybe () + "Maybe get the Haskell session, return nil if there isn't one." + (if (default-boundp 'haskell-session) + haskell-session + (setq haskell-session nil))) + +;;;###autoload +(defun haskell-session () + "Get the Haskell session, prompt if there isn't one or fail." + (or (haskell-session-maybe) + (haskell-session-assign + (or (haskell-session-from-buffer) + (haskell-session-new-assume-from-cabal) + (haskell-session-choose) + (haskell-session-new))))) + +(defun haskell-session-new-assume-from-cabal () + "Prompt to create a new project based on a guess from the nearest Cabal file." + (when (y-or-n-p (format "Start a new project named “%s”? " + (haskell-session-default-name))) + (haskell-session-make (haskell-session-default-name)))) + +(defun haskell-session-from-buffer () + "Get the session based on the buffer." + (when (and (buffer-file-name) + (consp haskell-sessions)) + (reduce (lambda (acc a) + (if (haskell-is-prefix-of (haskell-session-cabal-dir a) + (file-name-directory (buffer-file-name))) + (if acc + (if (and + (> (length (haskell-session-cabal-dir a)) + (length (haskell-session-cabal-dir acc)))) + a + acc) + a) + acc)) + haskell-sessions + :initial-value nil))) + +(defun haskell-session-new () + "Make a new session." + (let ((name (read-from-minibuffer "Project name: " (haskell-session-default-name)))) + (when (not (string= name "")) + (haskell-session-make name)))) + +(defun haskell-session-default-name () + "Generate a default project name for the new project prompt." + (let ((file (haskell-cabal-find-file))) + (or (when file + (downcase (file-name-sans-extension + (file-name-nondirectory file)))) + "haskell"))) + +(defun haskell-session-assign (session) + "Set the current session." + (set (make-local-variable 'haskell-session) session)) + +(defun haskell-session-choose () + "Find a session by choosing from a list of the current sessions." + (when haskell-sessions + (let* ((session-name (funcall haskell-completing-read-function + "Choose Haskell session: " + (mapcar 'haskell-session-name haskell-sessions))) + (session (find-if (lambda (session) + (string= (haskell-session-name session) + session-name)) + haskell-sessions))) + session))) + +(defun haskell-session-clear () + "Clear the buffer of any Haskell session choice." + (set (make-local-variable 'haskell-session) nil)) + +(defun haskell-session-change () + "Change the session for the current buffer." + (interactive) + (haskell-session-clear) + (haskell-session-assign (or (haskell-session-new-assume-from-cabal) + (haskell-session-choose) + (haskell-session-new)))) + +(defun haskell-session-change-target (target) + "Set the build target for cabal repl" + (interactive "sNew build target:") + (let* ((session haskell-session) + (old-target (haskell-session-get session 'target))) + (when session + (haskell-session-set-target session target) + (when (and (not (string= old-target target)) + (y-or-n-p "Target changed, restart haskell process?")) + (haskell-process-start session))))) + +(defun haskell-session-strip-dir (session file) + "Strip the load dir from the file path." + (let ((cur-dir (haskell-session-current-dir session))) + (if (> (length file) (length cur-dir)) + (if (string= (substring file 0 (length cur-dir)) + cur-dir) + (replace-regexp-in-string + "^[/\\]" "" + (substring file + (length cur-dir))) + file) + file))) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Building the session + +(defun haskell-session-make (name) + "Make a Haskell session." + (let ((session (set (make-local-variable 'haskell-session) + (list (cons 'name name))))) + (add-to-list 'haskell-sessions session) + (haskell-process-start session) + session)) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Accessing the session + +(defun haskell-session-name (s) + "Get the session name." + (haskell-session-get s 'name)) + +(defun haskell-session-target (s) + "Get the session build target." + (let* ((maybe-target (haskell-session-get s 'target)) + (target (if maybe-target maybe-target + (let ((new-target + (read-string "build target (empty for default):"))) + (haskell-session-set-target s new-target))))) + (if (not (string= target "")) target nil))) + +(defun haskell-session-set-target (s target) + "Set the session build target." + (haskell-session-set s 'target target)) + +(defun haskell-session-interactive-buffer (s) + "Get the session interactive buffer." + (let ((buffer (haskell-session-get s 'interactive-buffer))) + (if (and buffer (buffer-live-p buffer)) + buffer + (let ((buffer (get-buffer-create (format "*%s*" (haskell-session-name s))))) + (haskell-session-set-interactive-buffer s buffer) + (with-current-buffer buffer + (haskell-interactive-mode) + (haskell-session-assign s)) + (switch-to-buffer-other-window buffer) + buffer)))) + +(defun haskell-session-set-interactive-buffer (s v) + "Set the session interactive buffer." + (haskell-session-set s 'interactive-buffer v)) + +(defun haskell-session-set-process (s v) + "Set the session process." + (haskell-session-set s 'process v)) + +;;;###autoload +(defun haskell-session-process (s) + "Get the session process." + (haskell-session-get s 'process)) + +(defun haskell-session-set-cabal-dir (s v) + "Set the session cabal-dir." + (let ((true-path (file-truename v))) + (haskell-session-set s 'cabal-dir true-path) + (haskell-session-set-cabal-checksum s true-path))) + +(defun haskell-session-set-current-dir (s v) + "Set the session current directory." + (let ((true-path (file-truename v))) + (haskell-session-set s 'current-dir true-path))) + +(defun haskell-session-set-cabal-checksum (s cabal-dir) + "Set the session checksum of .cabal files" + (haskell-session-set s 'cabal-checksum + (haskell-cabal-compute-checksum cabal-dir))) + +(defun haskell-session-current-dir (s) + "Get the session current directory." + (let ((dir (haskell-session-get s 'current-dir))) + (or dir + (haskell-process-cd t)))) + +(defun haskell-session-cabal-dir (s) + "Get the session cabal-dir." + (let ((dir (haskell-session-get s 'cabal-dir))) + (if dir + dir + (let ((set-dir (haskell-cabal-get-dir))) + (if set-dir + (progn (haskell-session-set-cabal-dir s set-dir) + set-dir) + (haskell-session-cabal-dir s)))))) + +(defun haskell-session-modify (session key update) + "Update the value at KEY in SESSION with UPDATE." + (haskell-session-set + session + key + (funcall update + (haskell-session-get session key)))) + +(defun haskell-session-get (session key) + "Get the SESSION's KEY value. +Returns nil if KEY not set." + (cdr (assq key session))) + +(defun haskell-session-set (session key value) + "Set the SESSION's KEY to VALUE. +Returns newly set VALUE." + (let ((cell (assq key session))) + (if cell + (setcdr cell value) ; modify cell in-place + (setcdr session (cons (cons key value) (cdr session))) ; new cell + value))) + +(provide 'haskell-session) + +;; Local Variables: +;; byte-compile-warnings: (not cl-functions) +;; End: + +;;; haskell-session.el ends here diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/haskell-session.elc Binary file .emacs.d/haskell-mode/haskell-session.elc has changed diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/haskell-show.el --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/haskell-mode/haskell-show.el Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,263 @@ +;;; haskell-show.el --- A pretty printer for Haskell Show values + +;; Copyright (C) 2011 Chris Done + +;; Author: Chris Done + +;; This file is not part of GNU Emacs. + +;; This program is free software: you can redistribute it and/or +;; modify it under the terms of the GNU General Public License as +;; published by the Free Software Foundation, either version 3 of the +;; License, or (at your option) any later version. + +;; This program is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see +;; . + +;;; Commentary: + +;; It doesn't support some number literals (probably). I'm not +;; precisely sure what values Show will always produce. There is +;; however a test suite available, so patches for extra Show support +;; is welcome and should be easy to test. + +;;; Code: + +(defvar sexp-show "sexp-show") +(require 'haskell-string) +(with-no-warnings (require 'cl)) + +(defun haskell-show-replace-region () + "Replace the given region with a pretty printed version." + (interactive) + (haskell-show-replace (region-beginning) (region-end))) + +;;;###autoload +(defun haskell-show-replace (start end) + "Replace the given region containing a Show value with a pretty + printed collapsible version." + (let ((text (buffer-substring-no-properties start end))) + (goto-char start) + (delete-region start end) + (haskell-show-parse-and-insert text))) + +;;;###autoload +(defun haskell-show-parse-and-insert (given) + "Parse a `string' containing a Show instance value and insert + it pretty printed into the current buffer." + (when (not (string= "" (haskell-trim given))) + (let ((current-column (- (point) + (line-beginning-position))) + (result (haskell-show-parse given))) + (if (string-match "^[\\(]" result) + (let ((v (read result))) + (if (equal (car v) 'arbitrary) + (insert given) + (haskell-show-insert-pretty current-column v))) + (insert given))))) + +;;;###autoload +(defun haskell-show-parse (given) + "Parse the given input into a tree." + (with-temp-buffer + (insert given) + (shell-command-on-region + (point-min) + (point-max) + sexp-show + t) + (buffer-substring-no-properties (point-min) (point-max)))) + +(defun haskell-show-insert-pretty (column tree &optional parens) + "Insert a Show `tree' into the current buffer with collapsible nodes." + (case (car tree) + ('list (let ((start (point))) + (insert "[") + (haskell-show-mapcar/i (lambda (x i len) + (haskell-show-insert-pretty (+ column 1) x) + (unless (> i (- len 2)) + (if (< (+ column (length (haskell-show-pretty tree parens))) + 80) + (insert ",") + (insert (concat ",\n" (haskell-show-indent (+ 1 column) "")))))) + (cdr tree)) + (insert "]"))) + ('tuple (let ((start (point))) + (insert "(") + (haskell-show-mapcar/i (lambda (x i len) + (haskell-show-insert-pretty (+ column 1) x) + (unless (> i (- len 2)) + (if (< (+ column (length (haskell-show-pretty tree parens))) + 80) + (insert ",") + (insert (concat ",\n" (haskell-show-indent (+ 1 column) "")))))) + (cdr tree)) + (insert ")"))) + ('record + (let ((record (cdr tree)) (overlay (list 'nil))) + (insert (if parens "(" "")) + (let ((link-start (point))) + (insert (car record)) + (let ((button (make-text-button link-start (point) :type 'haskell-show-toggle-button))) + (put-text-property link-start (point) 'face 'font-lock-type-face) + (button-put button 'overlay overlay))) + (insert " {\n") + (let ((curly-start (1- (point))) + (show-len (+ column (length (haskell-show-pretty tree parens))))) + (haskell-show-mapcar/i (lambda (field i len) + (insert + (haskell-show-indent + (if (and (> i 0) (< show-len 80)) 0 column) + (car field))) + (insert " = ") + (put-text-property (- (point) 3) (point) 'face + 'font-lock-constant-face) + (haskell-show-insert-pretty + (if (< show-len 80) + 0 + (+ (length (car field)) column 3)) + (cdr field)) + (unless (> i (- len 2)) + (if (< show-len 80) + (insert ", ") + (insert ",\n")))) + (cdr record)) + (insert (concat "\n" (haskell-show-indent column "}"))) + (progn + (setf (car overlay) (make-overlay curly-start (- (point) 1) nil t)) + (overlay-put (car overlay) 'invisible t)) + (insert (if parens ")" ""))))) + ('num (let ((num-start (point))) + (insert (format "%d" (cdr tree))) + (put-text-property num-start (point) 'face 'font-lock-constant-face))) + ('string (let ((str-start (point))) + (insert "\"") + (if (< (+ column (length (cdr tree))) 60) + (progn + (insert (format "%s" (cdr tree))) + (put-text-property (+ 1 str-start) (point) 'face 'font-lock-string-face)) + (progn + (insert "…") + (insert (format "%s" (cdr tree))) + (let ((overlay (make-overlay (+ 2 str-start) (point) nil t))) + (overlay-put overlay 'invisible t) + (put-text-property (+ 2 str-start) (point) 'face 'font-lock-string-face) + (let ((button (make-text-button (+ 1 str-start) (+ 2 str-start) + :type 'haskell-show-toggle-button))) + (put-text-property (+ 1 str-start) (+ 2 str-start) + 'face 'font-lock-keyword-face) + (button-put button 'overlay (list overlay)) + (button-put button 'hide-on-click t))))) + (insert "\""))) + ('data (let ((data (cdr tree))) + (insert (if parens "(" "")) + (let ((cons-start (point))) + (insert (car data)) + (put-text-property cons-start (point) 'face 'font-lock-type-face)) + (unless (null (cdr data)) + (progn (insert " ") + (haskell-show-mapcar/i + (lambda (x i len) + (haskell-show-insert-pretty column x t) + (unless (> i (- len 2)) + (insert " "))) + (cdr data)))) + (insert (if parens ")" "")))) + ('char (progn (insert "'") + (insert (char-to-string (cdr tree))) + (put-text-property (- (point) 1) (point) 'face 'font-lock-string-face) + (insert "'"))) + ('arbitrary (let ((start (point))) + (insert (cdr tree)) + (put-text-property start (point) 'face 'font-lock-comment-face))) + (otherwise (error "Unsupported node type: %S" tree)))) + +(define-button-type 'haskell-show-toggle-button + 'action 'haskell-show-toggle-button-callback + 'follow-link t + 'help-echo "Click to expand…") + +(defun haskell-show-toggle-button-callback (btn) + "The callback to toggle the overlay visibility." + (let ((overlay (button-get btn 'overlay))) + (when overlay + (overlay-put (car overlay) + 'invisible (not (overlay-get (car overlay) + 'invisible))))) + (let ((hide (button-get btn 'remove-on-click))) + (when hide + (button-put btn 'invisible t)))) + +(defun haskell-show-pretty (tree &optional parens) + "Show a Show `tree'." + (case (car tree) + ('list (format "[%s]" + (mapconcat + (lambda (x) + (haskell-show-pretty x)) + (cdr tree) + ","))) + ('record (let ((record (cdr tree))) + (format "%s%s {%s}%s" + (if parens "(" "") + (car record) + (mapconcat (lambda (field) + (format "%s = %s" + (car field) + (haskell-show-pretty (cdr field)))) + (cdr record) + ", ") + (if parens ")" "")))) + ('num (format "%s" (cdr tree))) + ('string (format "%S" (cdr tree))) + ('data (let ((data (cdr tree))) + (format "%s%s%s%s" + (if parens "(" "") + (car data) + (if (null (cdr data)) + "" + (concat " " + (mapconcat + (lambda (x) (haskell-show-pretty x t)) + (cdr data) + " "))) + (if parens ")" "")))) + ('tuple (format "(%s)" + (mapconcat + (lambda (x) + (haskell-show-pretty x)) + (cdr tree) + ","))) + ('char (format "'%s'" (if (= (cdr tree) ?') + "\\'" + (char-to-string (cdr tree))))) + ('arbitrary (cdr tree)) + (otherwise (error "Unsupported node type: %S" tree)))) + +(defun haskell-show-mapcar/i (f xs) + "Map `f' across `xs' giving the index and length to `f' as extra parameters." + (let ((len (length xs)) + (i 0)) + (mapcar (lambda (x) + (funcall f x i len) + (setq i (1+ i))) + xs))) + +(defun haskell-show-indent (n s) + "Indent a string `s' at colum `n'." + (concat (make-string n ? ) + s)) + +(provide 'haskell-show) + +;; Local Variables: +;; byte-compile-warnings: (not cl-functions) +;; End: + +;;; haskell-show.el ends here diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/haskell-show.elc Binary file .emacs.d/haskell-mode/haskell-show.elc has changed diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/haskell-simple-indent.el --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/haskell-mode/haskell-simple-indent.el Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,201 @@ +;;; haskell-simple-indent.el --- Simple indentation module for Haskell Mode + +;; Copyright (C) 1998 Heribert Schuetz, Graeme E Moss + +;; Author: Heribert Schuetz +;; Graeme E Moss +;; Keywords: indentation files Haskell + +;; This file is not part of GNU Emacs. + +;; This file is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; This file is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see . + +;;; Commentary: + +;; Purpose: +;; +;; To support simple indentation of Haskell scripts. +;; +;; +;; Installation: +;; +;; To bind TAB to the indentation command for all Haskell buffers, add +;; this to .emacs: +;; +;; (add-hook 'haskell-mode-hook 'turn-on-haskell-simple-indent) +;; +;; Otherwise, call `turn-on-haskell-simple-indent'. +;; +;; +;; Customisation: +;; +;; None supported. +;; +;; +;; History: +;; +;; If you have any problems or suggestions, after consulting the list +;; below, email gem@cs.york.ac.uk quoting the version of you are +;; using, the version of Emacs you are using, and a small example of +;; the problem or suggestion. +;; +;; Version 1.0: +;; Brought over from Haskell mode v1.1. +;; +;; Present Limitations/Future Work (contributions are most welcome!): +;; +;; (None so far.) + +;;; Code: + +;; All functions/variables start with +;; `(turn-(on/off)-)haskell-simple-indent'. + +(require 'haskell-mode) + +(defgroup haskell-simple-indent nil + "Simple Haskell indentation." + :link '(custom-manual "(haskell-mode)Indentation") + :group 'haskell + :prefix "haskell-simple-indent-") + +;; Version. +(defconst haskell-simple-indent-version "1.2" + "`haskell-simple-indent' version number.") +(defun haskell-simple-indent-version () + "Echo the current version of `haskell-simple-indent' in the minibuffer." + (interactive) + (message "Using haskell-simple-indent version %s" + haskell-simple-indent-version)) + +;; Partly stolen from `indent-relative' in indent.el: +(defun haskell-simple-indent () + "Space out to under next visible indent point. +Indent points are positions of non-whitespace following whitespace in +lines preceeding point. A position is visible if it is to the left of +the first non-whitespace of every nonblank line between the position and +the current line. If there is no visible indent point beyond the current +column, `tab-to-tab-stop' is done instead." + (interactive) + (let* ((start-column (current-column)) + (invisible-from nil) ; `nil' means infinity here + (indent + (catch 'haskell-simple-indent-break + (save-excursion + (while (progn (beginning-of-line) + (not (bobp))) + (forward-line -1) + (if (not (looking-at "[ \t]*\n")) + (let ((this-indentation (current-indentation))) + (if (or (not invisible-from) + (< this-indentation invisible-from)) + (if (> this-indentation start-column) + (setq invisible-from this-indentation) + (let ((end (line-beginning-position 2))) + (move-to-column start-column) + ;; Is start-column inside a tab on this line? + (if (> (current-column) start-column) + (backward-char 1)) + (or (looking-at "[ \t]") + (skip-chars-forward "^ \t" end)) + (skip-chars-forward " \t" end) + (let ((col (current-column))) + (throw 'haskell-simple-indent-break + (if (or (= (point) end) + (and invisible-from + (> col invisible-from))) + invisible-from + col))))))))))))) + (if indent + (let ((opoint (point-marker))) + (indent-line-to indent) + (if (> opoint (point)) + (goto-char opoint)) + (set-marker opoint nil)) + (tab-to-tab-stop)))) + +(defun haskell-simple-indent-backtab () + "Indent backwards. Dual to `haskell-simple-indent'." + (interactive) + (let ((current-point (point)) + (i 0) + (x 0)) + (goto-char (line-beginning-position)) + (save-excursion + (while (< (point) current-point) + (haskell-simple-indent) + (setq i (+ i 1)))) + (while (< x (- i 1)) + (haskell-simple-indent) + (setq x (+ x 1))))) + +(defun haskell-simple-indent-newline-same-col () + "Make a newline and go to the same column as the current line." + (interactive) + (let ((point (point))) + (let ((start-end + (save-excursion + (let* ((start (line-beginning-position)) + (end (progn (goto-char start) + (search-forward-regexp + "[^ ]" (line-end-position) t 1)))) + (when end (cons start (1- end))))))) + (if start-end + (progn (newline) + (insert (buffer-substring-no-properties + (car start-end) (cdr start-end)))) + (newline))))) + +(defun haskell-simple-indent-newline-indent () + "Make a newline on the current column and indent on step." + (interactive) + (haskell-simple-indent-newline-same-col) + (insert (make-string haskell-indent-spaces ? ))) + +;;;###autoload +(define-minor-mode haskell-simple-indent-mode + "Simple Haskell indentation mode that uses simple heuristic. +In this minor mode, `indent-for-tab-command' (bound to by +default) will move the cursor to the next indent point in the +previous nonblank line, whereas `haskell-simple-indent-backtab' +\ (bound to by default) will move the cursor the +previous indent point. An indent point is a non-whitespace +character following whitespace. + +Runs `haskell-simple-indent-hook' on activation." + :lighter " Ind" + :group 'haskell-simple-indent + :keymap '(([backtab] . haskell-simple-indent-backtab)) + (kill-local-variable 'indent-line-function) + (when haskell-simple-indent-mode + (set (make-local-variable 'indent-line-function) 'haskell-simple-indent) + (run-hooks 'haskell-simple-indent-hook))) + +;; The main functions. +;;;###autoload +(defun turn-on-haskell-simple-indent () + "Turn on function `haskell-simple-indent-mode'." + (interactive) + (haskell-simple-indent-mode)) + +(defun turn-off-haskell-simple-indent () + "Turn off function `haskell-simple-indent-mode'." + (interactive) + (haskell-simple-indent-mode 0)) + +;; Provide ourselves: + +(provide 'haskell-simple-indent) + +;;; haskell-simple-indent.el ends here diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/haskell-simple-indent.elc Binary file .emacs.d/haskell-mode/haskell-simple-indent.elc has changed diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/haskell-sort-imports.el --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/haskell-mode/haskell-sort-imports.el Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,93 @@ +;;; haskell-sort-imports.el --- Sort the list of Haskell imports at the point alphabetically + +;; Copyright (C) 2010 Chris Done + +;; Author: Chris Done + +;; This file is not part of GNU Emacs. + +;; This program is free software: you can redistribute it and/or +;; modify it under the terms of the GNU General Public License as +;; published by the Free Software Foundation, either version 3 of +;; the License, or (at your option) any later version. + +;; This program is distributed in the hope that it will be +;; useful, but WITHOUT ANY WARRANTY; without even the implied +;; warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +;; PURPOSE. See the GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public +;; License along with this program. If not, see +;; . + +;;; Commentary: + +;; If the region is active it sorts the imports within the +;; region. + +;; This will align and sort the columns of the current import +;; list. It's more or less the coolest thing on the planet. + +;;; Code: + +(defvar haskell-sort-imports-regexp + (concat "^\\(import[ ]+\\)" + "\\(qualified \\)?" + "[ ]*\\(\"[^\"]*\" \\)?" + "[ ]*\\([A-Za-z0-9_.']*.*\\)")) + +;;;###autoload +(defun haskell-sort-imports () + "Sort the import list at the point." + (interactive) + (when (haskell-sort-imports-line-match) + (let ((current-line (buffer-substring-no-properties + (line-beginning-position) + (line-end-position))) + (col (current-column))) + (if (use-region-p) + (haskell-sort-imports-sort-imports-at (region-beginning) + (region-end) + t + current-line + col) + (haskell-sort-imports-sort-imports-at + (save-excursion (haskell-sort-imports-goto-modules-start/end + 'previous-line) + (point)) + (save-excursion (haskell-sort-imports-goto-modules-start/end + 'next-line) + (point)) + nil + current-line + col))))) + +(defun haskell-sort-imports-sort-imports-at (begin end region current-line col) + (save-excursion + (sort-regexp-fields nil + haskell-sort-imports-regexp + "\\4" + begin end)) + (when (not region) + (let ((line (save-excursion (goto-char end) + (search-backward current-line)))) + (goto-char (+ line col))))) + +(defun haskell-sort-imports-line-match () + "Try to match the current line as a regexp." + (let ((line (buffer-substring-no-properties (line-beginning-position) + (line-end-position)))) + (if (string-match "^import " line) + line + nil))) + +(defun haskell-sort-imports-goto-modules-start/end (direction) + "Skip a bunch of consequtive import lines up/down." + (while (not (or (equal (point) + (point-max)) + (not (haskell-sort-imports-line-match)))) + (funcall direction))) + +(provide 'haskell-sort-imports) + +;;; haskell-sort-imports.el ends here diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/haskell-sort-imports.elc Binary file .emacs.d/haskell-mode/haskell-sort-imports.elc has changed diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/haskell-str.el --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/haskell-mode/haskell-str.el Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,180 @@ +;;; haskell-str.el --- Haskell related string utilities + +;; Copyright (C) 2013 Herbert Valerio Riedel + +;; Author: Herbert Valerio Riedel + +;; This file is not part of GNU Emacs. + +;; This file is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3 of the License, or +;; (at your option) any later version. + +;; This file is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see . + +;;; Commentary: + +;;; Todo: + +;; - write ERT tests + +;;; Code: + +(defun haskell-str-trim (string) + "Remove whitespace around STRING. + +A Whitespace character is defined in the Haskell Report as follows + + whitechar -> newline | vertab | space | tab | uniWhite + newline -> return linefeed | return | linefeed | formfeed + uniWhite -> any Unicode character defined as whitespace + +Note: The implementation currently only supports ASCII + white-space characters, i.e. the implemention doesn't + consider uniWhite." + + (let ((s1 (if (string-match "[\t\n\v\f\r ]+\\'" string) (replace-match "" t t string) string))) + (if (string-match "\\`[\t\n\v\f\r ]+" s1) (replace-match "" t t s1) s1))) + +(defun haskell-str-only-spaces-p (string) + "Return t if STRING contains only whitespace (or is empty)." + (string= "" (haskell-str-trim string))) + +(defun haskell-str-take (string n) + "Return (up to) N character length prefix of STRING." + (substring string 0 (min (length string) n))) + +(defalias 'haskell-str-is-prefix-of-p 'string-prefix-p) + +(defun haskell-str-is-suffix-of-p (str1 str2 &optional ignore-case) + "Return non-nil if STR1 is a suffix of STR2. +If IGNORE-CASE is non-nil, the comparison is done without paying attention +to case differences. + +Dual to `haskell-str-is-prefix-of-p'" + (let ((pos (- (length str2) (length str1)))) + (if (>= pos 0) + (eq t (compare-strings str1 nil nil + str2 pos nil ignore-case))))) + +(defconst haskell-str-literal-encode-ascii-array + [ "\\NUL" "\\SOH" "\\STX" "\\ETX" "\\EOT" "\\ENQ" "\\ACK" "\\a" "\\b" "\\t" "\\n" "\\v" "\\f" "\\r" "\\SO" "\\SI" "\\DLE" "\\DC1" "\\DC2" "\\DC3" "\\DC4" "\\NAK" "\\SYN" "\\ETB" "\\CAN" "\\EM" "\\SUB" "\\ESC" "\\FS" "\\GS" "\\RS" "\\US" " " "!" "\\\"" "#" "$" "%" "&" "'" "(" ")" "*" "+" "," "-" "." "/" "0" "1" "2" "3" "4" "5" "6" "7" "8" "9" ":" ";" "<" "=" ">" "?" "@" "A" "B" "C" "D" "E" "F" "G" "H" "I" "J" "K" "L" "M" "N" "O" "P" "Q" "R" "S" "T" "U" "V" "W" "X" "Y" "Z" "[" "\\\\" "]" "^" "_" "`" "a" "b" "c" "d" "e" "f" "g" "h" "i" "j" "k" "l" "m" "n" "o" "p" "q" "r" "s" "t" "u" "v" "w" "x" "y" "z" "{" "|" "}" "~" "\\DEL" ] + "Array of encodings for 7-bit ASCII character points indexed by ASCII value.") + +(defun haskell-str-literal-encode (str &optional no-quotes) + "Encode STR according Haskell escape rules using 7-bit ASCII representation. + +The serialization has been implement to closely match the +behaviour of GHC's Show instance for Strings. + +If NO-QUOTES is non-nil, omit wrapping result in quotes. + +This is the dual operation to `haskell-str-literal-decode'." + + (let ((lastc -1)) + (let ((encode (lambda (c) + (let ((lc lastc)) + (setq lastc c) + (if (>= c 128) ;; if non-ASCII code point + (format "\\%d" c) + ;; else, for ASCII code points + (if (or (and (= lc 14) (= c ?H)) ;; "\SO\&H" + (and (>= lc 128) (>= c ?0) (<= c ?9))) ;; "\123\&4" + (concat "\\&" (aref haskell-str-literal-encode-ascii-array c)) + (aref haskell-str-literal-encode-ascii-array c) + )))))) + + (if no-quotes + (mapconcat encode str "") + (concat "\"" (mapconcat encode str "") "\""))))) + +(defconst haskell-str-literal-escapes-regexp + (concat "[\\]\\(?:" + (regexp-opt (append + (mapcar (lambda (c) (format "%c" c)) + "abfnrtv\\\"'&") ;; "charesc" escape sequences + (mapcar (lambda (c) (format "^%c" c)) + "ABCDEFGHIJKLMNOPQRSTUVWXYZ@[\\]^_") ;; "cntrl" escape sequences + (mapcar (lambda (s) (format "%s" s)) + (split-string "NUL SOH STX ETX EOT ENQ ACK BEL BS HT LF VT FF CR + SO SI DLE DC1 DC2 DC3 DC4 NAK SYN ETB CAN EM SUB ESC + FS GS RS US SP DEL")))) ;; "ascii" (w\o "cntrl") escape sequences + "\\|" "[\t\n\v\f\r ]+[\\]" ;; whitespace gaps + "\\|" "[0-9]+" ;; decimal escape sequence + "\\|" "o[0-7]+" ;; octal escape sequence + "\\|" "x[0-9a-f]+" ;; hex escape sequence + "\\)?") ;; everything else is an invalid escape sequence + "Regexp for matching escape codes in string literals. +See Haskell Report Sect 2.6, +URL `http://www.haskell.org/onlinereport/haskell2010/haskellch2.html#x7-200002.6', +for more details.") + +(defconst haskell-str-literal-decode1-table + (let ((h (make-hash-table :test 'equal))) + (mapc (lambda (c) (puthash (concat "\\" (car c)) (cdr c) h)) + '(;; ascii-escapes + ("NUL" . "\x00") ("SOH" . "\x01") ("STX" . "\x02") ("ETX" . "\x03") ("EOT" . "\x04") ("ENQ" . "\x05") + ("ACK" . "\x06") ("BEL" . "\x07") ("BS" . "\x08") ("HT" . "\x09") ("LF" . "\x0a") ("VT" . "\x0b") + ("FF" . "\x0c") ("CR" . "\x0d") ("SO" . "\x0e") ("SI" . "\x0f") ("DLE" . "\x10") ("DC1" . "\x11") + ("DC2" . "\x12") ("DC3" . "\x13") ("DC4" . "\x14") ("NAK" . "\x15") ("SYN" . "\x16") ("ETB" . "\x17") + ("CAN" . "\x18") ("EM" . "\x19") ("SUB" . "\x1a") ("ESC" . "\x1b") ("FS" . "\x1c") ("GS" . "\x1d") + ("RS" . "\x1e") ("US" . "\x1f") ("SP" . "\x20") ("DEL" . "\x7f" ) + ;; C-compatible single-char escape sequences + ("a" . "\x07") ("b" . "\x08") ("f" . "\x0c") ("n" . "\x0a") ("r" . "\x0d") ("t" . "\x09") ("v" . "\x0b") + ;; trivial escapes + ("\\" . "\\") ("\"" . "\"") ("'" . "'") + ;; "empty" escape + ("&" . ""))) + h) + "Hash table containing irregular escape sequences and their decoded strings. +Used by `haskell-str-literal-decode1'.") + +(defun haskell-str-literal-decode1 (l) + "Decode a single string literal escape sequence. +L must contain exactly one escape sequence. +This is an internal function used by `haskell-str-literal-decode'." + (let ((case-fold-search nil)) + (cond + ((gethash l haskell-str-literal-decode1-table)) + ((string-match "\\`[\\][0-9]+\\'" l) (char-to-string (string-to-number (substring l 1) 10))) + ((string-match "\\`[\\]x[[:xdigit:]]+\\'" l) (char-to-string (string-to-number (substring l 2) 16))) + ((string-match "\\`[\\]o[0-7]+\\'" l) (char-to-string (string-to-number (substring l 2) 8))) + ((string-match "\\`[\\]\\^[@-_]\\'" l) (char-to-string (- (aref l 2) ?@))) ;; "cntrl" escapes + ((string-match "\\`[\\][\t\n\v\f\r ]+[\\]\\'" l) "") ;; whitespace gap + (t (error "Invalid escape sequence"))))) + +(defun haskell-str-literal-decode (estr &optional no-quotes) + "Decode a Haskell string-literal. +If NO-QUOTES is nil, ESTR must be surrounded by quotes. + +This is the dual operation to `haskell-str-literal-encode'." + (if (and (not no-quotes) + (string-match-p "\\`\"[^\\\"[:cntrl:]]*\"\\'" estr)) + (substring estr 1 -1) ;; optimized fast-path for trivial strings + (let ((s (if no-quotes ;; else: do general decoding + estr + (if (string-match-p "\\`\".*\"\\'" estr) + (substring estr 1 -1) + (error "String literal must be delimited by quotes")))) + (case-fold-search nil)) + (replace-regexp-in-string haskell-str-literal-escapes-regexp #'haskell-str-literal-decode1 s t t)))) + +(defun haskell-str-ellipsize (string n) + "Return STRING truncated to (at most) N characters. +If truncation occured, last character in string is replaced by `…'. +See also `haskell-str-take'." + (cond + ((<= (length string) n) string) ;; no truncation needed + ((< n 1) "") + (t (concat (substring string 0 (1- n)) "…")))) + +(provide 'haskell-str) + +;;; haskell-str.el ends here diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/haskell-str.elc Binary file .emacs.d/haskell-mode/haskell-str.elc has changed diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/haskell-string.el --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/haskell-mode/haskell-string.el Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,23 @@ +;;;###autoload +(defun haskell-trim (string) + (replace-regexp-in-string + "^[ \t\n]+" "" + (replace-regexp-in-string + "[ \t\n]+$" "" + string))) + +;;;###autoload +(defun haskell-string-take (string n) + "Take n chars from string." + (substring string + 0 + (min (length string) n))) + +;;;###autoload +(defun haskell-is-prefix-of (x y) + "Is x string a prefix of y string?" + (string= x (substring y 0 (min (length y) (length x))))) + +(defun haskell-string ()) + +(provide 'haskell-string) diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/haskell-string.elc Binary file .emacs.d/haskell-mode/haskell-string.elc has changed diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/haskell-unicode-input-method.el --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/haskell-mode/haskell-unicode-input-method.el Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,301 @@ +;;; haskell-unicode-input-method.el --- Haskell Unicode helper functions -*- coding: utf-8 -*- + +;; Copyright (C) 2010-2011 Roel van Dijk + +;; Author: Roel van Dijk + +;; This file is not part of GNU Emacs. + +;; This file is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3 of the License, or +;; (at your option) any later version. + +;; This file is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see . + +;;; Commentary: + +;;; Code: + +(require 'quail) + +;;;###autoload +(defun turn-on-haskell-unicode-input-method () + "Set input method `haskell-unicode'. +See Info node `Unicode(haskell-mode)' for more details." + (interactive) + (set-input-method "haskell-unicode")) + +(quail-define-package + "haskell-unicode" ;; name + "UTF-8" ;; language + "\\" ;; title + t ;; guidance + "Haskell Unicode input method. +Designed to be used with the Haskell UnicodeSyntax language +extension in combination with the x-unicode-symbols set of +packages (base-unicode-symbols and containers-unicode-symbols). +" ;; docstring + nil ;; translation-keys + nil ;; forget-last-selection + nil ;; deterministic + nil ;; kbd-translate + nil ;; show-layout + nil ;; create-decode-map + nil ;; maximum-shortest + nil ;; overlay-plist + nil ;; update-translation-function + nil ;; conversion-keys + t ;; simple + ) + +(quail-define-rules + ;; Greek letters + ("alpha " ["α"]) + ("Alpha " ["Α"]) + ("beta " ["β"]) + ("Beta " ["Β"]) + ("gamma " ["γ"]) + ("Gamma " ["Γ"]) + ("delta " ["δ"]) + ("Delta " ["Δ"]) + ("epsilon " ["ε"]) + ("Epsilon " ["Ε"]) + ("zeta " ["ζ"]) + ("Zeta " ["Ζ"]) + ("eta " ["η"]) + ("Eta " ["Η"]) + ("theta " ["θ"]) + ("Theta " ["Θ"]) + ("iota " ["ι"]) + ("Iota " ["Ι"]) + ("kappa " ["κ"]) + ("Kappa " ["Κ"]) + ("lambda " ["λ"]) + ("Lambda " ["Λ"]) + ("lamda " ["λ"]) + ("Lamda " ["Λ"]) + ("mu " ["μ"]) + ("Mu " ["Μ"]) + ("nu " ["ν"]) + ("Nu " ["Ν"]) + ("xi " ["ξ"]) + ("Xi " ["Ξ"]) + ("omicron " ["ο"]) + ("Omicron " ["Ο"]) + ("pi " ["π"]) + ("Pi " ["Π"]) + ("rho " ["ρ"]) + ("Rho " ["Ρ"]) + ("sigma " ["σ"]) + ("Sigma " ["Σ"]) + ("tau " ["τ"]) + ("Tau " ["Τ"]) + ("upsilon " ["υ"]) + ("Upsilon " ["Υ"]) + ("phi " ["φ"]) + ("Phi " ["Φ"]) + ("chi " ["χ"]) + ("Chi " ["Χ"]) + ("psi " ["ψ"]) + ("Psi " ["Ψ"]) + ("omega " ["ω"]) + ("Omega " ["Ω"]) + ("digamma " ["ϝ"]) + ("Digamma " ["Ϝ"]) + ("san " ["ϻ"]) + ("San " ["Ϻ"]) + ("qoppa " ["ϙ"]) + ("Qoppa " ["Ϙ"]) + ("sampi " ["ϡ"]) + ("Sampi " ["Ϡ"]) + ("stigma " ["ϛ"]) + ("Stigma " ["Ϛ"]) + ("heta " ["ͱ"]) + ("Heta " ["Ͱ"]) + ("sho " ["ϸ"]) + ("Sho " ["Ϸ"]) + + ;; Double-struck letters + ("|A|" ["𝔸"]) + ("|B|" ["𝔹"]) + ("|C|" ["ℂ"]) + ("|D|" ["𝔻"]) + ("|E|" ["𝔼"]) + ("|F|" ["𝔽"]) + ("|G|" ["𝔾"]) + ("|H|" ["ℍ"]) + ("|I|" ["𝕀"]) + ("|J|" ["𝕁"]) + ("|K|" ["𝕂"]) + ("|L|" ["𝕃"]) + ("|M|" ["𝕄"]) + ("|N|" ["ℕ"]) + ("|O|" ["𝕆"]) + ("|P|" ["ℙ"]) + ("|Q|" ["ℚ"]) + ("|R|" ["ℝ"]) + ("|S|" ["𝕊"]) + ("|T|" ["𝕋"]) + ("|U|" ["𝕌"]) + ("|V|" ["𝕍"]) + ("|W|" ["𝕎"]) + ("|X|" ["𝕏"]) + ("|Y|" ["𝕐"]) + ("|Z|" ["ℤ"]) + ("|gamma|" ["ℽ"]) + ("|Gamma|" ["ℾ"]) + ("|pi|" ["ℼ"]) + ("|Pi|" ["ℿ"]) + + ;; Types + ("::" ["∷"]) + + ;; Quantifiers + ("forall" ["∀"]) + ("exists" ["∃"]) + + ;; Arrows + ("->" ["→"]) + ;; ("-->" ["⟶"]) + ("<-" ["←"]) + ;; ("<--" ["⟵"]) + ;; ("<->" ["↔"]) + ;; ("<-->" ["⟷"]) + + ("=>" ["⇒"]) + ;; ("==>" ["⟹"]) + ;; ("<=" ["⇐"]) + ;; ("<==" ["⟸"]) + ;; ("<=>" ["⇔"]) + ;; ("<==>" ["⟺"]) + + ;; ("|->" ["↦"]) + ;; ("|-->" ["⟼"]) + ;; ("<-|" ["↤"]) + ;; ("<--|" ["⟻"]) + + ;; ("|=>" ["⤇"]) + ;; ("|==>" ["⟾"]) + ;; ("<=|" ["⤆"]) + ;; ("<==|" ["⟽"]) + + ("~>" ["⇝"]) + ;; ("~~>" ["⟿"]) + ("<~" ["⇜"]) + ;; ("<~~" ["⬳"]) + + ;; (">->" ["↣"]) + ;; ("<-<" ["↢"]) + ;; ("->>" ["↠"]) + ;; ("<<-" ["↞"]) + + ;; (">->>" ["⤖"]) + ;; ("<<-<" ["⬻"]) + + ;; ("<|-" ["⇽"]) + ;; ("-|>" ["⇾"]) + ;; ("<|-|>" ["⇿"]) + + ;; ("<-/-" ["↚"]) + ;; ("-/->" ["↛"]) + + ;; ("<-|-" ["⇷"]) + ;; ("-|->" ["⇸"]) + ;; ("<-|->" ["⇹"]) + + ;; ("<-||-" ["⇺"]) + ;; ("-||->" ["⇻"]) + ;; ("<-||->" ["⇼"]) + + ;; ("-o->" ["⇴"]) + ;; ("<-o-" ["⬰"]) + + ;; Boolean operators + ;; ("not" ["¬"]) + ("&&" ["∧"]) + ("||" ["∨"]) + + ;; Relational operators + ("==" ["≡"]) + ("/=" ["≢" "≠"]) + ("<=" ["≤"]) + (">=" ["≥"]) + ("/<" ["≮"]) + ("/>" ["≯"]) + + ;; Arithmetic + ;; (" / " [" ÷ "]) + (" * " [" ⋅ "]) + + ;; Containers / Collections + ;; ("++" ["⧺"]) + ;; ("+++" ["⧻"]) + ;; ("|||" ["⫴"]) + ;; ("empty" ["∅"]) + ("elem" ["∈"]) + ("notElem" ["∉"]) + ("member" ["∈"]) + ("notMember" ["∉"]) + ("union" ["∪"]) + ("intersection" ["∩"]) + ("isSubsetOf" ["⊆"]) + ("isProperSubsetOf" ["⊂"]) + + ;; Other + ;; ("<<" ["≪"]) + ;; (">>" ["≫"]) + ("<<<" ["⋘"]) + (">>>" ["⋙"]) + ("<|" ["⊲"]) + ("|>" ["⊳"]) + ("><" ["⋈"]) + ;; ("mempty" ["∅"]) + ("mappend" ["⊕"]) + ;; ("<*>" ["⊛"]) + (" . " [" ∘ "]) + ("undefined" ["⊥"]) + (":=" ["≔"]) + ("=:" ["≕"]) + ("=def" ["≝"]) + ("=?" ["≟"]) + ("..." ["…"]) + + ;; Braces + ;; ("[|" ["〚"]) + ;; ("|]" ["〛"]) + + ;; Numeric subscripts + ("_0 " ["₀"]) + ("_1 " ["₁"]) + ("_2 " ["₂"]) + ("_3 " ["₃"]) + ("_4 " ["₄"]) + ("_5 " ["₅"]) + ("_6 " ["₆"]) + ("_7 " ["₇"]) + ("_8 " ["₈"]) + ("_9 " ["₉"]) + + ;; Numeric superscripts + ("^0 " ["⁰"]) + ("^1 " ["¹"]) + ("^2 " ["²"]) + ("^3 " ["³"]) + ("^4 " ["⁴"]) + ("^5 " ["⁵"]) + ("^6 " ["⁶"]) + ("^7 " ["⁷"]) + ("^8 " ["⁸"]) + ("^9 " ["⁹"]) + ) + +(provide 'haskell-unicode-input-method) + +;;; haskell-unicode-input-method.el ends here diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/haskell-unicode-input-method.elc Binary file .emacs.d/haskell-mode/haskell-unicode-input-method.elc has changed diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/haskell-utils.el --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/haskell-mode/haskell-utils.el Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,74 @@ +;;; haskell-utils.el --- General utility functions used by haskell-mode modules + +;; Copyright (C) 2013 Herbert Valerio Riedel + +;; Author: Herbert Valerio Riedel + +;; This file is not part of GNU Emacs. + +;; This file is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3 of the License, or +;; (at your option) any later version. + +;; This file is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see . + +;;; Commentary: + +;; This module's purpose is to provide a place for helper functions +;; which are general enough to be usable by multiple modules and/or +;; to alleviate circular module dependency problems. +;; +;; When possible, functions in this module shall be accompanied by +;; ERT-based unit tests. +;; +;; See also `haskell-str.el' for string utility functions. +;; +;; All symbols in this module have a `haskell-utils-' prefix. + +;;; Code: + +;; NOTE: This module is supposed to be a leaf-module and shall not +;; require/depend-on any other haskell-mode modules in order to +;; stay at the bottom of the module dependency graph. + + +(defun haskell-utils-read-directory-name (prompt default) + "Read directory name and normalize to true absolute path. +Refer to `read-directory-name' for the meaning of PROMPT and +DEFAULT." + (let ((filename (file-truename + (read-directory-name prompt + default + default)))) + (concat (replace-regexp-in-string "/$" "" filename) + "/"))) + + +(defun haskell-utils-parse-import-statement-at-point () + "Return imported module name if on import statement or nil otherwise. +This currently assumes that the \"import\" keyword and the module +name are on the same line. + +This function supports the SafeHaskell and PackageImports syntax extensions. + +Note: doesn't detect if in {--}-style comment." + (save-excursion + (goto-char (line-beginning-position)) + (if (looking-at (concat "[\t ]*import[\t ]+" + "\\(safe[\t ]+\\)?" ;; SafeHaskell + "\\(qualified[\t ]+\\)?" + "\\(\"[^\"]*\"[\t ]+\\)?" ;; PackageImports + "\\([[:digit:][:upper:][:lower:].]+\\)")) + (match-string-no-properties 4)))) + + +(provide 'haskell-utils) + +;;; haskell-utils.el ends here diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/haskell-utils.elc Binary file .emacs.d/haskell-mode/haskell-utils.elc has changed diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/haskell-yas.el --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/haskell-mode/haskell-yas.el Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,55 @@ +;;; haskell-yas.el --- Customization support for Luke Hoersten's yasnippets + +;; Copyright (C) 2013 John Wiegley, Luke Hoersten + +;; Author: John Wiegley +;; Luke Hoersten +;; Keywords: faces files Haskell + +;; This file is not part of GNU Emacs. + +;; This file is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; This file is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see . + +;;; Commentary: + +;; Provides customization variables for Luke Hoersten's yasnippet collection +;; to depend on. + +;;; Code: + +(defgroup haskell-yas nil + "Customizations for Luke Hoersten's yasnippet collection for haskell-mode." + :group 'haskell + :prefix "haskell-yas-") + +(defcustom haskell-yas-ghc-language-pragmas + (split-string (shell-command-to-string "ghc --supported-extensions")) + "List of language pragmas supported by the installed version of GHC." + :group 'haskell-yas + :type '(repeat string)) + +(defcustom haskell-yas-completing-function 'ido-completing-read + "Function to use for completing among alternatives." + :group 'haskell-yas + :type 'function) + +;;;###autoload +(defun haskell-yas-complete (&rest args) + (apply haskell-yas-completing-function args)) + +;; Provide ourselves: + +(provide 'haskell-yas) + +;;; haskell-yas.el ends here diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/haskell-yas.elc Binary file .emacs.d/haskell-mode/haskell-yas.elc has changed diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/inf-haskell.el --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/haskell-mode/inf-haskell.el Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,801 @@ +;;; inf-haskell.el --- Interaction with an inferior Haskell process + +;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. + +;; Author: Stefan Monnier +;; Keywords: Haskell + +;; This file is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; This file is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see . + +;;; Commentary: + +;; The code is made of 2 parts: a major mode for the buffer that holds the +;; inferior process's session and a minor mode for use in source buffers. + +;; Todo: + +;; - Check out Shim for ideas. +;; - i-h-load-buffer and i-h-send-region. + +;;; Code: + +(require 'comint) +(require 'shell) ; For directory tracking. +(require 'compile) +(require 'haskell-mode) +(require 'haskell-decl-scan) +(require 'haskell-cabal) +(with-no-warnings (require 'cl)) + +;; Dynamically scoped variables. +(defvar find-tag-marker-ring) + +(defgroup inferior-haskell nil + "Settings for REPL interaction via `inferior-haskell-mode'" + :link '(custom-manual "(haskell-mode)inferior-haskell-mode") + :prefix "inferior-haskell-" + :prefix "haskell-" + :group 'haskell) + +;; Here I depart from the inferior-haskell- prefix. +;; Not sure if it's a good idea. +(defcustom haskell-program-name + ;; Arbitrarily give preference to hugs over ghci. + (or (cond + ((executable-find "hugs") "hugs \"+.\"") + ((executable-find "ghci") "ghci")) + "hugs \"+.\"") + "The name of the command to start the inferior Haskell process. +The command can include arguments." + ;; Custom only supports the :options keyword for a few types, e.g. not + ;; for string. + ;; :options '("hugs \"+.\"" "ghci") + :group 'inferior-haskell + :type '(choice string (repeat string))) + +(defconst inferior-haskell-info-xref-re + "\t-- Defined at \\(.+\\):\\([0-9]+\\):\\([0-9]+\\)\\(?:-\\([0-9]+\\)\\)?$") + +(defconst inferior-haskell-module-re + "\t-- Defined in \\(.+\\)$" + "Regular expression for matching module names in :info.") + +(defvar inferior-haskell-multiline-prompt-re + "^\\*?[[:upper:]][\\._[:alnum:]]*\\(?: \\*?[[:upper:]][\\._[:alnum:]]*\\)*| " + "Regular expression for matching multiline prompt (the one inside :{ ... :} blocks).") + +(defconst inferior-haskell-error-regexp-alist + ;; The format of error messages used by Hugs. + `(("^ERROR \"\\(.+?\\)\"\\(:\\| line \\)\\([0-9]+\\) - " 1 3) + ;; Format of error messages used by GHCi. + ("^\\(.+?\\):\\([0-9]+\\):\\(\\([0-9]+\\):\\)?\\( \\|\n *\\)\\(Warning\\)?" + 1 2 4 ,@(if (fboundp 'compilation-fake-loc) + '((6) nil (5 '(face nil font-lock-multiline t))))) + ;; Runtime exceptions, from ghci. + ("^\\*\\*\\* Exception: \\(.+?\\):(\\([0-9]+\\),\\([0-9]+\\))-(\\([0-9]+\\),\\([0-9]+\\)): .*" + 1 ,@(if (fboundp 'compilation-fake-loc) '((2 . 4) (3 . 5)) '(2 3))) + ;; GHCi uses two different forms for line/col ranges, depending on + ;; whether it's all on the same line or not :-( In Emacs-23, I could use + ;; explicitly numbered subgroups to merge the two patterns. + ("^\\*\\*\\* Exception: \\(.+?\\):\\([0-9]+\\):\\([0-9]+\\)-\\([0-9]+\\): .*" + 1 2 ,(if (fboundp 'compilation-fake-loc) '(3 . 4) 3)) + ;; Info messages. Not errors per se. + ,@(when (fboundp 'compilation-fake-loc) + `(;; Other GHCi patterns used in type errors. + ("^[ \t]+at \\(.+\\):\\([0-9]+\\):\\([0-9]+\\)-\\([0-9]+\\)$" + 1 2 (3 . 4) 0) + ;; Foo.hs:318:80: + ;; Ambiguous occurrence `Bar' + ;; It could refer to either `Bar', defined at Zork.hs:311:5 + ;; or `Bar', imported from Bars at Frob.hs:32:0-16 + ;; (defined at Location.hs:97:5) + ("[ (]defined at \\(.+\\):\\([0-9]+\\):\\([0-9]+\\))?$" 1 2 3 0) + ("imported from .* at \\(.+\\):\\([0-9]+\\):\\([0-9]+\\)-\\([0-9]+\\)$" + 1 2 (3 . 4) 0) + ;; Info xrefs. + (,inferior-haskell-info-xref-re 1 2 (3 . 4) 0)))) + "Regexps for error messages generated by inferior Haskell processes. +The format should be the same as for `compilation-error-regexp-alist'.") + +(defcustom inferior-haskell-find-project-root t + "If non-nil, try and find the project root directory of this file. +This will either look for a Cabal file or a \"module\" statement in the file." + :group 'inferior-haskell + :type 'boolean) + +(define-derived-mode inferior-haskell-mode comint-mode "Inf-Haskell" + "Major mode for interacting with an inferior Haskell process." + :group 'inferior-haskell + (set (make-local-variable 'comint-prompt-regexp) + ;; Whay the backslash in [\\._[:alnum:]]? + "^\\*?[[:upper:]][\\._[:alnum:]]*\\(?: \\*?[[:upper:]][\\._[:alnum:]]*\\)*> \\|^λ?> $") + (set (make-local-variable 'comint-input-autoexpand) nil) + (add-hook 'comint-preoutput-filter-functions + 'inferior-haskell-send-decl-post-filter) + (add-hook 'comint-output-filter-functions 'inferior-haskell-spot-prompt nil t) + + ;; Setup directory tracking. + (set (make-local-variable 'shell-cd-regexp) ":cd") + (condition-case nil + (shell-dirtrack-mode 1) + (error ;The minor mode function may not exist or not accept an arg. + (set (make-local-variable 'shell-dirtrackp) t) + (add-hook 'comint-input-filter-functions 'shell-directory-tracker + nil 'local))) + + ;; Setup `compile' support so you can just use C-x ` and friends. + (set (make-local-variable 'compilation-error-regexp-alist) + inferior-haskell-error-regexp-alist) + (set (make-local-variable 'compilation-first-column) 0) ;GHCI counts from 0. + (if (and (not (boundp 'minor-mode-overriding-map-alist)) + (fboundp 'compilation-shell-minor-mode)) + ;; If we can't remove compilation-minor-mode bindings, at least try to + ;; use compilation-shell-minor-mode, so there are fewer + ;; annoying bindings. + (compilation-shell-minor-mode 1) + ;; Else just use compilation-minor-mode but without its bindings because + ;; things like mouse-2 are simply too annoying. + (compilation-minor-mode 1) + (let ((map (make-sparse-keymap))) + (dolist (keys '([menu-bar] [follow-link])) + ;; Preserve some of the bindings. + (define-key map keys (lookup-key compilation-minor-mode-map keys))) + (add-to-list 'minor-mode-overriding-map-alist + (cons 'compilation-minor-mode map))))) + +(defun inferior-haskell-string-to-strings (string) + "Split the STRING into a list of strings." + (let ((i (string-match "[\"]" string))) + (if (null i) (split-string string) ; no quoting: easy + (append (unless (eq i 0) (split-string (substring string 0 i))) + (let ((rfs (read-from-string string i))) + (cons (car rfs) + (inferior-haskell-string-to-strings + (substring string (cdr rfs))))))))) + +(defun inferior-haskell-command (arg) + (inferior-haskell-string-to-strings + (if (null arg) haskell-program-name + (read-string "Command to run haskell: " haskell-program-name)))) + +(defvar inferior-haskell-buffer nil + "The buffer in which the inferior process is running.") + +(defun inferior-haskell-start-process (command) + "Start an inferior haskell process. +With universal prefix \\[universal-argument], prompts for a COMMAND, +otherwise uses `haskell-program-name'. +It runs the hook `inferior-haskell-hook' after starting the process and +setting up the inferior-haskell buffer." + (interactive (list (inferior-haskell-command current-prefix-arg))) + (setq inferior-haskell-buffer + (apply 'make-comint "haskell" (car command) nil (cdr command))) + (with-current-buffer inferior-haskell-buffer + (inferior-haskell-mode) + (run-hooks 'inferior-haskell-hook))) + +(defun inferior-haskell-process (&optional arg) + (or (if (buffer-live-p inferior-haskell-buffer) + (get-buffer-process inferior-haskell-buffer)) + (progn + (let ((current-prefix-arg arg)) + (call-interactively 'inferior-haskell-start-process)) + ;; Try again. + (inferior-haskell-process arg)))) + +;;;###autoload +(defalias 'run-haskell 'switch-to-haskell) +;;;###autoload +(defun switch-to-haskell (&optional arg) + "Show the inferior-haskell buffer. Start the process if needed." + (interactive "P") + (let ((proc (inferior-haskell-process arg))) + (pop-to-buffer (process-buffer proc)))) + +(defcustom inferior-haskell-wait-and-jump nil + "If non-nil, wait for file loading to terminate and jump to the error." + :type 'boolean + :group 'inferior-haskell) + +(defvar inferior-haskell-send-decl-post-filter-on nil) +(make-variable-buffer-local 'inferior-haskell-send-decl-post-filter-on) + +(defun inferior-haskell-send-decl-post-filter (string) + (when (and inferior-haskell-send-decl-post-filter-on + #1=(string-match inferior-haskell-multiline-prompt-re string)) + ;; deleting sequence of `%s|' multiline promts + (while #1# + (setq string (substring string (match-end 0)))) + ;; deleting regular prompts + (setq string (replace-regexp-in-string comint-prompt-regexp "" string) + ;; turning off this post-filter + inferior-haskell-send-decl-post-filter-on nil)) + string) + +(defvar inferior-haskell-seen-prompt nil) +(make-variable-buffer-local 'inferior-haskell-seen-prompt) + +(defun inferior-haskell-spot-prompt (string) + (let ((proc (get-buffer-process (current-buffer)))) + (when proc + (save-excursion + (goto-char (process-mark proc)) + (if (re-search-backward comint-prompt-regexp + (line-beginning-position) t) + (setq inferior-haskell-seen-prompt t)))))) + +(defun inferior-haskell-wait-for-prompt (proc &optional timeout) + "Wait until PROC sends us a prompt. +The process PROC should be associated to a comint buffer." + (with-current-buffer (process-buffer proc) + (while (progn + (goto-char comint-last-input-end) + (not (or inferior-haskell-seen-prompt + (setq inferior-haskell-seen-prompt + (re-search-forward comint-prompt-regexp nil t)) + (not (accept-process-output proc timeout)))))) + (unless inferior-haskell-seen-prompt + (error "Can't find the prompt")))) + +(defvar inferior-haskell-cabal-buffer nil) + +(defun inferior-haskell-cabal-of-buf (buf) + (with-current-buffer buf + (or (and (buffer-live-p inferior-haskell-cabal-buffer) + inferior-haskell-cabal-buffer) + (if (local-variable-p 'inferior-haskell-cabal-buffer + ;; XEmacs needs this argument. + (current-buffer)) + inferior-haskell-cabal-buffer + (set (make-local-variable 'inferior-haskell-cabal-buffer) + (haskell-cabal-find-file)))))) + +(defun inferior-haskell-find-project-root (buf) + (with-current-buffer buf + (let* ( + (cabal-file (inferior-haskell-cabal-of-buf buf)) + (cabal (when cabal-file + (find-file-noselect cabal-file))) + ) + (or (when cabal + (with-current-buffer cabal + (let ((hsd (haskell-cabal-get-setting "hs-source-dirs"))) + (if (null hsd) + ;; If there's a Cabal file with no Hs-Source-Dirs, then + ;; just use the Cabal file's directory. + default-directory + ;; If there is an HSD, then check that it's an existing + ;; dir (otherwise, it may be a list of dirs and we don't + ;; know what to do with those). If it doesn't exist, then + ;; give up. + (if (file-directory-p hsd) (expand-file-name hsd)))))) + ;; If there's no Cabal file or it's not helpful, try to look for + ;; a "module" statement and count the number of "." in the + ;; module name. + (save-excursion + (goto-char (point-min)) + (let ((case-fold-search nil)) + (when (re-search-forward + "^module[ \t]+\\(\\(?:\\sw\\|[.]\\)+\\)" nil t) + (let* ((dir default-directory) + (module (match-string 1)) + (pos 0)) + (while (string-match "\\." module pos) + (setq pos (match-end 0)) + (setq dir (expand-file-name ".." dir))) + ;; Let's check that the module name matches the file name, + ;; otherwise the project root is probably not what we think. + (if (eq t (compare-strings + (file-name-sans-extension buffer-file-name) + nil nil + (expand-file-name + (replace-regexp-in-string "\\." "/" module) + dir) + nil nil t)) + dir + ;; If they're not equal, it means the local directory + ;; hierarchy doesn't match the module name. This seems + ;; odd, so let's warn the user about it. May help us + ;; debug this code as well. + (message "Ignoring inconsistent `module' info: %s in %s" + module buffer-file-name) + nil))))))))) + + + +;;;###autoload +(defun inferior-haskell-load-file (&optional reload) + "Pass the current buffer's file to the inferior haskell process. +If prefix arg \\[universal-argument] is given, just reload the previous file." + (interactive "P") + ;; Save first, so we're sure that `buffer-file-name' is non-nil afterward. + (save-buffer) + (let ((buf (current-buffer)) + (file buffer-file-name) + (proc (inferior-haskell-process))) + (if file + (with-current-buffer (process-buffer proc) + (compilation-forget-errors) + (let ((parsing-end (marker-position (process-mark proc))) + root) + ;; Go to the root of the Cabal project, if applicable. + (when (and inferior-haskell-find-project-root + (setq root (inferior-haskell-find-project-root buf))) + ;; Not sure if it's useful/needed and if it actually works. + (unless (equal default-directory root) + (setq default-directory root) + (inferior-haskell-send-command + proc (concat ":cd " default-directory))) + (setq file (file-relative-name file))) + (inferior-haskell-send-command + proc (if reload ":reload" + (concat ":load \"" + ;; Espace the backslashes that may occur in file names. + (replace-regexp-in-string "[\\\"]" "\\\\\&" file) + "\""))) + ;; Move the parsing-end marker *after* sending the command so + ;; that it doesn't point just to the insertion point. + ;; Otherwise insertion may move the marker (if done with + ;; insert-before-markers) and we'd then miss some errors. + (if (boundp 'compilation-parsing-end) + (if (markerp compilation-parsing-end) + (set-marker compilation-parsing-end parsing-end) + (setq compilation-parsing-end parsing-end)))) + (with-selected-window (display-buffer (current-buffer) nil 'visible) + (goto-char (point-max))) + ;; Use compilation-auto-jump-to-first-error if available. + ;; (if (and (boundp 'compilation-auto-jump-to-first-error) + ;; compilation-auto-jump-to-first-error + ;; (boundp 'compilation-auto-jump-to-next)) + ;; (setq compilation-auto-jump-to-next t) + (when inferior-haskell-wait-and-jump + (inferior-haskell-wait-for-prompt proc) + (ignore-errors ;Don't beep if there were no errors. + (next-error)))) + (error "No file associated with buffer")))) + +(defvar inferior-haskell-run-command ":main") + +;;;###autoload +(defun inferior-haskell-load-and-run (command) + "Pass the current buffer's file to haskell and then run a COMMAND." + (interactive + (list + (if (and inferior-haskell-run-command (not current-prefix-arg)) + inferior-haskell-run-command + (read-string "Command to run: " nil nil inferior-haskell-run-command)))) + (setq inferior-haskell-run-command command) + (let* ((inferior-haskell-errors nil) + (neh (lambda () (setq inferior-haskell-errors t)))) + (unwind-protect + (let ((inferior-haskell-wait-and-jump t)) + (add-hook 'next-error-hook neh) + (inferior-haskell-load-file)) + (remove-hook 'next-error-hook neh)) + (unless inferior-haskell-errors + (inferior-haskell-send-command (inferior-haskell-process) command) + (switch-to-haskell)))) + +(defun inferior-haskell-send-command (proc str) + (setq str (concat str "\n")) + (with-current-buffer (process-buffer proc) + (inferior-haskell-wait-for-prompt proc) + (goto-char (process-mark proc)) + (insert-before-markers str) + (move-marker comint-last-input-end (point)) + (setq inferior-haskell-seen-prompt nil) + (comint-send-string proc str))) + +(defun inferior-haskell-reload-file () + "Tell the inferior haskell process to reread the current buffer's file." + (interactive) + (inferior-haskell-load-file 'reload)) + +(defun inferior-haskell-wrap-decl (code) + "Wrap declaration code into :{ ... :}." + (setq code (concat code "\n")) + (concat ":{\n" + (if (string-match (concat "^\\s-*" + haskell-ds-start-keywords-re) + code) + ;; non-fun-decl + code + ;; fun-decl, wrapping into let { .. (; ..)* } + (concat "let {\n" + (mapconcat + ;; adding 2 whitespaces to each line + (lambda (decl) + (mapconcat (lambda (s) + (concat " " s)) + (split-string decl "\n") + "\n")) + ;; splitting function case-decls + (let (decls) + (while (string-match "^\\(\\w+\\).*\n*\\(?:\\s-+.*\n+\\)*" code) + (push (match-string 0 code) decls) + (setq code (substring code (match-end 0)))) + (reverse decls)) + "\n;\n") + "\n}")) + "\n:}\n")) + +(defun inferior-haskell-flash-decl (start end &optional timeout) + "Temporarily highlight declaration." + (let ((overlay (make-overlay start end))) + (overlay-put overlay 'face 'secondary-selection) + (run-with-timer (or timeout 0.2) nil 'delete-overlay overlay))) + +;;;###autoload +(defun inferior-haskell-send-decl () + "Send current declaration to inferior-haskell process." + (interactive) + (save-excursion + (goto-char (1+ (point))) + (let* ((proc (inferior-haskell-process)) + (start (or (haskell-ds-backward-decl) (point-min))) + (end (or (haskell-ds-forward-decl) (point-max))) + (raw-decl (buffer-substring start end))) + ;; enter multiline-prompt-cutting-mode + (with-current-buffer (process-buffer proc) + (setq inferior-haskell-send-decl-post-filter-on t)) + ;; flash decl + (inferior-haskell-flash-decl start end) + ;; send decl + (comint-send-string proc (inferior-haskell-wrap-decl raw-decl)) + ;; send preview + (inferior-haskell-send-command + proc + (let* ((str (remove ?\n raw-decl)) + (len (min 15 (length str)))) + (concat "-- evaluating {: " + (substring str 0 len) + (if (= 15 len) ".." "") + " :}")))))) + +(defun inferior-haskell-get-result (inf-expr) + "Submit the expression `inf-expr' to ghci and read the result." + (let ((proc (inferior-haskell-process))) + (with-current-buffer (process-buffer proc) + (let ((parsing-end ; Remember previous spot. + (marker-position (process-mark proc)))) + (inferior-haskell-send-command proc inf-expr) + ;; Find new point. + (inferior-haskell-wait-for-prompt proc) + (goto-char (point-max)) + ;; Back up to the previous end-of-line. + (end-of-line 0) + ;; Extract the output + (buffer-substring-no-properties + (save-excursion (goto-char parsing-end) + (line-beginning-position 2)) + (point)))))) + +;;;###autoload +(defun inferior-haskell-type (expr &optional insert-value) + "Query the haskell process for the type of the given expression. +If optional argument `insert-value' is non-nil, insert the type above point +in the buffer. This can be done interactively with the \\[universal-argument] prefix. +The returned info is cached for reuse by `haskell-doc-mode'." + (interactive + (let ((sym (haskell-ident-at-point))) + (list (read-string (if (> (length sym) 0) + (format "Show type of (default %s): " sym) + "Show type of: ") + nil nil sym) + current-prefix-arg))) + (if (string-match "\\`\\s_+\\'" expr) (setq expr (concat "(" expr ")"))) + (let ((type (inferior-haskell-get-result (concat ":type " expr)))) + (if (not (string-match (concat "^\\(" (regexp-quote expr) + "[ \t\n]+::[ \t\n]*\\(.\\|\n\\)*\\)") + type)) + (error "No type info: %s" type) + (progn + (setf type (match-string 1 type)) + ;; Cache for reuse by haskell-doc. + (when (and (boundp 'haskell-doc-mode) haskell-doc-mode + (boundp 'haskell-doc-user-defined-ids) + ;; Haskell-doc only works for idents, not arbitrary expr. + (string-match "\\`(?\\(\\s_+\\|\\(\\sw\\|\\s'\\)+\\)?[ \t]*::[ \t]*" + type)) + (let ((sym (match-string 1 type))) + (setq haskell-doc-user-defined-ids + (cons (cons sym (substring type (match-end 0))) + (delq (assoc sym haskell-doc-user-defined-ids) + haskell-doc-user-defined-ids))))) + + (if (called-interactively-p 'any) (message "%s" type)) + (when insert-value + (beginning-of-line) + (insert type "\n")) + type)))) + +;;;###autoload +(defun inferior-haskell-kind (type) + "Query the haskell process for the kind of the given expression." + (interactive + (let ((type (haskell-ident-at-point))) + (list (read-string (if (> (length type) 0) + (format "Show kind of (default %s): " type) + "Show kind of: ") + nil nil type)))) + (let ((result (inferior-haskell-get-result (concat ":kind " type)))) + (if (called-interactively-p 'any) (message "%s" result)) + result)) + +;;;###autoload +(defun inferior-haskell-info (sym) + "Query the haskell process for the info of the given expression." + (interactive + (let ((sym (haskell-ident-at-point))) + (list (read-string (if (> (length sym) 0) + (format "Show info of (default %s): " sym) + "Show info of: ") + nil nil sym)))) + (let ((result (inferior-haskell-get-result (concat ":info " sym)))) + (if (called-interactively-p 'any) (message "%s" result)) + result)) + +;;;###autoload +(defun inferior-haskell-find-definition (sym) + "Attempt to locate and jump to the definition of the given expression." + (interactive + (let ((sym (haskell-ident-at-point))) + (list (read-string (if (> (length sym) 0) + (format "Find definition of (default %s): " sym) + "Find definition of: ") + nil nil sym)))) + (let ((info (inferior-haskell-info sym))) + (if (not (string-match inferior-haskell-info-xref-re info)) + (error "No source information available") + (let ((file (match-string-no-properties 1 info)) + (line (string-to-number + (match-string-no-properties 2 info))) + (col (string-to-number + (match-string-no-properties 3 info)))) + (when file + (with-current-buffer (process-buffer (inferior-haskell-process)) + ;; The file name is relative to the process's cwd. + (setq file (expand-file-name file))) + ;; Push current location marker on the ring used by `find-tag' + (require 'etags) + (ring-insert find-tag-marker-ring (point-marker)) + (pop-to-buffer (find-file-noselect file)) + (when line + (goto-char (point-min)) + (forward-line (1- line)) + (when col (move-to-column col)))))))) + +;;; Functions to find the documentation of a given function. +;; +;; TODO for this section: +;; +;; * Support fetching of local Haddock docs pulled directly from source files. +;; * Display docs locally? w3m? + +(defcustom inferior-haskell-use-web-docs + 'fallback + "Whether to use the online documentation. Possible values: +`never', meaning always use local documentation, unless the local +file doesn't exist, when do nothing, `fallback', which means only +use the online documentation when the local file doesn't exist, +or `always', meaning always use the online documentation, +regardless of existance of local files. Default is `fallback'." + :group 'inferior-haskell + :type '(choice (const :tag "Never" never) + (const :tag "As fallback" fallback) + (const :tag "Always" always))) + +(defcustom inferior-haskell-web-docs-base + "http://haskell.org/ghc/docs/latest/html/libraries/" + "The base URL of the online libraries documentation. +This will only be used if the value of `inferior-haskell-use-web-docs' +is `always' or `fallback'." + :group 'inferior-haskell + :type 'string) + +(defcustom haskell-package-manager-name "ghc-pkg" + "Name of the program to consult regarding package details." + :group 'inferior-haskell + :type 'string) + +(defcustom haskell-package-conf-file + (condition-case nil + (with-temp-buffer + (call-process "ghc" nil t nil "--print-libdir") + (expand-file-name "package.conf" + (buffer-substring (point-min) (1- (point-max))))) + ;; Don't use `ignore-errors' because this form is not byte-compiled :-( + (error nil)) + "Where the package configuration file for the package manager resides. +By default this is set to `ghc --print-libdir`/package.conf." + :group 'inferior-haskell + :type 'string) + +(defun inferior-haskell-get-module (sym) + "Fetch the module in which SYM is defined." + (let ((info (inferior-haskell-info sym))) + (unless (string-match inferior-haskell-module-re info) + (error + "No documentation information available. Did you forget to C-c C-l?")) + (let ((module-name (match-string-no-properties 1 info))) + ;; Handles GHC 7.4.1+ which quotes module names like + ;; `System.Random', whereas previous GHC did not quote at all. + (if (string= "`" (substring module-name 0 1)) + (substring module-name 1 (- (length module-name) 1)) + module-name)))) + +(defun inferior-haskell-query-ghc-pkg (&rest args) + "Send ARGS to `haskell-package-manager-name'. +Insert the output into the current buffer." + (apply 'call-process haskell-package-manager-name nil t nil args)) + +(defun inferior-haskell-get-package-list () + "Get the list of packages from `haskell-package-manager-name'." + (with-temp-buffer + (inferior-haskell-query-ghc-pkg "--simple-output" "list") + (split-string (buffer-substring (point-min) (point-max))))) + +(defun inferior-haskell-compute-module-alist () + "Compute a list mapping modules to package names and haddock URLs using ghc-pkg." + (message "Generating module alist...") + (let ((module-alist ())) + (with-temp-buffer + (dolist (package (inferior-haskell-get-package-list)) + (erase-buffer) + (inferior-haskell-query-ghc-pkg "describe" package) + + (let ((package-w/o-version + (replace-regexp-in-string "[-.0-9]*\\'" "" package)) + ;; Find the Haddock documentation URL for this package + (haddock + (progn + (goto-char (point-min)) + (when (re-search-forward "haddock-html:[ \t]+\\(.*[^ \t\n]\\)" + nil t) + (match-string 1))))) + + ;; Fetch the list of exposed modules for this package + (goto-char (point-min)) + (when (re-search-forward "^exposed-modules:\\(.*\\(\n[ \t].*\\)*\\)" + nil t) + (dolist (module (split-string (match-string 1))) + (push (list module package-w/o-version haddock) + module-alist))))) + + (message "Generating module alist... done") + module-alist))) + + +(defcustom inferior-haskell-module-alist-file + ;; (expand-file-name "~/.inf-haskell-module-alist") + (expand-file-name (concat "inf-haskell-module-alist-" + (number-to-string (user-uid))) + temporary-file-directory) + "Where to save the module -> package lookup table. +Set this to nil to never cache to a file." + :group 'inferior-haskell + :type '(choice (const :tag "Don't cache to file" nil) string)) + +(defvar inferior-haskell-module-alist nil + "Association list of modules to their packages. +Each element is of the form (MODULE PACKAGE HADDOCK), where +MODULE is the name of a module, +PACKAGE is the package it belongs to, and +HADDOCK is the path to that package's Haddock documentation. + +This is calculated on-demand using `inferior-haskell-compute-module-alist'. +It's also cached in the file `inferior-haskell-module-alist-file', +so that it can be obtained more quickly next time.") + +(defun inferior-haskell-module-alist () + "Get the module alist from cache or ghc-pkg's info." + (or + ;; If we already have computed the alist, use it... + inferior-haskell-module-alist + (setq inferior-haskell-module-alist + (or + ;; ...otherwise try to read it from the cache file... + (and + inferior-haskell-module-alist-file + (file-readable-p inferior-haskell-module-alist-file) + (file-newer-than-file-p inferior-haskell-module-alist-file + haskell-package-conf-file) + (with-temp-buffer + (insert-file-contents inferior-haskell-module-alist-file) + (goto-char (point-min)) + (prog1 (read (current-buffer)) + (message "Read module alist from file cache.")))) + + ;; ...or generate it again and save it in a file for later. + (let ((alist (inferior-haskell-compute-module-alist))) + (when inferior-haskell-module-alist-file + (with-temp-buffer + (print alist (current-buffer)) + ;; Do the write to a temp file first, then rename it. + ;; This makes it more atomic, and suffers from fewer security + ;; holes related to race conditions if the file is in /tmp. + (let ((tmp (make-temp-file inferior-haskell-module-alist-file))) + (write-region (point-min) (point-max) tmp) + (rename-file tmp inferior-haskell-module-alist-file + 'ok-if-already-exists)))) + alist))))) + +(defvar inferior-haskell-ghc-internal-ident-alist + ;; FIXME: Fill this table, ideally semi-automatically. + '(("GHC.Base.return" . "Control.Monad.return") + ("GHC.Base.String" . "Data.String.String") + ("GHC.List" . "Data.List"))) + +(defun inferior-haskell-map-internal-ghc-ident (ident) + "Try to translate some internal GHC identifier to its alter ego in haskell docs." + (let ((head ident) + (tail "") + remapped) + (while (and (not + (setq remapped + (cdr (assoc head + inferior-haskell-ghc-internal-ident-alist)))) + (string-match "\\.[^.]+\\'" head)) + (setq tail (concat (match-string 0 head) tail)) + (setq head (substring head 0 (match-beginning 0)))) + (concat (or remapped head) tail))) + +;;;###autoload +(defun inferior-haskell-find-haddock (sym) + "Find and open the Haddock documentation of SYM. +Make sure to load the file into GHCi or Hugs first by using C-c C-l. +Only works for functions in a package installed with ghc-pkg, or +whatever the value of `haskell-package-manager-name' is. + +This function needs to find which package a given module belongs +to. In order to do this, it computes a module-to-package lookup +alist, which is expensive to compute (it takes upwards of five +seconds with more than about thirty installed packages). As a +result, we cache it across sessions using the cache file +referenced by `inferior-haskell-module-alist-file'. We test to +see if this is newer than `haskell-package-conf-file' every time +we load it." + (interactive + (let ((sym (haskell-ident-at-point))) + (list (read-string (if (> (length sym) 0) + (format "Find documentation of (default %s): " sym) + "Find documentation of: ") + nil nil sym)))) + (let* (;; Find the module and look it up in the alist + (module (inferior-haskell-get-module sym)) + (full-name (inferior-haskell-map-internal-ghc-ident (concat module "." sym))) + (success (string-match "\\(.*\\)\\.\\(.*\\)" full-name)) + (module (match-string 1 full-name)) + (sym (match-string 2 full-name)) + (alist-record (assoc module (inferior-haskell-module-alist))) + (package (nth 1 alist-record)) + (file-name (concat (subst-char-in-string ?. ?- module) ".html")) + (local-path (concat (nth 2 alist-record) "/" file-name)) + (url (if (or (eq inferior-haskell-use-web-docs 'always) + (and (not (file-exists-p local-path)) + (eq inferior-haskell-use-web-docs 'fallback))) + (concat inferior-haskell-web-docs-base package "/" file-name) + (and (file-exists-p local-path) + (concat "file://" local-path)))) + ;; Jump to the symbol within Haddock. + (url (concat url "#v:" sym))) + (if url (browse-url url) (error "Local file doesn't exist")))) + +(provide 'inf-haskell) + +;; Local Variables: +;; byte-compile-warnings: (not cl-functions) +;; End: + +;;; inf-haskell.el ends here diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/inf-haskell.elc Binary file .emacs.d/haskell-mode/inf-haskell.elc has changed diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/logo.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/haskell-mode/logo.svg Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/snippets/README.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/haskell-mode/snippets/README.md Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,89 @@ +# Shnippet + + +**Shnippet** is a collection of +[YASnippet][yas] +[Haskell][haskell] snippets for Emacs. + + +## Installation + +Clone repository: + + $ cd ~/.emacs.d/snippets + $ git clone https://github.com/LukeHoersten/shnippet + OR + $ hg clone https://bitbucket.org/LukeHoersten/shnippet + +Add the cloned repository to YASnippet's `yas-snippet-dirs`: + + (setq yas-snippet-dirs + '("~/.emacs.d/snippets/shnippet" + "/other/paths/" + )) + +Snippets may have to be recompiled and reloaded in Emacs if YASnippet +is already in use: + + M-x yas-recompile-all + M-x yas-reload-all + + +Haskell snippts should now be available to use! In a `haskell-mode` +buffer, type `fn`. A prompt should appear asking which `fn` +snippet to expand. + +I **highly** recommend using YASnippet with [ido-mode]. Configure +Emacs: + + (setq-default yas-prompt-functions '(yas-ido-prompt yas-dropdown-prompt)) + +This is important so that alternatives (like `import` vs. `import +qualified`) can quickly be selected with a single key stroke. + + +## Available Expansion Keys + +* `new` - newtype +* `mod` - module [simple, exports] +* `main ` - main module and funtion +* `let` - let bindings +* `lang` - language extension pragmas +* `\` - lambda function +* `inst` - instance declairation +* `imp` - import modules [simple, qualified] +* `if` - if conditional [inline, block] +* `<-` - monadic get +* `fn` - top level function [simple, guarded, clauses] +* `data` - data type definition [inline, record] +* `=>` - type constraint +* `{-` - block comment +* `case` - case statement + + +## Design Ideals + +* Keep snippet keys (the prefix used to auto-complete) to four + characters or less while still being as easy to guess as possible. + +* Have as few keys as possible. The more keys there are to remember, + the harder snippets are to use and learn. + +* Leverage [ido-mode][] when reasonable. For instance, to keep the + number of snippet keys to a minimum as well as auto complete things + like [Haskell Langauge Extension Pragmas][lang-pragma]. When + multiple snippets share a key (ex: `fn`), the `ido-mode` prompts are + unique to one character (ex: `guarded function` and `simple + function` are `g` and `s` respectively). + + +## Authors + +This code is written and maintained by Luke Hoersten, +. + + +[yas]: https://github.com/capitaomorte/yasnippet +[ido-mode]: http://www.emacswiki.org/emacs/InteractivelyDoThings +[lang-pragma]: http://hackage.haskell.org/packages/archive/Cabal/1.16.0.3/doc/html/Language-Haskell-Extension.html#t:KnownExtension +[haskell]: http://haskell.org/ diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/snippets/haskell-mode/.yas-ignore-filenames-as-triggers diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/snippets/haskell-mode/.yas-make-groups diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/snippets/haskell-mode/case --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/haskell-mode/snippets/haskell-mode/case Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,9 @@ +# -*- mode: snippet -*- +# key: case +# name: case +# expand-env: ((yas-indent-line 'fixed)) +# contributor: Luke Hoersten +# -- +case ${1:x} of + ${2:Data} -> ${4:undefined} + ${3:Data} -> ${5:undefined}$0 \ No newline at end of file diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/snippets/haskell-mode/comment.block --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/haskell-mode/snippets/haskell-mode/comment.block Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,6 @@ +# -*- mode: snippet -*- +# key: {- +# name: block comment +# contributor: Luke Hoersten +# -- +{- $0 -} \ No newline at end of file diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/snippets/haskell-mode/constraint --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/haskell-mode/snippets/haskell-mode/constraint Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,6 @@ +# -*- mode: snippet -*- +# key: => +# name: Type constraint +# contributor: Luke Hoersten +# -- +(${1:Class} ${2:m}) => $0 \ No newline at end of file diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/snippets/haskell-mode/data.inline --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/haskell-mode/snippets/haskell-mode/data.inline Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: data +# name: inline data +# condition: (= (length "data") (current-column)) +# contributor: Luke Hoersten +# -- +data ${1:Type} = ${2:Data}$0 ${3:deriving (${4:Show, Eq})} \ No newline at end of file diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/snippets/haskell-mode/data.record --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/haskell-mode/snippets/haskell-mode/data.record Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,10 @@ +# -*- mode: snippet -*- +# key: data +# name: record data +# condition: (= (length "data") (current-column)) +# contributor: Luke Hoersten +# -- +data ${1:Type} = $1 + { ${2:field} :: ${3:Type} + , ${4:field} :: ${5:Type}$0 + } ${6:deriving (${7:Show, Eq})} \ No newline at end of file diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/snippets/haskell-mode/fn --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/haskell-mode/snippets/haskell-mode/fn Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,9 @@ +# -*- mode: snippet -*- +# key: fn +# name: simple function +# condition: (= (length "fn") (current-column)) +# expand-env: ((yas-indent-line 'fixed)) +# contributor: Luke Hoersten +# -- +${1:f} :: ${2:a} ${3:-> ${4:b}} +$1 ${5:x} = ${6:undefined}$0 \ No newline at end of file diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/snippets/haskell-mode/fn.clause --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/haskell-mode/snippets/haskell-mode/fn.clause Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,10 @@ +# -*- mode: snippet -*- +# key: fn +# name: clause function +# condition: (= (length "fn") (current-column)) +# expand-env: ((yas-indent-line 'fixed)) +# contributor: Luke Hoersten +# -- +${1:f} :: ${2:a} ${3:-> ${4:b}} +$1 ${5:pattern} = ${7:undefined} +$1 ${6:pattern} = ${8:undefined}$0 \ No newline at end of file diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/snippets/haskell-mode/fn.guarded --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/haskell-mode/snippets/haskell-mode/fn.guarded Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,11 @@ +# -*- mode: snippet -*- +# key: fn +# name: guarded function +# condition: (= (length "fn") (current-column)) +# expand-env: ((yas-indent-line 'fixed)) +# contributor: Luke Hoersten +# -- +${1:f} :: ${2:a} ${3:-> ${4:b}} +$1 ${5:x} + | ${6:conditional} = ${8:undefined} + | ${7:conditional} = ${9:undefined}$0 \ No newline at end of file diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/snippets/haskell-mode/get --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/haskell-mode/snippets/haskell-mode/get Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,6 @@ +# -*- mode: snippet -*- +# key: <- +# name: monadic get +# contributor: Luke Hoersten +# -- +${1:x} <- ${2:undefined}$0 \ No newline at end of file diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/snippets/haskell-mode/if.block --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/haskell-mode/snippets/haskell-mode/if.block Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# key: if +# name: block if +# contributor: Luke Hoersten +# -- +if ${1:condition} + then ${2:undefined} + else ${3:undefined}$0 \ No newline at end of file diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/snippets/haskell-mode/if.inline --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/haskell-mode/snippets/haskell-mode/if.inline Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,6 @@ +# -*- mode: snippet -*- +# key: if +# name: inline if +# contributor: Luke Hoersten +# -- +if ${1:condition} then ${2:undefined} else ${3:undefined}$0 \ No newline at end of file diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/snippets/haskell-mode/import --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/haskell-mode/snippets/haskell-mode/import Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: imp +# name: simple import +# condition: (= (length "imp") (current-column)) +# contributor: Luke Hoersten +# -- +import ${1:Module} ${2:(${3:f})} \ No newline at end of file diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/snippets/haskell-mode/import.qualified --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/haskell-mode/snippets/haskell-mode/import.qualified Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,9 @@ +# -*- mode: snippet -*- +# key: imp +# name: qualified import +# condition: (= (length "imp") (current-column)) +# contributor: Luke Hoersten +# -- +import qualified ${1:Module} as ${2:${1:$(let ((name (car (last (split-string yas-text "\\\."))))) + (if (= 0 (length name)) "" + (subseq name 0 1)))}}$0 \ No newline at end of file diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/snippets/haskell-mode/instance --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/haskell-mode/snippets/haskell-mode/instance Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# key: inst +# name: instance +# condition: (= (length "inst") (current-column)) +# contributor: Luke Hoersten +# -- +instance ${1:Class} ${2:Data} where + ${3:f} = ${4:undefined}$0 \ No newline at end of file diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/snippets/haskell-mode/lambda --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/haskell-mode/snippets/haskell-mode/lambda Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,6 @@ +# -*- mode: snippet -*- +# key: \ +# name: lambda +# contributor: Luke Hoersten +# -- +\\${1:x} -> ${2:undefined}$0 \ No newline at end of file diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/snippets/haskell-mode/lang-pragma --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/haskell-mode/snippets/haskell-mode/lang-pragma Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: lang +# name: language pragma +# condition: (= (length "lang") (current-column)) +# contributor: Luke Hoersten , John Wiegley +# -- +{-# LANGUAGE `(progn (require 'haskell-yas) (haskell-yas-complete "Extension: " haskell-yas-ghc-language-pragmas))` #-} \ No newline at end of file diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/snippets/haskell-mode/let --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/haskell-mode/snippets/haskell-mode/let Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,6 @@ +# -*- mode: snippet -*- +# key: let +# name: let +# contributor: Luke Hoersten +# -- +let ${1:x} = ${2:undefined}$0 \ No newline at end of file diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/snippets/haskell-mode/main --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/haskell-mode/snippets/haskell-mode/main Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,13 @@ +# -*- mode: snippet -*- +# key: main +# name: main module +# condition: (= (length "main") (current-column)) +# expand-env: ((yas-indent-line 'fixed)) +# contributor: Luke Hoersten +# -- +module Main where + +main :: IO () +main = do + ${1:undefined}$0 + return () \ No newline at end of file diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/snippets/haskell-mode/module --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/haskell-mode/snippets/haskell-mode/module Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,14 @@ +# -*- mode: snippet -*- +# key: mod +# name: simple module +# condition: (= (length "mod") (current-column)) +# expand-env: ((yas-indent-line 'fixed)) +# contributor: Luke Hoersten +# -- +module ${1:`(if (not buffer-file-name) "Module" + (let ((name (file-name-sans-extension (buffer-file-name)))) + (if (search "src/" name) + (replace-regexp-in-string "/" "." (car (last (split-string name "src/")))) + (file-name-nondirectory name))))`} where + +$0 \ No newline at end of file diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/snippets/haskell-mode/module.exports --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/haskell-mode/snippets/haskell-mode/module.exports Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,17 @@ +# -*- mode: snippet -*- +# key: mod +# name: exports module +# condition: (= (length "mod") (current-column)) +# expand-env: ((yas-indent-line 'fixed)) +# contributor: Luke Hoersten +# -- +module ${1:`(if (not buffer-file-name) "Module" + (let ((name (file-name-sans-extension (buffer-file-name)))) + (if (search "src/" name) + (replace-regexp-in-string "/" "." (car (last (split-string name "src/")))) + (file-name-nondirectory name))))`} + ( ${3:export} + ${4:, ${5:export}} + ) where + +$0 \ No newline at end of file diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/snippets/haskell-mode/newtype --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/haskell-mode/snippets/haskell-mode/newtype Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# key: new +# name: newtype +# condition: (= (length "new") (current-column)) +# contributor: Luke Hoersten +# -- +newtype ${1:Type} = $1 { un$1 :: ${2:a} } ${3:deriving (${4:Show, Eq})} \ No newline at end of file diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/tests/haskell-str-tests.el --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/haskell-mode/tests/haskell-str-tests.el Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,114 @@ +;; unit tests for haskell-str.el + +(require 'ert) + +(require 'haskell-str ) ;; implementation under test + +(ert-deftest haskell-str-take () + (should (string= (haskell-str-take "" 0) "")) + (should (string= (haskell-str-take "" 1) "")) + (should (string= (haskell-str-take "" 2) "")) + (should (string= (haskell-str-take "x" 0) "")) + (should (string= (haskell-str-take "x" 1) "x")) + (should (string= (haskell-str-take "x" 2) "x")) + (should (string= (haskell-str-take "x" 3) "x")) + (should (string= (haskell-str-take "xy" 0) "")) + (should (string= (haskell-str-take "xy" 1) "x")) + (should (string= (haskell-str-take "xy" 2) "xy")) + (should (string= (haskell-str-take "xy" 3) "xy")) + (should (string= (haskell-str-take "xyz" 0) "")) + (should (string= (haskell-str-take "xyz" 1) "x")) + (should (string= (haskell-str-take "xyz" 2) "xy")) + (should (string= (haskell-str-take "xyz" 3) "xyz")) + (should (string= (haskell-str-take "xyz" 4) "xyz"))) + +(ert-deftest haskell-str-ellipsize () + (should (string= (haskell-str-ellipsize "" 0) "")) + (should (string= (haskell-str-ellipsize "" 1) "")) + (should (string= (haskell-str-ellipsize "" 2) "")) + (should (string= (haskell-str-ellipsize "x" 0) "")) + (should (string= (haskell-str-ellipsize "x" 1) "x")) + (should (string= (haskell-str-ellipsize "x" 2) "x")) + (should (string= (haskell-str-ellipsize "x" 3) "x")) + (should (string= (haskell-str-ellipsize "xy" 0) "")) + (should (string= (haskell-str-ellipsize "xy" 1) "…")) + (should (string= (haskell-str-ellipsize "xy" 2) "xy")) + (should (string= (haskell-str-ellipsize "xy" 3) "xy")) + (should (string= (haskell-str-ellipsize "xyz" 0) "")) + (should (string= (haskell-str-ellipsize "xyz" 1) "…")) + (should (string= (haskell-str-ellipsize "xyz" 2) "x…")) + (should (string= (haskell-str-ellipsize "xyz" 3) "xyz")) + (should (string= (haskell-str-ellipsize "xyz" 4) "xyz"))) + +(ert-deftest haskell-str-literal-encode-empty () + (should (string= (haskell-str-literal-encode "") "\"\"")) + (should (string= (haskell-str-literal-encode "" t) ""))) + +(ert-deftest haskell-str-literal-decode-empty () + (dolist (s0 (list "\"\"" + "\"\\&\"" + "\"\\&\\&\\&\"" + "\"\\ \\\"" + "\"\\ \\\\ \\\"" + "\"\\&\\ \\\"" + "\"\\ \\\\&\\ \\\"")) + (should (string= "" (haskell-str-literal-decode s0))) + (should (string= "" (haskell-str-literal-decode (substring s0 1 -1) t))))) + +(ert-deftest haskell-str-literal-decode-backslash () + "Test some edge cases involving backslashes." + (dolist (cs (list (cons "\\\\" "\\") + (cons "\\x10" "\x10") + (cons "\\\\x10" "\\x10") + (cons "\\ \\x10" "x10") + (cons "\\ \\ \\x30" " 0") + (cons "\\SO\\&H" "\x0eH") + (cons "\\SOH\\&" "\x01") + (cons "\\n" "\n") + (cons "\\'" "'") + (cons "\\\"" "\"") + (cons "\\SOH" "\x01"))) + (should (string= (cdr cs) + (haskell-str-literal-decode (concat "\"" (car cs) "\"")))) + (should (string= (cdr cs) + (haskell-str-literal-decode (car cs) t))))) + +(defun haskell-str-random (n) + "Generate random N characters long string." + (let ((a ())) + (apply #'string (dotimes (_ n a) + (setq a (cons (random 1024) a)))))) + +(ert-deftest haskell-str-literal-decode-encode () + "Test whether decode+encode is the identity function." + (random t) + ;; some edge cases + (dolist (s0 (list "\x0e\x48" ;; '\SO' 'H' + "\x01" ;; '\SOH' + "\x00df\x30" ;; '\223' '0' + "'" + "\'" + "\"" + "\x0e&H" + "\\" + " \\ \\" + "\\\\\"" + (string 40 945 8322 946 8323 8743 947 178 949 178 41) + "x" + "xy" + "\\x123" + "\\ \\x123" + " " + " " + "")) + (should (string= s0 (haskell-str-literal-decode (haskell-str-literal-encode s0)))) + (should (string= s0 (haskell-str-literal-decode (haskell-str-literal-encode s0 t) t)))) + + ;; randomized testing + (dotimes (_ 500) + (dotimes (n 15) + (let* ((s0 (haskell-str-random (+ 1 n))) + (s1 (haskell-str-literal-decode (haskell-str-literal-encode s0))) + (s2 (haskell-str-literal-decode (haskell-str-literal-encode s0 t) t))) + (should (string= s0 s1)) + (should (string= s0 s2)))))) diff -r 000000000000 -r 2764b4f45f9f .emacs.d/haskell-mode/w3m-haddock.el --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/haskell-mode/w3m-haddock.el Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,167 @@ +;;; w3m-haddock.el --- Make browsing haddocks with w3m-mode better. + +;; Copyright (C) 2014 Chris Done + +;; Author: Chris Done + +;; This file is not part of GNU Emacs. + +;; This file is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; This file is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to +;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. + +(require 'w3m) + +(add-hook 'w3m-display-hook 'w3m-haddock-display) + +(defface w3m-haddock-heading-face + '((((class color)) :background "#eeeeee")) + "Face for quarantines." + :group 'shm) + +(defcustom haskell-w3m-haddock-dir + "~/.cabal/share/doc/" + "The path to your cabal documentation dir. It should contain +directories of package-name-x.x. + +You can rebind this if you're using hsenv by adding it to your +.dir-locals.el in your project root. E.g. + + ((haskell-mode . ((haskell-w3m-haddock-dir . \"/home/chris/Projects/foobar/.hsenv/cabal/share/doc\")))) + +" + :group 'shm + :type 'string) + +(defvar w3m-haddock-entry-regex "^\\(\\(data\\|type\\) \\|[a-z].* :: \\)" + "Regex to match entry headings.") + +(defun haskell-w3m-open-haddock () + "Open a haddock page in w3m." + (interactive) + (let* ((entries (remove-if (lambda (s) (string= s "")) + (split-string (shell-command-to-string (concat "ls -1 " haskell-w3m-haddock-dir)) + "\n"))) + (package-dir (ido-completing-read + "Package: " + entries))) + (cond + ((member package-dir entries) + (w3m-browse-url (concat "file://" + haskell-w3m-haddock-dir + "/" + package-dir + "/html/index.html") + t)) + (t + (w3m-browse-url (concat "http://hackage.haskell.org/package/" + package-dir) + t))))) + +(defun w3m-haddock-page-p () + "Haddock general page?" + (save-excursion + (goto-char (point-max)) + (forward-line -2) + (looking-at "[ ]*Produced by Haddock"))) + +(defun w3m-haddock-source-p () + "Haddock source page?" + (save-excursion + (goto-char (point-min)) + (or (looking-at "Location: https?://hackage.haskell.org/package/.*/docs/src/") + (looking-at "Location: file://.*cabal/share/doc/.*/html/src/") + (looking-at "Location: .*src/.*.html$")))) + +(defun w3m-haddock-p () + "Any haddock page?" + (or (w3m-haddock-page-p) + (w3m-haddock-source-p))) + +(defun w3m-haddock-find-tag () + "Find a tag by jumping to the \"All\" index and doing a + search-forward." + (interactive) + (when (w3m-haddock-p) + (let ((ident (haskell-ident-at-point))) + (when ident + (w3m-browse-url + (replace-regexp-in-string "docs/.*" "docs/doc-index-All.html" w3m-current-url)) + (search-forward ident))))) + +(defun w3m-haddock-display (url) + "To be ran by w3m's display hook. This takes a normal w3m + buffer containing hadddock documentation and reformats it to be + more usable and look like a dedicated documentation page." + (when (w3m-haddock-page-p) + (save-excursion + (goto-char (point-min)) + (let ((inhibit-read-only t)) + (delete-region (point) + (line-end-position)) + (w3m-haddock-next-heading) + ;; Start formatting entries + (while (looking-at w3m-haddock-entry-regex) + (when (w3m-haddock-valid-heading) + (w3m-haddock-format-heading)) + (w3m-haddock-next-heading)))) + (rename-buffer (concat "*haddock: " (w3m-buffer-title (current-buffer)) "*"))) + (when (w3m-haddock-source-p) + (font-lock-mode -1) + (let ((n (line-number-at-pos))) + (save-excursion + (goto-char (point-min)) + (forward-line 1) + (let ((text (buffer-substring (point) + (point-max))) + (inhibit-read-only t)) + (delete-region (point) + (point-max)) + (insert + (haskell-fontify-as-mode text + 'haskell-mode)))) + (goto-line n)))) + +(defun w3m-haddock-format-heading () + "Format a haddock entry." + (let ((o (make-overlay (line-beginning-position) + (1- (save-excursion (w3m-haddock-header-end)))))) + (overlay-put o 'face 'w3m-haddock-heading-face)) + (let ((end (save-excursion + (w3m-haddock-next-heading) + (when (w3m-haddock-valid-heading) + (point))))) + (when end + (save-excursion + (w3m-haddock-header-end) + (indent-rigidly (point) + end + 4))))) + +(defun w3m-haddock-next-heading () + "Go to the next heading, or end of the buffer." + (forward-line 1) + (or (search-forward-regexp w3m-haddock-entry-regex nil t 1) + (goto-char (point-max))) + (goto-char (line-beginning-position))) + +(defun w3m-haddock-valid-heading () + "Is this a valid heading?" + (not (get-text-property (point) 'face))) + +(defun w3m-haddock-header-end () + "Go to the end of the header." + (search-forward-regexp "\n[ \n]")) + +(provide 'w3m-haddock) diff -r 000000000000 -r 2764b4f45f9f .emacs.d/htmlize.el --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/htmlize.el Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,1932 @@ +;;; htmlize.el --- Convert buffer text and decorations to HTML. + +;; Copyright (C) 1997-2003,2005,2006,2009,2011,2012 Hrvoje Niksic + +;; Author: Hrvoje Niksic +;; Keywords: hypermedia, extensions +;; Version: 1.47 + +;; This program is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 2, or (at your option) +;; any later version. + +;; This program is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with this program; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, +;; Boston, MA 02111-1307, USA. + +;;; Commentary: + +;; This package converts the buffer text and the associated +;; decorations to HTML. Mail to to discuss +;; features and additions. All suggestions are more than welcome. + +;; To use it, just switch to the buffer you want HTML-ized and type +;; `M-x htmlize-buffer'. You will be switched to a new buffer that +;; contains the resulting HTML code. You can edit and inspect this +;; buffer, or you can just save it with C-x C-w. `M-x htmlize-file' +;; will find a file, fontify it, and save the HTML version in +;; FILE.html, without any additional intervention. `M-x +;; htmlize-many-files' allows you to htmlize any number of files in +;; the same manner. `M-x htmlize-many-files-dired' does the same for +;; files marked in a dired buffer. + +;; htmlize supports three types of HTML output, selected by setting +;; `htmlize-output-type': `css', `inline-css', and `font'. In `css' +;; mode, htmlize uses cascading style sheets to specify colors; it +;; generates classes that correspond to Emacs faces and uses ... to color parts of text. In this mode, the +;; produced HTML is valid under the 4.01 strict DTD, as confirmed by +;; the W3C validator. `inline-css' is like `css', except the CSS is +;; put directly in the STYLE attribute of the SPAN element, making it +;; possible to paste the generated HTML into existing HTML documents. +;; In `font' mode, htmlize uses ... to +;; colorize HTML, which is not standard-compliant, but works better in +;; older browsers. `css' mode is the default. + +;; You can also use htmlize from your Emacs Lisp code. When called +;; non-interactively, `htmlize-buffer' and `htmlize-region' will +;; return the resulting HTML buffer, but will not change current +;; buffer or move the point. htmlize will do its best to work on +;; non-windowing Emacs sessions but the result will be limited to +;; colors supported by the terminal. + +;; htmlize aims for compatibility with Emacsen version 21 and later. +;; Please let me know if it doesn't work on the version of XEmacs or +;; GNU Emacs that you are using. The package relies on the presence +;; of CL extensions, especially for cross-emacs compatibility; please +;; don't try to remove that dependency. I see no practical problems +;; with using the full power of the CL extensions, except that one +;; might learn to like them too much. + +;; The latest version is available as a git repository at: +;; +;; +;; +;; The snapshot of the latest release can be obtained at: +;; +;; +;; +;; You can find a sample of htmlize's output (possibly generated with +;; an older version) at: +;; +;; + +;; Thanks go to the many people who have sent reports and contributed +;; comments, suggestions, and fixes. They include Ron Gut, Bob +;; Weiner, Toni Drabik, Peter Breton, Ville Skytta, Thomas Vogels, +;; Juri Linkov, Maciek Pasternacki, and many others. + +;; User quotes: "You sir, are a sick, sick, _sick_ person. :)" +;; -- Bill Perry, author of Emacs/W3 + + +;;; Code: + +(require 'cl) +(eval-when-compile + (defvar unresolved) + (if (string-match "XEmacs" emacs-version) + (byte-compiler-options + (warnings (- unresolved)))) + (defvar font-lock-auto-fontify) + (defvar font-lock-support-mode) + (defvar global-font-lock-mode)) + +(defconst htmlize-version "1.47") + +(defgroup htmlize nil + "Convert buffer text and faces to HTML." + :group 'hypermedia) + +(defcustom htmlize-head-tags "" + "Additional tags to insert within HEAD of the generated document." + :type 'string + :group 'htmlize) + +(defcustom htmlize-output-type 'css + "Output type of generated HTML, one of `css', `inline-css', or `font'. +When set to `css' (the default), htmlize will generate a style sheet +with description of faces, and use it in the HTML document, specifying +the faces in the actual text with . + +When set to `inline-css', the style will be generated as above, but +placed directly in the STYLE attribute of the span ELEMENT: . This makes it easier to paste the resulting HTML to +other documents. + +When set to `font', the properties will be set using layout tags +, , , , and . + +`css' output is normally preferred, but `font' is still useful for +supporting old, pre-CSS browsers, and both `inline-css' and `font' for +easier embedding of colorized text in foreign HTML documents (no style +sheet to carry around)." + :type '(choice (const css) (const inline-css) (const font)) + :group 'htmlize) + +(defcustom htmlize-use-images t + "Whether htmlize generates `img' for images attached to buffer contents." + :type 'boolean + :group 'htmlize) + +(defcustom htmlize-force-inline-images nil + "Non-nil means generate all images inline using data URLs. +Normally htmlize converts image descriptors with :file properties to +relative URIs, and those with :data properties to data URIs. With this +flag set, the images specified as a file name are loaded into memory and +embedded in the HTML as data URIs." + :type 'boolean + :group 'htmlize) + +(defcustom htmlize-max-alt-text 100 + "Maximum size of text to use as ALT text in images. + +Normally when htmlize encounters text covered by the `display' property +that specifies an image, it generates an `alt' attribute containing the +original text. If the text is larger than `htmlize-max-alt-text' characters, +this will not be done.") + +(defcustom htmlize-transform-image 'htmlize-default-transform-image + "Function called to modify the image descriptor. + +The function is called with the image descriptor found in the buffer and +the text the image is supposed to replace. It should return a (possibly +different) image descriptor property list or a replacement string to use +instead of of the original buffer text. + +Returning nil is the same as returning the original text." + :type 'boolean + :group 'htmlize) + +(defcustom htmlize-generate-hyperlinks t + "Non-nil means auto-generate the links from URLs and mail addresses in buffer. + +This is on by default; set it to nil if you don't want htmlize to +autogenerate such links. Note that this option only turns off automatic +search for contents that looks like URLs and converting them to links. +It has no effect on whether htmlize respects the `htmlize-link' property." + :type 'boolean + :group 'htmlize) + +(defcustom htmlize-hyperlink-style " + a { + color: inherit; + background-color: inherit; + font: inherit; + text-decoration: inherit; + } + a:hover { + text-decoration: underline; + } +" + "The CSS style used for hyperlinks when in CSS mode." + :type 'string + :group 'htmlize) + +(defcustom htmlize-replace-form-feeds t + "Non-nil means replace form feeds in source code with HTML separators. +Form feeds are the ^L characters at line beginnings that are sometimes +used to separate sections of source code. If this variable is set to +`t', form feed characters are replaced with the
separator. If this +is a string, it specifies the replacement to use. Note that
 is
+temporarily closed before the separator is inserted, so the default
+replacement is effectively \"

\".  If you specify
+another replacement, don't forget to close and reopen the 
 if you
+want the output to remain valid HTML.
+
+If you need more elaborate processing, set this to nil and use
+htmlize-after-hook."
+  :type 'boolean
+  :group 'htmlize)
+
+(defcustom htmlize-html-charset nil
+  "The charset declared by the resulting HTML documents.
+When non-nil, causes htmlize to insert the following in the HEAD section
+of the generated HTML:
+
+  
+
+where CHARSET is the value you've set for htmlize-html-charset.  Valid
+charsets are defined by MIME and include strings like \"iso-8859-1\",
+\"iso-8859-15\", \"utf-8\", etc.
+
+If you are using non-Latin-1 charsets, you might need to set this for
+your documents to render correctly.  Also, the W3C validator requires
+submitted HTML documents to declare a charset.  So if you care about
+validation, you can use this to prevent the validator from bitching.
+
+Needless to say, if you set this, you should actually make sure that
+the buffer is in the encoding you're claiming it is in.  (This is
+normally achieved by using the correct file coding system for the
+buffer.)  If you don't understand what that means, you should probably
+leave this option in its default setting."
+  :type '(choice (const :tag "Unset" nil)
+		 string)
+  :group 'htmlize)
+
+(defcustom htmlize-convert-nonascii-to-entities t
+  "Whether non-ASCII characters should be converted to HTML entities.
+
+When this is non-nil, characters with codes in the 128-255 range will be
+considered Latin 1 and rewritten as \"&#CODE;\".  Characters with codes
+above 255 will be converted to \"&#UCS;\", where UCS denotes the Unicode
+code point of the character.  If the code point cannot be determined,
+the character will be copied unchanged, as would be the case if the
+option were nil.
+
+When the option is nil, the non-ASCII characters are copied to HTML
+without modification.  In that case, the web server and/or the browser
+must be set to understand the encoding that was used when saving the
+buffer.  (You might also want to specify it by setting
+`htmlize-html-charset'.)
+
+Note that in an HTML entity \"&#CODE;\", CODE is always a UCS code point,
+which has nothing to do with the charset the page is in.  For example,
+\"©\" *always* refers to the copyright symbol, regardless of charset
+specified by the META tag or the charset sent by the HTTP server.  In
+other words, \"©\" is exactly equivalent to \"©\".
+
+For most people htmlize will work fine with this option left at the
+default setting; don't change it unless you know what you're doing."
+  :type 'sexp
+  :group 'htmlize)
+
+(defcustom htmlize-ignore-face-size 'absolute
+  "Whether face size should be ignored when generating HTML.
+If this is nil, face sizes are used.  If set to t, sizes are ignored
+If set to `absolute', only absolute size specifications are ignored.
+Please note that font sizes only work with CSS-based output types."
+  :type '(choice (const :tag "Don't ignore" nil)
+		 (const :tag "Ignore all" t)
+		 (const :tag "Ignore absolute" absolute))
+  :group 'htmlize)
+
+(defcustom htmlize-css-name-prefix ""
+  "The prefix used for CSS names.
+The CSS names that htmlize generates from face names are often too
+generic for CSS files; for example, `font-lock-type-face' is transformed
+to `type'.  Use this variable to add a prefix to the generated names.
+The string \"htmlize-\" is an example of a reasonable prefix."
+  :type 'string
+  :group 'htmlize)
+
+(defcustom htmlize-use-rgb-txt t
+  "Whether `rgb.txt' should be used to convert color names to RGB.
+
+This conversion means determining, for instance, that the color
+\"IndianRed\" corresponds to the (205, 92, 92) RGB triple.  `rgb.txt'
+is the X color database that maps hundreds of color names to such RGB
+triples.  When this variable is non-nil, `htmlize' uses `rgb.txt' to
+look up color names.
+
+If this variable is nil, htmlize queries Emacs for RGB components of
+colors using `color-instance-rgb-components' and `color-values'.
+This can yield incorrect results on non-true-color displays.
+
+If the `rgb.txt' file is not found (which will be the case if you're
+running Emacs on non-X11 systems), this option is ignored."
+  :type 'boolean
+  :group 'htmlize)
+
+(defcustom htmlize-html-major-mode nil
+  "The mode the newly created HTML buffer will be put in.
+Set this to nil if you prefer the default (fundamental) mode."
+  :type '(radio (const :tag "No mode (fundamental)" nil)
+		 (function-item html-mode)
+		 (function :tag "User-defined major mode"))
+  :group 'htmlize)
+
+(defvar htmlize-before-hook nil
+  "Hook run before htmlizing a buffer.
+The hook functions are run in the source buffer (not the resulting HTML
+buffer).")
+
+(defvar htmlize-after-hook nil
+  "Hook run after htmlizing a buffer.
+Unlike `htmlize-before-hook', these functions are run in the generated
+HTML buffer.  You may use them to modify the outlook of the final HTML
+output.")
+
+(defvar htmlize-file-hook nil
+  "Hook run by `htmlize-file' after htmlizing a file, but before saving it.")
+
+(defvar htmlize-buffer-places)
+
+;;; Some cross-Emacs compatibility.
+
+;; I try to conditionalize on features rather than Emacs version, but
+;; in some cases checking against the version *is* necessary.
+(defconst htmlize-running-xemacs (string-match "XEmacs" emacs-version))
+
+;; We need a function that efficiently finds the next change of a
+;; property regardless of whether the change occurred because of a
+;; text property or an extent/overlay.
+(cond
+ (htmlize-running-xemacs
+  (defun htmlize-next-change (pos prop &optional limit)
+    (if prop
+        (next-single-char-property-change pos prop nil (or limit (point-max)))
+      (next-property-change pos nil (or limit (point-max)))))
+  (defun htmlize-next-face-change (pos &optional limit)
+    (htmlize-next-change pos 'face limit)))
+ (t
+  (defun htmlize-next-change (pos prop &optional limit)
+    (if prop
+        (next-single-char-property-change pos prop nil limit)
+      (next-char-property-change pos limit)))
+  (defun htmlize-overlay-faces-at (pos)
+    (delq nil (mapcar (lambda (o) (overlay-get o 'face)) (overlays-at pos))))
+  (defun htmlize-next-face-change (pos &optional limit)
+    ;; (htmlize-next-change pos 'face limit) would skip over entire
+    ;; overlays that specify the `face' property, even when they
+    ;; contain smaller text properties that also specify `face'.
+    ;; Emacs display engine merges those faces, and so must we.
+    (or limit
+        (setq limit (point-max)))
+    (let ((next-prop (next-single-property-change pos 'face nil limit))
+          (overlay-faces (htmlize-overlay-faces-at pos)))
+      (while (progn
+               (setq pos (next-overlay-change pos))
+               (and (< pos next-prop)
+                    (equal overlay-faces (htmlize-overlay-faces-at pos)))))
+      (setq pos (min pos next-prop))
+      ;; Additionally, we include the entire region that specifies the
+      ;; `display' property.
+      (when (get-char-property pos 'display)
+        (setq pos (next-single-char-property-change pos 'display nil limit)))
+      pos)))
+ (t
+  (error "htmlize requires next-single-property-change or \
+next-single-char-property-change")))
+
+(defmacro htmlize-lexlet (&rest letforms)
+  (declare (indent 1) (debug let))
+  (if (and (boundp 'lexical-binding)
+           lexical-binding)
+      `(let ,@letforms)
+    ;; cl extensions have a macro implementing lexical let
+    `(lexical-let ,@letforms)))
+
+;; Simple overlay emulation for XEmacs
+
+(cond
+ (htmlize-running-xemacs
+  (defalias 'htmlize-make-overlay 'make-extent)
+  (defalias 'htmlize-overlay-put 'set-extent-property)
+  (defalias 'htmlize-overlay-get 'extent-property)
+  (defun htmlize-overlays-in (beg end) (extent-list nil beg end))
+  (defalias 'htmlize-delete-overlay 'detach-extent))
+ (t
+  (defalias 'htmlize-make-overlay 'make-overlay)
+  (defalias 'htmlize-overlay-put 'overlay-put)
+  (defalias 'htmlize-overlay-get 'overlay-get)
+  (defalias 'htmlize-overlays-in 'overlays-in)
+  (defalias 'htmlize-delete-overlay 'delete-overlay)))
+
+
+;;; Transformation of buffer text: HTML escapes, untabification, etc.
+
+(defvar htmlize-basic-character-table
+  ;; Map characters in the 0-127 range to either one-character strings
+  ;; or to numeric entities.
+  (let ((table (make-vector 128 ?\0)))
+    ;; Map characters in the 32-126 range to themselves, others to
+    ;; &#CODE entities;
+    (dotimes (i 128)
+      (setf (aref table i) (if (and (>= i 32) (<= i 126))
+			       (char-to-string i)
+			     (format "&#%d;" i))))
+    ;; Set exceptions manually.
+    (setf
+     ;; Don't escape newline, carriage return, and TAB.
+     (aref table ?\n) "\n"
+     (aref table ?\r) "\r"
+     (aref table ?\t) "\t"
+     ;; Escape &, <, and >.
+     (aref table ?&) "&"
+     (aref table ?<) "<"
+     (aref table ?>) ">"
+     ;; Not escaping '"' buys us a measurable speedup.  It's only
+     ;; necessary to quote it for strings used in attribute values,
+     ;; which htmlize doesn't typically do.
+     ;(aref table ?\") """
+     )
+    table))
+
+;; A cache of HTML representation of non-ASCII characters.  Depending
+;; on the setting of `htmlize-convert-nonascii-to-entities', this maps
+;; non-ASCII characters to either "&#;" or "" (mapconcat's
+;; mapper must always return strings).  It's only filled as characters
+;; are encountered, so that in a buffer with e.g. French text, it will
+;; only ever contain French accented characters as keys.  It's cleared
+;; on each entry to htmlize-buffer-1 to allow modifications of
+;; `htmlize-convert-nonascii-to-entities' to take effect.
+(defvar htmlize-extended-character-cache (make-hash-table :test 'eq))
+
+(defun htmlize-protect-string (string)
+  "HTML-protect string, escaping HTML metacharacters and I18N chars."
+  ;; Only protecting strings that actually contain unsafe or non-ASCII
+  ;; chars removes a lot of unnecessary funcalls and consing.
+  (if (not (string-match "[^\r\n\t -%'-;=?-~]" string))
+      string
+    (mapconcat (lambda (char)
+		 (cond
+		  ((< char 128)
+		   ;; ASCII: use htmlize-basic-character-table.
+		   (aref htmlize-basic-character-table char))
+		  ((gethash char htmlize-extended-character-cache)
+		   ;; We've already seen this char; return the cached
+		   ;; string.
+		   )
+		  ((not htmlize-convert-nonascii-to-entities)
+		   ;; If conversion to entities is not desired, always
+		   ;; copy the char literally.
+		   (setf (gethash char htmlize-extended-character-cache)
+			 (char-to-string char)))
+		  ((< char 256)
+		   ;; Latin 1: no need to call encode-char.
+		   (setf (gethash char htmlize-extended-character-cache)
+			 (format "&#%d;" char)))
+		  ((encode-char char 'ucs)
+                   ;; Must check if encode-char works for CHAR;
+                   ;; it fails for Arabic and possibly elsewhere.
+		   (setf (gethash char htmlize-extended-character-cache)
+			 (format "&#%d;" (encode-char char 'ucs))))
+		  (t
+		   ;; encode-char doesn't work for this char.  Copy it
+		   ;; unchanged and hope for the best.
+		   (setf (gethash char htmlize-extended-character-cache)
+			 (char-to-string char)))))
+	       string "")))
+
+(defun htmlize-attr-escape (string)
+  ;; Like htmlize-protect-string, but also escapes double-quoted
+  ;; strings to make it usable in attribute values.
+  (setq string (htmlize-protect-string string))
+  (if (not (string-match "\"" string))
+      string
+    (mapconcat (lambda (char)
+                 (if (eql char ?\")
+                     """
+                   (char-to-string char)))
+               string "")))
+
+(defsubst htmlize-concat (list)
+  (if (and (consp list) (null (cdr list)))
+      ;; Don't create a new string in the common case where the list only
+      ;; consists of one element.
+      (car list)
+    (apply #'concat list)))
+
+(defun htmlize-format-link (linkprops text)
+  (let ((uri (if (stringp linkprops)
+                 linkprops
+               (plist-get linkprops :uri)))
+        (escaped-text (htmlize-protect-string text)))
+    (if uri
+        (format "%s" (htmlize-attr-escape uri) escaped-text)
+      escaped-text)))
+
+(defun htmlize-escape-or-link (string)
+  ;; Escape STRING and/or add hyperlinks.  STRING comes from a
+  ;; `display' property.
+  (let ((pos 0) (end (length string)) outlist)
+    (while (< pos end)
+      (let* ((link (get-char-property pos 'htmlize-link string))
+             (next-link-change (next-single-property-change
+                                pos 'htmlize-link string end))
+             (chunk (substring string pos next-link-change)))
+        (push
+         (cond (link
+                (htmlize-format-link link chunk))
+               ((get-char-property 0 'htmlize-literal chunk)
+                chunk)
+               (t
+                (htmlize-protect-string chunk)))
+         outlist)
+        (setq pos next-link-change)))
+    (htmlize-concat (nreverse outlist))))
+
+(defun htmlize-display-prop-to-html (display text)
+  (let (desc)
+    (cond ((stringp display)
+           ;; Emacs ignores recursive display properties.
+           (htmlize-escape-or-link display))
+          ((not (eq (car-safe display) 'image))
+           (htmlize-protect-string text))
+          ((null (setq desc (funcall htmlize-transform-image
+                                     (cdr display) text)))
+           (htmlize-escape-or-link text))
+          ((stringp desc)
+           (htmlize-escape-or-link desc))
+          (t
+           (htmlize-generate-image desc text)))))
+
+(defun htmlize-string-to-html (string)
+  ;; Convert the string to HTML, including images attached as
+  ;; `display' property and links as `htmlize-link' property.  In a
+  ;; string without images or links, this is equivalent to
+  ;; `htmlize-protect-string'.
+  (let ((pos 0) (end (length string)) outlist)
+    (while (< pos end)
+      (let* ((display (get-char-property pos 'display string))
+             (next-display-change (next-single-property-change
+                                   pos 'display string end))
+             (chunk (substring string pos next-display-change)))
+        (push
+         (if display
+             (htmlize-display-prop-to-html display chunk)
+           (htmlize-escape-or-link chunk))
+         outlist)
+        (setq pos next-display-change)))
+    (htmlize-concat (nreverse outlist))))
+
+(defun htmlize-default-transform-image (imgprops _text)
+  "Default transformation of image descriptor to something usable in HTML.
+
+If `htmlize-use-images' is nil, the function always returns nil, meaning
+use original text.  Otherwise, it tries to find the image for images that
+specify a file name.  If `htmlize-force-inline-images' is non-nil, it also
+converts the :file attribute to :data and returns the modified property
+list."
+  (when htmlize-use-images
+    (when (plist-get imgprops :file)
+      (let ((location (plist-get (cdr (find-image (list imgprops))) :file)))
+        (when location
+          (setq imgprops (plist-put (copy-list imgprops) :file location)))))
+    (if htmlize-force-inline-images
+        (let ((location (plist-get imgprops :file))
+              data)
+          (when location
+            (with-temp-buffer
+              (condition-case nil
+                  (progn
+                    (insert-file-contents-literally location)
+                    (setq data (buffer-string)))
+                (error nil))))
+          ;; if successful, return the new plist, otherwise return
+          ;; nil, which will use the original text
+          (and data
+               (plist-put (plist-put imgprops :file nil)
+                          :data data)))
+      imgprops)))
+
+(defun htmlize-alt-text (_imgprops origtext)
+  (and (/= (length origtext) 0)
+       (<= (length origtext) htmlize-max-alt-text)
+       (not (string-match "[\0-\x1f]" origtext))
+       origtext))
+
+(defun htmlize-generate-image (imgprops origtext)
+  (let* ((alt-text (htmlize-alt-text imgprops origtext))
+         (alt-attr (if alt-text
+                       (format " alt=\"%s\"" (htmlize-attr-escape alt-text))
+                     "")))
+    (cond ((plist-get imgprops :file)
+           ;; Try to find the image in image-load-path
+           (let* ((found-props (cdr (find-image (list imgprops))))
+                  (file (or (plist-get found-props :file)
+                            (plist-get imgprops :file))))
+             (format ""
+                     (htmlize-attr-escape (file-relative-name file))
+                     alt-attr)))
+          ((plist-get imgprops :data)
+           (format ""
+                   (or (plist-get imgprops :type) "")
+                   (base64-encode-string (plist-get imgprops :data))
+                   alt-attr)))))
+
+(defconst htmlize-ellipsis "...")
+(put-text-property 0 (length htmlize-ellipsis) 'htmlize-ellipsis t htmlize-ellipsis)
+
+(defun htmlize-match-inv-spec (inv)
+  (member* inv buffer-invisibility-spec
+           :key (lambda (i)
+                  (if (symbolp i) i (car i)))))
+
+(defun htmlize-decode-invisibility-spec (invisible)
+  ;; Return t, nil, or `ellipsis', depending on how invisible text should be inserted.
+
+  (if (not (listp buffer-invisibility-spec))
+      ;; If buffer-invisibility-spec is not a list, then all
+      ;; characters with non-nil `invisible' property are visible.
+      (not invisible)
+
+    ;; Otherwise, the value of a non-nil `invisible' property can be:
+    ;; 1. a symbol -- make the text invisible if it matches
+    ;;    buffer-invisibility-spec.
+    ;; 2. a list of symbols -- make the text invisible if
+    ;;    any symbol in the list matches
+    ;;    buffer-invisibility-spec.
+    ;; If the match of buffer-invisibility-spec has a non-nil
+    ;; CDR, replace the invisible text with an ellipsis.
+    (let ((match (if (symbolp invisible)
+                     (htmlize-match-inv-spec invisible)
+                   (some #'htmlize-match-inv-spec invisible))))
+      (cond ((null match) t)
+            ((cdr-safe (car match)) 'ellipsis)
+            (t nil)))))
+
+(defun htmlize-add-before-after-strings (beg end text)
+  ;; Find overlays specifying before-string and after-string in [beg,
+  ;; pos).  If any are found, splice them into TEXT and return the new
+  ;; text.
+  (let (additions)
+    (dolist (overlay (overlays-in beg end))
+      (let ((before (overlay-get overlay 'before-string))
+            (after (overlay-get overlay 'after-string)))
+        (when after
+          (push (cons (- (overlay-end overlay) beg)
+                      after)
+                additions))
+        (when before
+          (push (cons (- (overlay-start overlay) beg)
+                      before)
+                additions))))
+    (if additions
+        (let ((textlist nil)
+              (strpos 0))
+          (dolist (add (stable-sort additions #'< :key #'car))
+            (let ((addpos (car add))
+                  (addtext (cdr add)))
+              (push (substring text strpos addpos) textlist)
+              (push addtext textlist)
+              (setq strpos addpos)))
+          (push (substring text strpos) textlist)
+          (apply #'concat (nreverse textlist)))
+      text)))
+
+(defun htmlize-copy-prop (prop beg end string)
+  ;; Copy the specified property from the specified region of the
+  ;; buffer to the target string.  We cannot rely on Emacs to copy the
+  ;; property because we want to handle properties coming from both
+  ;; text properties and overlays.
+  (let ((pos beg))
+    (while (< pos end)
+      (let ((value (get-char-property pos prop))
+            (next-change (htmlize-next-change pos prop end)))
+        (when value
+          (put-text-property (- pos beg) (- next-change beg)
+                             prop value string))
+        (setq pos next-change)))))
+
+(defun htmlize-get-text-with-display (beg end)
+  ;; Like buffer-substring-no-properties, except it copies the
+  ;; `display' property from the buffer, if found.
+  (let ((text (buffer-substring-no-properties beg end)))
+    (htmlize-copy-prop 'display beg end text)
+    (htmlize-copy-prop 'htmlize-link beg end text)
+    (unless htmlize-running-xemacs
+      (setq text (htmlize-add-before-after-strings beg end text)))
+    text))
+
+(defun htmlize-buffer-substring-no-invisible (beg end)
+  ;; Like buffer-substring-no-properties, but don't copy invisible
+  ;; parts of the region.  Where buffer-substring-no-properties
+  ;; mandates an ellipsis to be shown, htmlize-ellipsis is inserted.
+  (let ((pos beg)
+	visible-list invisible show last-show next-change)
+    ;; Iterate over the changes in the `invisible' property and filter
+    ;; out the portions where it's non-nil, i.e. where the text is
+    ;; invisible.
+    (while (< pos end)
+      (setq invisible (get-char-property pos 'invisible)
+	    next-change (htmlize-next-change pos 'invisible end)
+            show (htmlize-decode-invisibility-spec invisible))
+      (cond ((eq show t)
+	     (push (htmlize-get-text-with-display pos next-change)
+                   visible-list))
+            ((and (eq show 'ellipsis)
+                  (not (eq last-show 'ellipsis))
+                  ;; Conflate successive ellipses.
+                  (push htmlize-ellipsis visible-list))))
+      (setq pos next-change last-show show))
+    (htmlize-concat (nreverse visible-list))))
+
+(defun htmlize-trim-ellipsis (text)
+  ;; Remove htmlize-ellipses ("...") from the beginning of TEXT if it
+  ;; starts with it.  It checks for the special property of the
+  ;; ellipsis so it doesn't work on ordinary text that begins with
+  ;; "...".
+  (if (get-text-property 0 'htmlize-ellipsis text)
+      (substring text (length htmlize-ellipsis))
+    text))
+
+(defconst htmlize-tab-spaces
+  ;; A table of strings with spaces.  (aref htmlize-tab-spaces 5) is
+  ;; like (make-string 5 ?\ ), except it doesn't cons.
+  (let ((v (make-vector 32 nil)))
+    (dotimes (i (length v))
+      (setf (aref v i) (make-string i ?\ )))
+    v))
+
+(defun htmlize-untabify (text start-column)
+  "Untabify TEXT, assuming it starts at START-COLUMN."
+  (let ((column start-column)
+	(last-match 0)
+	(chunk-start 0)
+	chunks match-pos tab-size)
+    (while (string-match "[\t\n]" text last-match)
+      (setq match-pos (match-beginning 0))
+      (cond ((eq (aref text match-pos) ?\t)
+	     ;; Encountered a tab: create a chunk of text followed by
+	     ;; the expanded tab.
+	     (push (substring text chunk-start match-pos) chunks)
+	     ;; Increase COLUMN by the length of the text we've
+	     ;; skipped since last tab or newline.  (Encountering
+	     ;; newline resets it.)
+	     (incf column (- match-pos last-match))
+	     ;; Calculate tab size based on tab-width and COLUMN.
+	     (setq tab-size (- tab-width (% column tab-width)))
+	     ;; Expand the tab, carefully recreating the `display'
+	     ;; property if one was on the TAB.
+             (let ((display (get-text-property match-pos 'display text))
+                   (expanded-tab (aref htmlize-tab-spaces tab-size)))
+               (when display
+                 (put-text-property 0 tab-size 'display display expanded-tab))
+               (push expanded-tab chunks))
+	     (incf column tab-size)
+	     (setq chunk-start (1+ match-pos)))
+	    (t
+	     ;; Reset COLUMN at beginning of line.
+	     (setq column 0)))
+      (setq last-match (1+ match-pos)))
+    ;; If no chunks have been allocated, it means there have been no
+    ;; tabs to expand.  Return TEXT unmodified.
+    (if (null chunks)
+	text
+      (when (< chunk-start (length text))
+	;; Push the remaining chunk.
+	(push (substring text chunk-start) chunks))
+      ;; Generate the output from the available chunks.
+      (htmlize-concat (nreverse chunks)))))
+
+(defun htmlize-extract-text (beg end trailing-ellipsis)
+  ;; Extract buffer text, sans the invisible parts.  Then
+  ;; untabify it and escape the HTML metacharacters.
+  (let ((text (htmlize-buffer-substring-no-invisible beg end)))
+    (when trailing-ellipsis
+      (setq text (htmlize-trim-ellipsis text)))
+    ;; If TEXT ends up empty, don't change trailing-ellipsis.
+    (when (> (length text) 0)
+      (setq trailing-ellipsis
+            (get-text-property (1- (length text))
+                               'htmlize-ellipsis text)))
+    (setq text (htmlize-untabify text (current-column)))
+    (setq text (htmlize-string-to-html text))
+    (values text trailing-ellipsis)))
+
+(defun htmlize-despam-address (string)
+  "Replace every occurrence of '@' in STRING with %40.
+This is used to protect mailto links without modifying their meaning."
+  ;; Suggested by Ville Skytta.
+  (while (string-match "@" string)
+    (setq string (replace-match "%40" nil t string)))
+  string)
+
+(defun htmlize-make-tmp-overlay (beg end props)
+  (let ((overlay (htmlize-make-overlay beg end)))
+    (htmlize-overlay-put overlay 'htmlize-tmp-overlay t)
+    (while props
+      (htmlize-overlay-put overlay (pop props) (pop props)))
+    overlay))
+
+(defun htmlize-delete-tmp-overlays ()
+  (dolist (overlay (htmlize-overlays-in (point-min) (point-max)))
+    (when (htmlize-overlay-get overlay 'htmlize-tmp-overlay)
+      (htmlize-delete-overlay overlay))))
+
+(defun htmlize-make-link-overlay (beg end uri)
+  (htmlize-make-tmp-overlay beg end `(htmlize-link (:uri ,uri))))
+
+(defun htmlize-create-auto-links ()
+  "Add `htmlize-link' property to all mailto links in the buffer."
+  (save-excursion
+    (goto-char (point-min))
+    (while (re-search-forward
+            "<\\(\\(mailto:\\)?\\([-=+_.a-zA-Z0-9]+@[-_.a-zA-Z0-9]+\\)\\)>"
+            nil t)
+      (let* ((address (match-string 3))
+             (beg (match-beginning 0)) (end (match-end 0))
+             (uri (concat "mailto:" (htmlize-despam-address address))))
+        (htmlize-make-link-overlay beg end uri)))
+    (goto-char (point-min))
+    (while (re-search-forward "<\\(\\(URL:\\)?\\([a-zA-Z]+://[^;]+\\)\\)>"
+                              nil t)
+      (htmlize-make-link-overlay
+       (match-beginning 0) (match-end 0) (match-string 3)))))
+
+;; Tests for htmlize-create-auto-links:
+
+;; 
+;; 
+;; 
+;; 
+;; 
+;; 
+
+(defun htmlize-shadow-form-feeds ()
+  (let ((s "\n
")) + (put-text-property 0 (length s) 'htmlize-literal t s) + (let ((disp `(display ,s))) + (while (re-search-forward "\n\^L" nil t) + (htmlize-make-tmp-overlay (match-beginning 0) (match-end 0) disp))))) + +(defun htmlize-defang-local-variables () + ;; Juri Linkov reports that an HTML-ized "Local variables" can lead + ;; visiting the HTML to fail with "Local variables list is not + ;; properly terminated". He suggested changing the phrase to + ;; syntactically equivalent HTML that Emacs doesn't recognize. + (goto-char (point-min)) + (while (search-forward "Local Variables:" nil t) + (replace-match "Local Variables:" nil t))) + + +;;; Color handling. + +(defvar htmlize-x-library-search-path + `(,data-directory + "/etc/X11/rgb.txt" + "/usr/share/X11/rgb.txt" + ;; the remainder of this list really belongs in a museum + "/usr/X11R6/lib/X11/" + "/usr/X11R5/lib/X11/" + "/usr/lib/X11R6/X11/" + "/usr/lib/X11R5/X11/" + "/usr/local/X11R6/lib/X11/" + "/usr/local/X11R5/lib/X11/" + "/usr/local/lib/X11R6/X11/" + "/usr/local/lib/X11R5/X11/" + "/usr/X11/lib/X11/" + "/usr/lib/X11/" + "/usr/local/lib/X11/" + "/usr/X386/lib/X11/" + "/usr/x386/lib/X11/" + "/usr/XFree86/lib/X11/" + "/usr/unsupported/lib/X11/" + "/usr/athena/lib/X11/" + "/usr/local/x11r5/lib/X11/" + "/usr/lpp/Xamples/lib/X11/" + "/usr/openwin/lib/X11/" + "/usr/openwin/share/lib/X11/")) + +(defun htmlize-get-color-rgb-hash (&optional rgb-file) + "Return a hash table mapping X color names to RGB values. +The keys in the hash table are X11 color names, and the values are the +#rrggbb RGB specifications, extracted from `rgb.txt'. + +If RGB-FILE is nil, the function will try hard to find a suitable file +in the system directories. + +If no rgb.txt file is found, return nil." + (let ((rgb-file (or rgb-file (locate-file + "rgb.txt" + htmlize-x-library-search-path))) + (hash nil)) + (when rgb-file + (with-temp-buffer + (insert-file-contents rgb-file) + (setq hash (make-hash-table :test 'equal)) + (while (not (eobp)) + (cond ((looking-at "^\\s-*\\([!#]\\|$\\)") + ;; Skip comments and empty lines. + ) + ((looking-at + "[ \t]*\\([0-9]+\\)[ \t]+\\([0-9]+\\)[ \t]+\\([0-9]+\\)[ \t]+\\(.*\\)") + (setf (gethash (downcase (match-string 4)) hash) + (format "#%02x%02x%02x" + (string-to-number (match-string 1)) + (string-to-number (match-string 2)) + (string-to-number (match-string 3))))) + (t + (error + "Unrecognized line in %s: %s" + rgb-file + (buffer-substring (point) (progn (end-of-line) (point)))))) + (forward-line 1)))) + hash)) + +;; Compile the RGB map when loaded. On systems where rgb.txt is +;; missing, the value of the variable will be nil, and rgb.txt will +;; not be used. +(defvar htmlize-color-rgb-hash (htmlize-get-color-rgb-hash)) + +;;; Face handling. + +(defun htmlize-face-specifies-property (face prop) + ;; Return t if face specifies PROP, as opposed to it being inherited + ;; from the default face. The problem with e.g. + ;; `face-foreground-instance' is that it returns an instance for + ;; EVERY face because every face inherits from the default face. + ;; However, we'd like htmlize-face-{fore,back}ground to return nil + ;; when called with a face that doesn't specify its own foreground + ;; or background. + (or (eq face 'default) + (assq 'global (specifier-spec-list (face-property face prop))))) + +(defun htmlize-face-color-internal (face fg) + ;; Used only under GNU Emacs. Return the color of FACE, but don't + ;; return "unspecified-fg" or "unspecified-bg". If the face is + ;; `default' and the color is unspecified, look up the color in + ;; frame parameters. + (let* ((function (if fg #'face-foreground #'face-background)) + (color (funcall function face nil t))) + (when (and (eq face 'default) (null color)) + (setq color (cdr (assq (if fg 'foreground-color 'background-color) + (frame-parameters))))) + (when (or (eq color 'unspecified) + (equal color "unspecified-fg") + (equal color "unspecified-bg")) + (setq color nil)) + (when (and (eq face 'default) + (null color)) + ;; Assuming black on white doesn't seem right, but I can't think + ;; of anything better to do. + (setq color (if fg "black" "white"))) + color)) + +(defun htmlize-face-foreground (face) + ;; Return the name of the foreground color of FACE. If FACE does + ;; not specify a foreground color, return nil. + (cond (htmlize-running-xemacs + ;; XEmacs. + (and (htmlize-face-specifies-property face 'foreground) + (color-instance-name (face-foreground-instance face)))) + (t + ;; GNU Emacs. + (htmlize-face-color-internal face t)))) + +(defun htmlize-face-background (face) + ;; Return the name of the background color of FACE. If FACE does + ;; not specify a background color, return nil. + (cond (htmlize-running-xemacs + ;; XEmacs. + (and (htmlize-face-specifies-property face 'background) + (color-instance-name (face-background-instance face)))) + (t + ;; GNU Emacs. + (htmlize-face-color-internal face nil)))) + +;; Convert COLOR to the #RRGGBB string. If COLOR is already in that +;; format, it's left unchanged. + +(defun htmlize-color-to-rgb (color) + (let ((rgb-string nil)) + (cond ((null color) + ;; Ignore nil COLOR because it means that the face is not + ;; specifying any color. Hence (htmlize-color-to-rgb nil) + ;; returns nil. + ) + ((string-match "\\`#" color) + ;; The color is already in #rrggbb format. + (setq rgb-string color)) + ((and htmlize-use-rgb-txt + htmlize-color-rgb-hash) + ;; Use of rgb.txt is requested, and it's available on the + ;; system. Use it. + (setq rgb-string (gethash (downcase color) htmlize-color-rgb-hash))) + (t + ;; We're getting the RGB components from Emacs. + (let ((rgb + (if (fboundp 'color-instance-rgb-components) + (mapcar (lambda (arg) + (/ arg 256)) + (color-instance-rgb-components + (make-color-instance color))) + (mapcar (lambda (arg) + (/ arg 256)) + (color-values color))))) + (when rgb + (setq rgb-string (apply #'format "#%02x%02x%02x" rgb)))))) + ;; If RGB-STRING is still nil, it means the color cannot be found, + ;; for whatever reason. In that case just punt and return COLOR. + ;; Most browsers support a decent set of color names anyway. + (or rgb-string color))) + +;; We store the face properties we care about into an +;; `htmlize-fstruct' type. That way we only have to analyze face +;; properties, which can be time consuming, once per each face. The +;; mapping between Emacs faces and htmlize-fstructs is established by +;; htmlize-make-face-map. The name "fstruct" refers to variables of +;; type `htmlize-fstruct', while the term "face" is reserved for Emacs +;; faces. + +(defstruct htmlize-fstruct + foreground ; foreground color, #rrggbb + background ; background color, #rrggbb + size ; size + boldp ; whether face is bold + italicp ; whether face is italic + underlinep ; whether face is underlined + overlinep ; whether face is overlined + strikep ; whether face is struck through + css-name ; CSS name of face + ) + +(defun htmlize-face-set-from-keyword-attr (fstruct attr value) + ;; For ATTR and VALUE, set the equivalent value in FSTRUCT. + (case attr + (:foreground + (setf (htmlize-fstruct-foreground fstruct) (htmlize-color-to-rgb value))) + (:background + (setf (htmlize-fstruct-background fstruct) (htmlize-color-to-rgb value))) + (:height + (setf (htmlize-fstruct-size fstruct) value)) + (:weight + (when (string-match (symbol-name value) "bold") + (setf (htmlize-fstruct-boldp fstruct) t))) + (:slant + (setf (htmlize-fstruct-italicp fstruct) (or (eq value 'italic) + (eq value 'oblique)))) + (:bold + (setf (htmlize-fstruct-boldp fstruct) value)) + (:italic + (setf (htmlize-fstruct-italicp fstruct) value)) + (:underline + (setf (htmlize-fstruct-underlinep fstruct) value)) + (:overline + (setf (htmlize-fstruct-overlinep fstruct) value)) + (:strike-through + (setf (htmlize-fstruct-strikep fstruct) value)))) + +(defun htmlize-face-size (face) + ;; The size (height) of FACE, taking inheritance into account. + ;; Only works in Emacs 21 and later. + (let* ((face-list (list face)) + (head face-list) + (tail face-list)) + (while head + (let ((inherit (face-attribute (car head) :inherit))) + (cond ((listp inherit) + (setcdr tail (copy-list inherit)) + (setq tail (last tail))) + ((eq inherit 'unspecified)) + (t + (setcdr tail (list inherit)) + (setq tail (cdr tail))))) + (pop head)) + (let ((size-list + (loop + for f in face-list + for h = (face-attribute f :height) + collect (if (eq h 'unspecified) nil h)))) + (reduce 'htmlize-merge-size (cons nil size-list))))) + +(defun htmlize-face-css-name (face) + ;; Generate the css-name property for the given face. Emacs places + ;; no restrictions on the names of symbols that represent faces -- + ;; any characters may be in the name, even control chars. We try + ;; hard to beat the face name into shape, both esthetically and + ;; according to CSS1 specs. + (let ((name (downcase (symbol-name face)))) + (when (string-match "\\`font-lock-" name) + ;; font-lock-FOO-face -> FOO. + (setq name (replace-match "" t t name))) + (when (string-match "-face\\'" name) + ;; Drop the redundant "-face" suffix. + (setq name (replace-match "" t t name))) + (while (string-match "[^-a-zA-Z0-9]" name) + ;; Drop the non-alphanumerics. + (setq name (replace-match "X" t t name))) + (when (string-match "\\`[-0-9]" name) + ;; CSS identifiers may not start with a digit. + (setq name (concat "X" name))) + ;; After these transformations, the face could come out empty. + (when (equal name "") + (setq name "face")) + ;; Apply the prefix. + (concat htmlize-css-name-prefix name))) + +(defun htmlize-face-to-fstruct (face) + "Convert Emacs face FACE to fstruct." + (let ((fstruct (make-htmlize-fstruct + :foreground (htmlize-color-to-rgb + (htmlize-face-foreground face)) + :background (htmlize-color-to-rgb + (htmlize-face-background face))))) + (if htmlize-running-xemacs + ;; XEmacs doesn't provide a way to detect whether a face is + ;; bold or italic, so we need to examine the font instance. + (let* ((font-instance (face-font-instance face)) + (props (font-instance-properties font-instance))) + (when (equalp (cdr (assq 'WEIGHT_NAME props)) "bold") + (setf (htmlize-fstruct-boldp fstruct) t)) + (when (or (equalp (cdr (assq 'SLANT props)) "i") + (equalp (cdr (assq 'SLANT props)) "o")) + (setf (htmlize-fstruct-italicp fstruct) t)) + (setf (htmlize-fstruct-strikep fstruct) + (face-strikethru-p face)) + (setf (htmlize-fstruct-underlinep fstruct) + (face-underline-p face))) + ;; GNU Emacs + (dolist (attr '(:weight :slant :underline :overline :strike-through)) + (let ((value (face-attribute face attr nil t))) + (when (and value (not (eq value 'unspecified))) + (htmlize-face-set-from-keyword-attr fstruct attr value)))) + (let ((size (htmlize-face-size face))) + (unless (eql size 1.0) ; ignore non-spec + (setf (htmlize-fstruct-size fstruct) size)))) + (setf (htmlize-fstruct-css-name fstruct) (htmlize-face-css-name face)) + fstruct)) + +(defmacro htmlize-copy-attr-if-set (attr-list dest source) + ;; Generate code with the following pattern: + ;; (progn + ;; (when (htmlize-fstruct-ATTR source) + ;; (setf (htmlize-fstruct-ATTR dest) (htmlize-fstruct-ATTR source))) + ;; ...) + ;; for the given list of boolean attributes. + (cons 'progn + (loop for attr in attr-list + for attr-sym = (intern (format "htmlize-fstruct-%s" attr)) + collect `(when (,attr-sym ,source) + (setf (,attr-sym ,dest) (,attr-sym ,source)))))) + +(defun htmlize-merge-size (merged next) + ;; Calculate the size of the merge of MERGED and NEXT. + (cond ((null merged) next) + ((integerp next) next) + ((null next) merged) + ((floatp merged) (* merged next)) + ((integerp merged) (round (* merged next))))) + +(defun htmlize-merge-two-faces (merged next) + (htmlize-copy-attr-if-set + (foreground background boldp italicp underlinep overlinep strikep) + merged next) + (setf (htmlize-fstruct-size merged) + (htmlize-merge-size (htmlize-fstruct-size merged) + (htmlize-fstruct-size next))) + merged) + +(defun htmlize-merge-faces (fstruct-list) + (cond ((null fstruct-list) + ;; Nothing to do, return a dummy face. + (make-htmlize-fstruct)) + ((null (cdr fstruct-list)) + ;; Optimize for the common case of a single face, simply + ;; return it. + (car fstruct-list)) + (t + (reduce #'htmlize-merge-two-faces + (cons (make-htmlize-fstruct) fstruct-list))))) + +;; GNU Emacs 20+ supports attribute lists in `face' properties. For +;; example, you can use `(:foreground "red" :weight bold)' as an +;; overlay's "face", or you can even use a list of such lists, etc. +;; We call those "attrlists". +;; +;; htmlize supports attrlist by converting them to fstructs, the same +;; as with regular faces. + +(defun htmlize-attrlist-to-fstruct (attrlist) + ;; Like htmlize-face-to-fstruct, but accepts an ATTRLIST as input. + (let ((fstruct (make-htmlize-fstruct))) + (cond ((eq (car attrlist) 'foreground-color) + ;; ATTRLIST is (foreground-color . COLOR) + (setf (htmlize-fstruct-foreground fstruct) + (htmlize-color-to-rgb (cdr attrlist)))) + ((eq (car attrlist) 'background-color) + ;; ATTRLIST is (background-color . COLOR) + (setf (htmlize-fstruct-background fstruct) + (htmlize-color-to-rgb (cdr attrlist)))) + (t + ;; ATTRLIST is a plist. + (while attrlist + (let ((attr (pop attrlist)) + (value (pop attrlist))) + (when (and value (not (eq value 'unspecified))) + (htmlize-face-set-from-keyword-attr fstruct attr value)))))) + (setf (htmlize-fstruct-css-name fstruct) "ATTRLIST") + fstruct)) + +(defun htmlize-decode-face-prop (prop) + "Turn face property PROP into a list of face-like objects." + ;; PROP can be a symbol naming a face, a string naming such a + ;; symbol, a cons (foreground-color . COLOR) or (background-color + ;; COLOR), a property list (:attr1 val1 :attr2 val2 ...), or a list + ;; of any of those. + ;; + ;; (htmlize-decode-face-prop 'face) -> (face) + ;; (htmlize-decode-face-prop '(face1 face2)) -> (face1 face2) + ;; (htmlize-decode-face-prop '(:attr "val")) -> ((:attr "val")) + ;; (htmlize-decode-face-prop '((:attr "val") face (foreground-color "red"))) + ;; -> ((:attr "val") face (foreground-color "red")) + ;; + ;; Unrecognized atoms or non-face symbols/strings are silently + ;; stripped away. + (cond ((null prop) + nil) + ((symbolp prop) + (and (facep prop) + (list prop))) + ((stringp prop) + (and (facep (intern-soft prop)) + (list prop))) + ((atom prop) + nil) + ((and (symbolp (car prop)) + (eq ?: (aref (symbol-name (car prop)) 0))) + (list prop)) + ((or (eq (car prop) 'foreground-color) + (eq (car prop) 'background-color)) + (list prop)) + (t + (apply #'nconc (mapcar #'htmlize-decode-face-prop prop))))) + +(defun htmlize-make-face-map (faces) + ;; Return a hash table mapping Emacs faces to htmlize's fstructs. + ;; The keys are either face symbols or attrlists, so the test + ;; function must be `equal'. + (let ((face-map (make-hash-table :test 'equal)) + css-names) + (dolist (face faces) + (unless (gethash face face-map) + ;; Haven't seen FACE yet; convert it to an fstruct and cache + ;; it. + (let ((fstruct (if (symbolp face) + (htmlize-face-to-fstruct face) + (htmlize-attrlist-to-fstruct face)))) + (setf (gethash face face-map) fstruct) + (let* ((css-name (htmlize-fstruct-css-name fstruct)) + (new-name css-name) + (i 0)) + ;; Uniquify the face's css-name by using NAME-1, NAME-2, + ;; etc. + (while (member new-name css-names) + (setq new-name (format "%s-%s" css-name (incf i)))) + (unless (equal new-name css-name) + (setf (htmlize-fstruct-css-name fstruct) new-name)) + (push new-name css-names))))) + face-map)) + +(defun htmlize-unstringify-face (face) + "If FACE is a string, return it interned, otherwise return it unchanged." + (if (stringp face) + (intern face) + face)) + +(defun htmlize-faces-in-buffer () + "Return a list of faces used in the current buffer. +Under XEmacs, this returns the set of faces specified by the extents +with the `face' property. (This covers text properties as well.) Under +GNU Emacs, it returns the set of faces specified by the `face' text +property and by buffer overlays that specify `face'." + (let (faces) + ;; Testing for (fboundp 'map-extents) doesn't work because W3 + ;; defines `map-extents' under FSF. + (if htmlize-running-xemacs + (let (face-prop) + (map-extents (lambda (extent ignored) + (setq face-prop (extent-face extent) + ;; FACE-PROP can be a face or a list of + ;; faces. + faces (if (listp face-prop) + (union face-prop faces) + (adjoin face-prop faces))) + nil) + nil + ;; Specify endpoints explicitly to respect + ;; narrowing. + (point-min) (point-max) nil nil 'face)) + ;; FSF Emacs code. + ;; Faces used by text properties. + (let ((pos (point-min)) face-prop next) + (while (< pos (point-max)) + (setq face-prop (get-text-property pos 'face) + next (or (next-single-property-change pos 'face) (point-max))) + (setq faces (nunion (htmlize-decode-face-prop face-prop) + faces :test 'equal)) + (setq pos next))) + ;; Faces used by overlays. + (dolist (overlay (overlays-in (point-min) (point-max))) + (let ((face-prop (overlay-get overlay 'face))) + (setq faces (nunion (htmlize-decode-face-prop face-prop) + faces :test 'equal))))) + faces)) + +;; htmlize-faces-at-point returns the faces in use at point. The +;; faces are sorted by increasing priority, i.e. the last face takes +;; precedence. +;; +;; Under XEmacs, this returns all the faces in all the extents at +;; point. Under GNU Emacs, this returns all the faces in the `face' +;; property and all the faces in the overlays at point. + +(cond (htmlize-running-xemacs + (defun htmlize-faces-at-point () + (let (extent extent-list face-list face-prop) + (while (setq extent (extent-at (point) nil 'face extent)) + (push extent extent-list)) + ;; extent-list is in reverse display order, meaning that + ;; smallest ones come last. That is the order we want, + ;; except it can be overridden by the `priority' property. + (setq extent-list (stable-sort extent-list #'< + :key #'extent-priority)) + (dolist (extent extent-list) + (setq face-prop (extent-face extent)) + ;; extent's face-list is in reverse order from what we + ;; want, but the `nreverse' below will take care of it. + (setq face-list (if (listp face-prop) + (append face-prop face-list) + (cons face-prop face-list)))) + (nreverse face-list)))) + (t + (defun htmlize-faces-at-point () + (let (all-faces) + ;; Faces from text properties. + (let ((face-prop (get-text-property (point) 'face))) + ;; we need to reverse the `face' prop because we want + ;; more specific faces to come later + (setq all-faces (nreverse (htmlize-decode-face-prop face-prop)))) + ;; Faces from overlays. + (let ((overlays + ;; Collect overlays at point that specify `face'. + (delete-if-not (lambda (o) + (overlay-get o 'face)) + (overlays-at (point)))) + list face-prop) + ;; Sort the overlays so the smaller (more specific) ones + ;; come later. The number of overlays at each one + ;; position should be very small, so the sort shouldn't + ;; slow things down. + (setq overlays (sort* overlays + ;; Sort by ascending... + #'< + ;; ...overlay size. + :key (lambda (o) + (- (overlay-end o) + (overlay-start o))))) + ;; Overlay priorities, if present, override the above + ;; established order. Larger overlay priority takes + ;; precedence and therefore comes later in the list. + (setq overlays (stable-sort + overlays + ;; Reorder (stably) by acending... + #'< + ;; ...overlay priority. + :key (lambda (o) + (or (overlay-get o 'priority) 0)))) + (dolist (overlay overlays) + (setq face-prop (overlay-get overlay 'face) + list (nconc (htmlize-decode-face-prop face-prop) list))) + ;; Under "Merging Faces" the manual explicitly states + ;; that faces specified by overlays take precedence over + ;; faces specified by text properties. + (setq all-faces (nconc all-faces list))) + all-faces)))) + +;; htmlize supports generating HTML in several flavors, some of which +;; use CSS, and others the element. We take an OO approach and +;; define "methods" that indirect to the functions that depend on +;; `htmlize-output-type'. The currently used methods are `doctype', +;; `insert-head', `body-tag', and `text-markup'. Not all output types +;; define all methods. +;; +;; Methods are called either with (htmlize-method METHOD ARGS...) +;; special form, or by accessing the function with +;; (htmlize-method-function 'METHOD) and calling (funcall FUNCTION). +;; The latter form is useful in tight loops because `htmlize-method' +;; conses. + +(defmacro htmlize-method (method &rest args) + ;; Expand to (htmlize-TYPE-METHOD ...ARGS...). TYPE is the value of + ;; `htmlize-output-type' at run time. + `(funcall (htmlize-method-function ',method) ,@args)) + +(defun htmlize-method-function (method) + ;; Return METHOD's function definition for the current output type. + ;; The returned object can be safely funcalled. + (let ((sym (intern (format "htmlize-%s-%s" htmlize-output-type method)))) + (indirect-function (if (fboundp sym) + sym + (let ((default (intern (concat "htmlize-default-" + (symbol-name method))))) + (if (fboundp default) + default + 'ignore)))))) + +(defvar htmlize-memoization-table (make-hash-table :test 'equal)) + +(defmacro htmlize-memoize (key generator) + "Return the value of GENERATOR, memoized as KEY. +That means that GENERATOR will be evaluated and returned the first time +it's called with the same value of KEY. All other times, the cached +\(memoized) value will be returned." + (let ((value (gensym))) + `(let ((,value (gethash ,key htmlize-memoization-table))) + (unless ,value + (setq ,value ,generator) + (setf (gethash ,key htmlize-memoization-table) ,value)) + ,value))) + +;;; Default methods. + +(defun htmlize-default-doctype () + nil ; no doc-string + ;; Note that the `font' output is technically invalid under this DTD + ;; because the DTD doesn't allow embedding in
.
+  ""
+  )
+
+(defun htmlize-default-body-tag (face-map)
+  nil					; no doc-string
+  face-map ; shut up the byte-compiler
+  "")
+
+;;; CSS based output support.
+
+;; Internal function; not a method.
+(defun htmlize-css-specs (fstruct)
+  (let (result)
+    (when (htmlize-fstruct-foreground fstruct)
+      (push (format "color: %s;" (htmlize-fstruct-foreground fstruct))
+	    result))
+    (when (htmlize-fstruct-background fstruct)
+      (push (format "background-color: %s;"
+		    (htmlize-fstruct-background fstruct))
+	    result))
+    (let ((size (htmlize-fstruct-size fstruct)))
+      (when (and size (not (eq htmlize-ignore-face-size t)))
+	(cond ((floatp size)
+	       (push (format "font-size: %d%%;" (* 100 size)) result))
+	      ((not (eq htmlize-ignore-face-size 'absolute))
+	       (push (format "font-size: %spt;" (/ size 10.0)) result)))))
+    (when (htmlize-fstruct-boldp fstruct)
+      (push "font-weight: bold;" result))
+    (when (htmlize-fstruct-italicp fstruct)
+      (push "font-style: italic;" result))
+    (when (htmlize-fstruct-underlinep fstruct)
+      (push "text-decoration: underline;" result))
+    (when (htmlize-fstruct-overlinep fstruct)
+      (push "text-decoration: overline;" result))
+    (when (htmlize-fstruct-strikep fstruct)
+      (push "text-decoration: line-through;" result))
+    (nreverse result)))
+
+(defun htmlize-css-insert-head (buffer-faces face-map)
+  (insert "    \n"))
+
+(defun htmlize-css-text-markup (fstruct-list buffer)
+  ;; Open the markup needed to insert text colored with FACES into
+  ;; BUFFER.  Return the function that closes the markup.
+
+  ;; In CSS mode, this is easy: just nest the text in one  tag for each face in FSTRUCT-LIST.
+  (dolist (fstruct fstruct-list)
+    (princ "" buffer))
+  (htmlize-lexlet ((fstruct-list fstruct-list) (buffer buffer))
+    (lambda ()
+      (dolist (fstruct fstruct-list)
+        (ignore fstruct)                ; shut up the byte-compiler
+        (princ "" buffer)))))
+
+;; `inline-css' output support.
+
+(defun htmlize-inline-css-body-tag (face-map)
+  (format ""
+	  (mapconcat #'identity (htmlize-css-specs (gethash 'default face-map))
+		     " ")))
+
+(defun htmlize-inline-css-text-markup (fstruct-list buffer)
+  (let* ((merged (htmlize-merge-faces fstruct-list))
+	 (style (htmlize-memoize
+		 merged
+		 (let ((specs (htmlize-css-specs merged)))
+		   (and specs
+			(mapconcat #'identity (htmlize-css-specs merged) " "))))))
+    (when style
+      (princ "" buffer))
+    (htmlize-lexlet ((style style) (buffer buffer))
+      (lambda ()
+        (when style
+          (princ "" buffer))))))
+
+;;; `font' tag based output support.
+
+(defun htmlize-font-body-tag (face-map)
+  (let ((fstruct (gethash 'default face-map)))
+    (format ""
+	    (htmlize-fstruct-foreground fstruct)
+	    (htmlize-fstruct-background fstruct))))
+       
+(defun htmlize-font-text-markup (fstruct-list buffer)
+  ;; In `font' mode, we use the traditional HTML means of altering
+  ;; presentation:  tag for colors,  for bold,  for
+  ;; underline, and  for strike-through.
+  (let* ((merged (htmlize-merge-faces fstruct-list))
+	 (markup (htmlize-memoize
+		  merged
+		  (cons (concat
+			 (and (htmlize-fstruct-foreground merged)
+			      (format "" (htmlize-fstruct-foreground merged)))
+			 (and (htmlize-fstruct-boldp merged)      "")
+			 (and (htmlize-fstruct-italicp merged)    "")
+			 (and (htmlize-fstruct-underlinep merged) "")
+			 (and (htmlize-fstruct-strikep merged)    ""))
+			(concat
+			 (and (htmlize-fstruct-strikep merged)    "")
+			 (and (htmlize-fstruct-underlinep merged) "")
+			 (and (htmlize-fstruct-italicp merged)    "")
+			 (and (htmlize-fstruct-boldp merged)      "")
+			 (and (htmlize-fstruct-foreground merged) ""))))))
+    (princ (car markup) buffer)
+    (htmlize-lexlet ((markup markup) (buffer buffer))
+      (lambda ()
+        (princ (cdr markup) buffer)))))
+
+(defun htmlize-buffer-1 ()
+  ;; Internal function; don't call it from outside this file.  Htmlize
+  ;; current buffer, writing the resulting HTML to a new buffer, and
+  ;; return it.  Unlike htmlize-buffer, this doesn't change current
+  ;; buffer or use switch-to-buffer.
+  (save-excursion
+    ;; Protect against the hook changing the current buffer.
+    (save-excursion
+      (run-hooks 'htmlize-before-hook))
+    ;; Convince font-lock support modes to fontify the entire buffer
+    ;; in advance.
+    (htmlize-ensure-fontified)
+    (clrhash htmlize-extended-character-cache)
+    (clrhash htmlize-memoization-table)
+    ;; It's important that the new buffer inherits default-directory
+    ;; from the current buffer.
+    (let ((htmlbuf (generate-new-buffer (if (buffer-file-name)
+                                            (htmlize-make-file-name
+                                             (file-name-nondirectory
+                                              (buffer-file-name)))
+                                          "*html*")))
+          (completed nil))
+      (unwind-protect
+          (let* ((buffer-faces (htmlize-faces-in-buffer))
+                 (face-map (htmlize-make-face-map (adjoin 'default buffer-faces)))
+                 (places (gensym))
+                 (title (if (buffer-file-name)
+                            (file-name-nondirectory (buffer-file-name))
+                          (buffer-name))))
+            (when htmlize-generate-hyperlinks
+              (htmlize-create-auto-links))
+            (when htmlize-replace-form-feeds
+              (htmlize-shadow-form-feeds))
+
+            ;; Initialize HTMLBUF and insert the HTML prolog.
+            (with-current-buffer htmlbuf
+              (buffer-disable-undo)
+              (insert (htmlize-method doctype) ?\n
+                      (format "\n"
+                              htmlize-version htmlize-output-type)
+                      "\n  ")
+              (put places 'head-start (point-marker))
+              (insert "\n"
+                      "    " (htmlize-protect-string title) "\n"
+                      (if htmlize-html-charset
+                          (format (concat "    \n")
+                                  htmlize-html-charset)
+                        "")
+                      htmlize-head-tags)
+              (htmlize-method insert-head buffer-faces face-map)
+              (insert "  ")
+              (put places 'head-end (point-marker))
+              (insert "\n  ")
+              (put places 'body-start (point-marker))
+              (insert (htmlize-method body-tag face-map)
+                      "\n    ")
+              (put places 'content-start (point-marker))
+              (insert "
\n"))
+            (let ((text-markup
+                   ;; Get the inserter method, so we can funcall it inside
+                   ;; the loop.  Not calling `htmlize-method' in the loop
+                   ;; body yields a measurable speed increase.
+                   (htmlize-method-function 'text-markup))
+                  ;; Declare variables used in loop body outside the loop
+                  ;; because it's faster to establish `let' bindings only
+                  ;; once.
+                  next-change text face-list trailing-ellipsis
+                  fstruct-list last-fstruct-list
+                  (close-markup (lambda ())))
+              ;; This loop traverses and reads the source buffer, appending
+              ;; the resulting HTML to HTMLBUF.  This method is fast
+              ;; because: 1) it doesn't require examining the text
+              ;; properties char by char (htmlize-next-face-change is used
+              ;; to move between runs with the same face), and 2) it doesn't
+              ;; require frequent buffer switches, which are slow because
+              ;; they rebind all buffer-local vars.
+              (goto-char (point-min))
+              (while (not (eobp))
+                (setq next-change (htmlize-next-face-change (point)))
+                ;; Get faces in use between (point) and NEXT-CHANGE, and
+                ;; convert them to fstructs.
+                (setq face-list (htmlize-faces-at-point)
+                      fstruct-list (delq nil (mapcar (lambda (f)
+                                                       (gethash f face-map))
+                                                     face-list)))
+                (multiple-value-setq (text trailing-ellipsis)
+                  (htmlize-extract-text (point) next-change trailing-ellipsis))
+                ;; Don't bother writing anything if there's no text (this
+                ;; happens in invisible regions).
+                (when (> (length text) 0)
+                  ;; Open the new markup if necessary and insert the text.
+                  (when (not (equalp fstruct-list last-fstruct-list))
+                    (funcall close-markup)
+                    (setq last-fstruct-list fstruct-list
+                          close-markup (funcall text-markup fstruct-list htmlbuf)))
+                  (princ text htmlbuf))
+                (goto-char next-change))
+
+              ;; We've gone through the buffer; close the markup from
+              ;; the last run, if any.
+              (funcall close-markup))
+
+            ;; Insert the epilog and post-process the buffer.
+            (with-current-buffer htmlbuf
+              (insert "
") + (put places 'content-end (point-marker)) + (insert "\n ") + (put places 'body-end (point-marker)) + (insert "\n\n") + (htmlize-defang-local-variables) + (goto-char (point-min)) + (when htmlize-html-major-mode + ;; What sucks about this is that the minor modes, most notably + ;; font-lock-mode, won't be initialized. Oh well. + (funcall htmlize-html-major-mode)) + (set (make-local-variable 'htmlize-buffer-places) + (symbol-plist places)) + (run-hooks 'htmlize-after-hook) + (buffer-enable-undo)) + (setq completed t) + htmlbuf) + + (when (not completed) + (kill-buffer htmlbuf)) + (htmlize-delete-tmp-overlays))))) + +;; Utility functions. + +(defmacro htmlize-with-fontify-message (&rest body) + ;; When forcing fontification of large buffers in + ;; htmlize-ensure-fontified, inform the user that he is waiting for + ;; font-lock, not for htmlize to finish. + `(progn + (if (> (buffer-size) 65536) + (message "Forcing fontification of %s..." + (buffer-name (current-buffer)))) + ,@body + (if (> (buffer-size) 65536) + (message "Forcing fontification of %s...done" + (buffer-name (current-buffer)))))) + +(defun htmlize-ensure-fontified () + ;; If font-lock is being used, ensure that the "support" modes + ;; actually fontify the buffer. If font-lock is not in use, we + ;; don't care because, except in htmlize-file, we don't force + ;; font-lock on the user. + (when (and (boundp 'font-lock-mode) + font-lock-mode) + ;; In part taken from ps-print-ensure-fontified in GNU Emacs 21. + (cond + ((and (boundp 'jit-lock-mode) + (symbol-value 'jit-lock-mode)) + (htmlize-with-fontify-message + (jit-lock-fontify-now (point-min) (point-max)))) + ((and (boundp 'lazy-lock-mode) + (symbol-value 'lazy-lock-mode)) + (htmlize-with-fontify-message + (lazy-lock-fontify-region (point-min) (point-max)))) + ((and (boundp 'lazy-shot-mode) + (symbol-value 'lazy-shot-mode)) + (htmlize-with-fontify-message + ;; lazy-shot is amazing in that it must *refontify* the region, + ;; even if the whole buffer has already been fontified. + (lazy-shot-fontify-region (point-min) (point-max)))) + ;; There's also fast-lock, but we don't need to handle specially, + ;; I think. fast-lock doesn't really defer fontification, it + ;; just saves it to an external cache so it's not done twice. + ))) + + +;;;###autoload +(defun htmlize-buffer (&optional buffer) + "Convert BUFFER to HTML, preserving colors and decorations. + +The generated HTML is available in a new buffer, which is returned. +When invoked interactively, the new buffer is selected in the current +window. The title of the generated document will be set to the buffer's +file name or, if that's not available, to the buffer's name. + +Note that htmlize doesn't fontify your buffers, it only uses the +decorations that are already present. If you don't set up font-lock or +something else to fontify your buffers, the resulting HTML will be +plain. Likewise, if you don't like the choice of colors, fix the mode +that created them, or simply alter the faces it uses." + (interactive) + (let ((htmlbuf (with-current-buffer (or buffer (current-buffer)) + (htmlize-buffer-1)))) + (when (interactive-p) + (switch-to-buffer htmlbuf)) + htmlbuf)) + +;;;###autoload +(defun htmlize-region (beg end) + "Convert the region to HTML, preserving colors and decorations. +See `htmlize-buffer' for details." + (interactive "r") + ;; Don't let zmacs region highlighting end up in HTML. + (when (fboundp 'zmacs-deactivate-region) + (zmacs-deactivate-region)) + (let ((htmlbuf (save-restriction + (narrow-to-region beg end) + (htmlize-buffer-1)))) + (when (interactive-p) + (switch-to-buffer htmlbuf)) + htmlbuf)) + +(defun htmlize-region-for-paste (beg end) + "Htmlize the region and return just the HTML as a string. +This forces the `inline-css' style and only returns the HTML body, +but without the BODY tag. This should make it useful for inserting +the text to another HTML buffer." + (let* ((htmlize-output-type 'inline-css) + (htmlbuf (htmlize-region beg end))) + (unwind-protect + (with-current-buffer htmlbuf + (buffer-substring (plist-get htmlize-buffer-places 'content-start) + (plist-get htmlize-buffer-places 'content-end))) + (kill-buffer htmlbuf)))) + +(defun htmlize-make-file-name (file) + "Make an HTML file name from FILE. + +In its default implementation, this simply appends `.html' to FILE. +This function is called by htmlize to create the buffer file name, and +by `htmlize-file' to create the target file name. + +More elaborate transformations are conceivable, such as changing FILE's +extension to `.html' (\"file.c\" -> \"file.html\"). If you want them, +overload this function to do it and htmlize will comply." + (concat file ".html")) + +;; Older implementation of htmlize-make-file-name that changes FILE's +;; extension to ".html". +;(defun htmlize-make-file-name (file) +; (let ((extension (file-name-extension file)) +; (sans-extension (file-name-sans-extension file))) +; (if (or (equal extension "html") +; (equal extension "htm") +; (equal sans-extension "")) +; (concat file ".html") +; (concat sans-extension ".html")))) + +;;;###autoload +(defun htmlize-file (file &optional target) + "Load FILE, fontify it, convert it to HTML, and save the result. + +Contents of FILE are inserted into a temporary buffer, whose major mode +is set with `normal-mode' as appropriate for the file type. The buffer +is subsequently fontified with `font-lock' and converted to HTML. Note +that, unlike `htmlize-buffer', this function explicitly turns on +font-lock. If a form of highlighting other than font-lock is desired, +please use `htmlize-buffer' directly on buffers so highlighted. + +Buffers currently visiting FILE are unaffected by this function. The +function does not change current buffer or move the point. + +If TARGET is specified and names a directory, the resulting file will be +saved there instead of to FILE's directory. If TARGET is specified and +does not name a directory, it will be used as output file name." + (interactive (list (read-file-name + "HTML-ize file: " + nil nil nil (and (buffer-file-name) + (file-name-nondirectory + (buffer-file-name)))))) + (let ((output-file (if (and target (not (file-directory-p target))) + target + (expand-file-name + (htmlize-make-file-name (file-name-nondirectory file)) + (or target (file-name-directory file))))) + ;; Try to prevent `find-file-noselect' from triggering + ;; font-lock because we'll fontify explicitly below. + (font-lock-mode nil) + (font-lock-auto-fontify nil) + (global-font-lock-mode nil) + ;; Ignore the size limit for the purposes of htmlization. + (font-lock-maximum-size nil) + ;; Disable font-lock support modes. This will only work in + ;; more recent Emacs versions, so htmlize-buffer-1 still needs + ;; to call htmlize-ensure-fontified. + (font-lock-support-mode nil)) + (with-temp-buffer + ;; Insert FILE into the temporary buffer. + (insert-file-contents file) + ;; Set the file name so normal-mode and htmlize-buffer-1 pick it + ;; up. Restore it afterwards so with-temp-buffer's kill-buffer + ;; doesn't complain about killing a modified buffer. + (let ((buffer-file-name file)) + ;; Set the major mode for the sake of font-lock. + (normal-mode) + (font-lock-mode 1) + (unless font-lock-mode + ;; In GNU Emacs (font-lock-mode 1) doesn't force font-lock, + ;; contrary to the documentation. This seems to work. + (font-lock-fontify-buffer)) + ;; htmlize the buffer and save the HTML. + (with-current-buffer (htmlize-buffer-1) + (unwind-protect + (progn + (run-hooks 'htmlize-file-hook) + (write-region (point-min) (point-max) output-file)) + (kill-buffer (current-buffer))))))) + ;; I haven't decided on a useful return value yet, so just return + ;; nil. + nil) + +;;;###autoload +(defun htmlize-many-files (files &optional target-directory) + "Convert FILES to HTML and save the corresponding HTML versions. + +FILES should be a list of file names to convert. This function calls +`htmlize-file' on each file; see that function for details. When +invoked interactively, you are prompted for a list of files to convert, +terminated with RET. + +If TARGET-DIRECTORY is specified, the HTML files will be saved to that +directory. Normally, each HTML file is saved to the directory of the +corresponding source file." + (interactive + (list + (let (list file) + ;; Use empty string as DEFAULT because setting DEFAULT to nil + ;; defaults to the directory name, which is not what we want. + (while (not (equal (setq file (read-file-name + "HTML-ize file (RET to finish): " + (and list (file-name-directory + (car list))) + "" t)) + "")) + (push file list)) + (nreverse list)))) + ;; Verify that TARGET-DIRECTORY is indeed a directory. If it's a + ;; file, htmlize-file will use it as target, and that doesn't make + ;; sense. + (and target-directory + (not (file-directory-p target-directory)) + (error "target-directory must name a directory: %s" target-directory)) + (dolist (file files) + (htmlize-file file target-directory))) + +;;;###autoload +(defun htmlize-many-files-dired (arg &optional target-directory) + "HTMLize dired-marked files." + (interactive "P") + (htmlize-many-files (dired-get-marked-files nil arg) target-directory)) + +(provide 'htmlize) + +;; Local Variables: +;; byte-compile-warnings: (not cl-functions lexical unresolved obsolete) +;; lexical-binding: t +;; End: + +;;; htmlize.el ends here diff -r 000000000000 -r 2764b4f45f9f .emacs.d/inf-groovy.el --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.d/inf-groovy.el Mon Apr 21 04:30:59 2014 +0900 @@ -0,0 +1,349 @@ +;;; -*-Emacs-Lisp-*- +;;; +;;; Stuart Clayman sclayman@ee.ucl.ac.uk +;;; 2006-08-01 v1 +;;; 2010-04-07 v2 fixes for new groovy-mode +;;; +;;; Inferior Groovy Mode - groovy process in a buffer. +;;; adapted from cmuscheme.el and inf-haskell.el +;;; +;;; Usage: +;;; +;;; (1) modify .emacs to use groovy-mode +;;; for example : +;;; +;;; (autoload 'groovy-mode "groovy-mode" +;;; "Mode for editing groovy source files" t) +;;; (setq auto-mode-alist +;;; (append '(("\\.groovy$" . groovy-mode)) auto-mode-alist)) +;;; (setq interpreter-mode-alist (append '(("groovy" . groovy-mode)) +;;; interpreter-mode-alist)) +;;; +;;; (2) set to load inf-groovy and set inf-groovy key definition in groovy-mode. +;;; +;;; (autoload 'groovy-mode "groovy-mode" "Groovy mode." t) +;;; (autoload 'run-groovy "inf-groovy" "Run an inferior Groovy process") +;;; (autoload 'inf-groovy-keys "inf-groovy" "Set local key defs for inf-groovy in groovy-mode") +;;; +;;; (add-hook 'groovy-mode-hook +;;; '(lambda () +;;; (inf-groovy-keys) +;;; )) +;;; +;;; ;; can set groovy-home here, if not in environment +;;; (setq inferior-groovy-mode-hook +;;; '(lambda() +;;; (setq groovy-home "/Users/sclayman/Downloads/groovy-1.7.1/") +;;; )) +;;; +;;; (3) execute +;;; M-x run-groovy +;;; + +(require 'comint) +(require 'compile) +(require 'groovy-mode) + +;;;; for groovy +(defvar groovy-home (getenv "GROOVY_HOME")) + +(defvar groovy-program-name "groovysh --color=false" + "*Program invoked by the run-groovy command") + +(defvar inferior-groovy-first-prompt-pattern "^groovy:.*> *" + "first prompt regex pattern of groovy interpreter.") + +(defvar inferior-groovy-prompt-pattern "^groovy:.*> *" + "prompt regex pattern of groovy interpreter.") + +;; +;; mode variables +;; +(defvar inferior-groovy-mode-hook nil + "*Hook for customising inferior-groovy mode.") + +(defvar inferior-groovy-mode-map nil + "*Mode map for inferior-groovy-mode") + +(defconst inferior-groovy-error-regexp-alist + '(("SyntaxError: compile error\n^\\([^\(].*\\):\\([1-9][0-9]*\\):" 1 2) + ("^\tfrom \\([^\(].*\\):\\([1-9][0-9]*\\)\\(:in `.*'\\)?$" 1 2))) + +(cond ((not inferior-groovy-mode-map) + (setq inferior-groovy-mode-map + (copy-keymap comint-mode-map)) +; (define-key inferior-groovy-mode-map "\M-\C-x" ;gnu convention +; 'groovy-send-definition) +; (define-key inferior-groovy-mode-map "\C-x\C-e" 'groovy-send-last-sexp) + (define-key inferior-groovy-mode-map "\C-c\C-l" 'groovy-load-file) + (define-key inferior-groovy-mode-map "\C-c\C-m" 'inferior-groovy-newline-and-go) +)) + +(defun inf-groovy-keys () + "Set local key defs for inf-groovy in groovy-mode" + (define-key groovy-mode-map "\M-\C-x" 'groovy-send-definition) + (define-key groovy-mode-map "\C-x\C-e" 'groovy-send-last-sexp) + ;;(define-key groovy-mode-map "\C-c\M-b" 'groovy-send-block) + ;;(define-key groovy-mode-map "\C-c\C-b" 'groovy-send-block-and-go) + (define-key groovy-mode-map "\C-c\M-d" 'groovy-send-definition) + (define-key groovy-mode-map "\C-c\C-x" 'groovy-send-definition-and-go) + (define-key groovy-mode-map "\C-c\C-x" 'groovy-send-definition-and-go) + (define-key groovy-mode-map "\C-c\M-r" 'groovy-send-region) + (define-key groovy-mode-map "\C-c\C-r" 'groovy-send-region-and-go) + (define-key groovy-mode-map "\C-c\C-z" 'switch-to-groovy) + (define-key groovy-mode-map "\C-c\C-l" 'groovy-load-file) + (define-key groovy-mode-map "\C-c\C-s" 'run-groovy) +) + +(defvar groovy-buffer nil "current groovy (actually groovysh) process buffer.") + +(defun inferior-groovy-mode () + "Major mode for interacting with an inferior groovy (groovysh) process. + +The following commands are available: +\\{inferior-groovy-mode-map} + +A groovy process can be fired up with M-x run-groovy. + +Customisation: Entry to this mode runs the hooks on comint-mode-hook and +inferior-groovy-mode-hook (in that order). + +You can send text to the inferior groovy process from other buffers containing +Groovy source. + switch-to-groovy switches the current buffer to the groovy process buffer. + groovy-send-definition sends the current definition to the groovy process. + groovy-send-region sends the current region to the groovy process. + + groovy-send-definition-and-go, groovy-send-region-and-go, + switch to the groovy process buffer after sending their text. +For information on running multiple processes in multiple buffers, see +documentation for variable groovy-buffer. + +Commands: +Return after the end of the process' output sends the text from the + end of process to point. +Return before the end of the process' output copies the sexp ending at point + to the end of the process' output, and sends it. +Delete converts tabs to spaces as it moves back. +Tab indents for groovy; with argument, shifts rest + of expression rigidly with the current line. +C-M-q does Tab on each line starting within following expression. +Paragraphs are separated only by blank lines. # start comments. +If you accidentally suspend your process, use \\[comint-continue-subjob] +to continue it." + (interactive) + (comint-mode) + ;; Customise in inferior-groovy-mode-hook + (setq comint-prompt-regexp inferior-groovy-prompt-pattern) + ;; (groovy-mode-variables) + (setq major-mode 'inferior-groovy-mode) + (setq mode-name "Inferior Groovy") + (setq mode-line-process '(":%s")) + (use-local-map inferior-groovy-mode-map) + (define-key inferior-groovy-mode-map "\C-c\C-m" 'inferior-groovy-newline-and-go) + (setq comint-input-filter (function groovy-input-filter)) + (setq comint-get-old-input (function groovy-get-old-input)) + (setq comint-use-prompt-regexp t) ;; added v2 + (setq comint-process-echoes t) ;; added v2 + (setq comint-eol-on-send t) ;; added v2 + (compilation-shell-minor-mode t) + (make-local-variable 'compilation-error-regexp-alist) + (setq compilation-error-regexp-alist inferior-groovy-error-regexp-alist) + (run-hooks 'inferior-groovy-mode-hook)) + +(defvar inferior-groovy-filter-regexp "\\`\\s *\\S ?\\S ?\\s *\\'" + "*Input matching this regexp are not saved on the history list. +Defaults to a regexp ignoring all inputs of 0, 1, or 2 letters.") + +(defun inferior-groovy-newline-and-go() + (interactive) + (comint-send-input) + (let ((proc (groovy-proc))) + (comint-send-string proc "go\n"))) + +(defun groovy-input-filter (str) + "Don't save anything matching inferior-groovy-filter-regexp" + (not (string-match inferior-groovy-filter-regexp str))) + +;; adapted from replace-in-string in XEmacs (subr.el) +(defun remove-in-string (str regexp) + "Remove all matches in STR for REGEXP and returns the new string." + (let ((rtn-str "") (start 0) match prev-start) + (while (setq match (string-match regexp str start)) + (setq prev-start start + start (match-end 0) + rtn-str (concat rtn-str (substring str prev-start match)))) + (concat rtn-str (substring str start)))) + +(defun groovy-get-old-input () + "Snarf the sexp ending at point" + (save-excursion + (let ((end (point))) + (re-search-backward inferior-groovy-first-prompt-pattern) + (remove-in-string (buffer-substring (point) end) + inferior-groovy-prompt-pattern) + ))) + +(defun groovy-args-to-list (string) + (let ((where (string-match "[ \t]" string))) + (cond ((null where) (list string)) + ((not (= where 0)) + (cons (substring string 0 where) + (groovy-args-to-list (substring string (+ 1 where) + (length string))))) + (t (let ((pos (string-match "[^ \t]" string))) + (if (null pos) + nil + (groovy-args-to-list (substring string pos + (length string))))))))) + +(defun run-groovy (cmd) + "Run an inferior Groovy process, input and output via buffer *groovy*. +If there is a process already running in `*groovy*', switch to that buffer. +With argument, allows you to edit the command line (default is value +of `groovy-program-name'). Runs the hooks `inferior-groovy-mode-hook' +\(after the `comint-mode-hook' is run). +\(Type \\[describe-mode] in the process buffer for a list of commands.)" + + (interactive (list (if current-prefix-arg + (read-string "Run Groovy: " groovy-program-name) + (concat groovy-home "/bin/" groovy-program-name)))) + (if (not (comint-check-proc "*groovy*")) + (let ((cmdlist (groovy-args-to-list cmd))) + (set-buffer (apply 'make-comint "groovy" (car cmdlist) + nil (cdr cmdlist))) + (inferior-groovy-mode))) + ;(setq groovy-program-name cmd) + (setq groovy-buffer "*groovy*") + (pop-to-buffer "*groovy*") + (get-buffer-process groovy-buffer) + ) + + +(defun groovy-proc () + "Returns the current groovy process. See variable groovy-buffer." + (let ((proc (get-buffer-process (if (eq major-mode 'inferior-groovy-mode) + (current-buffer) + groovy-buffer)))) + (or proc + (call-interactively 'run-groovy)))) + + ;;; was (error "No current process. See variable groovy-buffer")))) + +(defun groovy-send-region (start end) + "Send the current region to the inferior Groovy process." + (interactive "r") + + (save-excursion + (save-restriction + (let (( str (concat (buffer-substring start end) "\n")) + (proc (groovy-proc))) + + (with-current-buffer (process-buffer proc) + (while (and + (goto-char comint-last-input-end) + (not (re-search-forward comint-prompt-regexp nil t)) + (accept-process-output proc))) + (goto-char (process-mark proc)) + (insert-before-markers str) + (move-marker comint-last-input-end (point)) + (comint-send-string proc str) + (comint-send-string proc "go\n") + ) + ) + ))) + + + +(defun groovy-send-definition () + "Send the current definition to the inferior Groovy process." + (interactive) + (save-excursion + (c-end-of-defun) + (let ((end (point))) + (c-beginning-of-defun) + (groovy-send-region (point) end)))) + +(defun groovy-send-last-sexp () + "Send the previous sexp to the inferior Groovy process." + (interactive) + (groovy-send-region (save-excursion (backward-sexp) (point)) (point))) + +;; v2. current groovy-mode does not support beginning-of-block, end-of-block +;; (defun groovy-send-block () +;; "Send the current block to the inferior Groovy process." +;; (interactive) +;; (save-excursion +;; (groovy-end-of-block) +;; (end-of-line) +;; (let ((end (point))) +;; (groovy-beginning-of-block) +;; (groovy-send-region (point) end)))) + +(defun switch-to-groovy (eob-p) + "Switch to the groovy process buffer. +With argument, positions cursor at end of buffer." + (interactive "P") + (if (get-buffer groovy-buffer) + (pop-to-buffer groovy-buffer) + (error "No current process buffer. See variable groovy-buffer.")) + (cond (eob-p + (push-mark) + (goto-char (point-max))))) + +(defun groovy-send-region-and-go (start end) + "Send the current region to the inferior Groovy process. +Then switch to the process buffer." + (interactive "r") + (groovy-send-region start end) + + (switch-to-groovy t)) + +(defun groovy-send-definition-and-go () + "Send the current definition to the inferior Groovy. +Then switch to the process buffer." + (interactive) + (groovy-send-definition) + (switch-to-groovy t)) + +;; (defun groovy-send-block-and-go () +;; "Send the current block to the inferior Groovy. +;; Then switch to the process buffer." +;; (interactive) +;; (groovy-send-block) +;; (switch-to-groovy t)) + +(defvar groovy-source-modes '(groovy-mode) + "*Used to determine if a buffer contains Groovy source code. +If it's loaded into a buffer that is in one of these major modes, it's +considered a groovy source file by groovy-load-file. +Used by these commands to determine defaults.") + +(defvar groovy-prev-l/c-dir/file nil + "Caches the last (directory . file) pair. +Caches the last pair used in the last groovy-load-file command. +Used for determining the default in the +next one.") + +(defun groovy-load-file (file-name) + "Load a Groovy file into the inferior Groovy process." + (interactive (comint-get-source "Load Groovy file: " groovy-prev-l/c-dir/file + groovy-source-modes t)) ; T because LOAD + ; needs an exact name + (comint-check-source file-name) ; Check to see if buffer needs saved. + (setq groovy-prev-l/c-dir/file (cons (file-name-directory file-name) + (file-name-nondirectory file-name))) + (comint-send-string (groovy-proc) (concat "\\i " + file-name + "\n"))) +;;; Do the user's customisation... + +(defvar inf-groovy-load-hook nil + "This hook is run when inf-groovy is loaded in. +This is a good place to put keybindings.") + +(run-hooks 'inf-groovy-load-hook) + +(provide 'inf-groovy) + +;;; inf-groovy.el ends here