diff --git a/README b/README index 23f6b63..2e1132a 100755 --- a/README +++ b/README @@ -31,3 +31,7 @@ under the term of GNU FDL. Kuso IDE have these prequest softwares: * GNU Emacs + +3. Installation +=============== +Just run install.sh in its directory diff --git a/conf/bin/pyemacs.sh b/conf/bin/pyemacs.sh new file mode 100755 index 0000000..8eaa956 --- /dev/null +++ b/conf/bin/pyemacs.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +epylint "$1" 2>/dev/null +pyflakes "$1" +pep8 --ignore=E221,E701,E202 --repeat "$1" +true + diff --git a/conf/dotemacs b/conf/dotemacs new file mode 100644 index 0000000..964e944 --- /dev/null +++ b/conf/dotemacs @@ -0,0 +1,86 @@ +(add-to-list 'load-path "~/.emacs.d/") +(add-hook 'find-file-hook 'flymake-find-file-hook) + +(require 'auto-complete-config) +;;(require 'auto-complete) +(add-to-list 'ac-dictionary-directories "~/.emacs.d/ac-dict") +(ac-config-default) + +(global-auto-complete-mode t) +(setq tramp-default-method "ssh") + +(autoload 'python-mode "python-mode" "Python Mode." t) +(add-to-list 'auto-mode-alist '("\\.py\\'" . python-mode)) +(add-to-list 'interpreter-mode-alist '("python" . python-mode)) +(require 'python-mode) + +;; Enabling ropemacs +;;(require 'pymacs) +;;(pymacs-load "ropemacs" "rope-") + +(setq ropemacs-enable-shortcuts nil) +(setq ropemacs-local-prefix "C-c C-p") + + + + +(require 'yasnippet) +(yas/initialize) +(yas/load-directory "~/.emacs.d/snippets") + +(require 'color-theme) +(eval-after-load "color-theme" + '(progn + (color-theme-initialize) + (color-theme-arjen) + )) + +(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. + '(c-plugin nil) + ;'(color-theme-selection "Arjen" nil (color-theme_seldefcustom)) + '(developer-email "--EMAIL--") + '(developer-name "--FULLNAME--") + '(kuso-workspace "--WORKSPACE--") + '(face-font-family-alternatives (quote (("courier" "Monospace" "fixed") ("courier" "CMU Typewriter Text" "fixed") ("Sans Serif" "helv" "helvetica" "arial" "fixed") ("helv" "helvetica" "arial" "fixed")))) + '(inhibit-startup-screen t) + '(rng-nxml-auto-validate-flag nil)) +(custom-set-faces + ;; custom-set-faces was added by Custom. + ;; If you edit it by hand, you could mess it up, so be careful. + ;; Your init file should contain only one such instance. + ;; If there is more than one, they won't work right. + '(font-lock-comment-face ((t (:foreground "orange red")))) + '(font-lock-keyword-face ((t (:foreground "DeepSkyBlue1"))))) + +(require 'flymake) +(when (load "flymake" t) + (defun flymake-pyflakes-init () + (let* ((temp-file (flymake-init-create-temp-buffer-copy + 'flymake-create-temp-inplace)) + (local-file (file-relative-name + temp-file + (file-name-directory buffer-file-name)))) + (list "--ADDR--/pyemacs.sh" (list local-file)))) + (add-to-list 'flymake-allowed-file-name-masks + '("\\.py$" flymake-pyflakes-init))) +;; flymake shortkeys +(global-set-key (kbd "\C-x a") 'flymake-display-err-menu-for-current-line) +(global-set-key (kbd "\C-x p") 'flymake-goto-next-error) +(tool-bar-mode -1) +(scroll-bar-mode -1) +;;(require 'kuso-dpaste-mode) +(setq x-select-enable-clipboard t) +(column-number-mode t) +;; dabbrev configuration +(require 'ac-dabbrev) +(setq ac-sources + (list ac-source-dabbrev + )) +(global-set-key (kbd "") 'dabbrev-expand) + +(load-file "--KUSOHOME--/kuso-ide.el") +(kuso-mode) diff --git a/conf/emacs.d/abbrev_defs b/conf/emacs.d/abbrev_defs new file mode 100644 index 0000000..3c15e2d --- /dev/null +++ b/conf/emacs.d/abbrev_defs @@ -0,0 +1,54 @@ +;;-*-coding: emacs-mule;-*- +(define-abbrev-table 'Buffer-menu-mode-abbrev-table '()) + +(define-abbrev-table 'comint-mode-abbrev-table '()) + +(define-abbrev-table 'completion-list-mode-abbrev-table '()) + +(define-abbrev-table 'django-html-mode-abbrev-table '()) + +(define-abbrev-table 'django-mode-abbrev-table '()) + +(define-abbrev-table 'emacs-lisp-mode-abbrev-table '()) + +(define-abbrev-table 'fundamental-mode-abbrev-table '()) + +(define-abbrev-table 'global-abbrev-table '()) + +(define-abbrev-table 'lisp-mode-abbrev-table '()) + +(define-abbrev-table 'python-mode-abbrev-table '()) + +(define-abbrev-table 'rst-mode-abbrev-table + '( + ("con" ".. contents:: +.. + " nil 0) + ("cont" "[...]" nil 0) + ("contents" ".. contents:: +.. + " nil 0) + ("seq" " + +[...] + + " nil 0) + ("skip" " + +[...] + + " nil 0) + )) + +(define-abbrev-table 'snippet-mode-abbrev-table '()) + +(define-abbrev-table 'special-mode-abbrev-table '()) + +(define-abbrev-table 'text-mode-abbrev-table '()) + +(define-abbrev-table 'vc-hg-incoming-mode-abbrev-table '()) + +(define-abbrev-table 'vc-hg-log-view-mode-abbrev-table '()) + +(define-abbrev-table 'vc-hg-outgoing-mode-abbrev-table '()) + diff --git a/conf/emacs.d/ac-dabbrev.el b/conf/emacs.d/ac-dabbrev.el new file mode 100644 index 0000000..3f82987 --- /dev/null +++ b/conf/emacs.d/ac-dabbrev.el @@ -0,0 +1,125 @@ +;;; ac-dabbrev.el --- auto-complete.el source for dabbrev +;; -*- Mode: Emacs-Lisp -*- + +;; Copyright (C) 2009 by 101000code/101000LAB + +;; 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 St, Fifth Floor, Boston, MA 02110-1301 USA + +;; Version: 0.0.8 +;; Author: k1LoW (Kenichirou Oyama), +;; URL: http://code.101000lab.org, http://trac.codecheck.in + +;;; Install +;; Put this file into load-path'ed directory, and byte compile it if +;; desired. And put the following expression into your ~/.emacs. +;; +;; (require 'ac-dabbrev) +;; (setq ac-sources +;; (list ac-source-dabbrev +;; )) + +;;; Change Log +;; 0.0.8: fix parameter for auto-complete.el 1.0a +;; 0.0.7: fix parameter for auto-complete.el 0.3.0 +;; 0.0.6: fix face for auto-complete.el 0.2.0 +;; 0.0.5: add face. +;; 0.0.4: new valiable:ac-dabbrev-reset-char. this valiable is suga idea. this valiable reset count when this valiable have insert char. +;; new valiable:ac-dabbrev-reset-always. reset count when ac-candidates is nil and this valiable non-nil. +;; -.-.-: document typo fix. +;; 0.0.3: new valiable:ac-dabbrev-sort. sort expansions. +;; 0.0.2: new variable:ac-dabbrev-all-min-count. this valiable is anything-dabbrev-expand.el idea. +;; 0.0.1: ac-dabbrev.el 0.0.1 released. + +;;; Code: + +(eval-when-compile (require 'cl)) +(require 'auto-complete) +(require 'dabbrev) + +(defvar ac-dabbrev-all-min-count 4) + +(defvar ac-dabbrev-trigger-commands '(self-insert-command delete-backward-char) + "Increment count when this valiable is last-command") + +(defvar ac-dabbrev-reset-char nil + "Reset count when this valiable have insert char.") ;(setq ac-dabbrev-reset-char '("-")) + +(defvar ac-dabbrev-reset-always nil + "Non-nil means reset count when candidates is 0.") + +(defvar ac-dabbrev-sort nil) + +(defun ac-dabbrev-find-limit-expansions (abbrev limit ignore-case) + "Return a list of limit expansions of ABBREV. +If IGNORE-CASE is non-nil, accept matches which differ in case." + (let ((all-expansions nil) (i 0) + expansion) + (save-excursion + (goto-char (point-min)) + (while + (and (< i limit) + (setq expansion (dabbrev--find-expansion abbrev -1 ignore-case))) + (setq all-expansions (cons expansion all-expansions)) + (setq i (+ i 1))) + (if ac-dabbrev-sort + (sort all-expansions (lambda (s1 s2) (if (< (length s1) (length s2)) t nil))) + all-expansions)))) + +(defun ac-dabbrev-get-limit-candidates (abbrev &optional all) + (let ((dabbrev-check-other-buffers all)) + (dabbrev--reset-global-variables) + (ac-dabbrev-find-limit-expansions abbrev ac-candidate-max nil))) + +(lexical-let ((count 1)) + (defun ac-dabbrev-set-count () + (setq command-char last-command-char) + (if (memq last-command ac-dabbrev-trigger-commands) + (incf count) + (setq count 1)) + (if (and ac-dabbrev-reset-always + (not ac-candidates)) + (setq count 1)) + (loop for char in ac-dabbrev-reset-char + do (if (char-equal last-command-char (string-to-char char)) + (setq count 1))) + count)) + +(defun ac-dabbrev-get-candidates (abbrev) + (if (>= (ac-dabbrev-set-count) ac-dabbrev-all-min-count) + (ac-dabbrev-get-limit-candidates abbrev t) + (ac-dabbrev-get-limit-candidates abbrev nil))) + +(defvar ac-source-dabbrev + '((candidates + . (lambda () (all-completions ac-target (ac-dabbrev-get-candidates ac-target)))) + (candidate-face . ac-dabbrev-menu-face) + (selection-face . ac-dabbrev-selection-face)) + "Source for dabbrev") + +(defface ac-dabbrev-menu-face + '((t (:background "lightgray" :foreground "blue"))) + "Face for dabbrev candidate menu." + :group 'auto-complete) + +(defface ac-dabbrev-selection-face + '((t (:background "blue" :foreground "white"))) + "Face for the dabbrev selected candidate." + :group 'auto-complete) + +;; mode provide +(provide 'ac-dabbrev) + +;;; end +;;; ac-dabbrev.el ends here \ No newline at end of file diff --git a/conf/emacs.d/ac-dict/c++-mode b/conf/emacs.d/ac-dict/c++-mode new file mode 100644 index 0000000..e3cd8ae --- /dev/null +++ b/conf/emacs.d/ac-dict/c++-mode @@ -0,0 +1,74 @@ +and +and_eq +asm +auto +bitand +bitor +bool +break +case +catch +char +class +compl +const +const_cast +continue +default +delete +do +double +dynamic_cast +else +enum +explicit +export +extern +false +float +for +friend +goto +if +inline +int +long +mutable +namespace +new +not +not_eq +operator +or +or_eq +private +protected +public +register +reinterpret_cast +return +short +signed +sizeof +static +static_cast +struct +switch +template +this +throw +true +try +typedef +typeid +typename +union +unsigned +using +virtual +void +volatile +wchar_t +while +xor +xor_eq diff --git a/conf/emacs.d/ac-dict/c-mode b/conf/emacs.d/ac-dict/c-mode new file mode 100644 index 0000000..496f904 --- /dev/null +++ b/conf/emacs.d/ac-dict/c-mode @@ -0,0 +1,37 @@ +auto +_Bool +break +case +char +_Complex +const +continue +default +do +double +else +enum +extern +float +for +goto +if +_Imaginary +inline +int +long +register +restrict +return +short +signed +sizeof +static +struct +switch +typedef +union +unsigned +void +volatile +while diff --git a/conf/emacs.d/ac-dict/clojure-mode b/conf/emacs.d/ac-dict/clojure-mode new file mode 100644 index 0000000..16348ed --- /dev/null +++ b/conf/emacs.d/ac-dict/clojure-mode @@ -0,0 +1,475 @@ +*agent* +*clojure-version* +*command-line-args* +*compile-files* +*compile-path* +*err* +*file* +*flush-on-newline* +*in* +*ns* +*out* +*print-dup* +*print-length* +*print-level* +*print-meta* +*print-readably* +*read-eval* +*warn-on-reflection* +accessor +aclone +add-classpath +add-watch +agent +agent-error +agent-errors +aget +alength +alias +all-ns +alter +alter-meta! +alter-var-root +amap +ancestors +and +apply +areduce +array-map +aset +aset-boolean +aset-byte +aset-char +aset-double +aset-float +aset-int +aset-long +aset-short +assert +assoc +assoc! +assoc-in +associative? +atom +await +await-for +bases +bean +bigdec +bigint +binding +bit-and +bit-and-not +bit-clear +bit-flip +bit-not +bit-or +bit-set +bit-shift-left +bit-shift-right +bit-test +bit-xor +boolean +boolean-array +booleans +bound-fn +bound-fn* +butlast +byte +byte-array +bytes +case +cast +char +char-array +char-escape-string +char-name-string +char? +chars +class +class? +clear-agent-errors +clojure-version +coll? +comment +commute +comp +comparator +compare +compare-and-set! +compile +complement +concat +cond +condp +conj +conj! +cons +constantly +construct-proxy +contains? +count +counted? +create-ns +create-struct +cycle +dec +decimal? +declare +definline +defmacro +defmethod +defmulti +defn +defn- +defonce +defprotocol +defstruct +deftype +delay +delay? +deliver +deref +derive +descendants +disj +disj! +dissoc +dissoc! +distinct +distinct? +doall +doc +dorun +doseq +dosync +dotimes +doto +double +double-array +doubles +drop +drop-last +drop-while +dtype +empty +empty? +ensure +enumeration-seq +error-handler +error-mode +eval +even? +every? +extend +extend-class +extend-protocol +extend-type +extenders +extends? +false? +ffirst +file-seq +filter +find +find-doc +find-ns +find-var +first +float +float-array +float? +floats +flush +fn +fn? +fnext +for +force +format +future +future-call +future-cancel +future-cancelled? +future-done? +future? +gen-class +gen-interface +gensym +get +get-in +get-method +get-proxy-class +get-thread-bindings +get-validator +hash +hash-map +hash-set +identical? +identity +if-let +if-not +ifn? +import +in-ns +inc +init-proxy +instance? +int +int-array +integer? +interleave +intern +interpose +into +into-array +ints +io! +isa? +iterate +iterator-seq +juxt +key +keys +keyword +keyword? +last +lazy-cat +lazy-seq +let +letfn +line-seq +list +list* +list? +load +load-file +load-reader +load-string +loaded-libs +locking +long +long-array +longs +loop +macroexpand +macroexpand-1 +make-array +make-hierarchy +map +map? +mapcat +max +max-key +memfn +memoize +merge +merge-with +meta +methods +min +min-key +mod +name +namespace +neg? +newline +next +nfirst +nil? +nnext +not +not-any? +not-empty +not-every? +not= +ns +ns-aliases +ns-imports +ns-interns +ns-map +ns-name +ns-publics +ns-refers +ns-resolve +ns-unalias +ns-unmap +nth +nthnext +num +number? +object-array +odd? +or +parents +partial +partition +pcalls +peek +persistent! +pmap +pop +pop! +pop-thread-bindings +pos? +pr +pr-str +prefer-method +prefers +print +print-namespace-doc +print-str +printf +println +println-str +prn +prn-str +promise +proxy +proxy-mappings +proxy-super +push-thread-bindings +pvalues +quot +rand +rand-int +range +ratio? +rationalize +re-find +re-groups +re-matcher +re-matches +re-pattern +re-seq +read +read-line +read-string +reduce +ref +ref-history-count +ref-max-history +ref-min-history +ref-set +refer +refer-clojure +reify +release-pending-sends +rem +remove +remove-method +remove-ns +remove-watch +repeat +repeatedly +replace +replicate +require +reset! +reset-meta! +resolve +rest +restart-agent +resultset-seq +reverse +reversible? +rseq +rsubseq +satisfies? +second +select-keys +send +send-off +seq +seq? +seque +sequence +sequential? +set +set-error-handler! +set-error-mode! +set-validator! +set? +short +short-array +shorts +shutdown-agents +slurp +some +sort +sort-by +sorted-map +sorted-map-by +sorted-set +sorted-set-by +sorted? +special-form-anchor +special-symbol? +split-at +split-with +str +stream? +string? +struct +struct-map +subs +subseq +subvec +supers +swap! +symbol +symbol? +sync +syntax-symbol-anchor +take +take-last +take-nth +take-while +test +the-ns +time +to-array +to-array-2d +trampoline +transient +tree-seq +true? +type +unchecked-add +unchecked-dec +unchecked-divide +unchecked-inc +unchecked-multiply +unchecked-negate +unchecked-remainder +unchecked-subtract +underive +update-in +update-proxy +use +val +vals +var-get +var-set +var? +vary-meta +vec +vector +vector-of +vector? +when +when-first +when-let +when-not +while +with-bindings +with-bindings* +with-in-str +with-local-vars +with-meta +with-open +with-out-str +with-precision +xml-seq +zero? +zipmap \ No newline at end of file diff --git a/conf/emacs.d/ac-dict/css-mode b/conf/emacs.d/ac-dict/css-mode new file mode 100644 index 0000000..4ec8f7d --- /dev/null +++ b/conf/emacs.d/ac-dict/css-mode @@ -0,0 +1,747 @@ +!important +ActiveBorder +ActiveCaption +Alpha +AppWorkspace +Background +Barn +BasicImage +Blinds +Blur +ButtonFace +ButtonHighlight +ButtonShadow +ButtonText +CaptionText +CheckerBoard +Chroma +Compositor +CradientWipe +DXImageTransform +DropShadow +Emboss +Engrave +Fade +FlipH +FlipV +Glow +Gray +GrayText +Highlight +HighlightText +Hz +ICMFilter +InactiveBorder +InactiveCaption +InactiveCaptionText +InfoBackground +InfoText +Inset +Invert +Iris +Light +MaskFilter +Matrix +Menu +MenuText +Microsoft +MotionBlur +Pixelate +RadialWipe +RandomBars +RandomDissolve +RevealTrans +Scrollbar +Shadow +Slide +Spiral +Stretch +Strips +ThreeDDarkShadow +ThreeDFace +ThreeDHighlight +ThreeDLightShadow +ThreeDShadow +Wave +Wheel +Window +WindowFrame +WindowText +Xray +Zigzag +_azimuth +_background +_background-position-x +_background-position-y +_border +_bottom +_caption +_clear +_clip +_color +_content +_counter +_cue +_cursor +_direction +_display +_elevation +_empty +_filter +_filter:progid:DXImageTransform.Microsoft +_float +_font +_height +_ime +_ime-mode +_layout +_layout-flow +_layout-grid +_layout-grid-char +_layout-grid-line +_layout-grid-mode +_layout-grid-type +_left +_letter +_line +_line-break +_list +_margin +_orphans +_outline +_overflow +_overflow-x +_overflow-y +_padding +_page +_pause +_pitch +_play +_position +_quotes +_richness +_right +_ruby +_ruby-align +_ruby-overhang +_ruby-position +_scrollbar +_scrollbar-3dlight-color +_scrollbar-arrow-color +_scrollbar-base-color +_scrollbar-darkshadow-color +_scrollbar-face-color +_scrollbar-highlight-color +_scrollbar-track-color +_speak +_speech +_stress +_table +_text +_text-align-last +_text-autospace +_text-justify +_text-kashida-space +_text-overflow +_text-underline-position +_top +_unicode +_vertical +_visibility +_voice +_volume +_white +_widows +_width +_word +_word-break +_word-wrap +_writing +_writing-mode +_z +_zoom +above +active +adjust +after +aliceblue +align +always +antiquewhite +aqua +aquamarine +armenian +arrow +attachment +auto +autospace +avoid +azimuth +azure +background +background-attachment +background-color +background-image +background-position +background-repeat +bar +base +baseline +before +behind +beige +below +bidi +bidi-override +bisque +black +blanchedalmond +blink +block +blue +blueviolet +bold +bolder +border +border-bottom +border-bottom-color +border-bottom-style +border-bottom-width +border-collapse +border-color +border-left +border-left-color +border-left-style +border-left-width +border-right +border-right-color +border-right-style +border-right-width +border-spacing +border-style +border-top +border-top-color +border-top-style +border-top-width +border-width +both +bottom +box +break +brown +burlwood +cadetblue +capitalize +caps +caption +caption-side +cell +cells +center +center-left +center-right +char +chartreuse +chocolate +circle +cjk +cjk-ideographic +clear +clip +close +close-quote +cm +code +collapse +color +column +compact +condensed +content +continuous +coral +cornflowerblue +cornsilk +counter +counter-increment +counter-reset +crimson +crop +cross +crosshair +cue +cue-after +cue-before +cursive +cursor +cyan +darkblue +darkcyan +darkgoldenrod +darkgray +darkgreen +darkkhaki +darkmagenta +darkolivegreen +darkorange +darkorchid +darkred +darksalmon +darkseagreen +darkshadow +darkslateblue +darkslategray +darkturquoise +darkviolet +dashed +decimal +decimal-leading-zero +decoration +deeppink +deepskyblue +default +deg +digits +dimgray +direction +disc +display +dodgerblue +dotted +double +during +e +e-resize +elevation +em +embed +empty +empty-cells +ex +expanded +extra +extra-condensed +extra-expanded +face +family +fantasy +far +far-left +far-right +fast +faster +firebrick +first +first-child +first-letter +first-line +fixed +float +floralwhite +flow +focus +font +font-family +font-size +font-size-adjust +font-stretch +font-style +font-variant +font-weight +footer +forestgreen +fuchsia +gainsboro +georgian +ghostwhite +gold +goldenrod +gray +greek +green +greenyellow +grid +groove +group +header +hebrew +height +help +hidden +hide +high +higher +hiragana +hiragana-iroha +honeydew +hotpink +hover +icon +ideographic +image +in +increment +indent +index +indianred +indigo +inherit +inline +inline-block +inline-table +inset +inside +iroha +italic +item +ivory +justify +kHz +kashida +katakana +katakana-iroha +khaki +landscape +lang() +large +larger +last +latin +lavender +lavenderblush +lawngreen +layout +leading +left +left-side +leftwards +lenonchiffon +letter +letter-spacing +level +lightblue +lightcoral +lightcyan +lighter +lightgoldenrodyellow +lightgray +lightgreen +lightgrey +lightpink +lightsalmon +lightseagreen +lightskyblue +lightslategray +lightsteelblue +lightyellow +lime +limegreen +line +line-height +line-through +linen +link +list +list-item +list-style +list-style-image +list-style-position +list-style-type +loud +low +lower +lower-alpha +lower-greek +lower-latin +lower-roman +lowercase +ltr +magenta +margin +margin-bottom +margin-left +margin-right +margin-top +marker +marker-offset +marks +maroon +max +max-height +max-width +medium +mediumaquamarine +mediumblue +mediumorchid +mediumpurple +mediumseagreen +mediumslateblue +mediumspringgreen +mediumturquoise +mediumvioletred +menu +message +message-box +middle +midnightblue +min +min-height +min-width +mintcream +mistyrose +mix +mm +moccasin +mode +monospace +move +ms +n +n-resize +naby +narrower +navajowhite +ne +ne-resize +no +no-close-quote +no-open-quote +no-repeat +none +normal +nowrap +number +numeral +nw +nw-resize +oblique +offset +oldlace +olive +olivedrab +once +open +open-quote +orange +orangered +orchid +orphans +out +outline +outline-color +outline-style +outline-width +outset +outside +overflow +overhang +overline +override +padding +padding-bottom +padding-left +padding-right +padding-top +page +page-break-after +page-break-before +page-break-inside +palegoldenrod +palegreen +paleturquoise +palevioletred +papayawhip +pause +pause-after +pause-before +pc +peachpuff +peru +pink +pitch +pitch-range +play +play-during +plum +pointer +portarait +position +powderblue +pre +pre-line +pre-wrap +progid +progress +pt +punctuation +purple +px +quote +quotes +rad +range +rate +red +relative +repeat +repeat-x +repeat-y +reset +resize +richness +ridge +right +right-side +rightwards +roman +rosybrown +row +royalblue +rtl +run +run-in +s +s-resize +saddlebrown +salmon +sandybrown +sans-serif +scroll +se +se-resize +seagreen +seashell +semi +semi-condensed +semi-expanded +separate +serif +shadow +show +side +sienna +silent +silever +silver +size +skyblue +slateblue +slategray +slow +slower +small +small-caps +small-caption +smaller +snow +soft +solid +space +spacing +speak +speak-header +speak-numeral +speak-punctuation +specific +specific-voice +speech +speech-rate +spell +spell-out +springgreen +square +static +status +status-bar +steelblue +stress +stretch +style +sub +super +sw +sw-resize +table +table-caption +table-cell +table-column +table-column-group +table-footer-group +table-header-group +table-layout +table-row +table-row-group +tan +teal +text +text-align +text-bottom +text-decoration +text-indent +text-shadow +text-top +text-transform +thick +thin +thistle +through +tomato +top +track +transform +transparent +turquoise +type +ultra +ultra-condensed +ultra-expanded +underline +unicode +unicode-bidi +upper +upper-alpha +upper-latin +upper-roman +uppercase +variant +vertical +vertical-align +violet +visibility +visible +visited +voice +voice-family +volume +w +w-resize +wait +weight +wheat +white +white-space +whitesmoke +wider +widows +width +word +word-spacing +wrap +x +x-fast +x-high +x-large +x-loud +x-low +x-slow +x-small +x-soft +xx +xx-large +xx-small +y +yellow +yellowgreen +z +z-index +zero diff --git a/conf/emacs.d/ac-dict/java-mode b/conf/emacs.d/ac-dict/java-mode new file mode 100644 index 0000000..8ed3d04 --- /dev/null +++ b/conf/emacs.d/ac-dict/java-mode @@ -0,0 +1,50 @@ +abstract +assert +boolean +break +byte +case +catch +char +class +const +continue +default +do +double +else +enum +extends +final +finally +float +for +goto +if +implements +import +instanceof +int +interface +long +native +new +package +private +protected +public +return +short +static +strictfp +super +switch +synchronized +this +throw +throws +transient +try +void +volatile +while diff --git a/conf/emacs.d/ac-dict/javascript-mode b/conf/emacs.d/ac-dict/javascript-mode new file mode 100644 index 0000000..3d83f84 --- /dev/null +++ b/conf/emacs.d/ac-dict/javascript-mode @@ -0,0 +1,148 @@ +Anchor +Area +Array +Boolean +Button +Checkbox +Date +Document +Element +FileUpload +Form +Frame +Function +Hidden +History +Image +Infinity +JavaArray +JavaClass +JavaObject +JavaPackage +Link +Location +Math +MimeType +NaN +Navigator +Number +Object +Option +Packages +Password +Plugin +Radio +RegExp +Reset +Select +String +Submit +Text +Textarea +Window +alert +arguments +assign +blur +break +callee +caller +captureEvents +case +clearInterval +clearTimeout +close +closed +comment +confirm +constructor +continue +default +defaultStatus +delete +do +document +else +escape +eval +export +find +focus +for +frames +function +getClass +history +home +if +import +in +innerHeight +innerWidth +isFinite +isNan +java +label +length +location +locationbar +menubar +moveBy +moveTo +name +navigate +navigator +netscape +new +onBlur +onError +onFocus +onLoad +onUnload +open +opener +outerHeight +outerWidth +pageXoffset +pageYoffset +parent +parseFloat +parseInt +personalbar +print +prompt +prototype +ref +releaseEvents +resizeBy +resizeTo +return +routeEvent +scroll +scrollBy +scrollTo +scrollbars +self +setInterval +setTimeout +status +statusbar +stop +sun +switch +taint +this +toString +toolbar +top +typeof +unescape +untaint +unwatch +valueOf +var +void +watch +while +window +with diff --git a/conf/emacs.d/ac-dict/php-mode b/conf/emacs.d/ac-dict/php-mode new file mode 100644 index 0000000..04352d8 --- /dev/null +++ b/conf/emacs.d/ac-dict/php-mode @@ -0,0 +1,62 @@ +and +array +as +break +case +catch +cfunction +class +clone +const +continue +declare +default +die +do +echo +else +elseif +empty +enddeclare +endfor +endforeach +endif +endswitch +endwhile +eval +exit +extends +final +for +foreach +function +global +goto +if +implements +include +include_once +instanceof +interface +isset +list +namespace +new +old_function +or +print +private +protected +public +require +require_once +return +static +switch +throw +try +unset +use +var +while +xor diff --git a/conf/emacs.d/ac-dict/python-mode b/conf/emacs.d/ac-dict/python-mode new file mode 100644 index 0000000..33b4b32 --- /dev/null +++ b/conf/emacs.d/ac-dict/python-mode @@ -0,0 +1,104 @@ +__import__ +abs +and +any +apply +as +assert +basestring +bin +bool +break +buffer +class +cmp +coerce +complex +continue +def +del +delattr +dict +dir +divmod +elif +else +enumerate +eval +except +exec +execfile +file +filter +finally +float +for +format +from +frozenset +getattr +global +globals +hasattr +hash +help +hex +id +if +import +in +input +int +intern +is +isinstance +issubclass +iter +lambda +len +list +locals +long +map +max +min +next +not +object +oct +open +or +ord +pass +pow +print +print +property +raise +range +raw_input +reduce +reload +repr +return +reversed +round +set +setattr +slice +sorted +staticmethod +str +sum +super +try +tuple +type +unichr +unicode +vars +while +with +xrange +yield +zip diff --git a/conf/emacs.d/ac-dict/ruby-mode b/conf/emacs.d/ac-dict/ruby-mode new file mode 100644 index 0000000..90b4fc9 --- /dev/null +++ b/conf/emacs.d/ac-dict/ruby-mode @@ -0,0 +1,181 @@ +$! +$" +$$ +$& +$' +$* +$+ +$, +$-0 +$-F +$-I +$-K +$-a +$-d +$-i +$-l +$-p +$-v +$-w +$. +$/ +$0 +$1 +$10 +$11 +$2 +$3 +$4 +$5 +$6 +$7 +$8 +$9 +$: +$; +$< +$= +$> +$? +$@ +$DEBUG +$FILENAME +$KCODE +$LOADED_FEATURES +$LOAD_PATH +$PROGRAM_NAME +$SAFE +$VERBOSE +$\ +$_ +$` +$deferr +$defout +$stderr +$stdin +$stdout +$~ +ARGF +ARGV +Array +BEGIN +DATA +END +ENV +FALSE +Float +Integer +NIL +PLATFORM +RELEASE_DATE +RUBY_COPYRIGHT +RUBY_DESCRIPTION +RUBY_PATCHLEVEL +RUBY_PLATFORM +RUBY_RELEASE_DATE +RUBY_VERSION +SCRIPT_LINES__ +STDERR +STDIN +STDOUT +String +TOPLEVEL_BINDING +TRUE +VERSION +__method__ +` +abort +alias +and +at_exit +autoload +autoload? +begin +binding +block_given +break +callcc +caller +case +catch +chomp +chomp! +chop +chop +class +def +defined? +do +else +elsif +end +ensure +eval +exec +exit +exit! +fail +false +for +fork +format +getc +gets +global_variables +gsub +gsub! +if +in +iterator? +lambda +load +local_varaibles +loop +module +next +nil +not +open +or +p +printf +proc +putc +puts +raise +rand +readline +readlines +redo +require +require_relative +rescue +retry +return +scan +select +self +set_trace_func +sleep +split +sprintf +srand +sub +sub! +super +syscall +system +test +then +throw +trace_var +trap +true +undef +unless +until +untrace_var +warn +when +while +yield diff --git a/conf/emacs.d/ac-dict/scheme-mode b/conf/emacs.d/ac-dict/scheme-mode new file mode 100644 index 0000000..e5cca61 --- /dev/null +++ b/conf/emacs.d/ac-dict/scheme-mode @@ -0,0 +1,216 @@ +case-lambda +call/cc +class +define-class +exit-handler +field +import +inherit +init-field +interface +let*-values +let-values +let/ec +mixin +opt-lambda +override +protect +provide +public +rename +require +require-for-syntax +syntax +syntax-case +syntax-error +unit/sig +unless +when +with-syntax +and +begin +call-with-current-continuation +call-with-input-file +call-with-output-file +case +cond +define +define-syntax +delay +do +dynamic-wind +else +for-each +if +lambda +let +let* +let-syntax +letrec +letrec-syntax +map +or +syntax-rules +abs +acos +angle +append +apply +asin +assoc +assq +assv +atan +boolean? +caar +cadr +call-with-input-file +call-with-output-file +call-with-values +car +cdddar +cddddr +cdr +ceiling +char->integer +char-alphabetic? +char-ci<=? +char-ci=? +char-ci>? +char-downcase +char-lower-case? +char-numeric? +char-ready? +char-upcase +char-upper-case? +char-whitespace? +char<=? +char=? +char>? +char? +close-input-port +close-output-port +complex? +cons +cos +current-input-port +current-output-port +denominator +display +eof-object? +eq? +equal? +eqv? +eval +even? +exact->inexact +exact? +exp +expt +#f +floor +force +gcd +imag-part +inexact->exact +inexact? +input-port? +integer->char +integer? +interaction-environment +lcm +length +list +list->string +list->vector +list-ref +list-tail +list? +load +log +magnitude +make-polar +make-rectangular +make-string +make-vector +max +member +memq +memv +min +modulo +negative? +newline +not +null-environment +null? +number->string +number? +numerator +odd? +open-input-file +open-output-file +output-port? +pair? +peek-char +port? +positive? +procedure? +quasiquote +quote +quotient +rational? +rationalize +read +read-char +real-part +real? +remainder +reverse +round +scheme-report-environment +set! +set-car! +set-cdr! +sin +sqrt +string +string->list +string->number +string->symbol +string-append +string-ci<=? +string-ci=? +string-ci>? +string-copy +string-fill! +string-length +string-ref +string-set! +string<=? +string=? +string>? +string? +substring +symbol->string +symbol? +#t +tan +transcript-off +transcript-on +truncate +values +vector +vector->list +vector-fill! +vector-length +vector-ref +vector-set! diff --git a/conf/emacs.d/ac-dict/tcl-mode b/conf/emacs.d/ac-dict/tcl-mode new file mode 100644 index 0000000..07a1281 --- /dev/null +++ b/conf/emacs.d/ac-dict/tcl-mode @@ -0,0 +1,172 @@ +after +append +apply +array +auto_execok +auto_import +auto_load +auto_load_index +auto_mkindex +auto_mkindex_old +auto_qualify +auto_reset +bell +binary +bind +bindtags +break +button +canvas +case +catch +cd +chan +checkbutton +clipboard +clock +close +concat +continue +destroy +dict +encoding +entry +eof +error +eval +event +exec +exit +expr +fblocked +fconfigure +fcopy +file +fileevent +flush +focus +font +for +foreach +format +frame +gets +glob +global +grab +grid +if +image +incr +info +interp +join +label +labelframe +lappend +lassign +lindex +linsert +list +listbox +llength +load +lower +lrange +lrepeat +lreplace +lreverse +lsearch +lset +lsort +menu +menubutton +message +namespace +open +option +pack +package +panedwindow +pid +pkg_mkIndex +place +proc +puts +pwd +radiobutton +raise +read +regexp +registry +regsub +rename +return +scale +scan +scrollbar +seek +selection +set +socket +source +spinbox +split +string +subst +switch +tclLog +tclPkgSetup +tclPkgUnknown +tcl_findLibrary +tell +text +time +tk +tk_chooseColor +tk_chooseDirectory +tk_getOpenFile +tk_getSaveFile +tk_menuSetFocus +tk_messageBox +tk_popup +tk_textCopy +tk_textCut +tk_textPaste +tkwait +toplevel +ttk::button +ttk::checkbutton +ttk::combobox +ttk::entry +ttk::focusFirst +ttk::frame +ttk::label +ttk::labelframe +ttk::menubutton +ttk::notebook +ttk::paned +ttk::panedwindow +ttk::progressbar +ttk::radiobutton +ttk::scale +ttk::scrollbar +ttk::separator +ttk::setTheme +ttk::sizegrip +ttk::style +ttk::takefocus +ttk::themes +ttk::treeview +trace +unknown +unload +unset +update +uplevel +upvar +variable +vwait +while +winfo +wm diff --git a/conf/emacs.d/auto-complete-config.el b/conf/emacs.d/auto-complete-config.el new file mode 100644 index 0000000..ec44a9c --- /dev/null +++ b/conf/emacs.d/auto-complete-config.el @@ -0,0 +1,483 @@ +;;; auto-complete-config.el --- auto-complete additional configuations + +;; Copyright (C) 2009, 2010 Tomohiro Matsuyama + +;; Author: Tomohiro Matsuyama +;; Keywords: convenience +;; Version: 1.3.1 + +;; 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: + +;; + +;;; Code: + +(eval-when-compile + (require 'cl)) + +(require 'auto-complete) + + + +;;;; Additional sources + +;; imenu + +(defvar ac-imenu-index nil) + +(ac-clear-variable-every-10-minutes 'ac-imenu-index) + +(defun ac-imenu-candidates () + (loop with i = 0 + with stack = (progn + (unless (local-variable-p 'ac-imenu-index) + (make-local-variable 'ac-imenu-index)) + (or ac-imenu-index + (setq ac-imenu-index + (ignore-errors + (with-no-warnings + (imenu--make-index-alist)))))) + with result + while (and stack (or (not (integerp ac-limit)) + (< i ac-limit))) + for node = (pop stack) + if (consp node) + do + (let ((car (car node)) + (cdr (cdr node))) + (if (consp cdr) + (mapc (lambda (child) + (push child stack)) + cdr) + (when (and (stringp car) + (string-match (concat "^" (regexp-quote ac-prefix)) car)) + ;; Remove extra characters + (if (string-match "^.*\\(()\\|=\\|<>\\)$" car) + (setq car (substring car 0 (match-beginning 1)))) + (push car result) + (incf i)))) + finally return (nreverse result))) + +(ac-define-source imenu + '((depends imenu) + (candidates . ac-imenu-candidates) + (symbol . "s"))) + +;; gtags + +(defface ac-gtags-candidate-face + '((t (:background "lightgray" :foreground "navy"))) + "Face for gtags candidate" + :group 'auto-complete) + +(defface ac-gtags-selection-face + '((t (:background "navy" :foreground "white"))) + "Face for the gtags selected candidate." + :group 'auto-complete) + +(defun ac-gtags-candidate () + (ignore-errors + (split-string (shell-command-to-string (format "global -ci %s" ac-prefix)) "\n"))) + +(ac-define-source gtags + '((candidates . ac-gtags-candidate) + (candidate-face . ac-gtags-candidate-face) + (selection-face . ac-gtags-selection-face) + (requires . 3) + (symbol . "s"))) + +;; yasnippet + +(defface ac-yasnippet-candidate-face + '((t (:background "sandybrown" :foreground "black"))) + "Face for yasnippet candidate." + :group 'auto-complete) + +(defface ac-yasnippet-selection-face + '((t (:background "coral3" :foreground "white"))) + "Face for the yasnippet selected candidate." + :group 'auto-complete) + +(defun ac-yasnippet-table-hash (table) + (cond + ((fboundp 'yas/snippet-table-hash) + (yas/snippet-table-hash table)) + ((fboundp 'yas/table-hash) + (yas/table-hash table)))) + +(defun ac-yasnippet-table-parent (table) + (cond + ((fboundp 'yas/snippet-table-parent) + (yas/snippet-table-parent table)) + ((fboundp 'yas/table-parent) + (yas/table-parent table)))) + +(defun ac-yasnippet-candidate-1 (table) + (with-no-warnings + (let ((hashtab (ac-yasnippet-table-hash table)) + (parent (ac-yasnippet-table-parent table)) + candidates) + (maphash (lambda (key value) + (push key candidates)) + hashtab) + (setq candidates (all-completions ac-prefix (nreverse candidates))) + (if parent + (setq candidates + (append candidates (ac-yasnippet-candidate-1 parent)))) + candidates))) + +(defun ac-yasnippet-candidates () + (with-no-warnings + (if (fboundp 'yas/get-snippet-tables) + ;; >0.6.0 + (apply 'append (mapcar 'ac-yasnippet-candidate-1 (yas/get-snippet-tables major-mode))) + (let ((table + (if (fboundp 'yas/snippet-table) + ;; <0.6.0 + (yas/snippet-table major-mode) + ;; 0.6.0 + (yas/current-snippet-table)))) + (if table + (ac-yasnippet-candidate-1 table)))))) + +(ac-define-source yasnippet + '((depends yasnippet) + (candidates . ac-yasnippet-candidates) + (action . yas/expand) + (candidate-face . ac-yasnippet-candidate-face) + (selection-face . ac-yasnippet-selection-face) + (symbol . "a"))) + +;; semantic + +(defun ac-semantic-candidates (prefix) + (with-no-warnings + (delete "" ; semantic sometimes returns an empty string + (mapcar 'semantic-tag-name + (ignore-errors + (or (semantic-analyze-possible-completions + (semantic-analyze-current-context)) + (senator-find-tag-for-completion prefix))))))) + +(ac-define-source semantic + '((available . (or (require 'semantic-ia nil t) + (require 'semantic/ia nil t))) + (candidates . (ac-semantic-candidates ac-prefix)) + (prefix . c-dot-ref) + (requires . 0) + (symbol . "m"))) + +(ac-define-source semantic-raw + '((available . (or (require 'semantic-ia nil t) + (require 'semantic/ia nil t))) + (candidates . (ac-semantic-candidates ac-prefix)) + (symbol . "s"))) + +;; eclim + +(defun ac-eclim-candidates () + (with-no-warnings + (loop for c in (eclim/java-complete) + collect (nth 1 c)))) + +(ac-define-source eclim + '((candidates . ac-eclim-candidates) + (prefix . c-dot) + (requires . 0) + (symbol . "f"))) + +;; css + +;; Copied from company-css.el +(defconst ac-css-property-alist + ;; see http://www.w3.org/TR/CSS21/propidx.html + '(("azimuth" angle "left-side" "far-left" "left" "center-left" "center" + "center-right" "right" "far-right" "right-side" "behind" "leftwards" + "rightwards") + ("background" background-color background-image background-repeat + background-attachment background-position) + ("background-attachment" "scroll" "fixed") + ("background-color" color "transparent") + ("background-image" uri "none") + ("background-position" percentage length "left" "center" "right" percentage + length "top" "center" "bottom" "left" "center" "right" "top" "center" + "bottom") + ("background-repeat" "repeat" "repeat-x" "repeat-y" "no-repeat") + ("border" border-width border-style border-color) + ("border-bottom" border) + ("border-bottom-color" border-color) + ("border-bottom-style" border-style) + ("border-bottom-width" border-width) + ("border-collapse" "collapse" "separate") + ("border-color" color "transparent") + ("border-left" border) + ("border-left-color" border-color) + ("border-left-style" border-style) + ("border-left-width" border-width) + ("border-right" border) + ("border-right-color" border-color) + ("border-right-style" border-style) + ("border-right-width" border-width) + ("border-spacing" length length) + ("border-style" border-style) + ("border-top" border) + ("border-top-color" border-color) + ("border-top-style" border-style) + ("border-top-width" border-width) + ("border-width" border-width) + ("bottom" length percentage "auto") + ("caption-side" "top" "bottom") + ("clear" "none" "left" "right" "both") + ("clip" shape "auto") + ("color" color) + ("content" "normal" "none" string uri counter "attr()" "open-quote" + "close-quote" "no-open-quote" "no-close-quote") + ("counter-increment" identifier integer "none") + ("counter-reset" identifier integer "none") + ("cue" cue-before cue-after) + ("cue-after" uri "none") + ("cue-before" uri "none") + ("cursor" uri "*" "auto" "crosshair" "default" "pointer" "move" "e-resize" + "ne-resize" "nw-resize" "n-resize" "se-resize" "sw-resize" "s-resize" + "w-resize" "text" "wait" "help" "progress") + ("direction" "ltr" "rtl") + ("display" "inline" "block" "list-item" "run-in" "inline-block" "table" + "inline-table" "table-row-group" "table-header-group" "table-footer-group" + "table-row" "table-column-group" "table-column" "table-cell" + "table-caption" "none") + ("elevation" angle "below" "level" "above" "higher" "lower") + ("empty-cells" "show" "hide") + ("float" "left" "right" "none") + ("font" font-style font-variant font-weight font-size "/" line-height + font-family "caption" "icon" "menu" "message-box" "small-caption" + "status-bar") + ("font-family" family-name generic-family) + ("font-size" absolute-size relative-size length percentage) + ("font-style" "normal" "italic" "oblique") + ("font-variant" "normal" "small-caps") + ("font-weight" "normal" "bold" "bolder" "lighter" "100" "200" "300" "400" + "500" "600" "700" "800" "900") + ("height" length percentage "auto") + ("left" length percentage "auto") + ("letter-spacing" "normal" length) + ("line-height" "normal" number length percentage) + ("list-style" list-style-type list-style-position list-style-image) + ("list-style-image" uri "none") + ("list-style-position" "inside" "outside") + ("list-style-type" "disc" "circle" "square" "decimal" "decimal-leading-zero" + "lower-roman" "upper-roman" "lower-greek" "lower-latin" "upper-latin" + "armenian" "georgian" "lower-alpha" "upper-alpha" "none") + ("margin" margin-width) + ("margin-bottom" margin-width) + ("margin-left" margin-width) + ("margin-right" margin-width) + ("margin-top" margin-width) + ("max-height" length percentage "none") + ("max-width" length percentage "none") + ("min-height" length percentage) + ("min-width" length percentage) + ("orphans" integer) + ("outline" outline-color outline-style outline-width) + ("outline-color" color "invert") + ("outline-style" border-style) + ("outline-width" border-width) + ("overflow" "visible" "hidden" "scroll" "auto") + ("padding" padding-width) + ("padding-bottom" padding-width) + ("padding-left" padding-width) + ("padding-right" padding-width) + ("padding-top" padding-width) + ("page-break-after" "auto" "always" "avoid" "left" "right") + ("page-break-before" "auto" "always" "avoid" "left" "right") + ("page-break-inside" "avoid" "auto") + ("pause" time percentage) + ("pause-after" time percentage) + ("pause-before" time percentage) + ("pitch" frequency "x-low" "low" "medium" "high" "x-high") + ("pitch-range" number) + ("play-during" uri "mix" "repeat" "auto" "none") + ("position" "static" "relative" "absolute" "fixed") + ("quotes" string string "none") + ("richness" number) + ("right" length percentage "auto") + ("speak" "normal" "none" "spell-out") + ("speak-header" "once" "always") + ("speak-numeral" "digits" "continuous") + ("speak-punctuation" "code" "none") + ("speech-rate" number "x-slow" "slow" "medium" "fast" "x-fast" "faster" + "slower") + ("stress" number) + ("table-layout" "auto" "fixed") + ("text-align" "left" "right" "center" "justify") + ("text-decoration" "none" "underline" "overline" "line-through" "blink") + ("text-indent" length percentage) + ("text-transform" "capitalize" "uppercase" "lowercase" "none") + ("top" length percentage "auto") + ("unicode-bidi" "normal" "embed" "bidi-override") + ("vertical-align" "baseline" "sub" "super" "top" "text-top" "middle" + "bottom" "text-bottom" percentage length) + ("visibility" "visible" "hidden" "collapse") + ("voice-family" specific-voice generic-voice "*" specific-voice + generic-voice) + ("volume" number percentage "silent" "x-soft" "soft" "medium" "loud" + "x-loud") + ("white-space" "normal" "pre" "nowrap" "pre-wrap" "pre-line") + ("widows" integer) + ("width" length percentage "auto") + ("word-spacing" "normal" length) + ("z-index" "auto" integer)) + "A list of CSS properties and their possible values.") + +(defconst ac-css-value-classes + '((absolute-size "xx-small" "x-small" "small" "medium" "large" "x-large" + "xx-large") + (border-style "none" "hidden" "dotted" "dashed" "solid" "double" "groove" + "ridge" "inset" "outset") + (color "aqua" "black" "blue" "fuchsia" "gray" "green" "lime" "maroon" "navy" + "olive" "orange" "purple" "red" "silver" "teal" "white" "yellow" + "rgb") + (counter "counter") + (family-name "Courier" "Helvetica" "Times") + (generic-family "serif" "sans-serif" "cursive" "fantasy" "monospace") + (generic-voice "male" "female" "child") + (margin-width "auto") ;; length percentage + (relative-size "larger" "smaller") + (shape "rect") + (uri "url")) + "A list of CSS property value classes and their contents.") + +(defconst ac-css-pseudo-classes + '("active" "after" "before" "first" "first-child" "first-letter" "first-line" + "focus" "hover" "lang" "left" "link" "right" "visited") + "Identifiers for CSS pseudo-elements and pseudo-classes.") + +(defvar ac-css-property nil + "Current editing property.") + +(defun ac-css-prefix () + (when (save-excursion (re-search-backward "\\_<\\(.+?\\)\\_>\\s *:.*\\=" nil t)) + (setq ac-css-property (match-string 1)) + (or (ac-prefix-symbol) (point)))) + +(defun ac-css-property-candidates () + (or (loop with list = (assoc-default ac-css-property ac-css-property-alist) + with seen = nil + with value + while (setq value (pop list)) + if (symbolp value) + do (unless (memq value seen) + (push value seen) + (setq list + (append list + (or (assoc-default value ac-css-value-classes) + (assoc-default (symbol-name value) ac-css-property-alist))))) + else collect value) + ac-css-pseudo-classes)) + +(defvar ac-source-css-property + '((candidates . ac-css-property-candidates) + (prefix . ac-css-prefix) + (requires . 0))) + + + +;;;; Not maintained sources + +;; ropemacs + +(defvar ac-ropemacs-loaded nil) +(defun ac-ropemacs-require () + (with-no-warnings + (unless ac-ropemacs-loaded + (pymacs-load "ropemacs" "rope-") + (if (boundp 'ropemacs-enable-autoimport) + (setq ropemacs-enable-autoimport t)) + (setq ac-ropemacs-loaded t)))) + +(defun ac-ropemacs-setup () + (ac-ropemacs-require) + ;(setq ac-sources (append (list 'ac-source-ropemacs) ac-sources)) + (setq ac-omni-completion-sources '(("\\." ac-source-ropemacs)))) + +(defun ac-ropemacs-initialize () + (autoload 'pymacs-apply "pymacs") + (autoload 'pymacs-call "pymacs") + (autoload 'pymacs-eval "pymacs" nil t) + (autoload 'pymacs-exec "pymacs" nil t) + (autoload 'pymacs-load "pymacs" nil t) + (add-hook 'python-mode-hook 'ac-ropemacs-setup) + t) + +(defvar ac-ropemacs-completions-cache nil) +(defvar ac-source-ropemacs + '((init + . (lambda () + (setq ac-ropemacs-completions-cache + (mapcar + (lambda (completion) + (concat ac-prefix completion)) + (ignore-errors + (rope-completions)))))) + (candidates . ac-ropemacs-completions-cache))) + +;; rcodetools + +(defvar ac-source-rcodetools + '((init . (lambda () + (require 'rcodetools) + (condition-case x + (save-excursion + (rct-exec-and-eval rct-complete-command-name "--completion-emacs-icicles")) + (error) (setq rct-method-completion-table nil)))) + (candidates . (lambda () + (all-completions + ac-prefix + (mapcar + (lambda (completion) + (replace-regexp-in-string "\t.*$" "" (car completion))) + rct-method-completion-table)))))) + + + +;;;; Default settings + +(defun ac-common-setup () + (add-to-list 'ac-sources 'ac-source-filename)) + +(defun ac-emacs-lisp-mode-setup () + (setq ac-sources (append '(ac-source-features ac-source-functions ac-source-yasnippet ac-source-variables ac-source-symbols) ac-sources))) + +(defun ac-cc-mode-setup () + (setq ac-sources (append '(ac-source-yasnippet ac-source-gtags) ac-sources))) + +(defun ac-ruby-mode-setup () + (make-local-variable 'ac-ignores) + (add-to-list 'ac-ignores "end")) + +(defun ac-css-mode-setup () + (setq ac-sources (append '(ac-source-css-property) ac-sources))) + +(defun ac-config-default () + (setq-default ac-sources '(ac-source-abbrev ac-source-dictionary ac-source-words-in-same-mode-buffers)) + (add-hook 'emacs-lisp-mode-hook 'ac-emacs-lisp-mode-setup) + (add-hook 'c-mode-common-hook 'ac-cc-mode-setup) + (add-hook 'ruby-mode-hook 'ac-ruby-mode-setup) + (add-hook 'css-mode-hook 'ac-css-mode-setup) + (add-hook 'auto-complete-mode-hook 'ac-common-setup) + (global-auto-complete-mode t)) + +(provide 'auto-complete-config) +;;; auto-complete-config.el ends here diff --git a/conf/emacs.d/auto-complete-config.elc b/conf/emacs.d/auto-complete-config.elc new file mode 100644 index 0000000..9c8d873 Binary files /dev/null and b/conf/emacs.d/auto-complete-config.elc differ diff --git a/conf/emacs.d/auto-complete.el b/conf/emacs.d/auto-complete.el new file mode 100644 index 0000000..286c2d4 --- /dev/null +++ b/conf/emacs.d/auto-complete.el @@ -0,0 +1,1897 @@ +;;; auto-complete.el --- Auto Completion for GNU Emacs + +;; Copyright (C) 2008, 2009, 2010 Tomohiro Matsuyama + +;; Author: Tomohiro Matsuyama +;; URL: http://cx4a.org/software/auto-complete +;; Keywords: completion, convenience +;; Version: 1.3.1 + +;; 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 extension provides a way to complete with popup menu like: +;; +;; def-!- +;; +-----------------+ +;; |defun::::::::::::| +;; |defvar | +;; |defmacro | +;; | ... | +;; +-----------------+ +;; +;; You can complete by typing and selecting menu. +;; +;; Entire documents are located in doc/ directory. +;; Take a look for information. +;; +;; Enjoy! + +;;; Code: + + + +(eval-when-compile + (require 'cl)) + +(require 'popup) + +;;;; Global stuff + +(defun ac-error (&optional var) + "Report an error and disable `auto-complete-mode'." + (ignore-errors + (message "auto-complete error: %s" var) + (auto-complete-mode -1) + var)) + + + +;;;; Customization + +(defgroup auto-complete nil + "Auto completion." + :group 'completion + :prefix "ac-") + +(defcustom ac-delay 0.1 + "Delay to completions will be available." + :type 'float + :group 'auto-complete) + +(defcustom ac-auto-show-menu 0.8 + "Non-nil means completion menu will be automatically shown." + :type '(choice (const :tag "Yes" t) + (const :tag "Never" nil) + (float :tag "Timer")) + :group 'auto-complete) + +(defcustom ac-show-menu-immediately-on-auto-complete t + "Non-nil means menu will be showed immediately on `auto-complete'." + :type 'boolean + :group 'auto-complete) + +(defcustom ac-expand-on-auto-complete t + "Non-nil means expand whole common part on first time `auto-complete'." + :type 'boolean + :group 'auto-complete) + +(defcustom ac-disable-faces '(font-lock-comment-face font-lock-string-face font-lock-doc-face) + "Non-nil means disable automatic completion on specified faces." + :type '(repeat symbol) + :group 'auto-complete) + +(defcustom ac-stop-flymake-on-completing t + "Non-nil means disble flymake temporarily on completing." + :type 'boolean + :group 'auto-complete) + +(defcustom ac-use-fuzzy t + "Non-nil means use fuzzy matching." + :type 'boolean + :group 'auto-complete) + +(defcustom ac-fuzzy-cursor-color "red" + "Cursor color in fuzzy mode." + :type 'string + :group 'auto-complete) + +(defcustom ac-use-comphist t + "Non-nil means use intelligent completion history." + :type 'boolean + :group 'auto-complete) + +(defcustom ac-comphist-threshold 0.7 + "Percentage of ignoring low scored candidates." + :type 'float + :group 'auto-complete) + +(defcustom ac-comphist-file + (expand-file-name (concat (if (boundp 'user-emacs-directory) + user-emacs-directory + "~/.emacs.d/") + "/ac-comphist.dat")) + "Completion history file name." + :type 'string + :group 'auto-complete) + +(defcustom ac-use-quick-help t + "Non-nil means use quick help." + :type 'boolean + :group 'auto-complete) + +(defcustom ac-quick-help-delay 1.5 + "Delay to show quick help." + :type 'float + :group 'auto-complete) + +(defcustom ac-menu-height 10 + "Max height of candidate menu." + :type 'integer + :group 'auto-complete) +(defvaralias 'ac-candidate-menu-height 'ac-menu-height) + +(defcustom ac-quick-help-height 20 + "Max height of quick help." + :type 'integer + :group 'auto-complete) + +(defcustom ac-quick-help-prefer-x t + "Prefer X tooltip than overlay popup for displaying quick help." + :type 'boolean + :group 'auto-complete) + +(defcustom ac-candidate-limit nil + "Limit number of candidates. Non-integer means no limit." + :type 'integer + :group 'auto-complete) +(defvaralias 'ac-candidate-max 'ac-candidate-limit) + +(defcustom ac-modes + '(emacs-lisp-mode + lisp-interaction-mode + c-mode cc-mode c++-mode + java-mode clojure-mode scala-mode + scheme-mode + ocaml-mode tuareg-mode + perl-mode cperl-mode python-mode ruby-mode + ecmascript-mode javascript-mode js-mode js2-mode php-mode css-mode + makefile-mode sh-mode fortran-mode f90-mode ada-mode + xml-mode sgml-mode) + "Major modes `auto-complete-mode' can run on." + :type '(repeat symbol) + :group 'auto-complete) + +(defcustom ac-compatible-packages-regexp + "^ac-" + "Regexp to indicate what packages can work with auto-complete." + :type 'string + :group 'auto-complete) + +(defcustom ac-trigger-commands + '(self-insert-command) + "Trigger commands that specify whether `auto-complete' should start or not." + :type '(repeat symbol) + :group 'auto-complete) + +(defcustom ac-trigger-commands-on-completing + '(delete-backward-char + backward-delete-char + backward-delete-char-untabify) + "Trigger commands that specify whether `auto-complete' should continue or not." + :type '(repeat symbol) + :group 'auto-complete) + +(defcustom ac-trigger-key nil + "Non-nil means `auto-complete' will start by typing this key. +If you specify this TAB, for example, `auto-complete' will start by typing TAB, +and if there is no completions, an original command will be fallbacked." + :type 'string + :group 'auto-complete + :set (lambda (symbol value) + (set-default symbol value) + (when (and value + (fboundp 'ac-set-trigger-key)) + (ac-set-trigger-key value)))) + +(defcustom ac-auto-start 2 + "Non-nil means completion will be started automatically. +Positive integer means if a length of a word you entered is larger than the value, +completion will be started automatically. +If you specify `nil', never be started automatically." + :type '(choice (const :tag "Yes" t) + (const :tag "Never" nil) + (integer :tag "Require")) + :group 'auto-complete) + +(defcustom ac-ignores nil + "List of string to ignore completion." + :type '(repeat string) + :group 'auto-complete) + +(defcustom ac-ignore-case 'smart + "Non-nil means auto-complete ignores case. +If this value is `smart', auto-complete ignores case only when +a prefix doen't contain any upper case letters." + :type '(choice (const :tag "Yes" t) + (const :tag "Smart" smart) + (const :tag "No" nil)) + :group 'auto-complete) + +(defcustom ac-dwim t + "Non-nil means `auto-complete' works based on Do What I Mean." + :type 'boolean + :group 'auto-complete) + +(defcustom ac-use-menu-map nil + "Non-nil means a special keymap `ac-menu-map' on completing menu will be used." + :type 'boolean + :group 'auto-complete) + +(defcustom ac-use-overriding-local-map nil + "Non-nil means `overriding-local-map' will be used to hack for overriding key events on auto-copletion." + :type 'boolean + :group 'auto-complete) + +(defface ac-completion-face + '((t (:foreground "darkgray" :underline t))) + "Face for inline completion" + :group 'auto-complete) + +(defface ac-candidate-face + '((t (:background "lightgray" :foreground "black"))) + "Face for candidate." + :group 'auto-complete) + +(defface ac-selection-face + '((t (:background "steelblue" :foreground "white"))) + "Face for selected candidate." + :group 'auto-complete) + +(defvar auto-complete-mode-hook nil + "Hook for `auto-complete-mode'.") + + + +;;;; Internal variables + +(defvar auto-complete-mode nil + "Dummy variable to suppress compiler warnings.") + +(defvar ac-cursor-color nil + "Old cursor color.") + +(defvar ac-inline nil + "Inline completion instance.") + +(defvar ac-menu nil + "Menu instance.") + +(defvar ac-show-menu nil + "Flag to show menu on timer tick.") + +(defvar ac-last-completion nil + "Cons of prefix marker and selected item of last completion.") + +(defvar ac-quick-help nil + "Quick help instance") + +(defvar ac-completing nil + "Non-nil means `auto-complete-mode' is now working on completion.") + +(defvar ac-buffer nil + "Buffer where auto-complete is started.") + +(defvar ac-point nil + "Start point of prefix.") + +(defvar ac-last-point nil + "Last point of updating pattern.") + +(defvar ac-prefix nil + "Prefix string.") +(defvaralias 'ac-target 'ac-prefix) + +(defvar ac-selected-candidate nil + "Last selected candidate.") + +(defvar ac-common-part nil + "Common part string of meaningful candidates. +If there is no common part, this will be nil.") + +(defvar ac-whole-common-part nil + "Common part string of whole candidates. +If there is no common part, this will be nil.") + +(defvar ac-prefix-overlay nil + "Overlay for prefix string.") + +(defvar ac-timer nil + "Completion idle timer.") + +(defvar ac-show-menu-timer nil + "Show menu idle timer.") + +(defvar ac-quick-help-timer nil + "Quick help idle timer.") + +(defvar ac-triggered nil + "Flag to update.") + +(defvar ac-limit nil + "Limit number of candidates for each sources.") + +(defvar ac-candidates nil + "Current candidates.") + +(defvar ac-candidates-cache nil + "Candidates cache for individual sources.") + +(defvar ac-fuzzy-enable nil + "Non-nil means fuzzy matching is enabled.") + +(defvar ac-dwim-enable nil + "Non-nil means DWIM completion will be allowed.") + +(defvar ac-mode-map (make-sparse-keymap) + "Auto-complete mode map. It is also used for trigger key command. See also `ac-trigger-key'.") + +(defvar ac-completing-map + (let ((map (make-sparse-keymap))) + (define-key map "\t" 'ac-expand) + (define-key map "\r" 'ac-complete) + (define-key map (kbd "M-TAB") 'auto-complete) + (define-key map "\C-s" 'ac-isearch) + + (define-key map "\M-n" 'ac-next) + (define-key map "\M-p" 'ac-previous) + (define-key map [down] 'ac-next) + (define-key map [up] 'ac-previous) + + (define-key map [f1] 'ac-help) + (define-key map [M-f1] 'ac-persist-help) + (define-key map (kbd "C-?") 'ac-help) + (define-key map (kbd "C-M-?") 'ac-persist-help) + + (define-key map [C-down] 'ac-quick-help-scroll-down) + (define-key map [C-up] 'ac-quick-help-scroll-up) + (define-key map "\C-\M-n" 'ac-quick-help-scroll-down) + (define-key map "\C-\M-p" 'ac-quick-help-scroll-up) + + (dotimes (i 9) + (let ((symbol (intern (format "ac-complete-%d" (1+ i))))) + (fset symbol + `(lambda () + (interactive) + (when (and (ac-menu-live-p) (popup-select ac-menu ,i)) + (ac-complete)))) + (define-key map (read-kbd-macro (format "M-%s" (1+ i))) symbol))) + + map) + "Keymap for completion.") +(defvaralias 'ac-complete-mode-map 'ac-completing-map) + +(defvar ac-menu-map + (let ((map (make-sparse-keymap))) + (define-key map "\C-n" 'ac-next) + (define-key map "\C-p" 'ac-previous) + (set-keymap-parent map ac-completing-map) + map) + "Keymap for completion on completing menu.") + +(defvar ac-current-map + (let ((map (make-sparse-keymap))) + (set-keymap-parent map ac-completing-map) + map)) + +(defvar ac-match-function 'all-completions + "Default match function.") + +(defvar ac-prefix-definitions + '((symbol . ac-prefix-symbol) + (file . ac-prefix-file) + (valid-file . ac-prefix-valid-file) + (c-dot . ac-prefix-c-dot) + (c-dot-ref . ac-prefix-c-dot-ref)) + "Prefix definitions for common use.") + +(defvar ac-sources '(ac-source-words-in-same-mode-buffers) + "Sources for completion.") +(make-variable-buffer-local 'ac-sources) + +(defvar ac-compiled-sources nil + "Compiled source of `ac-sources'.") + +(defvar ac-current-sources nil + "Current working sources. This is sublist of `ac-compiled-sources'.") + +(defvar ac-omni-completion-sources nil + "Do not use this anymore.") + +(defvar ac-current-prefix-def nil) + +(defvar ac-ignoring-prefix-def nil) + + + +;;;; Intelligent completion history + +(defvar ac-comphist nil + "Database of completion history.") + +(defsubst ac-comphist-make-tab () + (make-hash-table :test 'equal)) + +(defsubst ac-comphist-tab (db) + (nth 0 db)) + +(defsubst ac-comphist-cache (db) + (nth 1 db)) + +(defun ac-comphist-make (&optional tab) + (list (or tab (ac-comphist-make-tab)) (make-hash-table :test 'equal :weakness t))) + +(defun ac-comphist-get (db string &optional create) + (let* ((tab (ac-comphist-tab db)) + (index (gethash string tab))) + (when (and create (null index)) + (setq index (make-vector (length string) 0)) + (puthash string index tab)) + index)) + +(defun ac-comphist-add (db string prefix) + (setq prefix (min prefix (1- (length string)))) + (when (<= 0 prefix) + (setq string (substring-no-properties string)) + (let ((stat (ac-comphist-get db string t))) + (incf (aref stat prefix)) + (remhash string (ac-comphist-cache db))))) + +(defun ac-comphist-score (db string prefix) + (setq prefix (min prefix (1- (length string)))) + (if (<= 0 prefix) + (let ((cache (gethash string (ac-comphist-cache db)))) + (or (and cache (aref cache prefix)) + (let ((stat (ac-comphist-get db string)) + (score 0.0)) + (when stat + (loop for p from 0 below (length string) + ;; sigmoid function + with a = 5 + with d = (/ 6.0 a) + for x = (- d (abs (- prefix p))) + for r = (/ 1.0 (1+ (exp (* (- a) x)))) + do + (incf score (* (aref stat p) r)))) + ;; Weight by distance + (incf score (max 0.0 (- 0.3 (/ (- (length string) prefix) 100.0)))) + (unless cache + (setq cache (make-vector (length string) nil)) + (puthash string cache (ac-comphist-cache db))) + (aset cache prefix score) + score))) + 0.0)) + +(defun ac-comphist-sort (db collection prefix &optional threshold) + (let (result + (n 0) + (total 0) + (cur 0)) + (setq result (mapcar (lambda (a) + (when (and cur threshold) + (if (>= cur (* total threshold)) + (setq cur nil) + (incf n) + (incf cur (cdr a)))) + (car a)) + (sort (mapcar (lambda (string) + (let ((score (ac-comphist-score db string prefix))) + (incf total score) + (cons string score))) + collection) + (lambda (a b) (< (cdr b) (cdr a)))))) + (if threshold + (cons n result) + result))) + +(defun ac-comphist-serialize (db) + (let (alist) + (maphash (lambda (k v) + (push (cons k v) alist)) + (ac-comphist-tab db)) + (list alist))) + +(defun ac-comphist-deserialize (sexp) + (condition-case nil + (ac-comphist-make (let ((tab (ac-comphist-make-tab))) + (mapc (lambda (cons) + (puthash (car cons) (cdr cons) tab)) + (nth 0 sexp)) + tab)) + (error (message "Invalid comphist db.") nil))) + +(defun ac-comphist-init () + (ac-comphist-load) + (add-hook 'kill-emacs-hook 'ac-comphist-save)) + +(defun ac-comphist-load () + (interactive) + (let ((db (if (file-exists-p ac-comphist-file) + (ignore-errors + (with-temp-buffer + (insert-file-contents ac-comphist-file) + (goto-char (point-min)) + (ac-comphist-deserialize (read (current-buffer)))))))) + (setq ac-comphist (or db (ac-comphist-make))))) + +(defun ac-comphist-save () + (interactive) + (require 'pp) + (ignore-errors + (with-temp-buffer + (pp (ac-comphist-serialize ac-comphist) (current-buffer)) + (write-region (point-min) (point-max) ac-comphist-file)))) + + + +;;;; Auto completion internals + +(defun ac-menu-at-wrapper-line-p () + "Return non-nil if current line is long and wrapped to next visual line." + (and (not truncate-lines) + (eq (line-beginning-position) + (save-excursion + (vertical-motion 1) + (line-beginning-position))))) + +(defun ac-prefix-symbol () + "Default prefix definition function." + (require 'thingatpt) + (car-safe (bounds-of-thing-at-point 'symbol))) +(defalias 'ac-prefix-default 'ac-prefix-symbol) + +(defun ac-prefix-file () + "File prefix." + (let ((point (re-search-backward "[\"<>' \t\r\n]" nil t))) + (if point (1+ point)))) + +(defun ac-prefix-valid-file () + "Existed (or to be existed) file prefix." + (let* ((line-beg (line-beginning-position)) + (end (point)) + (start (or (let ((point (re-search-backward "[\"<>'= \t\r\n]" line-beg t))) + (if point (1+ point))) + line-beg)) + (file (buffer-substring start end))) + (if (and file (or (string-match "^/" file) + (and (setq file (and (string-match "^[^/]*/" file) + (match-string 0 file))) + (file-directory-p file)))) + start))) + +(defun ac-prefix-c-dot () + "C-like languages dot(.) prefix." + (if (re-search-backward "\\.\\(\\(?:[a-zA-Z0-9][_a-zA-Z0-9]*\\)?\\)\\=" nil t) + (match-beginning 1))) + +(defun ac-prefix-c-dot-ref () + "C-like languages dot(.) and reference(->) prefix." + (if (re-search-backward "\\(?:\\.\\|->\\)\\(\\(?:[a-zA-Z0-9][_a-zA-Z0-9]*\\)?\\)\\=" nil t) + (match-beginning 1))) + +(defun ac-define-prefix (name prefix) + "Define new prefix definition. +You can not use it in source definition like (prefix . `NAME')." + (push (cons name prefix) ac-prefix-definitions)) + +(defun ac-match-substring (prefix candidates) + (loop with regexp = (regexp-quote prefix) + for candidate in candidates + if (string-match regexp candidate) + collect candidate)) + +(defsubst ac-source-entity (source) + (if (symbolp source) + (symbol-value source) + source)) + +(defun ac-source-available-p (source) + (if (and (symbolp source) + (get source 'available)) + (eq (get source 'available) t) + (let* ((src (ac-source-entity source)) + (avail-pair (assq 'available src)) + (avail-cond (cdr avail-pair)) + (available (and (if avail-pair + (cond + ((symbolp avail-cond) + (funcall avail-cond)) + ((listp avail-cond) + (eval avail-cond))) + t) + (loop for feature in (assoc-default 'depends src) + unless (require feature nil t) return nil + finally return t)))) + (if (symbolp source) + (put source 'available (if available t 'no))) + available))) + +(defun ac-compile-sources (sources) + "Compiled `SOURCES' into expanded sources style." + (loop for source in sources + if (ac-source-available-p source) + do + (setq source (ac-source-entity source)) + (flet ((add-attribute (name value &optional append) (add-to-list 'source (cons name value) append))) + ;; prefix + (let* ((prefix (assoc 'prefix source)) + (real (assoc-default (cdr prefix) ac-prefix-definitions))) + (cond + (real + (add-attribute 'prefix real)) + ((null prefix) + (add-attribute 'prefix 'ac-prefix-default)))) + ;; match + (let ((match (assq 'match source))) + (cond + ((eq (cdr match) 'substring) + (setcdr match 'ac-match-substring))))) + and collect source)) + +(defun ac-compiled-sources () + (or ac-compiled-sources + (setq ac-compiled-sources + (ac-compile-sources ac-sources)))) + +(defsubst ac-menu-live-p () + (popup-live-p ac-menu)) + +(defun ac-menu-create (point width height) + (setq ac-menu + (popup-create point width height + :around t + :face 'ac-candidate-face + :selection-face 'ac-selection-face + :symbol t + :scroll-bar t + :margin-left 1))) + +(defun ac-menu-delete () + (when ac-menu + (popup-delete ac-menu) + (setq ac-menu))) + +(defsubst ac-inline-marker () + (nth 0 ac-inline)) + +(defsubst ac-inline-overlay () + (nth 1 ac-inline)) + +(defsubst ac-inline-live-p () + (and ac-inline (ac-inline-overlay) t)) + +(defun ac-inline-show (point string) + (unless ac-inline + (setq ac-inline (list (make-marker) nil))) + (save-excursion + (let ((overlay (ac-inline-overlay)) + (width 0) + (string-width (string-width string)) + (length 0) + (original-string string)) + ;; Calculate string space to show completion + (goto-char point) + (let (c) + (while (and (not (eolp)) + (< width string-width) + (setq c (char-after)) + (not (eq c ?\t))) ; special case for tab + (incf width (char-width c)) + (incf length) + (forward-char))) + + ;; Show completion + (goto-char point) + (cond + ((= width 0) + (set-marker (ac-inline-marker) point) + (let ((buffer-undo-list t)) + (insert " ")) + (setq width 1 + length 1)) + ((<= width string-width) + ;; No space to show + ;; Do nothing + ) + ((> width string-width) + ;; Need to fill space + (setq string (concat string (make-string (- width string-width) ? ))))) + (setq string (propertize string 'face 'ac-completion-face)) + (if overlay + (progn + (move-overlay overlay point (+ point length)) + (overlay-put overlay 'invisible nil)) + (setq overlay (make-overlay point (+ point length))) + (setf (nth 1 ac-inline) overlay) + (overlay-put overlay 'priority 9999) + ;; Help prefix-overlay in some cases + (overlay-put overlay 'keymap ac-current-map)) + (overlay-put overlay 'display (substring string 0 1)) + ;; TODO no width but char + (overlay-put overlay 'after-string (substring string 1)) + (overlay-put overlay 'string original-string)))) + +(defun ac-inline-delete () + (when (ac-inline-live-p) + (ac-inline-hide) + (delete-overlay (ac-inline-overlay)) + (setq ac-inline nil))) + +(defun ac-inline-hide () + (when (ac-inline-live-p) + (let ((overlay (ac-inline-overlay)) + (marker (ac-inline-marker)) + (buffer-undo-list t)) + (when overlay + (when (marker-position marker) + (save-excursion + (goto-char marker) + (delete-char 1) + (set-marker marker nil))) + (move-overlay overlay (point-min) (point-min)) + (overlay-put overlay 'invisible t) + (overlay-put overlay 'display nil) + (overlay-put overlay 'after-string nil))))) + +(defun ac-inline-update () + (if (and ac-completing ac-prefix (stringp ac-common-part)) + (let ((common-part-length (length ac-common-part)) + (prefix-length (length ac-prefix))) + (if (> common-part-length prefix-length) + (progn + (ac-inline-hide) + (ac-inline-show (point) (substring ac-common-part prefix-length))) + (ac-inline-delete))) + (ac-inline-delete))) + +(defun ac-put-prefix-overlay () + (unless ac-prefix-overlay + (let (newline) + ;; Insert newline to make sure that cursor always on the overlay + (when (and (eq ac-point (point-max)) + (eq ac-point (point))) + (popup-save-buffer-state + (insert "\n")) + (setq newline t)) + (setq ac-prefix-overlay (make-overlay ac-point (1+ (point)) nil t t)) + (overlay-put ac-prefix-overlay 'priority 9999) + (overlay-put ac-prefix-overlay 'keymap (make-sparse-keymap)) + (overlay-put ac-prefix-overlay 'newline newline)))) + +(defun ac-remove-prefix-overlay () + (when ac-prefix-overlay + (when (overlay-get ac-prefix-overlay 'newline) + ;; Remove inserted newline + (popup-save-buffer-state + (goto-char (point-max)) + (if (eq (char-before) ?\n) + (delete-char -1)))) + (delete-overlay ac-prefix-overlay))) + +(defun ac-activate-completing-map () + (if (and ac-show-menu ac-use-menu-map) + (set-keymap-parent ac-current-map ac-menu-map)) + (when (and ac-use-overriding-local-map + (null overriding-terminal-local-map)) + (setq overriding-terminal-local-map ac-current-map)) + (when ac-prefix-overlay + (set-keymap-parent (overlay-get ac-prefix-overlay 'keymap) ac-current-map))) + +(defun ac-deactivate-completing-map () + (set-keymap-parent ac-current-map ac-completing-map) + (when (and ac-use-overriding-local-map + (eq overriding-terminal-local-map ac-current-map)) + (setq overriding-terminal-local-map nil)) + (when ac-prefix-overlay + (set-keymap-parent (overlay-get ac-prefix-overlay 'keymap) nil))) + +(defsubst ac-selected-candidate () + (if ac-menu + (popup-selected-item ac-menu))) + +(defun ac-prefix (requires ignore-list) + (loop with current = (point) + with point + with prefix-def + with sources + for source in (ac-compiled-sources) + for prefix = (assoc-default 'prefix source) + for req = (or (assoc-default 'requires source) requires 1) + + if (null prefix-def) + do + (unless (member prefix ignore-list) + (save-excursion + (setq point (cond + ((symbolp prefix) + (funcall prefix)) + ((stringp prefix) + (and (re-search-backward (concat prefix "\\=") nil t) + (or (match-beginning 1) (match-beginning 0)))) + ((stringp (car-safe prefix)) + (let ((regexp (nth 0 prefix)) + (end (nth 1 prefix)) + (group (nth 2 prefix))) + (and (re-search-backward (concat regexp "\\=") nil t) + (funcall (if end 'match-end 'match-beginning) + (or group 0))))) + (t + (eval prefix)))) + (if (and point + (integerp req) + (< (- current point) req)) + (setq point nil)) + (if point + (setq prefix-def prefix)))) + + if (equal prefix prefix-def) do (push source sources) + + finally return + (and point (list prefix-def point (nreverse sources))))) + +(defun ac-init () + "Initialize current sources to start completion." + (setq ac-candidates-cache nil) + (loop for source in ac-current-sources + for function = (assoc-default 'init source) + if function do + (save-excursion + (cond + ((functionp function) + (funcall function)) + (t + (eval function)))))) + +(defun ac-candidates-1 (source) + (let* ((do-cache (assq 'cache source)) + (function (assoc-default 'candidates source)) + (action (assoc-default 'action source)) + (document (assoc-default 'document source)) + (symbol (assoc-default 'symbol source)) + (ac-limit (or (assoc-default 'limit source) ac-limit)) + (face (or (assoc-default 'face source) (assoc-default 'candidate-face source))) + (selection-face (assoc-default 'selection-face source)) + (cache (and do-cache (assq source ac-candidates-cache))) + (candidates (cdr cache))) + (unless cache + (setq candidates (save-excursion + (cond + ((functionp function) + (funcall function)) + (t + (eval function))))) + ;; Convert (name value) format candidates into name with text properties. + (setq candidates (mapcar (lambda (candidate) + (if (consp candidate) + (propertize (car candidate) 'value (cdr candidate)) + candidate)) + candidates)) + (when do-cache + (push (cons source candidates) ac-candidates-cache))) + (setq candidates (funcall (or (assoc-default 'match source) + ac-match-function) + ac-prefix candidates)) + ;; Remove extra items regarding to ac-limit + (if (and (integerp ac-limit) (> ac-limit 1) (> (length candidates) ac-limit)) + (setcdr (nthcdr (1- ac-limit) candidates) nil)) + ;; Put candidate properties + (setq candidates (mapcar (lambda (candidate) + (popup-item-propertize candidate + 'action action + 'symbol symbol + 'document document + 'popup-face face + 'selection-face selection-face)) + candidates)) + candidates)) + +(defun ac-candidates () + "Produce candidates for current sources." + (loop with completion-ignore-case = (or (eq ac-ignore-case t) + (and (eq ac-ignore-case 'smart) + (let ((case-fold-search nil)) (not (string-match "[[:upper:]]" ac-prefix))))) + with case-fold-search = completion-ignore-case + with prefix-len = (length ac-prefix) + for source in ac-current-sources + append (ac-candidates-1 source) into candidates + finally return + (progn + (delete-dups candidates) + (if (and ac-use-comphist ac-comphist) + (if ac-show-menu + (let* ((pair (ac-comphist-sort ac-comphist candidates prefix-len ac-comphist-threshold)) + (n (car pair)) + (result (cdr pair)) + (cons (if (> n 0) (nthcdr (1- n) result))) + (cdr (cdr cons))) + (if cons (setcdr cons nil)) + (setq ac-common-part (try-completion ac-prefix result)) + (setq ac-whole-common-part (try-completion ac-prefix candidates)) + (if cons (setcdr cons cdr)) + result) + (setq candidates (ac-comphist-sort ac-comphist candidates prefix-len)) + (setq ac-common-part (if candidates (popup-x-to-string (car candidates)))) + (setq ac-whole-common-part (try-completion ac-prefix candidates)) + candidates) + (setq ac-common-part (try-completion ac-prefix candidates)) + (setq ac-whole-common-part ac-common-part) + candidates)))) + +(defun ac-update-candidates (cursor scroll-top) + "Update candidates of menu to `ac-candidates' and redraw it." + (setf (popup-cursor ac-menu) cursor + (popup-scroll-top ac-menu) scroll-top) + (setq ac-dwim-enable (= (length ac-candidates) 1)) + (if ac-candidates + (progn + (setq ac-completing t) + (ac-activate-completing-map)) + (setq ac-completing nil) + (ac-deactivate-completing-map)) + (ac-inline-update) + (popup-set-list ac-menu ac-candidates) + (if (and (not ac-fuzzy-enable) + (<= (length ac-candidates) 1)) + (popup-hide ac-menu) + (if ac-show-menu + (popup-draw ac-menu)))) + +(defun ac-reposition () + "Force to redraw candidate menu with current `ac-candidates'." + (let ((cursor (popup-cursor ac-menu)) + (scroll-top (popup-scroll-top ac-menu))) + (ac-menu-delete) + (ac-menu-create ac-point (popup-preferred-width ac-candidates) (popup-height ac-menu)) + (ac-update-candidates cursor scroll-top))) + +(defun ac-cleanup () + "Cleanup auto completion." + (if ac-cursor-color + (set-cursor-color ac-cursor-color)) + (when (and ac-use-comphist ac-comphist) + (when (and (null ac-selected-candidate) + (member ac-prefix ac-candidates)) + ;; Assume candidate is selected by just typing + (setq ac-selected-candidate ac-prefix) + (setq ac-last-point ac-point)) + (when ac-selected-candidate + (ac-comphist-add ac-comphist + ac-selected-candidate + (if ac-last-point + (- ac-last-point ac-point) + (length ac-prefix))))) + (ac-deactivate-completing-map) + (ac-remove-prefix-overlay) + (ac-remove-quick-help) + (ac-inline-delete) + (ac-menu-delete) + (ac-cancel-timer) + (ac-cancel-show-menu-timer) + (ac-cancel-quick-help-timer) + (setq ac-cursor-color nil + ac-inline nil + ac-show-menu nil + ac-menu nil + ac-completing nil + ac-point nil + ac-last-point nil + ac-prefix nil + ac-prefix-overlay nil + ac-selected-candidate nil + ac-common-part nil + ac-whole-common-part nil + ac-triggered nil + ac-limit nil + ac-candidates nil + ac-candidates-cache nil + ac-fuzzy-enable nil + ac-dwim-enable nil + ac-compiled-sources nil + ac-current-sources nil + ac-current-prefix-def nil + ac-ignoring-prefix-def nil)) + +(defsubst ac-abort () + "Abort completion." + (ac-cleanup)) + +(defun ac-expand-string (string &optional remove-undo-boundary) + "Expand `STRING' into the buffer and update `ac-prefix' to `STRING'. +This function records deletion and insertion sequences by `undo-boundary'. +If `remove-undo-boundary' is non-nil, this function also removes `undo-boundary' +that have been made before in this function." + (when (not (equal string (buffer-substring ac-point (point)))) + (undo-boundary) + ;; We can't use primitive-undo since it undoes by + ;; groups, divided by boundaries. + ;; We don't want boundary between deletion and insertion. + ;; So do it manually. + ;; Delete region silently for undo: + (if remove-undo-boundary + (progn + (let (buffer-undo-list) + (save-excursion + (delete-region ac-point (point)))) + (setq buffer-undo-list + (nthcdr 2 buffer-undo-list))) + (delete-region ac-point (point))) + (insert string) + ;; Sometimes, possible when omni-completion used, (insert) added + ;; to buffer-undo-list strange record about position changes. + ;; Delete it here: + (when (and remove-undo-boundary + (integerp (cadr buffer-undo-list))) + (setcdr buffer-undo-list (nthcdr 2 buffer-undo-list))) + (undo-boundary) + (setq ac-selected-candidate string) + (setq ac-prefix string))) + +(defun ac-set-trigger-key (key) + "Set `ac-trigger-key' to `KEY'. It is recommemded to use this function instead of calling `setq'." + ;; Remove old mapping + (when ac-trigger-key + (define-key ac-mode-map (read-kbd-macro ac-trigger-key) nil)) + + ;; Make new mapping + (setq ac-trigger-key key) + (when key + (define-key ac-mode-map (read-kbd-macro key) 'ac-trigger-key-command))) + +(defun ac-set-timer () + (unless ac-timer + (setq ac-timer (run-with-idle-timer ac-delay ac-delay 'ac-update-greedy)))) + +(defun ac-cancel-timer () + (when (timerp ac-timer) + (cancel-timer ac-timer) + (setq ac-timer nil))) + +(defun ac-update (&optional force) + (when (and auto-complete-mode + ac-prefix + (or ac-triggered + force) + (not isearch-mode)) + (ac-put-prefix-overlay) + (setq ac-candidates (ac-candidates)) + (let ((preferred-width (popup-preferred-width ac-candidates))) + ;; Reposition if needed + (when (or (null ac-menu) + (>= (popup-width ac-menu) preferred-width) + (<= (popup-width ac-menu) (- preferred-width 10)) + (and (> (popup-direction ac-menu) 0) + (ac-menu-at-wrapper-line-p))) + (ac-inline-hide) ; Hide overlay to calculate correct column + (ac-menu-delete) + (ac-menu-create ac-point preferred-width ac-menu-height))) + (ac-update-candidates 0 0) + t)) + +(defun ac-update-greedy (&optional force) + (let (result) + (while (when (and (setq result (ac-update force)) + (null ac-candidates)) + (add-to-list 'ac-ignoring-prefix-def ac-current-prefix-def) + (ac-start :force-init t) + ac-current-prefix-def)) + result)) + +(defun ac-set-show-menu-timer () + (when (and (or (integerp ac-auto-show-menu) (floatp ac-auto-show-menu)) + (null ac-show-menu-timer)) + (setq ac-show-menu-timer (run-with-idle-timer ac-auto-show-menu ac-auto-show-menu 'ac-show-menu)))) + +(defun ac-cancel-show-menu-timer () + (when (timerp ac-show-menu-timer) + (cancel-timer ac-show-menu-timer) + (setq ac-show-menu-timer nil))) + +(defun ac-show-menu () + (when (not (eq ac-show-menu t)) + (setq ac-show-menu t) + (ac-inline-hide) + (ac-remove-quick-help) + (ac-update t))) + +(defun ac-help (&optional persist) + (interactive "P") + (when ac-menu + (popup-menu-show-help ac-menu persist))) + +(defun ac-persist-help () + (interactive) + (ac-help t)) + +(defun ac-last-help (&optional persist) + (interactive "P") + (when ac-last-completion + (popup-item-show-help (cdr ac-last-completion) persist))) + +(defun ac-last-persist-help () + (interactive) + (ac-last-help t)) + +(defun ac-set-quick-help-timer () + (when (and ac-use-quick-help + (null ac-quick-help-timer)) + (setq ac-quick-help-timer (run-with-idle-timer ac-quick-help-delay ac-quick-help-delay 'ac-quick-help)))) + +(defun ac-cancel-quick-help-timer () + (when (timerp ac-quick-help-timer) + (cancel-timer ac-quick-help-timer) + (setq ac-quick-help-timer nil))) + +(defun ac-pos-tip-show-quick-help (menu &optional item &rest args) + (let* ((point (plist-get args :point)) + (around nil) + (parent-offset (popup-offset menu)) + (doc (popup-menu-documentation menu item))) + (when (stringp doc) + (if (popup-hidden-p menu) + (setq around t) + (setq point nil)) + (with-no-warnings + (pos-tip-show doc + 'popup-tip-face + (or point + (and menu + (popup-child-point menu parent-offset)) + (point)) + nil 0 + popup-tip-max-width + nil nil + (and (not around) 0)) + (unless (plist-get args :nowait) + (clear-this-command-keys) + (unwind-protect + (push (read-event (plist-get args :prompt)) unread-command-events) + (pos-tip-hide)) + t))))) + +(defun ac-quick-help (&optional force) + (interactive) + (when (and (or force (null this-command)) + (ac-menu-live-p) + (null ac-quick-help)) + (setq ac-quick-help + (funcall (if (and ac-quick-help-prefer-x + (eq window-system 'x) + (featurep 'pos-tip)) + 'ac-pos-tip-show-quick-help + 'popup-menu-show-quick-help) + ac-menu nil + :point ac-point + :height ac-quick-help-height + :nowait t)))) + +(defun ac-remove-quick-help () + (when ac-quick-help + (popup-delete ac-quick-help) + (setq ac-quick-help nil))) + +(defun ac-last-quick-help () + (interactive) + (when (and ac-last-completion + (eq (marker-buffer (car ac-last-completion)) + (current-buffer))) + (let ((doc (popup-item-documentation (cdr ac-last-completion))) + (point (marker-position (car ac-last-completion)))) + (when (stringp doc) + (if (and ac-quick-help-prefer-x + (eq window-system 'x) + (featurep 'pos-tip)) + (with-no-warnings (pos-tip-show doc nil point nil 0)) + (popup-tip doc + :point point + :around t + :scroll-bar t + :margin t)))))) + +(defmacro ac-define-quick-help-command (name arglist &rest body) + (declare (indent 2)) + `(progn + (defun ,name ,arglist ,@body) + (put ',name 'ac-quick-help-command t))) + +(ac-define-quick-help-command ac-quick-help-scroll-down () + (interactive) + (when ac-quick-help + (popup-scroll-down ac-quick-help))) + +(ac-define-quick-help-command ac-quick-help-scroll-up () + (interactive) + (when ac-quick-help + (popup-scroll-up ac-quick-help))) + + + +;;;; Auto completion isearch + +(defun ac-isearch-callback (list) + (setq ac-dwim-enable (eq (length list) 1))) + +(defun ac-isearch () + (interactive) + (when (ac-menu-live-p) + (ac-cancel-show-menu-timer) + (ac-cancel-quick-help-timer) + (ac-show-menu) + (popup-isearch ac-menu :callback 'ac-isearch-callback))) + + + +;;;; Auto completion commands + +(defun auto-complete (&optional sources) + "Start auto-completion at current point." + (interactive) + (let ((menu-live (ac-menu-live-p)) + (inline-live (ac-inline-live-p))) + (ac-abort) + (let ((ac-sources (or sources ac-sources))) + (if (or ac-show-menu-immediately-on-auto-complete + inline-live) + (setq ac-show-menu t)) + (ac-start)) + (when (ac-update-greedy t) + ;; TODO Not to cause inline completion to be disrupted. + (if (ac-inline-live-p) + (ac-inline-hide)) + ;; Not to expand when it is first time to complete + (when (and (or (and (not ac-expand-on-auto-complete) + (> (length ac-candidates) 1) + (not menu-live)) + (not (let ((ac-common-part ac-whole-common-part)) + (ac-expand-common)))) + ac-use-fuzzy + (null ac-candidates)) + (ac-fuzzy-complete))))) + +(defun ac-fuzzy-complete () + "Start fuzzy completion at current point." + (interactive) + (when (require 'fuzzy nil) + (unless (ac-menu-live-p) + (ac-start)) + (let ((ac-match-function 'fuzzy-all-completions)) + (unless ac-cursor-color + (setq ac-cursor-color (frame-parameter (selected-frame) 'cursor-color))) + (if ac-fuzzy-cursor-color + (set-cursor-color ac-fuzzy-cursor-color)) + (setq ac-show-menu t) + (setq ac-fuzzy-enable t) + (setq ac-triggered nil) + (ac-update t))) + t) + +(defun ac-next () + "Select next candidate." + (interactive) + (when (ac-menu-live-p) + (popup-next ac-menu) + (setq ac-show-menu t) + (if (eq this-command 'ac-next) + (setq ac-dwim-enable t)))) + +(defun ac-previous () + "Select previous candidate." + (interactive) + (when (ac-menu-live-p) + (popup-previous ac-menu) + (setq ac-show-menu t) + (if (eq this-command 'ac-previous) + (setq ac-dwim-enable t)))) + +(defun ac-expand () + "Try expand, and if expanded twice, select next candidate." + (interactive) + (unless (ac-expand-common) + (let ((string (ac-selected-candidate))) + (when string + (when (equal ac-prefix string) + (ac-next) + (setq string (ac-selected-candidate))) + (ac-expand-string string (eq last-command this-command)) + ;; Do reposition if menu at long line + (if (and (> (popup-direction ac-menu) 0) + (ac-menu-at-wrapper-line-p)) + (ac-reposition)) + (setq ac-show-menu t) + string)))) + +(defun ac-expand-common () + "Try to expand meaningful common part." + (interactive) + (if (and ac-dwim ac-dwim-enable) + (ac-complete) + (when (and (ac-inline-live-p) + ac-common-part) + (ac-inline-hide) + (ac-expand-string ac-common-part (eq last-command this-command)) + (setq ac-common-part nil) + t))) + +(defun ac-complete () + "Try complete." + (interactive) + (let* ((candidate (ac-selected-candidate)) + (action (popup-item-property candidate 'action)) + (fallback nil)) + (when candidate + (unless (ac-expand-string candidate) + (setq fallback t)) + ;; Remember to show help later + (when (and ac-point candidate) + (unless ac-last-completion + (setq ac-last-completion (cons (make-marker) nil))) + (set-marker (car ac-last-completion) ac-point ac-buffer) + (setcdr ac-last-completion candidate))) + (ac-abort) + (cond + (action + (funcall action)) + (fallback + (ac-fallback-command))) + candidate)) + +(defun* ac-start (&key + requires + force-init) + "Start completion." + (interactive) + (if (not auto-complete-mode) + (message "auto-complete-mode is not enabled") + (let* ((info (ac-prefix requires ac-ignoring-prefix-def)) + (prefix-def (nth 0 info)) + (point (nth 1 info)) + (sources (nth 2 info)) + prefix + (init (or force-init (not (eq ac-point point))))) + (if (or (null point) + (member (setq prefix (buffer-substring-no-properties point (point))) + ac-ignores)) + (prog1 nil + (ac-abort)) + (unless ac-cursor-color + (setq ac-cursor-color (frame-parameter (selected-frame) 'cursor-color))) + (setq ac-show-menu (or ac-show-menu (if (eq ac-auto-show-menu t) t)) + ac-current-sources sources + ac-buffer (current-buffer) + ac-point point + ac-prefix prefix + ac-limit ac-candidate-limit + ac-triggered t + ac-current-prefix-def prefix-def) + (when (or init (null ac-prefix-overlay)) + (ac-init)) + (ac-set-timer) + (ac-set-show-menu-timer) + (ac-set-quick-help-timer) + (ac-put-prefix-overlay))))) + +(defun ac-stop () + "Stop completiong." + (interactive) + (setq ac-selected-candidate nil) + (ac-abort)) + +(defun ac-trigger-key-command (&optional force) + (interactive "P") + (if (or force (ac-trigger-command-p last-command)) + (auto-complete) + (ac-fallback-command 'ac-trigger-key-command))) + + + +;;;; Basic cache facility + +(defvar ac-clear-variables-every-minute-timer nil) +(defvar ac-clear-variables-after-save nil) +(defvar ac-clear-variables-every-minute nil) +(defvar ac-minutes-counter 0) + +(defun ac-clear-variable-after-save (variable &optional pred) + (add-to-list 'ac-clear-variables-after-save (cons variable pred))) + +(defun ac-clear-variables-after-save () + (dolist (pair ac-clear-variables-after-save) + (if (or (null (cdr pair)) + (funcall (cdr pair))) + (set (car pair) nil)))) + +(defun ac-clear-variable-every-minutes (variable minutes) + (add-to-list 'ac-clear-variables-every-minute (cons variable minutes))) + +(defun ac-clear-variable-every-minute (variable) + (ac-clear-variable-every-minutes variable 1)) + +(defun ac-clear-variable-every-10-minutes (variable) + (ac-clear-variable-every-minutes variable 10)) + +(defun ac-clear-variables-every-minute () + (incf ac-minutes-counter) + (dolist (pair ac-clear-variables-every-minute) + (if (eq (% ac-minutes-counter (cdr pair)) 0) + (set (car pair) nil)))) + + + +;;;; Auto complete mode + +(defun ac-cursor-on-diable-face-p (&optional point) + (memq (get-text-property (or point (point)) 'face) ac-disable-faces)) + +(defun ac-trigger-command-p (command) + "Return non-nil if `COMMAND' is a trigger command." + (and (symbolp command) + (or (memq command ac-trigger-commands) + (string-match "self-insert-command" (symbol-name command)) + (string-match "electric" (symbol-name command))))) + +(defun ac-fallback-command (&optional except-command) + (let* ((auto-complete-mode nil) + (keys (this-command-keys-vector)) + (command (if keys (key-binding keys)))) + (when (and (commandp command) + (not (eq command except-command))) + (setq this-command command) + (call-interactively command)))) + +(defun ac-compatible-package-command-p (command) + "Return non-nil if `COMMAND' is compatible with auto-complete." + (and (symbolp command) + (string-match ac-compatible-packages-regexp (symbol-name command)))) + +(defun ac-handle-pre-command () + (condition-case var + (if (or (setq ac-triggered (and (not ac-fuzzy-enable) ; ignore key storkes in fuzzy mode + (or (eq this-command 'auto-complete) ; special case + (ac-trigger-command-p this-command) + (and ac-completing + (memq this-command ac-trigger-commands-on-completing))) + (not (ac-cursor-on-diable-face-p)))) + (ac-compatible-package-command-p this-command)) + (progn + (if (or (not (symbolp this-command)) + (not (get this-command 'ac-quick-help-command))) + (ac-remove-quick-help)) + ;; Not to cause inline completion to be disrupted. + (ac-inline-hide)) + (ac-abort)) + (error (ac-error var)))) + +(defun ac-handle-post-command () + (condition-case var + (when (and ac-triggered + (or ac-auto-start + ac-completing) + (not isearch-mode)) + (setq ac-last-point (point)) + (ac-start :requires (unless ac-completing ac-auto-start)) + (ac-inline-update)) + (error (ac-error var)))) + +(defun ac-setup () + (if ac-trigger-key + (ac-set-trigger-key ac-trigger-key)) + (if ac-use-comphist + (ac-comphist-init)) + (unless ac-clear-variables-every-minute-timer + (setq ac-clear-variables-every-minute-timer (run-with-timer 60 60 'ac-clear-variables-every-minute))) + (if ac-stop-flymake-on-completing + (defadvice flymake-on-timer-event (around ac-flymake-stop-advice activate) + (unless ac-completing + ad-do-it)) + (ad-disable-advice 'flymake-on-timer-event 'around 'ac-flymake-stop-advice))) + +(define-minor-mode auto-complete-mode + "AutoComplete mode" + :lighter " AC" + :keymap ac-mode-map + :group 'auto-complete + (if auto-complete-mode + (progn + (ac-setup) + (add-hook 'pre-command-hook 'ac-handle-pre-command nil t) + (add-hook 'post-command-hook 'ac-handle-post-command nil t) + (add-hook 'after-save-hook 'ac-clear-variables-after-save nil t) + (run-hooks 'auto-complete-mode-hook)) + (remove-hook 'pre-command-hook 'ac-handle-pre-command t) + (remove-hook 'post-command-hook 'ac-handle-post-command t) + (remove-hook 'after-save-hook 'ac-clear-variables-after-save t) + (ac-abort))) + +(defun auto-complete-mode-maybe () + "What buffer `auto-complete-mode' prefers." + (if (and (not (minibufferp (current-buffer))) + (memq major-mode ac-modes)) + (auto-complete-mode 1))) + +(define-global-minor-mode global-auto-complete-mode + auto-complete-mode auto-complete-mode-maybe + :group 'auto-complete) + + + +;;;; Compatibilities with other extensions + +(defun ac-flyspell-workaround () + "Flyspell uses `sit-for' for delaying its process. Unfortunatelly, +it stops auto completion which is trigger with `run-with-idle-timer'. +This workaround avoid flyspell processes when auto completion is being started." + (interactive) + (defadvice flyspell-post-command-hook (around ac-flyspell-workaround activate) + (unless ac-triggered + ad-do-it))) + + + +;;;; Standard sources + +(defmacro ac-define-source (name source) + "Source definition macro. It defines a complete command also." + (declare (indent 1)) + `(progn + (defvar ,(intern (format "ac-source-%s" name)) + ,source) + (defun ,(intern (format "ac-complete-%s" name)) () + (interactive) + (auto-complete '(,(intern (format "ac-source-%s" name))))))) + +;; Words in buffer source +(defvar ac-word-index nil) + +(defun ac-candidate-words-in-buffer (point prefix limit) + (let ((i 0) + candidate + candidates + (regexp (concat "\\_<" (regexp-quote prefix) "\\(\\sw\\|\\s_\\)+\\_>"))) + (save-excursion + ;; Search backward + (goto-char point) + (while (and (or (not (integerp limit)) (< i limit)) + (re-search-backward regexp nil t)) + (setq candidate (match-string-no-properties 0)) + (unless (member candidate candidates) + (push candidate candidates) + (incf i))) + ;; Search backward + (goto-char (+ point (length prefix))) + (while (and (or (not (integerp limit)) (< i limit)) + (re-search-forward regexp nil t)) + (setq candidate (match-string-no-properties 0)) + (unless (member candidate candidates) + (push candidate candidates) + (incf i))) + (nreverse candidates)))) + +(defun ac-incremental-update-word-index () + (unless (local-variable-p 'ac-word-index) + (make-local-variable 'ac-word-index)) + (if (null ac-word-index) + (setq ac-word-index (cons nil nil))) + ;; Mark incomplete + (if (car ac-word-index) + (setcar ac-word-index nil)) + (let ((index (cdr ac-word-index)) + (words (ac-candidate-words-in-buffer ac-point ac-prefix (or (and (integerp ac-limit) ac-limit) 10)))) + (dolist (word words) + (unless (member word index) + (push word index) + (setcdr ac-word-index index))))) + +(defun ac-update-word-index-1 () + (unless (local-variable-p 'ac-word-index) + (make-local-variable 'ac-word-index)) + (when (and (not (car ac-word-index)) + (< (buffer-size) 1048576)) + ;; Complete index + (setq ac-word-index + (cons t + (split-string (buffer-substring-no-properties (point-min) (point-max)) + "\\(?:^\\|\\_>\\).*?\\(?:\\_<\\|$\\)"))))) + +(defun ac-update-word-index () + (dolist (buffer (buffer-list)) + (when (or ac-fuzzy-enable + (not (eq buffer (current-buffer)))) + (with-current-buffer buffer + (ac-update-word-index-1))))) + +(defun ac-word-candidates (&optional buffer-pred) + (loop initially (unless ac-fuzzy-enable (ac-incremental-update-word-index)) + for buffer in (buffer-list) + if (and (or (not (integerp ac-limit)) (< (length candidates) ac-limit)) + (if buffer-pred (funcall buffer-pred buffer) t)) + append (funcall ac-match-function + ac-prefix + (and (local-variable-p 'ac-word-index buffer) + (cdr (buffer-local-value 'ac-word-index buffer)))) + into candidates + finally return candidates)) + +(ac-define-source words-in-buffer + '((candidates . ac-word-candidates))) + +(ac-define-source words-in-all-buffer + '((init . ac-update-word-index) + (candidates . ac-word-candidates))) + +(ac-define-source words-in-same-mode-buffers + '((init . ac-update-word-index) + (candidates . (ac-word-candidates + (lambda (buffer) + (derived-mode-p (buffer-local-value 'major-mode buffer))))))) + +;; Lisp symbols source +(defvar ac-symbols-cache nil) +(ac-clear-variable-every-10-minutes 'ac-symbols-cache) + +(defun ac-symbol-file (symbol type) + (if (fboundp 'find-lisp-object-file-name) + (find-lisp-object-file-name symbol type) + (let ((file-name (with-no-warnings + (describe-simplify-lib-file-name + (symbol-file symbol type))))) + (when (equal file-name "loaddefs.el") + ;; Find the real def site of the preloaded object. + (let ((location (condition-case nil + (if (eq type 'defun) + (find-function-search-for-symbol symbol nil + "loaddefs.el") + (find-variable-noselect symbol file-name)) + (error nil)))) + (when location + (with-current-buffer (car location) + (when (cdr location) + (goto-char (cdr location))) + (when (re-search-backward + "^;;; Generated autoloads from \\(.*\\)" nil t) + (setq file-name (match-string 1))))))) + (if (and (null file-name) + (or (eq type 'defun) + (integerp (get symbol 'variable-documentation)))) + ;; It's a object not defined in Elisp but in C. + (if (get-buffer " *DOC*") + (if (eq type 'defun) + (help-C-file-name (symbol-function symbol) 'subr) + (help-C-file-name symbol 'var)) + 'C-source) + file-name)))) + +(defun ac-symbol-documentation (symbol) + (if (stringp symbol) + (setq symbol (intern-soft symbol))) + (ignore-errors + (with-temp-buffer + (let ((standard-output (current-buffer))) + (prin1 symbol) + (princ " is ") + (cond + ((fboundp symbol) + (let ((help-xref-following t)) + (describe-function-1 symbol)) + (buffer-string)) + ((boundp symbol) + (let ((file-name (ac-symbol-file symbol 'defvar))) + (princ "a variable") + (when file-name + (princ " defined in `") + (princ (if (eq file-name 'C-source) + "C source code" + (file-name-nondirectory file-name)))) + (princ "'.\n\n") + (princ (or (documentation-property symbol 'variable-documentation t) + "Not documented.")) + (buffer-string))) + ((facep symbol) + (let ((file-name (ac-symbol-file symbol 'defface))) + (princ "a face") + (when file-name + (princ " defined in `") + (princ (if (eq file-name 'C-source) + "C source code" + (file-name-nondirectory file-name)))) + (princ "'.\n\n") + (princ (or (documentation-property symbol 'face-documentation t) + "Not documented.")) + (buffer-string))) + (t + (let ((doc (documentation-property symbol 'group-documentation t))) + (when doc + (princ "a group.\n\n") + (princ doc) + (buffer-string))))))))) + +(defun ac-symbol-candidates () + (or ac-symbols-cache + (setq ac-symbols-cache + (loop for x being the symbols + if (or (fboundp x) + (boundp x) + (symbol-plist x)) + collect (symbol-name x))))) + +(ac-define-source symbols + '((candidates . ac-symbol-candidates) + (document . ac-symbol-documentation) + (symbol . "s") + (cache))) + +;; Lisp functions source +(defvar ac-functions-cache nil) +(ac-clear-variable-every-10-minutes 'ac-functions-cache) + +(defun ac-function-candidates () + (or ac-functions-cache + (setq ac-functions-cache + (loop for x being the symbols + if (fboundp x) + collect (symbol-name x))))) + +(ac-define-source functions + '((candidates . ac-function-candidates) + (document . ac-symbol-documentation) + (symbol . "f") + (prefix . "(\\(\\(?:\\sw\\|\\s_\\)+\\)") + (cache))) + +;; Lisp variables source +(defvar ac-variables-cache nil) +(ac-clear-variable-every-10-minutes 'ac-variables-cache) + +(defun ac-variable-candidates () + (or ac-variables-cache + (setq ac-variables-cache + (loop for x being the symbols + if (boundp x) + collect (symbol-name x))))) + +(ac-define-source variables + '((candidates . ac-variable-candidates) + (document . ac-symbol-documentation) + (symbol . "v") + (cache))) + +;; Lisp features source +(defvar ac-emacs-lisp-features nil) +(ac-clear-variable-every-10-minutes 'ac-emacs-lisp-features) + +(defun ac-emacs-lisp-feature-candidates () + (or ac-emacs-lisp-features + (if (fboundp 'find-library-suffixes) + (let ((suffix (concat (regexp-opt (find-library-suffixes) t) "\\'"))) + (setq ac-emacs-lisp-features + (append (mapcar 'prin1-to-string features) + (loop for dir in load-path + if (file-directory-p dir) + append (loop for file in (directory-files dir) + if (string-match suffix file) + collect (substring file 0 (match-beginning 0)))))))))) + +(ac-define-source features + '((depends find-func) + (candidates . ac-emacs-lisp-feature-candidates) + (prefix . "require +'\\(\\(?:\\sw\\|\\s_\\)*\\)") + (requires . 0))) + +(defvaralias 'ac-source-emacs-lisp-features 'ac-source-features) + +;; Abbrev source +(ac-define-source abbrev + '((candidates . (mapcar 'popup-x-to-string (append (vconcat local-abbrev-table global-abbrev-table) nil))) + (action . expand-abbrev) + (symbol . "a") + (cache))) + +;; Files in current directory source +(ac-define-source files-in-current-dir + '((candidates . (directory-files default-directory)) + (cache))) + +;; Filename source +(defvar ac-filename-cache nil) + +(defun ac-filename-candidate () + (unless (file-regular-p ac-prefix) + (ignore-errors + (loop with dir = (file-name-directory ac-prefix) + with files = (or (assoc-default dir ac-filename-cache) + (let ((files (directory-files dir nil "^[^.]"))) + (push (cons dir files) ac-filename-cache) + files)) + for file in files + for path = (concat dir file) + collect (if (file-directory-p path) + (concat path "/") + path))))) + +(ac-define-source filename + '((init . (setq ac-filename-cache nil)) + (candidates . ac-filename-candidate) + (prefix . valid-file) + (requires . 0) + (action . ac-start) + (limit . nil))) + +;; Dictionary source +(defcustom ac-user-dictionary nil + "User dictionary" + :type '(repeat string) + :group 'auto-complete) + +(defcustom ac-user-dictionary-files '("~/.dict") + "User dictionary files." + :type '(repeat string) + :group 'auto-complete) + +(defcustom ac-dictionary-directories nil + "Dictionary directories." + :type '(repeat string) + :group 'auto-complete) + +(defvar ac-dictionary nil) +(defvar ac-dictionary-cache (make-hash-table :test 'equal)) + +(defun ac-clear-dictionary-cache () + (interactive) + (clrhash ac-dictionary-cache)) + +(defun ac-read-file-dictionary (filename) + (let ((cache (gethash filename ac-dictionary-cache 'none))) + (if (and cache (not (eq cache 'none))) + cache + (let (result) + (ignore-errors + (with-temp-buffer + (insert-file-contents filename) + (setq result (split-string (buffer-string) "\n")))) + (puthash filename result ac-dictionary-cache) + result)))) + +(defun ac-buffer-dictionary () + (apply 'append + (mapcar 'ac-read-file-dictionary + (mapcar (lambda (name) + (loop for dir in ac-dictionary-directories + for file = (concat dir "/" name) + if (file-exists-p file) + return file)) + (list (symbol-name major-mode) + (ignore-errors + (file-name-extension (buffer-file-name)))))))) + +(defun ac-dictionary-candidates () + (apply 'append `(,ac-user-dictionary + ,(ac-buffer-dictionary) + ,@(mapcar 'ac-read-file-dictionary + ac-user-dictionary-files)))) + +(ac-define-source dictionary + '((candidates . ac-dictionary-candidates) + (symbol . "d"))) + +(provide 'auto-complete) +;;; auto-complete.el ends here diff --git a/conf/emacs.d/auto-complete.elc b/conf/emacs.d/auto-complete.elc new file mode 100644 index 0000000..d2be8bb Binary files /dev/null and b/conf/emacs.d/auto-complete.elc differ diff --git a/conf/emacs.d/color-theme.el b/conf/emacs.d/color-theme.el new file mode 100644 index 0000000..c92c1a5 --- /dev/null +++ b/conf/emacs.d/color-theme.el @@ -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 --git a/conf/emacs.d/conditionalconfig.el b/conf/emacs.d/conditionalconfig.el new file mode 100644 index 0000000..5f5b600 --- /dev/null +++ b/conf/emacs.d/conditionalconfig.el @@ -0,0 +1,30 @@ +; Shalgham - conditional configuration for emacs +; Copyright (C) 2010 Sameer Rahmani +; +; 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 +; 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 . + +(defun load-suitable-configuration () + "Load the suitable configuration file for current opend file." + (interactive) + (let (arg) + (setq filename (buffer-file-name ())) + (message "debug >>>> %s" filename) + (t) + ) + ) + +(setq find-file-hook + '((load-suitable-configuration ()) + ) +) diff --git a/conf/emacs.d/dropdown-list.el b/conf/emacs.d/dropdown-list.el new file mode 100644 index 0000000..7b451d5 --- /dev/null +++ b/conf/emacs.d/dropdown-list.el @@ -0,0 +1,251 @@ +;;; dropdown-list.el --- Drop-down menu interface +;; +;; Filename: dropdown-list.el +;; Description: Drop-down menu interface +;; Author: Jaeyoun Chung [jay.chung@gmail.com] +;; Maintainer: +;; Copyright (C) 2008 Jaeyoun Chung +;; Created: Sun Mar 16 11:20:45 2008 (Pacific Daylight Time) +;; Version: +;; Last-Updated: Sun Mar 16 12:19:49 2008 (Pacific Daylight Time) +;; By: dradams +;; Update #: 43 +;; URL: http://www.emacswiki.org/cgi-bin/wiki/dropdown-list.el +;; Keywords: convenience menu +;; Compatibility: GNU Emacs 21.x, GNU Emacs 22.x +;; +;; Features that might be required by this library: +;; +;; `cl'. +;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;;; Commentary: +;; +;; According to Jaeyoun Chung, "overlay code stolen from company-mode.el." +;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;;; Change log: +;; +;; 2008/03/16 dadams +;; Clean-up - e.g. use char-to-string for control chars removed by email posting. +;; Moved example usage code (define-key*, command-selector) inside the library. +;; Require cl.el at byte-compile time. +;; Added GPL statement. +;; 2008/01/06 Jaeyoun Chung +;; Posted to gnu-emacs-sources@gnu.org at 9:10 p.m. +;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;; 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; see the file COPYING. If not, write to +;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth +;; Floor, Boston, MA 02110-1301, USA. +;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;;; Code: + +(eval-when-compile (require 'cl)) ;; decf, fourth, incf, loop, mapcar* + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +(defface dropdown-list-face + '((t :inherit default :background "lightyellow" :foreground "black")) + "*Bla." :group 'dropdown-list) + +(defface dropdown-list-selection-face + '((t :inherit dropdown-list-face :background "purple")) + "*Bla." :group 'dropdown-list) + +(defvar dropdown-list-overlays nil) + +(defun dropdown-list-hide () + (while dropdown-list-overlays + (delete-overlay (pop dropdown-list-overlays)))) + +(defun dropdown-list-put-overlay (beg end &optional prop value prop2 value2) + (let ((ov (make-overlay beg end))) + (overlay-put ov 'window t) + (when prop + (overlay-put ov prop value) + (when prop2 (overlay-put ov prop2 value2))) + ov)) + +(defun dropdown-list-line (start replacement &optional no-insert) + ;; start might be in the middle of a tab, which means we need to hide the + ;; tab and add spaces + (let ((end (+ start (length replacement))) + beg-point end-point + before-string after-string) + (goto-char (point-at-eol)) + (if (< (current-column) start) + (progn (setq before-string (make-string (- start (current-column)) ? )) + (setq beg-point (point))) + (goto-char (point-at-bol)) ;; Emacs bug, move-to-column is wrong otherwise + (move-to-column start) + (setq beg-point (point)) + (when (> (current-column) start) + (goto-char (1- (point))) + (setq beg-point (point)) + (setq before-string (make-string (- start (current-column)) ? )))) + (move-to-column end) + (setq end-point (point)) + (let ((end-offset (- (current-column) end))) + (when (> end-offset 0) (setq after-string (make-string end-offset ?b)))) + (when no-insert + ;; prevent inheriting of faces + (setq before-string (when before-string (propertize before-string 'face 'default))) + (setq after-string (when after-string (propertize after-string 'face 'default)))) + (let ((string (concat before-string replacement after-string))) + (if no-insert + string + (push (dropdown-list-put-overlay beg-point end-point 'invisible t + 'after-string string) + dropdown-list-overlays))))) + +(defun dropdown-list-start-column (display-width) + (let ((column (mod (current-column) (window-width))) + (width (window-width))) + (cond ((<= (+ column display-width) width) column) + ((> column display-width) (- column display-width)) + ((>= width display-width) (- width display-width)) + (t nil)))) + +(defun dropdown-list-move-to-start-line (candidate-count) + (decf candidate-count) + (let ((above-line-count (save-excursion (- (vertical-motion (- candidate-count))))) + (below-line-count (save-excursion (vertical-motion candidate-count)))) + (cond ((= below-line-count candidate-count) + t) + ((= above-line-count candidate-count) + (vertical-motion (- candidate-count)) + t) + ((>= (+ below-line-count above-line-count) candidate-count) + (vertical-motion (- (- candidate-count below-line-count))) + t) + (t nil)))) + +(defun dropdown-list-at-point (candidates &optional selidx) + (dropdown-list-hide) + (let* ((lengths (mapcar #'length candidates)) + (max-length (apply #'max lengths)) + (start (dropdown-list-start-column (+ max-length 3))) + (i -1) + (candidates (mapcar* (lambda (candidate length) + (let ((diff (- max-length length))) + (propertize + (concat (if (> diff 0) + (concat candidate (make-string diff ? )) + (substring candidate 0 max-length)) + (format "%3d" (+ 2 i))) + 'face (if (eql (incf i) selidx) + 'dropdown-list-selection-face + 'dropdown-list-face)))) + candidates + lengths))) + (save-excursion + (and start + (dropdown-list-move-to-start-line (length candidates)) + (loop initially (vertical-motion 0) + for candidate in candidates + do (dropdown-list-line (+ (current-column) start) candidate) + while (/= (vertical-motion 1) 0) + finally return t))))) + +(defun dropdown-list (candidates) + (let ((selection) + (temp-buffer)) + (save-window-excursion + (unwind-protect + (let ((candidate-count (length candidates)) + done key (selidx 0)) + (while (not done) + (unless (dropdown-list-at-point candidates selidx) + (switch-to-buffer (setq temp-buffer (get-buffer-create "*selection*")) + 'norecord) + (delete-other-windows) + (delete-region (point-min) (point-max)) + (insert (make-string (length candidates) ?\n)) + (goto-char (point-min)) + (dropdown-list-at-point candidates selidx)) + (setq key (read-key-sequence "")) + (cond ((and (stringp key) + (>= (aref key 0) ?1) + (<= (aref key 0) (+ ?0 (min 9 candidate-count)))) + (setq selection (- (aref key 0) ?1) + done t)) + ((member key `(,(char-to-string ?\C-p) [up] "p")) + (setq selidx (mod (+ candidate-count (1- (or selidx 0))) + candidate-count))) + ((member key `(,(char-to-string ?\C-n) [down] "n")) + (setq selidx (mod (1+ (or selidx -1)) candidate-count))) + ((member key `(,(char-to-string ?\f)))) + ((member key `(,(char-to-string ?\r) [return])) + (setq selection selidx + done t)) + (t (setq done t))))) + (dropdown-list-hide) + (and temp-buffer (kill-buffer temp-buffer))) + ;; (when selection + ;; (message "your selection => %d: %s" selection (nth selection candidates)) + ;; (sit-for 1)) + selection))) + +(defun define-key* (keymap key command) + "Add COMMAND to the multiple-command binding of KEY in KEYMAP. +Use multiple times to bind different COMMANDs to the same KEY." + (define-key keymap key (combine-command command (lookup-key keymap key)))) + +(defun combine-command (command defs) + "$$$$$ FIXME - no doc string" + (cond ((null defs) command) + ((and (listp defs) + (eq 'lambda (car defs)) + (= (length defs) 4) + (listp (fourth defs)) + (eq 'command-selector (car (fourth defs)))) + (unless (member `',command (cdr (fourth defs))) + (setcdr (fourth defs) (nconc (cdr (fourth defs)) `(',command)))) + defs) + (t + `(lambda () (interactive) (command-selector ',defs ',command))))) + +(defvar command-selector-last-command nil "$$$$$ FIXME - no doc string") + +(defun command-selector (&rest candidates) + "$$$$$ FIXME - no doc string" + (if (and (eq last-command this-command) command-selector-last-command) + (call-interactively command-selector-last-command) + (let* ((candidate-strings + (mapcar (lambda (candidate) + (format "%s" (if (symbolp candidate) + candidate + (let ((s (format "%s" candidate))) + (if (>= (length s) 7) + (concat (substring s 0 7) "...") + s))))) + candidates)) + (selection (dropdown-list candidate-strings))) + (when selection + (let ((cmd (nth selection candidates))) + (call-interactively cmd) + (setq command-selector-last-command cmd)))))) + +;;;;;;;;;;;;;;;;;;;; + +(provide 'dropdown-list) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; dropdown-list.el ends here \ No newline at end of file diff --git a/conf/emacs.d/ede-projects.el b/conf/emacs.d/ede-projects.el new file mode 100644 index 0000000..406a203 --- /dev/null +++ b/conf/emacs.d/ede-projects.el @@ -0,0 +1,4 @@ +;; EDE project cache file. +;; This contains a list of projects you have visited. +( +) diff --git a/conf/emacs.d/expander.el b/conf/emacs.d/expander.el new file mode 100644 index 0000000..8b0f817 --- /dev/null +++ b/conf/emacs.d/expander.el @@ -0,0 +1,110 @@ +;;; expander.el --- Text expander interface + +;; Copyright (C) 2009 Tomohiro Matsuyama + +;; Author: Tomohiro Matsuyama +;; Keywords: lisp + +;; 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: + +;; + +;;; Code: + +(eval-when-compile + (require 'cl)) + +(defface expander-face + '((t (:background "darkblue" :foreground "white"))) + "Default face for expander.") + +(defstruct expander + face overlay marker) + +(defun* expander-create (&optional (face 'expander-face)) + (make-expander :face face + :marker (make-marker))) + +(defun expander-delete (expander) + (when (expander-live-p expander) + (expander-hide expander) + (delete-overlay (expander-overlay expander)) + (setf (expander-overlay expander)))) + +(defun expander-live-p (expander) + (and expander (expander-overlay expander) t)) + +(defun expander-show (expander point string) + (save-excursion + (let ((overlay (expander-overlay expander)) + (width 0) + (string-width (string-width string)) + (original-string string)) + ;; Calculate string space to show completion + (goto-char point) + (while (and (not (eolp)) + (< width string-width)) + (incf width (char-width (char-after))) + (forward-char)) + + ;; Show completion + (goto-char point) + (cond + ((= width 0) + (set-marker (expander-marker expander) point) + (let ((buffer-undo-list t)) + (insert " ")) + (setq width 1)) + ((<= width string-width) + ;; No space to show + ;; Do nothing + ) + ((> width string-width) + ;; Need to fill space + (setq string (concat string (make-string (- width string-width) ? ))))) + (setq string (propertize string 'face (expander-face expander))) + (if overlay + (progn + (move-overlay overlay point (+ point width)) + (overlay-put overlay 'invisible nil)) + (setq overlay (make-overlay point (+ point width))) + (setf (expander-overlay expander) overlay) + (overlay-put overlay 'priority 9999)) + (overlay-put overlay 'display (substring string 0 1)) + ;; TODO no width but char + (overlay-put overlay 'after-string (substring string 1)) + (overlay-put overlay 'string original-string)))) + +(defun expander-hide (expander) + (let ((overlay (expander-overlay expander)) + (marker (expander-marker expander)) + (buffer-undo-list t)) + (when overlay + (when (marker-position marker) + (save-excursion + (goto-char marker) + (delete-char 1) + (set-marker marker nil))) + (move-overlay overlay (point-min) (point-min)) + (overlay-put overlay 'invisible t) + (overlay-put overlay 'display nil) + (overlay-put overlay 'after-string nil)))) + +(defun expander-string (expander) + (overlay-get (expander-overlay expander) 'string)) + +(provide 'expander) +;;; expander.el ends here diff --git a/conf/emacs.d/fuzzy.el b/conf/emacs.d/fuzzy.el new file mode 100644 index 0000000..c69150a --- /dev/null +++ b/conf/emacs.d/fuzzy.el @@ -0,0 +1,255 @@ +;;; fuzzy.el --- Fuzzy matching utilities + +;; Copyright (C) 2010 Tomohiro Matsuyama + +;; Author: Tomohiro Matsuyama +;; Keywords: convenience + +;; 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: + +;; + +;;; Code: + +(eval-when-compile + (require 'cl)) +(require 'regexp-opt) + +(defgroup fuzzy nil + "Fuzzy matching utilities." + :group 'convenience + :prefix "fuzzy-") + +(defcustom fuzzy-accept-error-rate 0.10 + "Error threshold." + :group 'fuzzy) + +(defvar fuzzy-accept-length-difference 2) + +(defvar fuzzy-regexp-some-char (format "\\w\\{0,%s\\}" fuzzy-accept-length-difference)) + + + +;;; Functions + +(defun fuzzy-reverse-string (string) + (apply 'string (nreverse (append string nil)))) + +(defun fuzzy-regexp-compile (string) + (labels ((oddp (n) (eq (logand n 1) 1)) + (evenp (n) (eq (logand n 1) 0)) + (opt (n) (regexp-opt-charset (append (substring string + (max 0 (- n 1)) + (min (length string) (+ n 2))) nil)))) + (concat + "\\(" + (loop for i below (length string) + for c = (if (evenp i) (opt i) fuzzy-regexp-some-char) + concat c) + "\\|" + (loop for i below (length string) + for c = (if (oddp i) (opt i) fuzzy-regexp-some-char) + concat c) + "\\)"))) + +(defalias 'fuzzy-edit-distance 'fuzzy-jaro-winkler-distance) + +(defun fuzzy-jaro-winkler-distance (s1 s2) + "http://en.wikipedia.org/wiki/Jaro-Winkler_distance" + (let* ((l1 (length s1)) + (l2 (length s2)) + (r (max 1 (1- (/ (max l1 l2) 2)))) + (m 0) + (tr 0) + (p 0) + cs1 cs2) + (loop with seen = (make-vector l2 nil) + for i below l1 + for c1 = (aref s1 i) do + (loop for j from (max 0 (- i r)) below (min l2 (+ i r)) + for c2 = (aref s2 j) + if (and (char-equal c1 c2) + (null (aref seen j))) do + (push c1 cs1) + (aset seen j c2) + (incf m) + and return nil) + finally + (setq cs1 (nreverse cs1) + cs2 (loop for i below l2 + for c = (aref seen i) + if c collect c))) + (loop for c1 in cs1 + for c2 in cs2 + if (not (char-equal c1 c2)) do + (incf tr)) + (loop for i below (min m 5) + for c1 across s1 + for c2 across s2 + while (char-equal c1 c2) do + (incf p)) + (if (eq m 0) + 0.0 + (setq m (float m)) + (let* ((dj (/ (+ (/ m l1) (/ m l2) (/ (- m (/ tr 2)) m)) 3)) + (dw (+ dj (* p 0.1 (- 1 dj))))) + dw)))) + +;; this function should be compiled +(byte-compile 'fuzzy-jaro-winkler-distance) + +(defun fuzzy-match (s1 s2 &optional function) + (or function (setq function 'fuzzy-edit-distance)) + (and (<= (abs (- (length s1) (length s2))) + fuzzy-accept-length-difference) + (>= (funcall function s1 s2) + (- 1 fuzzy-accept-error-rate)))) + +(defun fuzzy-all-completions (string collection) + "all-completions family with fuzzy matching." + (loop with length = (length string) + for str in collection + for s = (substring str 0 (min (length str) + (+ length fuzzy-accept-length-difference))) + if (fuzzy-match string s) + collect str)) + + + +;;; Search and Incremental Search + +(defvar fuzzy-search-cache nil) +(defvar fuzzy-search-cache-string nil) + +(defun fuzzy-search-cache-activate () + (setq fuzzy-search-cache (make-hash-table)) + (setq fuzzy-search-cache-string nil)) + +(defun fuzzy-search-cache-deactive () + (setq fuzzy-search-cache nil) + (setq fuzzy-search-cache-string nil)) + +(defun fuzzy-search-edit-distance (s1 s2) + (or (and fuzzy-search-cache + (cond + ((null fuzzy-search-cache-string) + (setq fuzzy-search-cache-string s1) + nil) + ((not (equal fuzzy-search-cache-string s1)) + (setq fuzzy-search-cache-string s1) + (clrhash fuzzy-search-cache) + nil) + (t)) + (gethash s2 fuzzy-search-cache)) + (let ((d (fuzzy-edit-distance s1 s2))) + (if fuzzy-search-cache + (puthash s2 d fuzzy-search-cache)) + d))) + +(defun fuzzy-search-match (s1 s2) + (fuzzy-match s1 s2 'fuzzy-search-edit-distance)) + +(defun fuzzy-search-forward (string &optional bound noerror count) + (let* ((regexp (fuzzy-regexp-compile string)) + match-data) + (save-excursion + (while (and (null match-data) + (re-search-forward regexp bound t)) + (if (fuzzy-search-match string (match-string 1)) + (setq match-data (match-data)) + (goto-char (1+ (match-beginning 1)))))) + (when match-data + (store-match-data match-data) + (goto-char (match-end 1))))) + +(defun fuzzy-search-backward (string &optional bound noerror count) + (let* ((regexp (fuzzy-regexp-compile string)) + match-data begin end) + (save-excursion + (while (and (null match-data) + (re-search-backward regexp bound t)) + (setq begin (match-beginning 1) + end (match-end 1)) + (store-match-data nil) + (goto-char (max (point-min) (- begin (* (length string) 2)))) + (while (re-search-forward regexp end t) + (if (fuzzy-search-match string (match-string 1)) + (setq match-data (match-data)) + (goto-char (1+ (match-beginning 1))))) + (unless match-data + (goto-char begin))) + (if match-data + (progn + (store-match-data match-data) + (goto-char (match-beginning 1))) + (store-match-data nil))))) + +(defvar fuzzy-isearch nil) +(defvar fuzzy-isearch-failed-count 0) +(defvar fuzzy-isearch-enabled 'on-failed) +(defvar fuzzy-isearch-original-search-fun nil) +(defvar fuzzy-isearch-prefix "[FUZZY] ") + +(defun fuzzy-isearch-activate () + (setq fuzzy-isearch t) + (setq fuzzy-isearch-failed-count 0) + (fuzzy-search-cache-activate)) + +(defun fuzzy-isearch-deactivate () + (setq fuzzy-isearch nil) + (setq fuzzy-isearch-failed-count 0) + (fuzzy-search-cache-deactive)) + +(defun fuzzy-isearch () + (cond (isearch-word + (if isearch-forward 'word-search-forward 'word-search-backward)) + (isearch-regexp + (if isearch-forward 're-search-forward 're-search-backward)) + ((or fuzzy-isearch + (eq fuzzy-isearch-enabled 'always) + (and (eq fuzzy-isearch-enabled 'on-failed) + (null isearch-success) + isearch-wrapped + (> (setq fuzzy-isearch-failed-count (1+ fuzzy-isearch-failed-count)) + 1))) + (unless fuzzy-isearch + ;(goto-char isearch-opoint) + (fuzzy-isearch-activate)) + (if isearch-forward 'fuzzy-search-forward 'fuzzy-search-backward)) + (t + (if isearch-forward 'search-forward 'search-backward)))) + +(defun fuzzy-isearch-end-hook () + (fuzzy-isearch-deactivate)) + +(defun turn-on-fuzzy-isearch () + (interactive) + (setq fuzzy-isearch-original-search-fun isearch-search-fun-function) + (setq isearch-search-fun-function 'fuzzy-isearch) + (add-hook 'isearch-mode-end-hook 'fuzzy-isearch-end-hook)) + +(defun turn-off-fuzzy-isearch () + (interactive) + (setq isearch-search-fun-function fuzzy-isearch-original-search-fun) + (remove-hook 'isearch-mode-end-hook 'fuzzy-isearch-end-hook)) + +(defadvice isearch-message-prefix (after fuzzy-isearch-message-prefix activate) + (if fuzzy-isearch + (setq ad-return-value (concat fuzzy-isearch-prefix ad-return-value)) + ad-return-value)) + +(provide 'fuzzy) +;;; fuzzy.el ends here diff --git a/conf/emacs.d/fuzzy.elc b/conf/emacs.d/fuzzy.elc new file mode 100644 index 0000000..41bfe4b Binary files /dev/null and b/conf/emacs.d/fuzzy.elc differ diff --git a/conf/emacs.d/popup.el b/conf/emacs.d/popup.el new file mode 100644 index 0000000..0f14dfe --- /dev/null +++ b/conf/emacs.d/popup.el @@ -0,0 +1,1061 @@ +;;; popup.el --- Visual popup interface + +;; Copyright (C) 2009, 2010 Tomohiro Matsuyama + +;; Author: Tomohiro Matsuyama +;; Keywords: lisp +;; Version: 0.4 + +;; 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: + +;; + +;;; Code: + +(eval-when-compile + (require 'cl)) + + + +;; Utilities + +(defvar popup-use-optimized-column-computation t + "Use optimized column computation routine. +If there is a problem, please set it to nil.") + +;; Borrowed from anything.el +(defmacro popup-aif (test-form then-form &rest else-forms) + "Anaphoric if. Temporary variable `it' is the result of test-form." + (declare (indent 2)) + `(let ((it ,test-form)) + (if it ,then-form ,@else-forms))) + +(defun popup-x-to-string (x) + "Convert any object to string effeciently. +This is faster than prin1-to-string in many cases." + (typecase x + (string x) + (symbol (symbol-name x)) + (integer (number-to-string x)) + (float (number-to-string x)) + (t (format "%s" x)))) + +(defun popup-substring-by-width (string width) + "Return cons of substring and remaining string by `WIDTH'." + ;; Expand tabs with 4 spaces + (setq string (replace-regexp-in-string "\t" " " string)) + (loop with len = (length string) + with w = 0 + for l from 0 + for c in (append string nil) + while (<= (incf w (char-width c)) width) + finally return + (if (< l len) + (cons (substring string 0 l) (substring string l)) + (list string)))) + +(defun popup-fill-string (string &optional width max-width justify squeeze) + "Split STRING into fixed width strings and return a cons cell like +\(WIDTH . ROWS). Here, the car WIDTH indicates the actual maxim width of ROWS. + +The argument WIDTH specifies the width of filling each paragraph. WIDTH nil +means don't perform any justification and word wrap. Note that this function +doesn't add any padding characters at the end of each row. + +MAX-WIDTH, if WIDTH is nil, specifies the maximum number of columns. + +The optional fourth argument JUSTIFY specifies which kind of justification +to do: `full', `left', `right', `center', or `none' (equivalent to nil). +A value of t means handle each paragraph as specified by its text properties. + +SQUEEZE nil means leave whitespaces other than line breaks untouched." + (if (eq width 0) + (error "Can't fill string with 0 width")) + (if width + (setq max-width width)) + (with-temp-buffer + (let ((tab-width 4) + (fill-column width) + (left-margin 0) + (kinsoku-limit 1) + indent-tabs-mode + row rows) + (insert string) + (untabify (point-min) (point-max)) + (if width + (fill-region (point-min) (point-max) justify (not squeeze))) + (goto-char (point-min)) + (setq width 0) + (while (prog2 + (let ((line (buffer-substring + (point) (progn (end-of-line) (point))))) + (if max-width + (while (progn + (setq row (truncate-string-to-width line max-width) + width (max width (string-width row))) + (push row rows) + (if (not (= (length row) (length line))) + (setq line (substring line (length row)))))) + (setq width (max width (string-width line))) + (push line rows))) + (< (point) (point-max)) + (beginning-of-line 2))) + (cons width (nreverse rows))))) + +(defmacro popup-save-buffer-state (&rest body) + (declare (indent 0)) + `(save-excursion + (let ((buffer-undo-list t) + (buffer-read-only nil) + (modified (buffer-modified-p))) + (unwind-protect + (progn ,@body) + (set-buffer-modified-p modified))))) + +(defun popup-preferred-width (list) + "Return preferred width of popup to show `LIST' beautifully." + (loop with tab-width = 4 + for item in list + for summary = (popup-item-summary item) + maximize (string-width (popup-x-to-string item)) into width + if (stringp summary) + maximize (+ (string-width summary) 2) into summary-width + finally return (* (ceiling (/ (+ (or width 0) (or summary-width 0)) 10.0)) 10))) + +;; window-full-width-p is not defined in Emacs 22.1 +(defun popup-window-full-width-p (&optional window) + (if (fboundp 'window-full-width-p) + (window-full-width-p window) + (= (window-width window) (frame-width (window-frame (or window (selected-window))))))) + +;; truncated-partial-width-window-p is not defined in Emacs 22 +(defun popup-truncated-partial-width-window-p (&optional window) + (unless window + (setq window (selected-window))) + (unless (popup-window-full-width-p window) + (let ((t-p-w-w (buffer-local-value 'truncate-partial-width-windows + (window-buffer window)))) + (if (integerp t-p-w-w) + (< (window-width window) t-p-w-w) + t-p-w-w)))) + +(defun popup-current-physical-column () + (or (when (and popup-use-optimized-column-computation + (eq (window-hscroll) 0)) + (let ((current-column (current-column))) + (if (or (popup-truncated-partial-width-window-p) + truncate-lines + (< current-column (window-width))) + current-column))) + (car (posn-col-row (posn-at-point))))) + +(defun popup-last-line-of-buffer-p () + (save-excursion (end-of-line) (/= (forward-line) 0))) + +(defun popup-lookup-key-by-event (function event) + (or (funcall function (vector event)) + (if (symbolp event) + (popup-aif (get event 'event-symbol-element-mask) + (funcall function (vector (logior (or (get (car it) 'ascii-character) 0) + (cadr it)))))))) + + + +;; Popup common + +(defgroup popup nil + "Visual popup interface" + :group 'lisp + :prefix "popup-") + +(defface popup-face + '((t (:background "lightgray" :foreground "black"))) + "Face for popup." + :group 'popup) + +(defface popup-scroll-bar-foreground-face + '((t (:background "black"))) + "Foreground face for scroll-bar." + :group 'popup) + +(defface popup-scroll-bar-background-face + '((t (:background "gray"))) + "Background face for scroll-bar." + :group 'popup) + +(defvar popup-instances nil + "Popup instances.") + +(defvar popup-scroll-bar-foreground-char + (propertize " " 'face 'popup-scroll-bar-foreground-face) + "Foreground character for scroll-bar.") + +(defvar popup-scroll-bar-background-char + (propertize " " 'face 'popup-scroll-bar-background-face) + "Background character for scroll-bar.") + +(defstruct popup + point row column width height min-height direction overlays + parent depth + face selection-face + margin-left margin-right margin-left-cancel scroll-bar symbol + cursor offset scroll-top current-height list newlines + pattern original-list) + +(defun popup-item-propertize (item &rest properties) + "Same to `propertize` but this avoids overriding existed value with `nil` property." + (let (props) + (while properties + (when (cadr properties) + (push (car properties) props) + (push (cadr properties) props)) + (setq properties (cddr properties))) + (apply 'propertize + (popup-x-to-string item) + (nreverse props)))) + +(defun popup-item-property (item property) + (if (stringp item) + (get-text-property 0 property item))) + +(defun* popup-make-item (name + &key + value + popup-face + selection-face + sublist + document + symbol + summary) + "Utility function to make popup item. +See also `popup-item-propertize'." + (popup-item-propertize name + 'value value + 'popup-face popup-face + 'selection-face selection-face + 'document document + 'symbol symbol + 'summary summary + 'sublist sublist)) + +(defsubst popup-item-value (item) (popup-item-property item 'value)) +(defsubst popup-item-value-or-self (item) (or (popup-item-value item) item)) +(defsubst popup-item-popup-face (item) (popup-item-property item 'popup-face)) +(defsubst popup-item-selection-face (item) (popup-item-property item 'selection-face)) +(defsubst popup-item-document (item) (popup-item-property item 'document)) +(defsubst popup-item-summary (item) (popup-item-property item 'summary)) +(defsubst popup-item-symbol (item) (popup-item-property item 'symbol)) +(defsubst popup-item-sublist (item) (popup-item-property item 'sublist)) + +(defun popup-item-documentation (item) + (let ((doc (popup-item-document item))) + (if (functionp doc) + (setq doc (funcall doc (popup-item-value-or-self item)))) + doc)) + +(defun popup-item-show-help-1 (item) + (let ((doc (popup-item-documentation item))) + (when doc + (with-current-buffer (get-buffer-create " *Popup Help*") + (erase-buffer) + (insert doc) + (goto-char (point-min)) + (display-buffer (current-buffer))) + t))) + +(defun popup-item-show-help (item &optional persist) + (when item + (if (not persist) + (save-window-excursion + (when (popup-item-show-help-1 item) + (block nil + (while t + (clear-this-command-keys) + (let ((key (read-key-sequence-vector nil))) + (case (key-binding key) + ('scroll-other-window + (scroll-other-window)) + ('scroll-other-window-down + (scroll-other-window-down nil)) + (t + (setq unread-command-events (append key unread-command-events)) + (return)))))))) + (popup-item-show-help-1 item)))) + +(defun popup-set-list (popup list) + (popup-set-filtered-list popup list) + (setf (popup-pattern popup) nil) + (setf (popup-original-list popup) list)) + +(defun popup-set-filtered-list (popup list) + (setf (popup-list popup) list + (popup-offset popup) (if (> (popup-direction popup) 0) + 0 + (max (- (popup-height popup) (length list)) 0)))) + +(defun popup-selected-item (popup) + (nth (popup-cursor popup) (popup-list popup))) + +(defun popup-selected-line (popup) + (- (popup-cursor popup) (popup-scroll-top popup))) + +(defun popup-line-overlay (popup line) + (aref (popup-overlays popup) line)) + +(defun popup-selected-line-overlay (popup) + (popup-line-overlay popup (popup-selected-line popup))) + +(defun popup-hide-line (popup line) + (let ((overlay (popup-line-overlay popup line))) + (overlay-put overlay 'display nil) + (overlay-put overlay 'after-string nil))) + +(defun popup-line-hidden-p (popup line) + (let ((overlay (popup-line-overlay popup line))) + (and (eq (overlay-get overlay 'display) nil) + (eq (overlay-get overlay 'after-string) nil)))) + +(defun popup-set-line-item (popup line item face margin-left margin-right scroll-bar-char symbol summary) + (let* ((overlay (popup-line-overlay popup line)) + (content (popup-create-line-string popup (popup-x-to-string item) margin-left margin-right symbol summary)) + (start 0) + (prefix (overlay-get overlay 'prefix)) + (postfix (overlay-get overlay 'postfix)) + end) + ;; Overlap face properties + (if (get-text-property start 'face content) + (setq start (next-single-property-change start 'face content))) + (while (and start (setq end (next-single-property-change start 'face content))) + (put-text-property start end 'face face content) + (setq start (next-single-property-change end 'face content))) + (if start + (put-text-property start (length content) 'face face content)) + (unless (overlay-get overlay 'dangle) + (overlay-put overlay 'display (concat prefix (substring content 0 1))) + (setq prefix nil + content (concat (substring content 1)))) + (overlay-put overlay + 'after-string + (concat prefix + content + scroll-bar-char + postfix)))) + +(defun popup-create-line-string (popup string margin-left margin-right symbol summary) + (let* ((popup-width (popup-width popup)) + (summary-width (string-width summary)) + (string (car (popup-substring-by-width string + (- popup-width + (if (> summary-width 0) + (+ summary-width 2) + 0))))) + (string-width (string-width string))) + (concat margin-left + string + (make-string (max (- popup-width string-width summary-width) 0) ? ) + summary + symbol + margin-right))) + +(defun popup-live-p (popup) + (and popup (popup-overlays popup) t)) + +(defun popup-child-point (popup &optional offset) + (overlay-end (popup-line-overlay popup + (or offset + (popup-selected-line popup))))) + +(defun* popup-create (point + width + height + &key + min-height + around + (face 'popup-face) + (selection-face face) + scroll-bar + margin-left + margin-right + symbol + parent + parent-offset) + (or margin-left (setq margin-left 0)) + (or margin-right (setq margin-right 0)) + (unless point + (setq point + (if parent (popup-child-point parent parent-offset) (point)))) + + (save-excursion + (goto-char point) + (let* ((row (line-number-at-pos)) + (column (popup-current-physical-column)) + (overlays (make-vector height nil)) + (popup-width (+ width + (if scroll-bar 1 0) + margin-left + margin-right + (if symbol 2 0))) + margin-left-cancel + (window (selected-window)) + (window-start (window-start)) + (window-hscroll (window-hscroll)) + (window-width (window-width)) + (right (+ column popup-width)) + (overflow (and (> right window-width) + (>= right popup-width))) + (foldable (and (null parent) + (>= column popup-width))) + (direction (or + ;; Currently the direction of cascade popup won't be changed + (and parent (popup-direction parent)) + + ;; Calculate direction + (if (and (> row height) + (> height (- (max 1 (- (window-height) + (if mode-line-format 1 0) + (if header-line-format 1 0))) + (count-lines window-start (point))))) + -1 + 1))) + (depth (if parent (1+ (popup-depth parent)) 0)) + (newlines (max 0 (+ (- height (count-lines point (point-max))) (if around 1 0)))) + current-column) + (when (> newlines 0) + (popup-save-buffer-state + (goto-char (point-max)) + (insert (make-string newlines ?\n)))) + + (if overflow + (if foldable + (progn + (decf column (- popup-width margin-left margin-right)) + (unless around (move-to-column column))) + (when (not truncate-lines) + ;; Cut out overflow + (let ((d (1+ (- popup-width (- window-width column))))) + (decf popup-width d) + (decf width d))) + (decf column margin-left)) + (decf column margin-left)) + (when (and (null parent) + (< column 0)) + ;; Cancel margin left + (setq column 0) + (decf popup-width margin-left) + (setq margin-left-cancel t)) + + (dotimes (i height) + (let (overlay begin w (dangle t) (prefix "") (postfix "")) + (when around + (if (>= emacs-major-version 23) + (vertical-motion (cons column direction)) + (vertical-motion direction) + (move-to-column (+ (current-column) column)))) + (setq around t + current-column (popup-current-physical-column)) + + (when (> current-column column) + (backward-char) + (setq current-column (popup-current-physical-column))) + (when (< current-column column) + ;; Extend short buffer lines by popup prefix (line of spaces) + (setq prefix (make-string (+ (if (= current-column 0) + (- window-hscroll (current-column)) + 0) + (- column current-column)) + ? ))) + + (setq begin (point)) + (setq w (+ popup-width (length prefix))) + (while (and (not (eolp)) (> w 0)) + (setq dangle nil) + (decf w (char-width (char-after))) + (forward-char)) + (if (< w 0) + (setq postfix (make-string (- w) ? ))) + + (setq overlay (make-overlay begin (point))) + (overlay-put overlay 'window window) + (overlay-put overlay 'dangle dangle) + (overlay-put overlay 'prefix prefix) + (overlay-put overlay 'postfix postfix) + (overlay-put overlay 'width width) + (aset overlays + (if (> direction 0) i (- height i 1)) + overlay))) + (loop for p from (- 10000 (* depth 1000)) + for overlay in (nreverse (append overlays nil)) + do (overlay-put overlay 'priority p)) + (let ((it (make-popup :point point + :row row + :column column + :width width + :height height + :min-height min-height + :direction direction + :parent parent + :depth depth + :face face + :selection-face selection-face + :margin-left margin-left + :margin-right margin-right + :margin-left-cancel margin-left-cancel + :scroll-bar scroll-bar + :symbol symbol + :cursor 0 + :scroll-top 0 + :current-height 0 + :list nil + :newlines newlines + :overlays overlays))) + (push it popup-instances) + it)))) + +(defun popup-delete (popup) + (when (popup-live-p popup) + (popup-hide popup) + (mapc 'delete-overlay (popup-overlays popup)) + (setf (popup-overlays popup) nil) + (setq popup-instances (delq popup popup-instances)) + (let ((newlines (popup-newlines popup))) + (when (> newlines 0) + (popup-save-buffer-state + (goto-char (point-max)) + (dotimes (i newlines) + (if (= (char-before) ?\n) + (delete-char -1))))))) + nil) + +(defun popup-draw (popup) + (loop with height = (popup-height popup) + with min-height = (popup-min-height popup) + with popup-face = (popup-face popup) + with selection-face = (popup-selection-face popup) + with list = (popup-list popup) + with length = (length list) + with thum-size = (max (/ (* height height) (max length 1)) 1) + with page-size = (/ (+ 0.0 (max length 1)) height) + with scroll-bar = (popup-scroll-bar popup) + with margin-left = (make-string (if (popup-margin-left-cancel popup) 0 (popup-margin-left popup)) ? ) + with margin-right = (make-string (popup-margin-right popup) ? ) + with symbol = (popup-symbol popup) + with cursor = (popup-cursor popup) + with scroll-top = (popup-scroll-top popup) + with offset = (popup-offset popup) + for o from offset + for i from scroll-top + while (< o height) + for item in (nthcdr scroll-top list) + for page-index = (* thum-size (/ o thum-size)) + for face = (if (= i cursor) + (or (popup-item-selection-face item) selection-face) + (or (popup-item-popup-face item) popup-face)) + for empty-char = (propertize " " 'face face) + for scroll-bar-char = (if scroll-bar + (cond + ((<= page-size 1) + empty-char) + ((and (> page-size 1) + (>= cursor (* page-index page-size)) + (< cursor (* (+ page-index thum-size) page-size))) + popup-scroll-bar-foreground-char) + (t + popup-scroll-bar-background-char)) + "") + for sym = (if symbol + (concat " " (or (popup-item-symbol item) " ")) + "") + for summary = (or (popup-item-summary item) "") + + do + ;; Show line and set item to the line + (popup-set-line-item popup o item face margin-left margin-right scroll-bar-char sym summary) + + finally + ;; Remember current height + (setf (popup-current-height popup) (- o offset)) + + ;; Hide remaining lines + (let ((scroll-bar-char (if scroll-bar (propertize " " 'face popup-face) "")) + (symbol (if symbol " " ""))) + (if (> (popup-direction popup) 0) + (progn + (when min-height + (while (< o min-height) + (popup-set-line-item popup o "" popup-face margin-left margin-right scroll-bar-char symbol "") + (incf o))) + (while (< o height) + (popup-hide-line popup o) + (incf o))) + (loop with h = (if min-height (- height min-height) offset) + for o from 0 below offset + if (< o h) + do (popup-hide-line popup o) + if (>= o h) + do (popup-set-line-item popup o "" popup-face margin-left margin-right scroll-bar-char symbol "")))))) + +(defun popup-hide (popup) + (dotimes (i (popup-height popup)) + (popup-hide-line popup i))) + +(defun popup-hidden-p (popup) + (let ((hidden t)) + (when (popup-live-p popup) + (dotimes (i (popup-height popup)) + (unless (popup-line-hidden-p popup i) + (setq hidden nil)))) + hidden)) + +(defun popup-select (popup i) + (setq i (+ i (popup-offset popup))) + (when (and (<= 0 i) (< i (popup-height popup))) + (setf (popup-cursor popup) i) + (popup-draw popup) + t)) + +(defun popup-next (popup) + (let ((height (popup-height popup)) + (cursor (1+ (popup-cursor popup))) + (scroll-top (popup-scroll-top popup)) + (length (length (popup-list popup)))) + (cond + ((>= cursor length) + ;; Back to first page + (setq cursor 0 + scroll-top 0)) + ((= cursor (+ scroll-top height)) + ;; Go to next page + (setq scroll-top (min (1+ scroll-top) (max (- length height) 0))))) + (setf (popup-cursor popup) cursor + (popup-scroll-top popup) scroll-top) + (popup-draw popup))) + +(defun popup-previous (popup) + (let ((height (popup-height popup)) + (cursor (1- (popup-cursor popup))) + (scroll-top (popup-scroll-top popup)) + (length (length (popup-list popup)))) + (cond + ((< cursor 0) + ;; Go to last page + (setq cursor (1- length) + scroll-top (max (- length height) 0))) + ((= cursor (1- scroll-top)) + ;; Go to previous page + (decf scroll-top))) + (setf (popup-cursor popup) cursor + (popup-scroll-top popup) scroll-top) + (popup-draw popup))) + +(defun popup-scroll-down (popup &optional n) + (let ((scroll-top (min (+ (popup-scroll-top popup) (or n 1)) + (- (length (popup-list popup)) (popup-height popup))))) + (setf (popup-cursor popup) scroll-top + (popup-scroll-top popup) scroll-top) + (popup-draw popup))) + +(defun popup-scroll-up (popup &optional n) + (let ((scroll-top (max (- (popup-scroll-top popup) (or n 1)) + 0))) + (setf (popup-cursor popup) scroll-top + (popup-scroll-top popup) scroll-top) + (popup-draw popup))) + + + +;; Popup isearch + +(defface popup-isearch-match + '((t (:background "sky blue"))) + "Popup isearch match face." + :group 'popup) + +(defvar popup-isearch-cursor-color "blue") + +(defvar popup-isearch-keymap + (let ((map (make-sparse-keymap))) + ;(define-key map "\r" 'popup-isearch-done) + (define-key map "\C-g" 'popup-isearch-cancel) + (define-key map "\C-h" 'popup-isearch-delete) + (define-key map (kbd "DEL") 'popup-isearch-delete) + map)) + +(defsubst popup-isearch-char-p (char) + (and (integerp char) + (<= 32 char) + (<= char 126))) + +(defun popup-isearch-filter-list (pattern list) + (loop with regexp = (regexp-quote pattern) + for item in list + do + (unless (stringp item) + (setq item (popup-item-propertize (popup-x-to-string item) + 'value item))) + if (string-match regexp item) + collect (let ((beg (match-beginning 0)) + (end (match-end 0))) + (alter-text-property 0 (length item) 'face + (lambda (prop) + (unless (eq prop 'popup-isearch-match) + prop)) + item) + (put-text-property beg end + 'face 'popup-isearch-match + item) + item))) + +(defun popup-isearch-prompt (popup pattern) + (format "Pattern: %s" (if (= (length (popup-list popup)) 0) + (propertize pattern 'face 'isearch-fail) + pattern))) + +(defun popup-isearch-update (popup pattern &optional callback) + (setf (popup-cursor popup) 0 + (popup-scroll-top popup) 0 + (popup-pattern popup) pattern) + (let ((list (popup-isearch-filter-list pattern (popup-original-list popup)))) + (popup-set-filtered-list popup list) + (if callback + (funcall callback list))) + (popup-draw popup)) + +(defun* popup-isearch (popup + &key + (cursor-color popup-isearch-cursor-color) + (keymap popup-isearch-keymap) + callback + help-delay) + (let ((list (popup-original-list popup)) + (pattern (or (popup-pattern popup) "")) + (old-cursor-color (frame-parameter (selected-frame) 'cursor-color)) + prompt key binding done) + (unwind-protect + (unless (block nil + (if cursor-color + (set-cursor-color cursor-color)) + (while t + (setq prompt (popup-isearch-prompt popup pattern)) + (setq key (popup-menu-read-key-sequence keymap prompt help-delay)) + (if (null key) + (unless (funcall popup-menu-show-quick-help-function popup nil :prompt prompt) + (clear-this-command-keys) + (push (read-event prompt) unread-command-events)) + (setq binding (lookup-key keymap key)) + (cond + ((and (stringp key) + (popup-isearch-char-p (aref key 0))) + (setq pattern (concat pattern key))) + ((eq binding 'popup-isearch-done) + (return t)) + ((eq binding 'popup-isearch-cancel) + (return nil)) + ((eq binding 'popup-isearch-delete) + (if (> (length pattern) 0) + (setq pattern (substring pattern 0 (1- (length pattern)))))) + (t + (setq unread-command-events + (append (listify-key-sequence key) unread-command-events)) + (return t))) + (popup-isearch-update popup pattern callback)))) + (popup-isearch-update popup "" callback) + t) ; Return non-nil if isearch is cancelled + (if old-cursor-color + (set-cursor-color old-cursor-color))))) + + + +;; Popup tip + +(defface popup-tip-face + '((t (:background "khaki1" :foreground "black"))) + "Face for popup tip." + :group 'popup) + +(defvar popup-tip-max-width 80) + +(defun* popup-tip (string + &key + point + (around t) + width + (height 15) + min-height + truncate + margin + margin-left + margin-right + scroll-bar + parent + parent-offset + nowait + prompt + &aux tip lines) + (if (bufferp string) + (setq string (with-current-buffer string (buffer-string)))) + ;; TODO strip text (mainly face) properties + (setq string (substring-no-properties string)) + + (and (eq margin t) (setq margin 1)) + (or margin-left (setq margin-left margin)) + (or margin-right (setq margin-right margin)) + + (let ((it (popup-fill-string string width popup-tip-max-width))) + (setq width (car it) + lines (cdr it))) + + (setq tip (popup-create point width height + :min-height min-height + :around around + :margin-left margin-left + :margin-right margin-right + :scroll-bar scroll-bar + :face 'popup-tip-face + :parent parent + :parent-offset parent-offset)) + + (unwind-protect + (when (> (popup-width tip) 0) ; not to be corrupted + (when (and (not (eq width (popup-width tip))) ; truncated + (not truncate)) + ;; Refill once again to lines be fitted to popup width + (setq width (popup-width tip)) + (setq lines (cdr (popup-fill-string string width width)))) + + (popup-set-list tip lines) + (popup-draw tip) + (if nowait + tip + (clear-this-command-keys) + (push (read-event prompt) unread-command-events) + t)) + (unless nowait + (popup-delete tip)))) + + + +;; Popup menu + +(defface popup-menu-face + '((t (:background "lightgray" :foreground "black"))) + "Face for popup menu." + :group 'popup) + +(defface popup-menu-selection-face + '((t (:background "steelblue" :foreground "white"))) + "Face for popup menu selection." + :group 'popup) + +(defvar popup-menu-show-tip-function 'popup-tip + "Function used for showing tooltip by `popup-menu-show-quick-help'.") + +(defvar popup-menu-show-quick-help-function 'popup-menu-show-quick-help + "Function used for showing quick help by `popup-menu*'.") + +(defun popup-menu-show-help (menu &optional persist item) + (popup-item-show-help (or item (popup-selected-item menu)) persist)) + +(defun popup-menu-documentation (menu &optional item) + (popup-item-documentation (or item (popup-selected-item menu)))) + +(defun popup-menu-show-quick-help (menu &optional item &rest args) + (let* ((point (plist-get args :point)) + (height (or (plist-get args :height) (popup-height menu))) + (min-height (min height (popup-current-height menu))) + (around nil) + (parent-offset (popup-offset menu)) + (doc (popup-menu-documentation menu item))) + (when (stringp doc) + (if (popup-hidden-p menu) + (setq around t + menu nil + parent-offset nil) + (setq point nil)) + (let ((popup-use-optimized-column-computation nil)) ; To avoid wrong positioning + (apply popup-menu-show-tip-function + doc + :point point + :height height + :min-height min-height + :around around + :parent menu + :parent-offset parent-offset + args))))) + +(defun popup-menu-read-key-sequence (keymap &optional prompt timeout) + (catch 'timeout + (let ((timer (and timeout + (run-with-timer timeout nil + (lambda () + (if (zerop (length (this-command-keys))) + (throw 'timeout nil)))))) + (old-global-map (current-global-map)) + (temp-global-map (make-sparse-keymap)) + (overriding-terminal-local-map (make-sparse-keymap))) + (substitute-key-definition 'keyboard-quit 'keyboard-quit + temp-global-map old-global-map) + (define-key temp-global-map [menu-bar] (lookup-key old-global-map [menu-bar])) + (define-key temp-global-map [tool-bar] (lookup-key old-global-map [tool-bar])) + (set-keymap-parent overriding-terminal-local-map keymap) + (if (current-local-map) + (define-key overriding-terminal-local-map [menu-bar] + (lookup-key (current-local-map) [menu-bar]))) + (unwind-protect + (progn + (use-global-map temp-global-map) + (clear-this-command-keys) + (with-temp-message prompt + (read-key-sequence nil))) + (use-global-map old-global-map) + (if timer (cancel-timer timer)))))) + +(defun popup-menu-fallback (event default)) + +(defun* popup-menu-event-loop (menu keymap fallback &optional prompt help-delay isearch isearch-cursor-color isearch-keymap isearch-callback &aux key binding) + (block nil + (while (popup-live-p menu) + (and isearch + (popup-isearch menu + :cursor-color isearch-cursor-color + :keymap isearch-keymap + :callback isearch-callback + :help-delay help-delay) + (keyboard-quit)) + (setq key (popup-menu-read-key-sequence keymap prompt help-delay)) + (if (null key) + (unless (funcall popup-menu-show-quick-help-function menu nil :prompt prompt) + (clear-this-command-keys) + (push (read-event prompt) unread-command-events)) + (if (eq (lookup-key (current-global-map) key) 'keyboard-quit) + (keyboard-quit)) + (setq binding (lookup-key keymap key)) + (cond + ((eq binding 'popup-close) + (if (popup-parent menu) + (return))) + ((memq binding '(popup-select popup-open)) + (let* ((item (popup-selected-item menu)) + (sublist (popup-item-sublist item))) + (if sublist + (popup-aif (popup-cascade-menu sublist + :around nil + :parent menu + :margin-left (popup-margin-left menu) + :margin-right (popup-margin-right menu) + :scroll-bar (popup-scroll-bar menu)) + (and it (return it))) + (if (eq binding 'popup-select) + (return (popup-item-value-or-self item)))))) + ((eq binding 'popup-next) + (popup-next menu)) + ((eq binding 'popup-previous) + (popup-previous menu)) + ((eq binding 'popup-help) + (popup-menu-show-help menu)) + ((eq binding 'popup-isearch) + (popup-isearch menu + :cursor-color isearch-cursor-color + :keymap isearch-keymap + :callback isearch-callback + :help-delay help-delay)) + ((commandp binding) + (call-interactively binding)) + (t + (funcall fallback key (key-binding key)))))))) + +;; popup-menu is used by mouse.el unfairly... +(defun* popup-menu* (list + &key + point + (around t) + (width (popup-preferred-width list)) + (height 15) + margin + margin-left + margin-right + scroll-bar + symbol + parent + parent-offset + (keymap popup-menu-keymap) + (fallback 'popup-menu-fallback) + help-delay + prompt + isearch + (isearch-cursor-color popup-isearch-cursor-color) + (isearch-keymap popup-isearch-keymap) + isearch-callback + &aux menu event) + (and (eq margin t) (setq margin 1)) + (or margin-left (setq margin-left margin)) + (or margin-right (setq margin-right margin)) + (if (and scroll-bar + (integerp margin-right) + (> margin-right 0)) + ;; Make scroll-bar space as margin-right + (decf margin-right)) + (setq menu (popup-create point width height + :around around + :face 'popup-menu-face + :selection-face 'popup-menu-selection-face + :margin-left margin-left + :margin-right margin-right + :scroll-bar scroll-bar + :symbol symbol + :parent parent)) + (unwind-protect + (progn + (popup-set-list menu list) + (popup-draw menu) + (popup-menu-event-loop menu keymap fallback prompt help-delay isearch + isearch-cursor-color isearch-keymap isearch-callback)) + (popup-delete menu))) + +(defun popup-cascade-menu (list &rest args) + "Same to `popup-menu', but an element of `LIST' can be +list of submenu." + (apply 'popup-menu* + (mapcar (lambda (item) + (if (consp item) + (popup-make-item (car item) + :sublist (cdr item) + :symbol ">") + item)) + list) + :symbol t + args)) + +(defvar popup-menu-keymap + (let ((map (make-sparse-keymap))) + (define-key map "\r" 'popup-select) + (define-key map "\C-f" 'popup-open) + (define-key map [right] 'popup-open) + (define-key map "\C-b" 'popup-close) + (define-key map [left] 'popup-close) + + (define-key map "\C-n" 'popup-next) + (define-key map [down] 'popup-next) + (define-key map "\C-p" 'popup-previous) + (define-key map [up] 'popup-previous) + + (define-key map [f1] 'popup-help) + (define-key map (kbd "\C-?") 'popup-help) + + (define-key map "\C-s" 'popup-isearch) + map)) + +(provide 'popup) +;;; popup.el ends here diff --git a/conf/emacs.d/popup.elc b/conf/emacs.d/popup.elc new file mode 100644 index 0000000..e3d81ad Binary files /dev/null and b/conf/emacs.d/popup.elc differ diff --git a/conf/emacs.d/pulldown.el b/conf/emacs.d/pulldown.el new file mode 100644 index 0000000..74e022b --- /dev/null +++ b/conf/emacs.d/pulldown.el @@ -0,0 +1,361 @@ +;;; pulldown.el --- Visual pulldown menu interface + +;; Copyright (C) 2009 Tomohiro Matsuyama + +;; Author: Tomohiro Matsuyama +;; Keywords: lisp +;; Version: 0.1 + +;; 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: + +;; + +;;; Code: + +(eval-when-compile + (require 'cl)) + +(defgroup pulldown nil + "Visual pulldown menu interface" + :group 'lisp + :prefix "pulldown-") + +(defface pulldown-default-face + '((t (:background "lightgray" :foreground "black" :underline "darkgray"))) + "Face for pulldown menu." + :group 'pulldown) + +(defface pulldown-default-selection-face + '((t (:background "steelblue" :foreground "white"))) + "Face for selection." + :group 'pulldown) + +(defstruct pulldown + point row column width height direction overlays + newline-added + face selection-face + cursor offset scroll-top list) + +(defun pulldown-x-to-string (x) + "Convert anything to string effeciently." + (typecase x + (string x) + (symbol (symbol-name x)) + (integer (number-to-string x)) + (float (number-to-string x)) + (t (format "%s" x)))) + +(defun pulldown-goto-line (line) + "Goto `LINE' regarding of narrowing." + (goto-char (point-min)) + (forward-line (1- line))) + +(defun pulldown-current-physical-column () + "Current physical column. (not logical column)" + (car (posn-col-row (posn-at-point)))) + +(defun pulldown-last-line-of-buffer () + "Return non-nil if at last line of buffer." + (save-excursion (/= (forward-line) 0))) + +(defun pulldown-item-propertize (item &rest properties) + (if (stringp item) + (apply 'propertize item properties) + item)) + +(defun pulldown-item-property (item property) + (if (stringp item) + (get-text-property 0 property item))) + +(defun pulldown-set-list (menu list) + "Set menu list." + (setf (pulldown-list menu) list + (pulldown-offset menu) (if (> (pulldown-direction menu) 0) + 0 + (max (- (pulldown-height menu) (length list)) 0)))) + +(defun pulldown-line-overlay (menu line) + "Return a overlay of `MENU' at `LINE'." + (aref (pulldown-overlays menu) line)) + +(defun pulldown-hide-line (menu line) + "Hide `LINE' in `MENU'." + (let ((overlay (pulldown-line-overlay menu line))) + (overlay-put overlay 'invisible nil) + (overlay-put overlay 'after-string nil))) + +(defun pulldown-show-line (menu line) + "Show `LINE' in `MENU'." + (overlay-put (pulldown-line-overlay menu line) 'invisible t)) + +(defun pulldown-set-line-item (menu line item &optional face) + "Set list of `LINE' in `MENU'." + (let ((overlay (pulldown-line-overlay menu line))) + (overlay-put overlay 'real-item item) + (overlay-put overlay + 'after-string + (concat (overlay-get overlay 'prefix) + (propertize (pulldown-create-line-string menu item) 'face face) + (overlay-get overlay 'postfix))))) + +(defun pulldown-create-line-string (menu item) + "Create string for showing `ITEM' in `MENU'." + (loop with string = (pulldown-x-to-string item) + with width = 0 + with menu-width = (pulldown-width menu) + for length from 0 + for c in (append string nil) + while (<= (incf width (char-width c)) menu-width) + finally return + (let ((string-width (string-width (if (< length (length string)) + (substring string 0 length) + string)))) + (if (< string-width menu-width) + ;; Padding + (concat string (make-string (- menu-width string-width) ? )) + string)))) + +(defun pulldown-hide (menu) + "Hide `MENU'." + (dotimes (i (pulldown-height menu)) + (pulldown-hide-line menu i))) + +(defun pulldown-draw (menu) + "Draw `MENU'." + (loop with height = (pulldown-height menu) + with list = (pulldown-list menu) + with cursor = (pulldown-cursor menu) + with scroll-top = (pulldown-scroll-top menu) + with offset = (pulldown-offset menu) + for o from offset + for i from scroll-top + for item in (nthcdr scroll-top list) + while (< o height) + + do + ;; Show line and set item to the line + (pulldown-show-line menu o) + (pulldown-set-line-item + menu o item + (if (= i cursor) + (or (pulldown-item-property item 'selection-face) (pulldown-selection-face menu)) + (or (pulldown-item-property item 'menu-face) (pulldown-face menu)))) + + finally + ;; Hide remaining lines + (if (> (pulldown-direction menu) 0) + (while (< o height) + (pulldown-hide-line menu o) + (incf o)) + (dotimes (o offset) + (pulldown-hide-line menu o))))) + +(defun pulldown-next (menu) + "Select next item." + (let ((height (pulldown-height menu)) + (cursor (1+ (pulldown-cursor menu))) + (scroll-top (pulldown-scroll-top menu)) + (length (length (pulldown-list menu)))) + (cond + ((>= cursor length) + ;; Back to first page + (setq cursor 0 + scroll-top 0)) + ((= cursor (+ scroll-top height)) + ;; Go to next page + (setq scroll-top (min (1+ scroll-top) (max (- length height) 0))))) + (setf (pulldown-cursor menu) cursor + (pulldown-scroll-top menu) scroll-top) + (pulldown-draw menu))) + +(defun pulldown-previous (menu) + "Select previous item." + (let ((height (pulldown-height menu)) + (cursor (1- (pulldown-cursor menu))) + (scroll-top (pulldown-scroll-top menu)) + (length (length (pulldown-list menu)))) + (cond + ((< cursor 0) + ;; Go to last page + (setq cursor (1- length) + scroll-top (max (- length height) 0))) + ((= cursor (1- scroll-top)) + ;; Go to previous page + (decf scroll-top))) + (setf (pulldown-cursor menu) cursor + (pulldown-scroll-top menu) scroll-top) + (pulldown-draw menu))) + +(defun* pulldown-create (point width height + &key + (face 'pulldown-default-face) + (selection-face 'pulldown-default-selection-face)) + "Create pulldown menu." + (save-excursion + (goto-char point) + (let* ((row (line-number-at-pos)) + (column (pulldown-current-physical-column)) + (overlays (make-vector height nil)) + (window (selected-window)) + (window-start (window-start)) + (window-hscroll (window-hscroll)) + (window-width (window-width)) + (right (+ column width)) + (direction (if (and (> row height) + (> height (- (max 1 (- (window-height) + (if mode-line-format 1 0) + (if header-line-format 1 0))) + (count-lines window-start (point))))) + -1 + 1)) + (newline-added (save-excursion + (goto-char (point-max)) + (unless (bolp) + (newline) + t))) + current-column) + (if (and (> right window-width) + (>= right width) + (>= column width)) + (decf column width)) + (dotimes (i height) + (let (overlay begin w (prefix "") (postfix "")) + (if (>= emacs-major-version 23) + (vertical-motion (cons column direction)) + (vertical-motion direction) + (move-to-column (+ (current-column) column))) + (setq current-column (pulldown-current-physical-column)) + + (when (> current-column column) + (backward-char) + (setq current-column (pulldown-current-physical-column))) + (when (< current-column column) + ;; Extend short buffer lines by menu prefix (line of spaces) + (setq prefix (make-string (+ (if (= current-column 0) + (- window-hscroll (current-column)) + 0) + (- column current-column)) + ? ))) + + (setq begin (point)) + (setq w (+ width (length prefix))) + (while (and (not (eolp)) (> w 0)) + (decf w (char-width (char-after))) + (forward-char)) + (if (< w 0) + (setq postfix (make-string (- w) ? ))) + (if (pulldown-last-line-of-buffer) + (setq postfix (concat postfix "\n"))) + + (setq overlay (make-overlay begin (point))) + (overlay-put overlay 'window window) + (overlay-put overlay 'prefix prefix) + (overlay-put overlay 'postfix postfix) + (overlay-put overlay 'width width) + (aset overlays + (if (> direction 0) i (- height i 1)) + overlay))) + (loop for p from 100 + for overlay in (nreverse (append overlays nil)) + do (overlay-put overlay 'priority p)) + (make-pulldown :point point + :row row + :column column + :width width + :height height + :direction direction + :newline-added newline-added + :face face + :selection-face selection-face + :cursor 0 + :scroll-top 0 + :list '() + :overlays overlays)))) + +(defun pulldown-delete (menu) + (mapcar 'delete-overlay (pulldown-overlays menu)) + (setf (pulldown-overlays menu) nil) + (if (pulldown-newline-added menu) + (save-excursion + (goto-char (point-max)) + (if (and (bolp) (eolp)) + (delete-char -1))))) + +(defun pulldown-live-p (menu) + (and menu (pulldown-overlays menu) t)) + +(defun pulldown-preferred-width (list) + "Return preferred width of pulldown menu to show `LIST' beautifully." + (loop for item in list + maximize (string-width (pulldown-x-to-string item)) into width + finally return (* (ceiling (/ (or width 0) 10.0)) 10))) + +(defun pulldown-lookup-key-by-event (function event) + (or (funcall function (vector event)) + (if (symbolp event) + (let ((mask (get event 'event-symbol-element-mask))) + (if mask + (funcall function (vector (logior (or (get (car mask) 'ascii-character) 0) + (cadr mask))))))))) + +(defun* pulldown-event-loop (menu keymap fallback &optional message &aux event binding) + (unwind-protect + (block nil + (while (and (pulldown-live-p menu) + (setq event (progn (clear-this-command-keys) (read-event message)))) + (if (eq event 'Quit) + (return nil)) + (setq binding (pulldown-lookup-key-by-event (lambda (key) (lookup-key keymap key)) event)) + (cond + ((eq binding 'pulldown-select) + (return (nth (pulldown-cursor menu) (pulldown-list menu)))) + ((eq binding 'pulldown-next) + (pulldown-next menu)) + ((eq binding 'pulldown-previous) + (pulldown-previous menu)) + (binding + (call-interactively binding)) + (t + (funcall fallback event (pulldown-lookup-key-by-event (lambda (key) (key-binding key)) event)))))) + (pulldown-delete menu))) + +(defun pulldown-default-fallback (event default)) + +(defun* pulldown-menu (list + &key + (width (pulldown-preferred-width list)) + (height 10) + (keymap pulldown-keymap) + (fallback 'pulldown-default-fallback) + message + &aux menu event) + (setq menu (pulldown-create (point) width height)) + (pulldown-set-list menu list) + (pulldown-draw menu) + (pulldown-event-loop menu keymap fallback message)) + +(defvar pulldown-keymap + (let ((map (make-sparse-keymap))) + (define-key map "\r" 'pulldown-select) + + (define-key map "\C-n" 'pulldown-next) + (define-key map "\C-p" 'pulldown-previous) + (define-key map [down] 'pulldown-next) + (define-key map [up] 'pulldown-previous) + map)) + +(provide 'pulldown) +;;; pulldown.el ends here diff --git a/conf/emacs.d/python-mode.el b/conf/emacs.d/python-mode.el new file mode 100644 index 0000000..88ab654 --- /dev/null +++ b/conf/emacs.d/python-mode.el @@ -0,0 +1,4223 @@ +;;; python-mode.el --- Major mode for editing Python programs + +;; Copyright (C) 1992,1993,1994 Tim Peters + +;; Author: 2003-2011 https://launchpad.net/python-mode +;; 1995-2002 Barry A. Warsaw +;; 1992-1994 Tim Peters +;; Maintainer: python-mode@python.org +;; Created: Feb 1992 +;; Keywords: python languages oop + +(defconst py-version "5.2.0" + "`python-mode' version number.") + +;; This file is part of python-mode.el. +;; +;; python-mode.el 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. +;; +;; python-mode.el 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 python-mode.el. If not, see . + +;;; Commentary: + +;; This is a major mode for editing Python programs. It was developed by Tim +;; Peters after an original idea by Michael A. Guravage. Tim subsequently +;; left the net and in 1995, Barry Warsaw inherited the mode. Tim came back +;; but disavowed all responsibility for the mode. In fact, we suspect he +;; doesn't even use Emacs any more . In 2003, python-mode.el was moved +;; to its own SourceForge project apart from the Python project, and in 2008 +;; it was moved to Launchpad for all project administration. python-mode.el +;; is maintained by the volunteers at the python-mode@python.org mailing +;; list. + +;; python-mode.el is different than, and pre-dates by many years, the +;; python.el that comes with FSF Emacs. We'd like to merge the two modes but +;; have few cycles to do so. Volunteers are welcome. + +;; pdbtrack support contributed by Ken Manheimer, April 2001. Skip Montanaro +;; has also contributed significantly to python-mode's development. + +;; Please use Launchpad to submit bugs or patches: +;; +;; https://launchpad.net/python-mode + +;; INSTALLATION: + +;; To install, just drop this file into a directory on your load-path and +;; byte-compile it. To set up Emacs to automatically edit files ending in +;; ".py" using python-mode, add to your emacs init file +;; +;; GNU Emacs: ~/.emacs, ~/.emacs.el, or ~/.emacs.d/init.el +;; +;; XEmacs: ~/.xemacs/init.el +;; +;; the following code: +;; +;; (setq auto-mode-alist (cons '("\\.py$" . python-mode) auto-mode-alist)) +;; (setq interpreter-mode-alist (cons '("python" . python-mode) +;; interpreter-mode-alist)) +;; (autoload 'python-mode "python-mode" "Python editing mode." t) +;; +;; In XEmacs syntax highlighting should be enabled automatically. In GNU +;; Emacs you may have to add these lines to your init file: +;; +;; (global-font-lock-mode t) +;; (setq font-lock-maximum-decoration t) + +;; BUG REPORTING: + +;; As mentioned above, please use the Launchpad python-mode project for +;; submitting bug reports or patches. The old recommendation, to use C-c C-b +;; will still work, but those reports have a higher chance of getting buried +;; in our inboxes. Please include a complete, but concise code sample and a +;; recipe for reproducing the bug. Send suggestions and other comments to +;; python-mode@python.org. + +;; When in a Python mode buffer, do a C-h m for more help. It's doubtful that +;; a texinfo manual would be very useful, but if you want to contribute one, +;; we'll certainly accept it! + +;;; Code: + +(require 'comint) +(require 'custom) +(require 'cl) +(require 'compile) +(require 'ansi-color) + + +;; user definable variables +;; vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv + +(defgroup python nil + "Support for the Python programming language, " + :group 'languages + :prefix "py-") + +(defcustom py-tab-always-indent t + "*Non-nil means TAB in Python mode should always reindent the current line, +regardless of where in the line point is when the TAB command is used." + :type 'boolean + :group 'python) + +(defcustom py-python-command "python" + "*Shell command used to start Python interpreter." + :type 'string + :group 'python) + +(make-obsolete-variable 'py-jpython-command 'py-jython-command) +(defcustom py-jython-command "jython" + "*Shell command used to start the Jython interpreter." + :type 'string + :group 'python + :tag "Jython Command") + +(defcustom py-default-interpreter 'cpython + "*Which Python interpreter is used by default. +The value for this variable can be either `cpython' or `jython'. + +When the value is `cpython', the variables `py-python-command' and +`py-python-command-args' are consulted to determine the interpreter +and arguments to use. + +When the value is `jython', the variables `py-jython-command' and +`py-jython-command-args' are consulted to determine the interpreter +and arguments to use. + +Note that this variable is consulted only the first time that a Python +mode buffer is visited during an Emacs session. After that, use +\\[py-toggle-shells] to change the interpreter shell." + :type '(choice (const :tag "Python (a.k.a. CPython)" cpython) + (const :tag "Jython" jython)) + :group 'python) + +(defcustom py-python-command-args '("-i") + "*List of string arguments to be used when starting a Python shell." + :type '(repeat string) + :group 'python) + +(make-obsolete-variable 'py-jpython-command-args 'py-jython-command-args) +(defcustom py-jython-command-args '("-i") + "*List of string arguments to be used when starting a Jython shell." + :type '(repeat string) + :group 'python + :tag "Jython Command Args") + +(defcustom py-indent-offset 4 + "*Amount of offset per level of indentation. +`\\[py-guess-indent-offset]' can usually guess a good value when +you're editing someone else's Python code." + :type 'integer + :group 'python) + +(defcustom py-continuation-offset 4 + "*Additional amount of offset to give for some continuation lines. +Continuation lines are those that immediately follow a backslash +terminated line. Only those continuation lines for a block opening +statement are given this extra offset." + :type 'integer + :group 'python) + +(defcustom py-smart-indentation t + "*Should `python-mode' try to automagically set some indentation variables? +When this variable is non-nil, two things happen when a buffer is set +to `python-mode': + + 1. `py-indent-offset' is guessed from existing code in the buffer. + Only guessed values between 2 and 8 are considered. If a valid + guess can't be made (perhaps because you are visiting a new + file), then the value in `py-indent-offset' is used. + + 2. `indent-tabs-mode' is turned off if `py-indent-offset' does not + equal `tab-width' (`indent-tabs-mode' is never turned on by + Python mode). This means that for newly written code, tabs are + only inserted in indentation if one tab is one indentation + level, otherwise only spaces are used. + +Note that both these settings occur *after* `python-mode-hook' is run, +so if you want to defeat the automagic configuration, you must also +set `py-smart-indentation' to nil in your `python-mode-hook'." + :type 'boolean + :group 'python) + +(defcustom py-align-multiline-strings-p t + "*Flag describing how multi-line triple quoted strings are aligned. +When this flag is non-nil, continuation lines are lined up under the +preceding line's indentation. When this flag is nil, continuation +lines are aligned to column zero." + :type '(choice (const :tag "Align under preceding line" t) + (const :tag "Align to column zero" nil)) + :group 'python) + +(defcustom py-block-comment-prefix "##" + "*String used by \\[comment-region] to comment out a block of code. +This should follow the convention for non-indenting comment lines so +that the indentation commands won't get confused (i.e., the string +should be of the form `#x...' where `x' is not a blank or a tab, and +`...' is arbitrary). However, this string should not end in whitespace." + :type 'string + :group 'python) + +(defcustom py-honor-comment-indentation t + "*Controls how comment lines influence subsequent indentation. + +When nil, all comment lines are skipped for indentation purposes, and +if possible, a faster algorithm is used (i.e. X/Emacs 19 and beyond). + +When t, lines that begin with a single `#' are a hint to subsequent +line indentation. If the previous line is such a comment line (as +opposed to one that starts with `py-block-comment-prefix'), then its +indentation is used as a hint for this line's indentation. Lines that +begin with `py-block-comment-prefix' are ignored for indentation +purposes. + +When not nil or t, comment lines that begin with a single `#' are used +as indentation hints, unless the comment character is in column zero." + :type '(choice + (const :tag "Skip all comment lines (fast)" nil) + (const :tag "Single # `sets' indentation for next line" t) + (const :tag "Single # `sets' indentation except at column zero" + other) + ) + :group 'python) + +(defcustom py-temp-directory + (let ((ok '(lambda (x) + (and x + (setq x (expand-file-name x)) ; always true + (file-directory-p x) + (file-writable-p x) + x)))) + (or (funcall ok (getenv "TMPDIR")) + (funcall ok "/usr/tmp") + (funcall ok "/tmp") + (funcall ok "/var/tmp") + (funcall ok ".") + (error + "Couldn't find a usable temp directory -- set `py-temp-directory'"))) + "*Directory used for temporary files created by a *Python* process. +By default, the first directory from this list that exists and that you +can write into: the value (if any) of the environment variable TMPDIR, +/usr/tmp, /tmp, /var/tmp, or the current directory." + :type 'string + :group 'python) + +(defcustom py-beep-if-tab-change t + "*Ring the bell if `tab-width' is changed. +If a comment of the form + + \t# vi:set tabsize=: + +is found before the first code line when the file is entered, and the +current value of (the general Emacs variable) `tab-width' does not +equal , `tab-width' is set to , a message saying so is +displayed in the echo area, and if `py-beep-if-tab-change' is non-nil +the Emacs bell is also rung as a warning." + :type 'boolean + :group 'python) + +(defcustom py-jump-on-exception t + "*Jump to innermost exception frame in *Python Output* buffer. +When this variable is non-nil and an exception occurs when running +Python code synchronously in a subprocess, jump immediately to the +source code of the innermost traceback frame." + :type 'boolean + :group 'python) + +(defcustom py-ask-about-save t + "If not nil, ask about which buffers to save before executing some code. +Otherwise, all modified buffers are saved without asking." + :type 'boolean + :group 'python) + +(defcustom py-backspace-function 'backward-delete-char-untabify + "*Function called by `py-electric-backspace' when deleting backwards." + :type 'function + :group 'python) + +(defcustom py-delete-function 'delete-char + "*Function called by `py-electric-delete' when deleting forwards." + :type 'function + :group 'python) + +(defcustom py-imenu-show-method-args-p nil + "*Controls echoing of arguments of functions & methods in the Imenu buffer. +When non-nil, arguments are printed." + :type 'boolean + :group 'python) +(make-variable-buffer-local 'py-indent-offset) + +(defcustom py-pdbtrack-do-tracking-p t + "*Controls whether the pdbtrack feature is enabled or not. +When non-nil, pdbtrack is enabled in all comint-based buffers, +e.g. shell buffers and the *Python* buffer. When using pdb to debug a +Python program, pdbtrack notices the pdb prompt and displays the +source file and line that the program is stopped at, much the same way +as gud-mode does for debugging C programs with gdb." + :type 'boolean + :group 'python) +(make-variable-buffer-local 'py-pdbtrack-do-tracking-p) + +(defcustom py-pdbtrack-minor-mode-string " PDB" + "*String to use in the minor mode list when pdbtrack is enabled." + :type 'string + :group 'python) + +(defcustom py-import-check-point-max + 20000 + "Maximum number of characters to search for a Java-ish import statement. +When `python-mode' tries to calculate the shell to use (either a +CPython or a Jython shell), it looks at the so-called `shebang' line +-- i.e. #! line. If that's not available, it looks at some of the +file heading imports to see if they look Java-like." + :type 'integer + :group 'python + ) + +(make-obsolete-variable 'py-jpython-packages 'py-jython-packages) +(defcustom py-jython-packages + '("java" "javax" "org" "com") + "Imported packages that imply `jython-mode'." + :type '(repeat string) + :group 'python) + +;; Not customizable +(defvar py-master-file nil + "If non-nil, execute the named file instead of the buffer's file. +The intent is to allow you to set this variable in the file's local +variable section, e.g.: + + # Local Variables: + # py-master-file: \"master.py\" + # End: + +so that typing \\[py-execute-buffer] in that buffer executes the named +master file instead of the buffer's file. If the file name has a +relative path, the value of variable `default-directory' for the +buffer is prepended to come up with a file name.") +(make-variable-buffer-local 'py-master-file) + +(defcustom py-pychecker-command "pychecker" + "*Shell command used to run Pychecker." + :type 'string + :group 'python + :tag "Pychecker Command") + +(defcustom py-pychecker-command-args '("--stdlib") + "*List of string arguments to be passed to pychecker." + :type '(repeat string) + :group 'python + :tag "Pychecker Command Args") + +(defvar py-shell-alist + '(("jython" . 'jython) + ("python" . 'cpython)) + "*Alist of interpreters and python shells. Used by `py-choose-shell' +to select the appropriate python interpreter mode for a file.") + +(defcustom py-shell-input-prompt-1-regexp "^>>> " + "*A regular expression to match the input prompt of the shell." + :type 'string + :group 'python) + +(defcustom py-shell-input-prompt-2-regexp "^[.][.][.] " + "*A regular expression to match the input prompt of the shell after the + first line of input." + :type 'string + :group 'python) + +(defcustom py-shell-switch-buffers-on-execute t + "*Controls switching to the Python buffer where commands are + executed. When non-nil the buffer switches to the Python buffer, if + not no switching occurs." + :type 'boolean + :group 'python) + +(defcustom py-hide-show-keywords + '( + "class" "def" "elif" "else" "except" + "for" "if" "while" "finally" "try" + "with" + ) + "*Keywords that can be hidden by hide-show" + :type '(repeat string) + :group 'python) + +(defcustom py-hide-show-hide-docstrings t + "*Controls if doc strings can be hidden by hide-show" + :type 'boolean + :group 'python) + + + +;; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +;; NO USER DEFINABLE VARIABLES BEYOND THIS POINT + +(defvar py-line-number-offset 0 + "When an exception occurs as a result of py-execute-region, a +subsequent py-up-exception needs the line number where the region +started, in order to jump to the correct file line. This variable is +set in py-execute-region and used in py-jump-to-exception.") + +;; 2009-09-10 a.roehler@web.de changed section start +;; from python.el, version "22.1" + +(defconst python-font-lock-syntactic-keywords + '(("[^\\]\\\\\\(?:\\\\\\\\\\)*\\(\\s\"\\)\\1\\(\\1\\)" + (2 + (7))) + ("\\([RUBrub]?\\)[Rr]?\\(\\s\"\\)\\2\\(\\2\\)" + (1 + (python-quote-syntax 1)) + (2 + (python-quote-syntax 2)) + (3 + (python-quote-syntax 3))))) + +(defun python-quote-syntax (n) + "Put `syntax-table' property correctly on triple quote. +Used for syntactic keywords. N is the match number (1, 2 or 3)." + ;; Given a triple quote, we have to check the context to know + ;; whether this is an opening or closing triple or whether it's + ;; quoted anyhow, and should be ignored. (For that we need to do + ;; the same job as `syntax-ppss' to be correct and it seems to be OK + ;; to use it here despite initial worries.) We also have to sort + ;; out a possible prefix -- well, we don't _have_ to, but I think it + ;; should be treated as part of the string. + ;; Test cases: + ;; ur"""ar""" x='"' # """ + ;; x = ''' """ ' a + ;; ''' + ;; x '"""' x """ \"""" x + (save-excursion + (goto-char (match-beginning 0)) + (cond + ;; Consider property for the last char if in a fenced string. + ((= n 3) + (let* ((font-lock-syntactic-keywords nil) + (syntax (syntax-ppss))) + (when (eq t (nth 3 syntax)) ; after unclosed fence + (goto-char (nth 8 syntax)) ; fence position + (skip-chars-forward "uUrRbB") ; skip any prefix + ;; Is it a matching sequence? + (if (eq (char-after) (char-after (match-beginning 2))) + (if (featurep 'xemacs) + '(15) + (eval-when-compile (string-to-syntax "|"))) + )))) + ;; Consider property for initial char, accounting for prefixes. + ((or (and (= n 2) ; leading quote (not prefix) + (= (match-beginning 1) (match-end 1))) ; prefix is null + (and (= n 1) ; prefix + (/= (match-beginning 1) (match-end 1)))) ; non-empty + (let ((font-lock-syntactic-keywords nil)) + (unless (eq 'string (syntax-ppss-context (syntax-ppss))) + ;; (eval-when-compile (string-to-syntax "|")) + (if (featurep 'xemacs) + '(15) + (eval-when-compile (string-to-syntax "|"))) + ))) + ;; Otherwise (we're in a non-matching string) the property is + ;; nil, which is OK. + ))) + +(setq py-mode-syntax-table + (let ((table (make-syntax-table)) + (tablelookup (if (featurep 'xemacs) + 'get-char-table + 'aref))) + ;; Give punctuation syntax to ASCII that normally has symbol + ;; syntax or has word syntax and isn't a letter. + (if (featurep 'xemacs) + (setq table (standard-syntax-table)) + (let ((symbol (if (featurep 'xemacs) '(3)(string-to-syntax "_"))) + ;; (symbol (string-to-syntax "_")) + (sst (standard-syntax-table))) + (dotimes (i 128) + (unless (= i ?_) + (if (equal symbol (funcall tablelookup sst i)) + (modify-syntax-entry i "." table)))))) + (modify-syntax-entry ?$ "." table) + (modify-syntax-entry ?% "." table) + ;; exceptions + (modify-syntax-entry ?# "<" table) + (modify-syntax-entry ?\n ">" table) + (modify-syntax-entry ?' "\"" table) + (modify-syntax-entry ?` "$" table) + (modify-syntax-entry ?\_ "w" table) + table)) + +(defsubst python-in-string/comment () + "Return non-nil if point is in a Python literal (a comment or string)." + ;; We don't need to save the match data. + (nth 8 (syntax-ppss))) + +(defconst python-space-backslash-table + (let ((table (copy-syntax-table py-mode-syntax-table))) + (modify-syntax-entry ?\\ " " table) + table) + "`python-mode-syntax-table' with backslash given whitespace syntax.") + +;; 2009-09-10 a.roehler@web.de changed section end + +(defconst py-emacs-features + (let (features) + features) + "A list of features extant in the Emacs you are using. +There are many flavors of Emacs out there, with different levels of +support for features needed by `python-mode'.") + +;; Face for None, True, False, self, and Ellipsis +(defvar py-pseudo-keyword-face 'py-pseudo-keyword-face + "Face for pseudo keywords in Python mode, like self, True, False, Ellipsis.") +(make-face 'py-pseudo-keyword-face) + +;; PEP 318 decorators +(defvar py-decorators-face 'py-decorators-face + "Face method decorators.") +(make-face 'py-decorators-face) + +;; Face for builtins +(defvar py-builtins-face 'py-builtins-face + "Face for builtins like TypeError, object, open, and exec.") +(make-face 'py-builtins-face) + +;; XXX, TODO, and FIXME comments and such +(defvar py-XXX-tag-face 'py-XXX-tag-face + "Face for XXX, TODO, and FIXME tags") +(make-face 'py-XXX-tag-face) + +;; Face for class names +(defvar py-class-name-face 'py-class-name-face + "Face for Python class names.") +(make-face 'py-class-name-face) + +;; Face for exception names +(defvar py-exception-name-face 'py-exception-name-face + "Face for exception names like TypeError.") +(make-face 'py-exception-name-face) + +(defun py-font-lock-mode-hook () + (or (face-differs-from-default-p 'py-pseudo-keyword-face) + (copy-face 'font-lock-keyword-face 'py-pseudo-keyword-face)) + (or (face-differs-from-default-p 'py-builtins-face) + (copy-face 'font-lock-keyword-face 'py-builtins-face)) + (or (face-differs-from-default-p 'py-decorators-face) + (copy-face 'py-pseudo-keyword-face 'py-decorators-face)) + (or (face-differs-from-default-p 'py-XXX-tag-face) + (copy-face 'font-lock-comment-face 'py-XXX-tag-face)) + (or (face-differs-from-default-p 'py-class-name-face) + (copy-face 'font-lock-type-face 'py-class-name-face)) + (or (face-differs-from-default-p 'py-exception-name-face) + (copy-face 'font-lock-builtin-face 'py-exception-name-face)) + ) + +(add-hook 'font-lock-mode-hook 'py-font-lock-mode-hook) + +(defvar python-font-lock-keywords + (let ((kw1 (mapconcat 'identity + '("and" "assert" "break" "class" + "continue" "def" "del" "elif" + "else" "except" "for" "from" + "global" "if" "import" "in" + "is" "lambda" "not" "or" + "pass" "raise" "as" "return" + "while" "with" "yield" + ) + "\\|")) + (kw2 (mapconcat 'identity + '("else:" "except:" "finally:" "try:") + "\\|")) + (kw3 (mapconcat 'identity + ;; Don't include Ellipsis in this list, since it is + ;; already defined as a pseudo keyword. + '("__debug__" + "__import__" "__name__" "abs" "all" "any" "apply" + "basestring" "bin" "bool" "buffer" "bytearray" + "callable" "chr" "classmethod" "cmp" "coerce" + "compile" "complex" "copyright" "credits" + "delattr" "dict" "dir" "divmod" "enumerate" "eval" + "exec" "execfile" "exit" "file" "filter" "float" + "format" "getattr" "globals" "hasattr" "hash" "help" + "hex" "id" "input" "int" "intern" "isinstance" + "issubclass" "iter" "len" "license" "list" "locals" + "long" "map" "max" "memoryview" "min" "next" + "object" "oct" "open" "ord" "pow" "print" "property" + "quit" "range" "raw_input" "reduce" "reload" "repr" + "round" "set" "setattr" "slice" "sorted" + "staticmethod" "str" "sum" "super" "tuple" "type" + "unichr" "unicode" "vars" "xrange" "zip") + "\\|")) + (kw4 (mapconcat 'identity + ;; Exceptions and warnings + '("ArithmeticError" "AssertionError" + "AttributeError" "BaseException" "BufferError" + "BytesWarning" "DeprecationWarning" "EOFError" + "EnvironmentError" "Exception" + "FloatingPointError" "FutureWarning" "GeneratorExit" + "IOError" "ImportError" "ImportWarning" + "IndentationError" "IndexError" + "KeyError" "KeyboardInterrupt" "LookupError" + "MemoryError" "NameError" "NotImplemented" + "NotImplementedError" "OSError" "OverflowError" + "PendingDeprecationWarning" "ReferenceError" + "RuntimeError" "RuntimeWarning" "StandardError" + "StopIteration" "SyntaxError" "SyntaxWarning" + "SystemError" "SystemExit" "TabError" "TypeError" + "UnboundLocalError" "UnicodeDecodeError" + "UnicodeEncodeError" "UnicodeError" + "UnicodeTranslateError" "UnicodeWarning" + "UserWarning" "ValueError" "Warning" + "ZeroDivisionError") + "\\|")) + ) + (list + ;; decorators + '("^[ \t]*\\(@[a-zA-Z_][a-zA-Z_0-9]+\\)\\((.+)\\)?" 1 'py-decorators-face) + ;; keywords + (cons (concat "\\<\\(" kw1 "\\)\\>[ \n\t(]") 1) + ;; builtins when they don't appear as object attributes + (list (concat "\\([^. \t]\\|^\\)[ \t]*\\<\\(" kw3 "\\)\\>[ \n\t(]") 2 + 'py-builtins-face) + ;; block introducing keywords with immediately following colons. + ;; Yes "except" is in both lists. + (cons (concat "\\<\\(" kw2 "\\)[ \n\t(]") 1) + ;; Exceptions + (list (concat "\\<\\(" kw4 "\\)[ \n\t:,()]") 1 'py-exception-name-face) + ;; raise stmts + '("\\" + 1 py-pseudo-keyword-face) + ;; XXX, TODO, and FIXME tags + '("XXX\\|TODO\\|FIXME" 0 py-XXX-tag-face t) + ;; special marking for string escapes and percent substitutes; + ;; loops adapted from lisp-mode in font-lock.el + ;; '((lambda (bound) + ;; (catch 'found + ;; (while (re-search-forward + ;; (concat + ;; "\\(\\\\\\\\\\|\\\\x..\\|\\\\u....\\|\\\\U........\\|" + ;; "\\\\[0-9][0-9]*\\|\\\\[abfnrtv\"']\\)") bound t) + ;; (let ((face (get-text-property (1- (point)) 'face))) + ;; (when (or (and (listp face) (memq 'font-lock-string-face face)) + ;; (eq 'font-lock-string-face face)) + ;; (throw 'found t)))))) + ;; (1 'font-lock-regexp-grouping-backslash prepend)) + ;; '((lambda (bound) + ;; (catch 'found + ;; (while (re-search-forward "\\(%[^(]\\|%([^)]*).\\)" bound t) + ;; (let ((face (get-text-property (1- (point)) 'face))) + ;; (when (or (and (listp face) (memq 'font-lock-string-face face)) + ;; (eq 'font-lock-string-face face)) + ;; (throw 'found t)))))) + ;; (1 'font-lock-regexp-grouping-construct prepend)) + )) + "Additional expressions to highlight in Python mode.") + +;; have to bind py-file-queue before installing the kill-emacs-hook +(defvar py-file-queue nil + "Queue of Python temp files awaiting execution. +Currently-active file is at the head of the list.") + +(defvar py-pdbtrack-is-tracking-p nil) + +(defvar py-pychecker-history nil) + + + +;; Constants + +(defconst py-stringlit-re + (concat + ;; These fail if backslash-quote ends the string (not worth + ;; fixing?). They precede the short versions so that the first two + ;; quotes don't look like an empty short string. + ;; + ;; (maybe raw), long single quoted triple quoted strings (SQTQ), + ;; with potential embedded single quotes + "[rRuUbB]?'''[^']*\\(\\('[^']\\|''[^']\\)[^']*\\)*'''" + "\\|" + ;; (maybe raw), long double quoted triple quoted strings (DQTQ), + ;; with potential embedded double quotes + "[rRuUbB]?\"\"\"[^\"]*\\(\\(\"[^\"]\\|\"\"[^\"]\\)[^\"]*\\)*\"\"\"" + "\\|" + "[rRuUbB]?'\\([^'\n\\]\\|\\\\.\\)*'" ; single-quoted + "\\|" ; or + "[rRuUbB]?\"\\([^\"\n\\]\\|\\\\.\\)*\"" ; double-quoted + ) + "Regular expression matching a Python string literal.") + +(defconst py-continued-re + ;; This is tricky because a trailing backslash does not mean + ;; continuation if it's in a comment + (concat + "\\(" "[^#'\"\n\\]" "\\|" py-stringlit-re "\\)*" + "\\\\$") + "Regular expression matching Python backslash continuation lines.") + +(defconst py-blank-or-comment-re "[ \t]*\\($\\|#\\)" + "Regular expression matching a blank or comment line.") + +(defconst py-outdent-re + (concat "\\(" (mapconcat 'identity + '("else:" + "except\\(\\s +.*\\)?:" + "finally:" + "elif\\s +.*:") + "\\|") + "\\)") + "Regular expression matching statements to be dedented one level.") + +(defconst py-block-closing-keywords-re + "\\(return\\|raise\\|break\\|continue\\|pass\\)" + "Regular expression matching keywords which typically close a block.") + +(defconst py-no-outdent-re + (concat + "\\(" + (mapconcat 'identity + (list "try:" + "except\\(\\s +.*\\)?:" + "while\\s +.*:" + "for\\s +.*:" + "if\\s +.*:" + "elif\\s +.*:" + (concat py-block-closing-keywords-re "[ \t\n]") + ) + "\\|") + "\\)") + "Regular expression matching lines not to dedent after.") + +(defvar py-traceback-line-re + "[ \t]+File \"\\([^\"]+\\)\", line \\([0-9]+\\)" + "Regular expression that describes tracebacks.") + +;; pdbtrack constants +(defconst py-pdbtrack-stack-entry-regexp +; "^> \\([^(]+\\)(\\([0-9]+\\))\\([?a-zA-Z0-9_]+\\)()" + "^> \\(.*\\)(\\([0-9]+\\))\\([?a-zA-Z0-9_<>]+\\)()" + "Regular expression pdbtrack uses to find a stack trace entry.") + +(defconst py-pdbtrack-input-prompt "\n[(<]*[Pp]db[>)]+ " + "Regular expression pdbtrack uses to recognize a pdb prompt.") + +(defconst py-pdbtrack-track-range 10000 + "Max number of characters from end of buffer to search for stack entry.") + + + +;; Major mode boilerplate + +;; define a mode-specific abbrev table for those who use such things +(defvar python-mode-abbrev-table nil + "Abbrev table in use in `python-mode' buffers.") +(define-abbrev-table 'python-mode-abbrev-table nil) + +(defvar python-mode-hook nil + "*Hook called by `python-mode'.") + +(make-obsolete-variable 'jpython-mode-hook 'jython-mode-hook) +(defvar jython-mode-hook nil + "*Hook called by `jython-mode'. `jython-mode' also calls +`python-mode-hook'.") + +(defvar py-shell-hook nil + "*Hook called by `py-shell'.") + +;; In previous version of python-mode.el, the hook was incorrectly +;; called py-mode-hook, and was not defvar'd. Deprecate its use. +(and (fboundp 'make-obsolete-variable) + (make-obsolete-variable 'py-mode-hook 'python-mode-hook)) + +(defvar py-mode-map () + "Keymap used in `python-mode' buffers.") +(if py-mode-map + nil + (setq py-mode-map (make-sparse-keymap)) + ;; electric keys + (define-key py-mode-map ":" 'py-electric-colon) + ;; indentation level modifiers + (define-key py-mode-map "\C-c\C-l" 'py-shift-region-left) + (define-key py-mode-map "\C-c\C-r" 'py-shift-region-right) + (define-key py-mode-map "\C-c<" 'py-shift-region-left) + (define-key py-mode-map "\C-c>" 'py-shift-region-right) + ;; subprocess commands + ;;(define-key py-mode-map "\C-c\C-c" 'py-execute-buffer) + (define-key py-mode-map "\C-c\C-c" 'extended-py-execute-buffer) + (define-key py-mode-map "\C-c\C-m" 'extended-py-execute-buffer-with-args) + (define-key py-mode-map "\C-c\C-n" 'py-execute-import-or-reload) + (define-key py-mode-map "\C-c\C-s" 'py-execute-string) + (define-key py-mode-map "\C-c|" 'py-execute-region) + (define-key py-mode-map "\e\C-x" 'py-execute-def-or-class) + (define-key py-mode-map "\C-c!" 'py-shell) + (define-key py-mode-map "\C-c\C-t" 'py-toggle-shells) + ;; Caution! Enter here at your own risk. We are trying to support + ;; several behaviors and it gets disgusting. :-( This logic ripped + ;; largely from CC Mode. + ;; + ;; In XEmacs 19, Emacs 19, and Emacs 20, we use this to bind + ;; backwards deletion behavior to DEL, which both Delete and + ;; Backspace get translated to. There's no way to separate this + ;; behavior in a clean way, so deal with it! Besides, it's been + ;; this way since the dawn of time. + (if (not (boundp 'delete-key-deletes-forward)) + (define-key py-mode-map "\177" 'py-electric-backspace) + ;; However, XEmacs 20 actually achieved enlightenment. It is + ;; possible to sanely define both backward and forward deletion + ;; behavior under X separately (TTYs are forever beyond hope, but + ;; who cares? XEmacs 20 does the right thing with these too). + (define-key py-mode-map [delete] 'py-electric-delete) + (define-key py-mode-map [backspace] 'py-electric-backspace)) + ;; Separate M-BS from C-M-h. The former should remain + ;; backward-kill-word. + (define-key py-mode-map [(control meta h)] 'py-mark-def-or-class) + (define-key py-mode-map "\C-c\C-k" 'py-mark-block) + ;; Miscellaneous + (define-key py-mode-map "\C-c:" 'py-guess-indent-offset) + (define-key py-mode-map "\C-c\t" 'py-indent-region) + (define-key py-mode-map "\C-c\C-d" 'py-pdbtrack-toggle-stack-tracking) + (define-key py-mode-map "\C-c\C-f" 'py-sort-imports) + (define-key py-mode-map "\C-c\C-n" 'py-next-statement) + (define-key py-mode-map "\C-c\C-p" 'py-previous-statement) + (define-key py-mode-map "\C-c\C-u" 'py-goto-block-up) + (define-key py-mode-map "\C-c#" 'py-comment-region) + (define-key py-mode-map "\C-c?" 'py-describe-mode) + (define-key py-mode-map "\C-c\C-e" 'py-help-at-point) + (define-key py-mode-map "\e\C-a" 'py-beginning-of-def-or-class) + (define-key py-mode-map "\e\C-e" 'py-end-of-def-or-class) + (define-key py-mode-map "\C-c-" 'py-up-exception) + (define-key py-mode-map "\C-c=" 'py-down-exception) + ;; stuff that is `standard' but doesn't interface well with + ;; python-mode, which forces us to rebind to special commands + (define-key py-mode-map "\C-xnd" 'py-narrow-to-defun) + ;; information + (define-key py-mode-map "\C-c\C-b" 'py-submit-bug-report) + (define-key py-mode-map "\C-c\C-v" 'py-version) + (define-key py-mode-map "\C-c\C-w" 'py-pychecker-run) + ;; shadow global bindings for newline-and-indent w/ the py- version. + ;; BAW - this is extremely bad form, but I'm not going to change it + ;; for now. + (mapc #'(lambda (key) + (define-key py-mode-map key 'py-newline-and-indent)) + (where-is-internal 'newline-and-indent)) + ;; Force RET to be py-newline-and-indent even if it didn't get + ;; mapped by the above code. motivation: Emacs' default binding for + ;; RET is `newline' and C-j is `newline-and-indent'. Most Pythoneers + ;; expect RET to do a `py-newline-and-indent' and any Emacsers who + ;; dislike this are probably knowledgeable enough to do a rebind. + ;; However, we do *not* change C-j since many Emacsers have already + ;; swapped RET and C-j and they don't want C-j bound to `newline' to + ;; change. + (define-key py-mode-map "\C-m" 'py-newline-and-indent) + ) + +(defvar py-mode-output-map nil + "Keymap used in *Python Output* buffers.") +(if py-mode-output-map + nil + (setq py-mode-output-map (make-sparse-keymap)) + (define-key py-mode-output-map [button2] 'py-mouseto-exception) + (define-key py-mode-output-map "\C-c\C-c" 'py-goto-exception) + ;; TBD: Disable all self-inserting keys. This is bogus, we should + ;; really implement this as *Python Output* buffer being read-only + (mapc #' (lambda (key) + (define-key py-mode-output-map key + #'(lambda () (interactive) (beep)))) + (where-is-internal 'self-insert-command)) + ) + +(defvar py-shell-map nil + "Keymap used in *Python* shell buffers.") +(if py-shell-map + nil + (setq py-shell-map (copy-keymap comint-mode-map)) + (define-key py-shell-map [tab] 'tab-to-tab-stop) + (define-key py-shell-map "\C-c-" 'py-up-exception) + (define-key py-shell-map "\C-c=" 'py-down-exception) + ) + +;; (when (featurep 'xemacs) (defvar py-mode-syntax-table nil)) +;; (when (featurep 'xemacs) +;; (when (not py-mode-syntax-table) +;; (setq py-mode-syntax-table (make-syntax-table)) +;; (modify-syntax-entry ?\( "()" py-mode-syntax-table) +;; (modify-syntax-entry ?\) ")(" py-mode-syntax-table) +;; (modify-syntax-entry ?\[ "(]" py-mode-syntax-table) +;; (modify-syntax-entry ?\] ")[" py-mode-syntax-table) +;; (modify-syntax-entry ?\{ "(}" py-mode-syntax-table) +;; (modify-syntax-entry ?\} "){" py-mode-syntax-table) +;; ;; Add operator symbols misassigned in the std table +;; (modify-syntax-entry ?\$ "." py-mode-syntax-table) +;; (modify-syntax-entry ?\% "." py-mode-syntax-table) +;; (modify-syntax-entry ?\& "." py-mode-syntax-table) +;; (modify-syntax-entry ?\* "." py-mode-syntax-table) +;; (modify-syntax-entry ?\+ "." py-mode-syntax-table) +;; (modify-syntax-entry ?\- "." py-mode-syntax-table) +;; (modify-syntax-entry ?\/ "." py-mode-syntax-table) +;; (modify-syntax-entry ?\< "." py-mode-syntax-table) +;; (modify-syntax-entry ?\= "." py-mode-syntax-table) +;; (modify-syntax-entry ?\> "." py-mode-syntax-table) +;; (modify-syntax-entry ?\| "." py-mode-syntax-table) +;; ;; For historical reasons, underscore is word class instead of +;; ;; symbol class. GNU conventions say it should be symbol class, but +;; ;; there's a natural conflict between what major mode authors want +;; ;; and what users expect from `forward-word' and `backward-word'. +;; ;; Guido and I have hashed this out and have decided to keep +;; ;; underscore in word class. If you're tempted to change it, try +;; ;; binding M-f and M-b to py-forward-into-nomenclature and +;; ;; py-backward-into-nomenclature instead. This doesn't help in all +;; ;; situations where you'd want the different behavior +;; ;; (e.g. backward-kill-word). +;; (modify-syntax-entry ?\_ "w" py-mode-syntax-table) +;; ;; Both single quote and double quote are string delimiters +;; (modify-syntax-entry ?\' "\"" py-mode-syntax-table) +;; (modify-syntax-entry ?\" "|" py-mode-syntax-table) +;; ;; backquote is open and close paren +;; (modify-syntax-entry ?\` "$" py-mode-syntax-table) +;; ;; comment delimiters +;; (modify-syntax-entry ?\# "<" py-mode-syntax-table) +;; (modify-syntax-entry ?\n ">" py-mode-syntax-table))) + +;; An auxiliary syntax table which places underscore and dot in the +;; symbol class for simplicity +(defvar py-dotted-expression-syntax-table nil + "Syntax table used to identify Python dotted expressions.") +(when (not py-dotted-expression-syntax-table) + (setq py-dotted-expression-syntax-table + (copy-syntax-table py-mode-syntax-table)) + (modify-syntax-entry ?_ "_" py-dotted-expression-syntax-table) + (modify-syntax-entry ?. "_" py-dotted-expression-syntax-table)) + + + +;; Utilities +(defmacro py-safe (&rest body) + "Safely execute BODY, return nil if an error occurred." + `(condition-case nil + (progn ,@ body) + (error nil))) + +(defsubst py-keep-region-active () + "Keep the region active in XEmacs." + ;; Ignore byte-compiler warnings you might see. Also note that + ;; FSF's Emacs 19 does it differently; its policy doesn't require us + ;; to take explicit action. + (and (boundp 'zmacs-region-stays) + (setq zmacs-region-stays t))) + +(defsubst py-point (position) + "Returns the value of point at certain commonly referenced POSITIONs. +POSITION can be one of the following symbols: + + bol -- beginning of line + eol -- end of line + bod -- beginning of def or class + eod -- end of def or class + bob -- beginning of buffer + eob -- end of buffer + boi -- back to indentation + bos -- beginning of statement + +This function does not modify point or mark." + (let ((here (point))) + (cond + ((eq position 'bol) (beginning-of-line)) + ((eq position 'eol) (end-of-line)) + ((eq position 'bod) (py-beginning-of-def-or-class 'either)) + ((eq position 'eod) (py-end-of-def-or-class 'either)) + ;; Kind of funny, I know, but useful for py-up-exception. + ((eq position 'bob) (goto-char (point-min))) + ((eq position 'eob) (goto-char (point-max))) + ((eq position 'boi) (back-to-indentation)) + ((eq position 'bos) (py-goto-initial-line)) + (t (error "Unknown buffer position requested: %s" position)) + ) + (prog1 + (point) + (goto-char here)))) + +(defsubst py-highlight-line (from to file line) + (cond + ((fboundp 'make-extent) + ;; XEmacs + (let ((e (make-extent from to))) + (set-extent-property e 'mouse-face 'highlight) + (set-extent-property e 'py-exc-info (cons file line)) + (set-extent-property e 'keymap py-mode-output-map))) + (t + ;; Emacs -- Please port this! + ) + )) + +(defun py-in-literal (&optional lim) + "Return non-nil if point is in a Python literal (a comment or string). +Optional argument LIM indicates the beginning of the containing form, +i.e. the limit on how far back to scan." + ;; This is the version used for non-XEmacs, which has a nicer + ;; interface. + ;; + ;; WARNING: Watch out for infinite recursion. + (let* ((lim (or lim (py-point 'bod))) + (state (parse-partial-sexp lim (point)))) + (cond + ((nth 3 state) 'string) + ((nth 4 state) 'comment) + (t nil)))) + +;; XEmacs has a built-in function that should make this much quicker. +;; In this case, lim is ignored +(defun py-fast-in-literal (&optional lim) + "Fast version of `py-in-literal', used only by XEmacs. +Optional LIM is ignored." + ;; don't have to worry about context == 'block-comment + (buffer-syntactic-context)) + +(if (fboundp 'buffer-syntactic-context) + (defalias 'py-in-literal 'py-fast-in-literal)) + + + +;; Menu definitions, only relevent if you have the easymenu.el package +;; (standard in the latest Emacs 19 and XEmacs 19 distributions). +(defvar py-menu nil + "Menu for Python Mode. +This menu will get created automatically if you have the `easymenu' +package. Note that the latest X/Emacs releases contain this package.") + +(and (py-safe (require 'easymenu) t) + (easy-menu-define + py-menu py-mode-map "Python Mode menu" + '("Python" + ["Comment Out Region" py-comment-region (mark)] + ["Uncomment Region" (py-comment-region (point) (mark) '(4)) (mark)] + "-" + ["Mark current block" py-mark-block t] + ["Mark current def" py-mark-def-or-class t] + ["Mark current class" (py-mark-def-or-class t) t] + "-" + ["Shift region left" py-shift-region-left (mark)] + ["Shift region right" py-shift-region-right (mark)] + "-" + ["Import/reload file" py-execute-import-or-reload t] + ["Execute buffer" py-execute-buffer t] + ["Execute buffer (Kuso)" extended-py-execute-buffer t] + ["Execute buffer with args (Kuso)" extended-py-execute-buffer-with-args t] + ["Execute region" py-execute-region (mark)] + ["Execute def or class" py-execute-def-or-class (mark)] + ["Execute string" py-execute-string t] + ["Start interpreter..." py-shell t] + "-" + ["Go to start of block" py-goto-block-up t] + ["Go to start of class" (py-beginning-of-def-or-class t) t] + ["Move to end of class" (py-end-of-def-or-class t) t] + ["Move to start of def" py-beginning-of-def-or-class t] + ["Move to end of def" py-end-of-def-or-class t] + "-" + ["Describe mode" py-describe-mode t] + ))) + + + +;; Imenu definitions +(defvar py-imenu-class-regexp + (concat ; <> + "\\(" ; + "^[ \t]*" ; newline and maybe whitespace + "\\(class[ \t]+[a-zA-Z0-9_]+\\)" ; class name + ; possibly multiple superclasses + "\\([ \t]*\\((\\([a-zA-Z0-9_,. \t\n]\\)*)\\)?\\)" + "[ \t]*:" ; and the final : + "\\)" ; >>classes<< + ) + "Regexp for Python classes for use with the Imenu package." + ) + +(defvar py-imenu-method-regexp + (concat ; <> + "\\(" ; + "^[ \t]*" ; new line and maybe whitespace + "\\(def[ \t]+" ; function definitions start with def + "\\([a-zA-Z0-9_]+\\)" ; name is here + ; function arguments... +;; "[ \t]*(\\([-+/a-zA-Z0-9_=,\* \t\n.()\"'#]*\\))" + "[ \t]*(\\([^:#]*\\))" + "\\)" ; end of def + "[ \t]*:" ; and then the : + "\\)" ; >>methods and functions<< + ) + "Regexp for Python methods/functions for use with the Imenu package." + ) + +(defvar py-imenu-method-no-arg-parens '(2 8) + "Indices into groups of the Python regexp for use with Imenu. + +Using these values will result in smaller Imenu lists, as arguments to +functions are not listed. + +See the variable `py-imenu-show-method-args-p' for more +information.") + +(defvar py-imenu-method-arg-parens '(2 7) + "Indices into groups of the Python regexp for use with imenu. +Using these values will result in large Imenu lists, as arguments to +functions are listed. + +See the variable `py-imenu-show-method-args-p' for more +information.") + +;; Note that in this format, this variable can still be used with the +;; imenu--generic-function. Otherwise, there is no real reason to have +;; it. +(defvar py-imenu-generic-expression + (cons + (concat + py-imenu-class-regexp + "\\|" ; or... + py-imenu-method-regexp + ) + py-imenu-method-no-arg-parens) + "Generic Python expression which may be used directly with Imenu. +Used by setting the variable `imenu-generic-expression' to this value. +Also, see the function \\[py-imenu-create-index] for a better +alternative for finding the index.") + +;; These next two variables are used when searching for the Python +;; class/definitions. Just saving some time in accessing the +;; generic-python-expression, really. +(defvar py-imenu-generic-regexp nil) +(defvar py-imenu-generic-parens nil) + + +(defun py-imenu-create-index-function () + "Python interface function for the Imenu package. +Finds all Python classes and functions/methods. Calls function +\\[py-imenu-create-index-engine]. See that function for the details +of how this works." + (setq py-imenu-generic-regexp (car py-imenu-generic-expression) + py-imenu-generic-parens (if py-imenu-show-method-args-p + py-imenu-method-arg-parens + py-imenu-method-no-arg-parens)) + (goto-char (point-min)) + ;; Warning: When the buffer has no classes or functions, this will + ;; return nil, which seems proper according to the Imenu API, but + ;; causes an error in the XEmacs port of Imenu. Sigh. + (py-imenu-create-index-engine nil)) + +(defun py-imenu-create-index-engine (&optional start-indent) + "Function for finding Imenu definitions in Python. + +Finds all definitions (classes, methods, or functions) in a Python +file for the Imenu package. + +Returns a possibly nested alist of the form + + (INDEX-NAME . INDEX-POSITION) + +The second element of the alist may be an alist, producing a nested +list as in + + (INDEX-NAME . INDEX-ALIST) + +This function should not be called directly, as it calls itself +recursively and requires some setup. Rather this is the engine for +the function \\[py-imenu-create-index-function]. + +It works recursively by looking for all definitions at the current +indention level. When it finds one, it adds it to the alist. If it +finds a definition at a greater indentation level, it removes the +previous definition from the alist. In its place it adds all +definitions found at the next indentation level. When it finds a +definition that is less indented then the current level, it returns +the alist it has created thus far. + +The optional argument START-INDENT indicates the starting indentation +at which to continue looking for Python classes, methods, or +functions. If this is not supplied, the function uses the indentation +of the first definition found." + (let (index-alist + sub-method-alist + looking-p + def-name prev-name + cur-indent def-pos + (class-paren (first py-imenu-generic-parens)) + (def-paren (second py-imenu-generic-parens))) + (setq looking-p + (re-search-forward py-imenu-generic-regexp (point-max) t)) + (while looking-p + (save-excursion + ;; used to set def-name to this value but generic-extract-name + ;; is new to imenu-1.14. this way it still works with + ;; imenu-1.11 + ;;(imenu--generic-extract-name py-imenu-generic-parens)) + (let ((cur-paren (if (match-beginning class-paren) + class-paren def-paren))) + (setq def-name + (buffer-substring-no-properties (match-beginning cur-paren) + (match-end cur-paren)))) + (save-match-data + (py-beginning-of-def-or-class 'either)) + (beginning-of-line) + (setq cur-indent (current-indentation))) + ;; HACK: want to go to the next correct definition location. We + ;; explicitly list them here but it would be better to have them + ;; in a list. + (setq def-pos + (or (match-beginning class-paren) + (match-beginning def-paren))) + ;; if we don't have a starting indent level, take this one + (or start-indent + (setq start-indent cur-indent)) + ;; if we don't have class name yet, take this one + (or prev-name + (setq prev-name def-name)) + ;; what level is the next definition on? must be same, deeper + ;; or shallower indentation + (cond + ;; Skip code in comments and strings + ((py-in-literal)) + ;; at the same indent level, add it to the list... + ((= start-indent cur-indent) + (push (cons def-name def-pos) index-alist)) + ;; deeper indented expression, recurse + ((< start-indent cur-indent) + ;; the point is currently on the expression we're supposed to + ;; start on, so go back to the last expression. The recursive + ;; call will find this place again and add it to the correct + ;; list + (re-search-backward py-imenu-generic-regexp (point-min) 'move) + (setq sub-method-alist (py-imenu-create-index-engine cur-indent)) + (if sub-method-alist + ;; we put the last element on the index-alist on the start + ;; of the submethod alist so the user can still get to it. + (let ((save-elmt (pop index-alist))) + (push (cons prev-name + (cons save-elmt sub-method-alist)) + index-alist)))) + ;; found less indented expression, we're done. + (t + (setq looking-p nil) + (re-search-backward py-imenu-generic-regexp (point-min) t))) + ;; end-cond + (setq prev-name def-name) + (and looking-p + (setq looking-p + (re-search-forward py-imenu-generic-regexp + (point-max) 'move)))) + (nreverse index-alist))) + + + +(defun py-choose-shell-by-shebang () + "Choose CPython or Jython mode by looking at #! on the first line. +Returns the appropriate mode function. +Used by `py-choose-shell', and similar to but distinct from +`set-auto-mode', though it uses `auto-mode-interpreter-regexp' (if available)." + ;; look for an interpreter specified in the first line + ;; similar to set-auto-mode (files.el) + (let* ((re (if (boundp 'auto-mode-interpreter-regexp) + auto-mode-interpreter-regexp + ;; stolen from Emacs 21.2 + "#![ \t]?\\([^ \t\n]*/bin/env[ \t]\\)?\\([^ \t\n]+\\)")) + (interpreter (save-excursion + (goto-char (point-min)) + (if (looking-at re) + (match-string 2) + ""))) + elt) + ;; Map interpreter name to a mode. + (setq elt (assoc (file-name-nondirectory interpreter) + py-shell-alist)) + (and elt (caddr elt)))) + + + +(defun py-choose-shell-by-import () + "Choose CPython or Jython mode based imports. +If a file imports any packages in `py-jython-packages', within +`py-import-check-point-max' characters from the start of the file, +return `jython', otherwise return nil." + (let (mode) + (save-excursion + (goto-char (point-min)) + (while (and (not mode) + (search-forward-regexp + "^\\(\\(from\\)\\|\\(import\\)\\) \\([^ \t\n.]+\\)" + py-import-check-point-max t)) + (setq mode (and (member (match-string 4) py-jython-packages) + 'jython + )))) + mode)) + + +(defun py-choose-shell () + "Choose CPython or Jython mode. Returns the appropriate mode function. +This does the following: + - look for an interpreter with `py-choose-shell-by-shebang' + - examine imports using `py-choose-shell-by-import' + - default to the variable `py-default-interpreter'" + (interactive) + (or (py-choose-shell-by-shebang) + (py-choose-shell-by-import) + py-default-interpreter +; 'cpython ;; don't use to py-default-interpreter, because default +; ;; is only way to choose CPython + )) + + +;;;###autoload +(defun python-mode () + "Major mode for editing Python files. +To submit a problem report, enter `\\[py-submit-bug-report]' from a +`python-mode' buffer. Do `\\[py-describe-mode]' for detailed +documentation. To see what version of `python-mode' you are running, +enter `\\[py-version]'. + +This mode knows about Python indentation, tokens, comments and +continuation lines. Paragraphs are separated by blank lines only. + +COMMANDS +\\{py-mode-map} +VARIABLES + +py-indent-offset\t\tindentation increment +py-block-comment-prefix\t\tcomment string used by `comment-region' +py-python-command\t\tshell command to invoke Python interpreter +py-temp-directory\t\tdirectory used for temp files (if needed) +py-beep-if-tab-change\t\tring the bell if `tab-width' is changed" + (interactive) + ;; set up local variables + (kill-all-local-variables) + (make-local-variable 'paragraph-separate) + (make-local-variable 'paragraph-start) + (make-local-variable 'require-final-newline) + (make-local-variable 'comment-start) + (make-local-variable 'comment-end) + (make-local-variable 'comment-start-skip) + (make-local-variable 'comment-column) + (make-local-variable 'comment-indent-function) + (make-local-variable 'indent-region-function) + (make-local-variable 'indent-line-function) + (make-local-variable 'add-log-current-defun-function) + (make-local-variable 'fill-paragraph-function) + ;; + (set-syntax-table py-mode-syntax-table) + ;; 2009-09-10 a.roehler@web.de changed section start + ;; from python.el, version "22.1" + (set (make-local-variable 'font-lock-defaults) + '(python-font-lock-keywords nil nil nil nil + (font-lock-syntactic-keywords + . python-font-lock-syntactic-keywords))) + ;; 2009-09-10 a.roehler@web.de changed section end + (setq major-mode 'python-mode + mode-name "Python" + local-abbrev-table python-mode-abbrev-table + paragraph-separate "^[ \t]*$" + paragraph-start "^[ \t]*$" + require-final-newline t + comment-start "# " + comment-end "" + comment-start-skip "# *" + comment-column 40 + comment-indent-function 'py-comment-indent-function + indent-region-function 'py-indent-region + indent-line-function 'py-indent-line + ;; tell add-log.el how to find the current function/method/variable + add-log-current-defun-function 'py-current-defun + + fill-paragraph-function 'py-fill-paragraph + ) + (use-local-map py-mode-map) + ;; add the menu + (if py-menu + (easy-menu-add py-menu)) + ;; Emacs 19 requires this + (if (boundp 'comment-multi-line) + (setq comment-multi-line nil)) + ;; Install Imenu if available + (when (py-safe (require 'imenu)) + (setq imenu-create-index-function #'py-imenu-create-index-function) + (setq imenu-generic-expression py-imenu-generic-expression) + (if (fboundp 'imenu-add-to-menubar) + (imenu-add-to-menubar (format "%s-%s" "IM" mode-name))) + ) + + ;; Add support for HideShow + (add-to-list 'hs-special-modes-alist + (list + 'python-mode + ;; start regex + (concat (if py-hide-show-hide-docstrings + "^\\s-*\"\"\"\\|" "") + (mapconcat 'identity + (mapcar #'(lambda (x) (concat "^\\s-*" x "\\>")) + py-hide-show-keywords) + "\\|")) + ;; end regex + nil + ;; comment-start regex + "#" + ;; forward-sexp function + (lambda (arg) + (py-goto-beyond-block) + (skip-chars-backward " \t\n")) + nil)) + + ;; Run the mode hook. Note that py-mode-hook is deprecated. + (if python-mode-hook + (run-hooks 'python-mode-hook) + (run-hooks 'py-mode-hook)) + ;; Now do the automagical guessing + (if py-smart-indentation + (let ((offset py-indent-offset)) + ;; It's okay if this fails to guess a good value + (if (and (py-safe (py-guess-indent-offset)) + (<= py-indent-offset 8) + (>= py-indent-offset 2)) + (setq offset py-indent-offset)) + (setq py-indent-offset offset) + ;; Only turn indent-tabs-mode off if tab-width != + ;; py-indent-offset. Never turn it on, because the user must + ;; have explicitly turned it off. + (if (/= tab-width py-indent-offset) + (setq indent-tabs-mode nil)))) + ;; Set the default shell if not already set + (when (null py-which-shell) + (py-toggle-shells (py-choose-shell)))) + +(make-obsolete 'jpython-mode 'jython-mode) +(defun jython-mode () + "Major mode for editing Jython/Jython files. +This is a simple wrapper around `python-mode'. +It runs `jython-mode-hook' then calls `python-mode.' +It is added to `interpreter-mode-alist' and `py-choose-shell'. +" + (interactive) + (python-mode) + (py-toggle-shells 'jython) + (when jython-mode-hook + (run-hooks 'jython-mode-hook))) + + +;; It's handy to add recognition of Python files to the +;; interpreter-mode-alist and to auto-mode-alist. With the former, we +;; can specify different `derived-modes' based on the #! line, but +;; with the latter, we can't. So we just won't add them if they're +;; already added. +;;;###autoload +(let ((modes '(("jython" . jython-mode) + ("python" . python-mode)))) + (while modes + (when (not (assoc (car modes) interpreter-mode-alist)) + (push (car modes) interpreter-mode-alist)) + (setq modes (cdr modes)))) +;;;###autoload +(when (not (or (rassq 'python-mode auto-mode-alist) + (rassq 'jython-mode auto-mode-alist))) + (push '("\\.py$" . python-mode) auto-mode-alist)) + + + +;; electric characters +(defun py-outdent-p () + "Returns non-nil if the current line should dedent one level." + (save-excursion + (and (progn (back-to-indentation) + (looking-at py-outdent-re)) + ;; short circuit infloop on illegal construct + (not (bobp)) + (progn (forward-line -1) + (py-goto-initial-line) + (back-to-indentation) + (while (or (looking-at py-blank-or-comment-re) + (bobp)) + (backward-to-indentation 1)) + (not (looking-at py-no-outdent-re))) + ))) + +(defun py-electric-colon (arg) + "Insert a colon. +In certain cases the line is dedented appropriately. If a numeric +argument ARG is provided, that many colons are inserted +non-electrically. Electric behavior is inhibited inside a string or +comment." + (interactive "*P") + (self-insert-command (prefix-numeric-value arg)) + ;; are we in a string or comment? + (if (save-excursion + (let ((pps (parse-partial-sexp (save-excursion + (py-beginning-of-def-or-class) + (point)) + (point)))) + (not (or (nth 3 pps) (nth 4 pps))))) + (save-excursion + (let ((here (point)) + (outdent 0) + (indent (py-compute-indentation t))) + (if (and (not arg) + (py-outdent-p) + (= indent (save-excursion + (py-next-statement -1) + (py-compute-indentation t))) + ) + (setq outdent py-indent-offset)) + ;; Don't indent, only dedent. This assumes that any lines + ;; that are already dedented relative to + ;; py-compute-indentation were put there on purpose. It's + ;; highly annoying to have `:' indent for you. Use TAB, C-c + ;; C-l or C-c C-r to adjust. TBD: Is there a better way to + ;; determine this??? + (if (< (current-indentation) indent) nil + (goto-char here) + (beginning-of-line) + (delete-horizontal-space) + (indent-to (- indent outdent)) + ))))) + + +;; Python subprocess utilities and filters +(defun py-execute-file (proc filename) + "Send to Python interpreter process PROC \"execfile('FILENAME')\". +Make that process's buffer visible and force display. Also make +comint believe the user typed this string so that +`kill-output-from-shell' does The Right Thing." + (let ((curbuf (current-buffer)) + (procbuf (process-buffer proc)) +; (comint-scroll-to-bottom-on-output t) + (msg (format "## working on region in file %s...\n" filename)) + ;; add some comment, so that we can filter it out of history + (cmd (format "execfile(r'%s') # PYTHON-MODE\n" filename))) + (unwind-protect + (save-excursion + (set-buffer procbuf) + (goto-char (point-max)) + (move-marker (process-mark proc) (point)) + (funcall (process-filter proc) proc msg)) + (set-buffer curbuf)) + (process-send-string proc cmd))) + +(defun py-comint-output-filter-function (string) + "Watch output for Python prompt and exec next file waiting in queue. +This function is appropriate for `comint-output-filter-functions'." + ;;remove ansi terminal escape sequences from string, not sure why they are + ;;still around... + (setq string (ansi-color-filter-apply string)) + (when (and (string-match py-shell-input-prompt-1-regexp string) + py-file-queue) + (if py-shell-switch-buffers-on-execute + (pop-to-buffer (current-buffer))) + (py-safe (delete-file (car py-file-queue))) + (setq py-file-queue (cdr py-file-queue)) + (if py-file-queue + (let ((pyproc (get-buffer-process (current-buffer)))) + (py-execute-file pyproc (car py-file-queue)))) + )) + +(defun py-pdbtrack-overlay-arrow (activation) + "Activate or de arrow at beginning-of-line in current buffer." + ;; This was derived/simplified from edebug-overlay-arrow + (cond (activation + (setq overlay-arrow-position (make-marker)) + (setq overlay-arrow-string "=>") + (set-marker overlay-arrow-position (py-point 'bol) (current-buffer)) + (setq py-pdbtrack-is-tracking-p t)) + (overlay-arrow-position + (setq overlay-arrow-position nil) + (setq py-pdbtrack-is-tracking-p nil)) + )) + +(defun py-pdbtrack-track-stack-file (text) + "Show the file indicated by the pdb stack entry line, in a separate window. + +Activity is disabled if the buffer-local variable +`py-pdbtrack-do-tracking-p' is nil. + +We depend on the pdb input prompt matching `py-pdbtrack-input-prompt' +at the beginning of the line. + +If the traceback target file path is invalid, we look for the most +recently visited python-mode buffer which either has the name of the +current function \(or class) or which defines the function \(or +class). This is to provide for remote scripts, eg, Zope's 'Script +\(Python)' - put a _copy_ of the script in a buffer named for the +script, and set to python-mode, and pdbtrack will find it.)" + ;; Instead of trying to piece things together from partial text + ;; (which can be almost useless depending on Emacs version), we + ;; monitor to the point where we have the next pdb prompt, and then + ;; check all text from comint-last-input-end to process-mark. + ;; + ;; Also, we're very conservative about clearing the overlay arrow, + ;; to minimize residue. This means, for instance, that executing + ;; other pdb commands wipe out the highlight. You can always do a + ;; 'where' (aka 'w') command to reveal the overlay arrow. + (let* ((origbuf (current-buffer)) + (currproc (get-buffer-process origbuf))) + + (if (not (and currproc py-pdbtrack-do-tracking-p)) + (py-pdbtrack-overlay-arrow nil) + + (let* ((procmark (process-mark currproc)) + (block (buffer-substring (max comint-last-input-end + (- procmark + py-pdbtrack-track-range)) + procmark)) + target target_fname target_lineno target_buffer) + + (if (not (string-match (concat py-pdbtrack-input-prompt "$") block)) + (py-pdbtrack-overlay-arrow nil) + + (setq target (py-pdbtrack-get-source-buffer block)) + + (if (stringp target) + (message "pdbtrack: %s" target) + + (setq target_lineno (car target)) + (setq target_buffer (cadr target)) + (setq target_fname (buffer-file-name target_buffer)) + (switch-to-buffer-other-window target_buffer) + (goto-line target_lineno) + (message "pdbtrack: line %s, file %s" target_lineno target_fname) + (py-pdbtrack-overlay-arrow t) + (pop-to-buffer origbuf t) + + ))))) + ) + +(defun py-pdbtrack-get-source-buffer (block) + "Return line number and buffer of code indicated by block's traceback text. + +We look first to visit the file indicated in the trace. + +Failing that, we look for the most recently visited python-mode buffer +with the same name or having the named function. + +If we're unable find the source code we return a string describing the +problem as best as we can determine." + + (if (not (string-match py-pdbtrack-stack-entry-regexp block)) + + "Traceback cue not found" + + (let* ((filename (match-string 1 block)) + (lineno (string-to-number (match-string 2 block))) + (funcname (match-string 3 block)) + funcbuffer) + + (cond ((file-exists-p filename) + (list lineno (find-file-noselect filename))) + + ((setq funcbuffer (py-pdbtrack-grub-for-buffer funcname lineno)) + (if (string-match "/Script (Python)$" filename) + ;; Add in number of lines for leading '##' comments: + (setq lineno + (+ lineno + (save-excursion + (set-buffer funcbuffer) + (count-lines + (point-min) + (max (point-min) + (string-match "^\\([^#]\\|#[^#]\\|#$\\)" + (buffer-substring (point-min) + (point-max))) + )))))) + (list lineno funcbuffer)) + + ((= (elt filename 0) ?\<) + (format "(Non-file source: '%s')" filename)) + + (t (format "Not found: %s(), %s" funcname filename))) + ) + ) + ) + +(defun py-pdbtrack-grub-for-buffer (funcname lineno) + "Find most recent buffer itself named or having function funcname. + +We walk the buffer-list history for python-mode buffers that are +named for funcname or define a function funcname." + (let ((buffers (buffer-list)) + buf + got) + (while (and buffers (not got)) + (setq buf (car buffers) + buffers (cdr buffers)) + (if (and (save-excursion (set-buffer buf) + (string= major-mode "python-mode")) + (or (string-match funcname (buffer-name buf)) + (string-match (concat "^\\s-*\\(def\\|class\\)\\s-+" + funcname "\\s-*(") + (save-excursion + (set-buffer buf) + (buffer-substring (point-min) + (point-max)))))) + (setq got buf))) + got)) + +(defun py-postprocess-output-buffer (buf) + "Highlight exceptions found in BUF. +If an exception occurred return t, otherwise return nil. BUF must exist." + (let (line file bol err-p) + (save-excursion + (set-buffer buf) + (goto-char (point-min)) + (while (re-search-forward py-traceback-line-re nil t) + (setq file (match-string 1) + line (string-to-number (match-string 2)) + bol (py-point 'bol)) + (py-highlight-line bol (py-point 'eol) file line))) + (when (and py-jump-on-exception line) + (beep) + (py-jump-to-exception file line) + (setq err-p t)) + err-p)) + + + +;;; Subprocess commands + +;; only used when (memq 'broken-temp-names py-emacs-features) +(defvar py-serial-number 0) +(defvar py-exception-buffer nil) +(defvar py-output-buffer "*Python Output*") +(make-variable-buffer-local 'py-output-buffer) + +;; for toggling between CPython and Jython +(defvar py-which-shell nil) +(defvar py-which-args py-python-command-args) +(defvar py-which-bufname "Python") +(make-variable-buffer-local 'py-which-shell) +(make-variable-buffer-local 'py-which-args) +(make-variable-buffer-local 'py-which-bufname) + +(defun py-toggle-shells (arg) + "Toggles between the CPython and Jython shells. + +With positive argument ARG (interactively \\[universal-argument]), +uses the CPython shell, with negative ARG uses the Jython shell, and +with a zero argument, toggles the shell. + +Programmatically, ARG can also be one of the symbols `cpython' or +`jython', equivalent to positive arg and negative arg respectively." + (interactive "P") + ;; default is to toggle + (if (null arg) + (setq arg 0)) + ;; preprocess arg + (cond + ((equal arg 0) + ;; toggle + (if (string-equal py-which-bufname "Python") + (setq arg -1) + (setq arg 1))) + ((equal arg 'cpython) (setq arg 1)) + ((equal arg 'jython) (setq arg -1))) + (let (msg) + (cond + ((< 0 arg) + ;; set to CPython + (setq py-which-shell py-python-command + py-which-args py-python-command-args + py-which-bufname "Python" + msg "CPython") + (if (string-equal py-which-bufname "Jython") + (setq mode-name "Python"))) + ((> 0 arg) + (setq py-which-shell py-jython-command + py-which-args py-jython-command-args + py-which-bufname "Jython" + msg "Jython") + (if (string-equal py-which-bufname "Python") + (setq mode-name "Jython"))) + ) + (message "Using the %s shell" msg) + (setq py-output-buffer (format "*%s Output*" py-which-bufname)))) + +;;;###autoload +(defun py-shell (&optional argprompt) + "Start an interactive Python interpreter in another window. +This is like Shell mode, except that Python is running in the window +instead of a shell. See the `Interactive Shell' and `Shell Mode' +sections of the Emacs manual for details, especially for the key +bindings active in the `*Python*' buffer. + +With optional \\[universal-argument], the user is prompted for the +flags to pass to the Python interpreter. This has no effect when this +command is used to switch to an existing process, only when a new +process is started. If you use this, you will probably want to ensure +that the current arguments are retained (they will be included in the +prompt). This argument is ignored when this function is called +programmatically, or when running in Emacs 19.34 or older. + +Note: You can toggle between using the CPython interpreter and the +Jython interpreter by hitting \\[py-toggle-shells]. This toggles +buffer local variables which control whether all your subshell +interactions happen to the `*Jython*' or `*Python*' buffers (the +latter is the name used for the CPython buffer). + +Warning: Don't use an interactive Python if you change sys.ps1 or +sys.ps2 from their default values, or if you're running code that +prints `>>> ' or `... ' at the start of a line. `python-mode' can't +distinguish your output from Python's output, and assumes that `>>> ' +at the start of a line is a prompt from Python. Similarly, the Emacs +Shell mode code assumes that both `>>> ' and `... ' at the start of a +line are Python prompts. Bad things can happen if you fool either +mode. + +Warning: If you do any editing *in* the process buffer *while* the +buffer is accepting output from Python, do NOT attempt to `undo' the +changes. Some of the output (nowhere near the parts you changed!) may +be lost if you do. This appears to be an Emacs bug, an unfortunate +interaction between undo and process filters; the same problem exists in +non-Python process buffers using the default (Emacs-supplied) process +filter." + (interactive "P") + ;; Set the default shell if not already set + (when (null py-which-shell) + (py-toggle-shells py-default-interpreter)) + (let ((args py-which-args)) + (when (and argprompt + (interactive-p) + (fboundp 'split-string)) + ;; TBD: Perhaps force "-i" in the final list? + (setq args (split-string + (read-string (concat py-which-bufname + " arguments: ") + (concat + (mapconcat 'identity py-which-args " ") " ") + )))) + (if (not (equal (buffer-name) "*Python*")) + (switch-to-buffer-other-window + (apply 'make-comint py-which-bufname py-which-shell nil args)) + (apply 'make-comint py-which-bufname py-which-shell nil args)) + (make-local-variable 'comint-prompt-regexp) + (setq comint-prompt-regexp (concat py-shell-input-prompt-1-regexp "\\|" + py-shell-input-prompt-2-regexp "\\|" + "^([Pp]db) ")) + (add-hook 'comint-output-filter-functions + 'py-comint-output-filter-function) + ;; pdbtrack + (add-hook 'comint-output-filter-functions 'py-pdbtrack-track-stack-file) + (setq py-pdbtrack-do-tracking-p t) + (set-syntax-table py-mode-syntax-table) + (use-local-map py-shell-map) + (run-hooks 'py-shell-hook) + )) + +(defun py-clear-queue () + "Clear the queue of temporary files waiting to execute." + (interactive) + (let ((n (length py-file-queue))) + (mapc 'delete-file py-file-queue) + (setq py-file-queue nil) + (message "%d pending files de-queued." n))) + + +(defun py-execute-region (start end &optional async) + "Execute the region in a Python interpreter. + +The region is first copied into a temporary file (in the directory +`py-temp-directory'). If there is no Python interpreter shell +running, this file is executed synchronously using +`shell-command-on-region'. If the program is long running, use +\\[universal-argument] to run the command asynchronously in its own +buffer. + +When this function is used programmatically, arguments START and END +specify the region to execute, and optional third argument ASYNC, if +non-nil, specifies to run the command asynchronously in its own +buffer. + +If the Python interpreter shell is running, the region is execfile()'d +in that shell. If you try to execute regions too quickly, +`python-mode' will queue them up and execute them one at a time when +it sees a `>>> ' prompt from Python. Each time this happens, the +process buffer is popped into a window (if it's not already in some +window) so you can see it, and a comment of the form + + \t## working on region in file ... + +is inserted at the end. See also the command `py-clear-queue'." + (interactive "r\nP") + ;; Skip ahead to the first non-blank line + (let* ((proc (get-process py-which-bufname)) + (temp (if (memq 'broken-temp-names py-emacs-features) + (let + ((sn py-serial-number) + (pid (and (fboundp 'emacs-pid) (emacs-pid)))) + (setq py-serial-number (1+ py-serial-number)) + (if pid + (format "python-%d-%d" sn pid) + (format "python-%d" sn))) + (make-temp-name "python-"))) + (file (concat (expand-file-name temp py-temp-directory) ".py")) + (cur (current-buffer)) + (buf (get-buffer-create file)) + shell) + ;; Write the contents of the buffer, watching out for indented regions. + (save-excursion + (goto-char start) + (beginning-of-line) + (while (and (looking-at "\\s *$") + (< (point) end)) + (forward-line 1)) + (setq start (point)) + (or (< start end) + (error "Region is empty")) + (setq py-line-number-offset (count-lines 1 start)) + (let ((needs-if (/= (py-point 'bol) (py-point 'boi)))) + (set-buffer buf) + (python-mode) + (when needs-if + (insert "if 1:\n") + (setq py-line-number-offset (- py-line-number-offset 1))) + (insert-buffer-substring cur start end) + ;; Set the shell either to the #! line command, or to the + ;; py-which-shell buffer local variable. + (setq shell (or (py-choose-shell-by-shebang) + (py-choose-shell-by-import) + py-which-shell)))) + (cond + ;; always run the code in its own asynchronous subprocess + (async + ;; User explicitly wants this to run in its own async subprocess + (save-excursion + (set-buffer buf) + (write-region (point-min) (point-max) file nil 'nomsg)) + (let* ((buf (generate-new-buffer-name py-output-buffer)) + ;; TBD: a horrible hack, but why create new Custom variables? + (arg (if (string-equal py-which-bufname "Python") + "-u" ""))) + (start-process py-which-bufname buf shell arg file) + (pop-to-buffer buf) + (py-postprocess-output-buffer buf) + ;; TBD: clean up the temporary file! + )) + ;; if the Python interpreter shell is running, queue it up for + ;; execution there. + (proc + ;; use the existing python shell + (save-excursion + (set-buffer buf) + (write-region (point-min) (point-max) file nil 'nomsg)) + (if (not py-file-queue) + (py-execute-file proc file) + (message "File %s queued for execution" file)) + (setq py-file-queue (append py-file-queue (list file))) + (setq py-exception-buffer (cons file (current-buffer)))) + (t + ;; TBD: a horrible hack, but why create new Custom variables? + (let ((cmd (concat py-which-shell (if (string-equal py-which-bufname + "Jython") + " -" "")))) + ;; otherwise either run it synchronously in a subprocess + (save-excursion + (set-buffer buf) + (shell-command-on-region (point-min) (point-max) + cmd py-output-buffer)) + ;; shell-command-on-region kills the output buffer if it never + ;; existed and there's no output from the command + (if (not (get-buffer py-output-buffer)) + (message "No output.") + (setq py-exception-buffer (current-buffer)) + (let ((err-p (py-postprocess-output-buffer py-output-buffer))) + (pop-to-buffer py-output-buffer) + (if err-p + (pop-to-buffer py-exception-buffer))) + )) + )) + ;; Clean up after ourselves. + (kill-buffer buf))) + + +;; Code execution commands +(defun py-execute-buffer (&optional async) + "Send the contents of the buffer to a Python interpreter. +If the file local variable `py-master-file' is non-nil, execute the +named file instead of the buffer's file. + +If there is a *Python* process buffer it is used. If a clipping +restriction is in effect, only the accessible portion of the buffer is +sent. A trailing newline will be supplied if needed. + +See the `\\[py-execute-region]' docs for an account of some +subtleties, including the use of the optional ASYNC argument." + (interactive "P") + (let ((old-buffer (current-buffer))) + (if py-master-file + (let* ((filename (expand-file-name py-master-file)) + (buffer (or (get-file-buffer filename) + (find-file-noselect filename)))) + (set-buffer buffer))) + (py-execute-region (point-min) (point-max) async) + (pop-to-buffer old-buffer))) + +(defun buffer-change-colorizing (start end length) + "colorizing the region from start to end." + (ansi-color-apply-on-region start end) +) + +(defun extended-py-execute-buffer () + "run current buffer that contains python code using extended mode." + (interactive) + (let (current-buffer-address pybuffer fullcommand commandp cwd current-buffer-dir) + (setq current-buffer-address (buffer-file-name)) + (setq current-buffer-dir (file-name-directory current-buffer-address)) + (setq cwd default-directory) + (cd current-buffer-dir) + (if (stringp current-buffer-address) + (progn + (setq pybuffer (get-buffer-create "*Python*")) + (switch-to-buffer pybuffer) + (ansi-color-for-comint-mode-on) + (add-hook 'after-change-functions 'buffer-change-colorizing t t) + (setq fullcommand (concat current-buffer-address)) + ;;(setq commandp (start-process-shell-command "python" pybuffer fullcommand)) + (setq commandp (apply 'make-comint-in-buffer "python" pybuffer *python* nil (list fullcommand))) + ) + (message "This buffer did not visit any file.") + ) + (cd cwd) + ) +) +(defun extended-py-execute-buffer-with-args (args) + "run current buffer that contains python code using extended mode." + (interactive "sEnter commandlines arguments: ") + (let (current-buffer-address pybuffer fullcommand commandp current-buffer-dir cwd) + (setq current-buffer-address (buffer-file-name)) + (setq current-buffer-dir (file-name-directory current-buffer-address)) + (setq cwd default-directory) + (cd current-buffer-dir) + + (if (stringp current-buffer-address) + (progn + (setq pybuffer (get-buffer-create "*Python*")) + (switch-to-buffer pybuffer) + (ansi-color-for-comint-mode-on) + (add-hook 'after-change-functions 'buffer-change-colorizing t t) + (setq fullcommand (concat current-buffer-address)) + (setq commandp (apply 'make-comint-in-buffer "python" pybuffer *python* nil (list fullcommand args))) + ) + (message "This buffer did not visit any file.") + ) + (cd cwd) + ) +) + +(defun py-execute-import-or-reload (&optional async) + "Import the current buffer's file in a Python interpreter. + +If the file has already been imported, then do reload instead to get +the latest version. + +If the file's name does not end in \".py\", then do execfile instead. + +If the current buffer is not visiting a file, do `py-execute-buffer' +instead. + +If the file local variable `py-master-file' is non-nil, import or +reload the named file instead of the buffer's file. The file may be +saved based on the value of `py-execute-import-or-reload-save-p'. + +See the `\\[py-execute-region]' docs for an account of some +subtleties, including the use of the optional ASYNC argument. + +This may be preferable to `\\[py-execute-buffer]' because: + + - Definitions stay in their module rather than appearing at top + level, where they would clutter the global namespace and not affect + uses of qualified names (MODULE.NAME). + + - The Python debugger gets line number information about the functions." + (interactive "P") + ;; Check file local variable py-master-file + (if py-master-file + (let* ((filename (expand-file-name py-master-file)) + (buffer (or (get-file-buffer filename) + (find-file-noselect filename)))) + (set-buffer buffer))) + (let ((file (buffer-file-name (current-buffer)))) + (if file + (progn + ;; Maybe save some buffers + (save-some-buffers (not py-ask-about-save) nil) + (py-execute-string + (if (string-match "\\.py$" file) + (let ((f (file-name-sans-extension + (file-name-nondirectory file)))) + (format "if globals().has_key('%s'):\n reload(%s)\nelse:\n import %s\n" + f f f)) + (format "execfile(r'%s')\n" file)) + async)) + ;; else + (py-execute-buffer async)))) + + +(defun py-execute-def-or-class (&optional async) + "Send the current function or class definition to a Python interpreter. + +If there is a *Python* process buffer it is used. + +See the `\\[py-execute-region]' docs for an account of some +subtleties, including the use of the optional ASYNC argument." + (interactive "P") + (save-excursion + (py-mark-def-or-class) + ;; mark is before point + (py-execute-region (mark) (point) async))) + + +(defun py-execute-string (string &optional async) + "Send the argument STRING to a Python interpreter. + +If there is a *Python* process buffer it is used. + +See the `\\[py-execute-region]' docs for an account of some +subtleties, including the use of the optional ASYNC argument." + (interactive "sExecute Python command: ") + (save-excursion + (set-buffer (get-buffer-create + (generate-new-buffer-name " *Python Command*"))) + (insert string) + (py-execute-region (point-min) (point-max) async))) + + + +(defun py-jump-to-exception (file line) + "Jump to the Python code in FILE at LINE." + (let ((buffer (cond ((string-equal file "") + (if (consp py-exception-buffer) + (cdr py-exception-buffer) + py-exception-buffer)) + ((and (consp py-exception-buffer) + (string-equal file (car py-exception-buffer))) + (cdr py-exception-buffer)) + ((py-safe (find-file-noselect file))) + ;; could not figure out what file the exception + ;; is pointing to, so prompt for it + (t (find-file (read-file-name "Exception file: " + nil + file t)))))) + ;; Fiddle about with line number + (setq line (+ py-line-number-offset line)) + + (pop-to-buffer buffer) + ;; Force Python mode + (if (not (eq major-mode 'python-mode)) + (python-mode)) + (goto-line line) + (message "Jumping to exception in file %s on line %d" file line))) + +(defun py-mouseto-exception (event) + "Jump to the code which caused the Python exception at EVENT. +EVENT is usually a mouse click." + (interactive "e") + (cond + ((fboundp 'event-point) + ;; XEmacs + (let* ((point (event-point event)) + (buffer (event-buffer event)) + (e (and point buffer (extent-at point buffer 'py-exc-info))) + (info (and e (extent-property e 'py-exc-info)))) + (message "Event point: %d, info: %s" point info) + (and info + (py-jump-to-exception (car info) (cdr info))) + )) + ;; Emacs -- Please port this! + )) + +(defun py-goto-exception () + "Go to the line indicated by the traceback." + (interactive) + (let (file line) + (save-excursion + (beginning-of-line) + (if (looking-at py-traceback-line-re) + (setq file (match-string 1) + line (string-to-number (match-string 2))))) + (if (not file) + (error "Not on a traceback line")) + (py-jump-to-exception file line))) + +(defun py-find-next-exception (start buffer searchdir errwhere) + "Find the next Python exception and jump to the code that caused it. +START is the buffer position in BUFFER from which to begin searching +for an exception. SEARCHDIR is a function, either +`re-search-backward' or `re-search-forward' indicating the direction +to search. ERRWHERE is used in an error message if the limit (top or +bottom) of the trackback stack is encountered." + (let (file line) + (save-excursion + (set-buffer buffer) + (goto-char (py-point start)) + (if (funcall searchdir py-traceback-line-re nil t) + (setq file (match-string 1) + line (string-to-number (match-string 2))))) + (if (and file line) + (py-jump-to-exception file line) + (error "%s of traceback" errwhere)))) + +(defun py-down-exception (&optional bottom) + "Go to the next line down in the traceback. +With \\[univeral-argument] (programmatically, optional argument +BOTTOM), jump to the bottom (innermost) exception in the exception +stack." + (interactive "P") + (let* ((proc (get-process "Python")) + (buffer (if proc "*Python*" py-output-buffer))) + (if bottom + (py-find-next-exception 'eob buffer 're-search-backward "Bottom") + (py-find-next-exception 'eol buffer 're-search-forward "Bottom")))) + +(defun py-up-exception (&optional top) + "Go to the previous line up in the traceback. +With \\[universal-argument] (programmatically, optional argument TOP) +jump to the top (outermost) exception in the exception stack." + (interactive "P") + (let* ((proc (get-process "Python")) + (buffer (if proc "*Python*" py-output-buffer))) + (if top + (py-find-next-exception 'bob buffer 're-search-forward "Top") + (py-find-next-exception 'bol buffer 're-search-backward "Top")))) + + +;; Electric deletion +(defun py-electric-backspace (arg) + "Delete preceding character or levels of indentation. +Deletion is performed by calling the function in `py-backspace-function' +with a single argument (the number of characters to delete). + +If point is at the leftmost column, delete the preceding newline. + +Otherwise, if point is at the leftmost non-whitespace character of a +line that is neither a continuation line nor a non-indenting comment +line, or if point is at the end of a blank line, this command reduces +the indentation to match that of the line that opened the current +block of code. The line that opened the block is displayed in the +echo area to help you keep track of where you are. With +\\[universal-argument] dedents that many blocks (but not past column +zero). + +Otherwise the preceding character is deleted, converting a tab to +spaces if needed so that only a single column position is deleted. +\\[universal-argument] specifies how many characters to delete; +default is 1. + +When used programmatically, argument ARG specifies the number of +blocks to dedent, or the number of characters to delete, as indicated +above." + (interactive "*p") + (if (or (/= (current-indentation) (current-column)) + (bolp) + (py-continuation-line-p) +; (not py-honor-comment-indentation) +; (looking-at "#[^ \t\n]") ; non-indenting # + ) + (funcall py-backspace-function arg) + ;; else indent the same as the colon line that opened the block + ;; force non-blank so py-goto-block-up doesn't ignore it + (insert-char ?* 1) + (backward-char) + (let ((base-indent 0) ; indentation of base line + (base-text "") ; and text of base line + (base-found-p nil)) + (save-excursion + (while (< 0 arg) + (condition-case nil ; in case no enclosing block + (progn + (py-goto-block-up 'no-mark) + (setq base-indent (current-indentation) + base-text (py-suck-up-leading-text) + base-found-p t)) + (error nil)) + (setq arg (1- arg)))) + (delete-char 1) ; toss the dummy character + (delete-horizontal-space) + (indent-to base-indent) + (if base-found-p + (message "Closes block: %s" base-text))))) + + +(defun py-electric-delete (arg) + "Delete preceding or following character or levels of whitespace. + +The behavior of this function depends on the variable +`delete-key-deletes-forward'. If this variable is nil (or does not +exist, as in older Emacsen and non-XEmacs versions), then this +function behaves identically to \\[c-electric-backspace]. + +If `delete-key-deletes-forward' is non-nil and is supported in your +Emacs, then deletion occurs in the forward direction, by calling the +function in `py-delete-function'. + +\\[universal-argument] (programmatically, argument ARG) specifies the +number of characters to delete (default is 1)." + (interactive "*p") + (if (or (and (fboundp 'delete-forward-p) ;XEmacs 21 + (delete-forward-p)) + (and (boundp 'delete-key-deletes-forward) ;XEmacs 20 + delete-key-deletes-forward)) + (funcall py-delete-function arg) + (py-electric-backspace arg))) + +;; required for pending-del and delsel modes +(put 'py-electric-colon 'delete-selection t) ;delsel +(put 'py-electric-colon 'pending-delete t) ;pending-del +(put 'py-electric-backspace 'delete-selection 'supersede) ;delsel +(put 'py-electric-backspace 'pending-delete 'supersede) ;pending-del +(put 'py-electric-delete 'delete-selection 'supersede) ;delsel +(put 'py-electric-delete 'pending-delete 'supersede) ;pending-del + + + +(defun py-indent-line (&optional arg) + "Fix the indentation of the current line according to Python rules. +With \\[universal-argument] (programmatically, the optional argument +ARG non-nil), ignore dedenting rules for block closing statements +\(e.g. return, raise, break, continue, pass) + +This function is normally bound to `indent-line-function' so +\\[indent-for-tab-command] will call it." + (interactive "P") + (let* ((ci (current-indentation)) + (move-to-indentation-p (<= (current-column) ci)) + (need (py-compute-indentation (not arg))) + (cc (current-column))) + ;; dedent out a level if previous command was the same unless we're in + ;; column 1 + (if (and (equal last-command this-command) + (/= cc 0)) + (progn + (beginning-of-line) + (delete-horizontal-space) + (indent-to (* (/ (- cc 1) py-indent-offset) py-indent-offset))) + (progn + ;; see if we need to dedent + (if (py-outdent-p) + (setq need (- need py-indent-offset))) + (if (or py-tab-always-indent + move-to-indentation-p) + (progn (if (/= ci need) + (save-excursion + (beginning-of-line) + (delete-horizontal-space) + (indent-to need))) + (if move-to-indentation-p (back-to-indentation))) + (insert-tab)))))) + +(defun py-newline-and-indent () + "Strives to act like the Emacs `newline-and-indent'. +This is just `strives to' because correct indentation can't be computed +from scratch for Python code. In general, deletes the whitespace before +point, inserts a newline, and takes an educated guess as to how you want +the new line indented." + (interactive) + (let ((ci (current-indentation))) + (if (< ci (current-column)) ; if point beyond indentation + (newline-and-indent) + ;; else try to act like newline-and-indent "normally" acts + (beginning-of-line) + (insert-char ?\n 1) + (move-to-column ci)))) + +(defun py-compute-indentation (honor-block-close-p) + "Compute Python indentation. +When HONOR-BLOCK-CLOSE-P is non-nil, statements such as `return', +`raise', `break', `continue', and `pass' force one level of +dedenting." + (save-excursion + (beginning-of-line) + (let* ((bod (py-point 'bod)) + (pps (parse-partial-sexp bod (point))) + (boipps (parse-partial-sexp bod (py-point 'boi))) + placeholder) + (cond + ;; are we inside a multi-line string or comment? + ((or (and (nth 3 pps) (nth 3 boipps)) + (and (nth 4 pps) (nth 4 boipps))) + (save-excursion + (if (not py-align-multiline-strings-p) 0 + ;; skip back over blank & non-indenting comment lines + ;; note: will skip a blank or non-indenting comment line + ;; that happens to be a continuation line too + (re-search-backward "^[ \t]*\\([^ \t\n#]\\|#[ \t\n]\\)" nil 'move) + (back-to-indentation) + (current-column)))) + ;; are we on a continuation line? + ((py-continuation-line-p) + (let ((startpos (point)) + (open-bracket-pos (py-nesting-level)) + endpos searching found state cind cline) + (if open-bracket-pos + (progn + (setq endpos (py-point 'bol)) + (py-goto-initial-line) + (setq cind (current-indentation)) + (setq cline cind) + (dolist (bp + (nth 9 (save-excursion + (parse-partial-sexp (point) endpos))) + cind) + (if (search-forward "\n" bp t) (setq cline cind)) + (goto-char (1+ bp)) + (skip-chars-forward " \t") + (setq cind (if (memq (following-char) '(?\n ?# ?\\)) + (+ cline py-indent-offset) + (current-column))))) + ;; else on backslash continuation line + (forward-line -1) + (if (py-continuation-line-p) ; on at least 3rd line in block + (current-indentation) ; so just continue the pattern + ;; else started on 2nd line in block, so indent more. + ;; if base line is an assignment with a start on a RHS, + ;; indent to 2 beyond the leftmost "="; else skip first + ;; chunk of non-whitespace characters on base line, + 1 more + ;; column + (end-of-line) + (setq endpos (point) + searching t) + (back-to-indentation) + (setq startpos (point)) + ;; look at all "=" from left to right, stopping at first + ;; one not nested in a list or string + (while searching + (skip-chars-forward "^=" endpos) + (if (= (point) endpos) + (setq searching nil) + (forward-char 1) + (setq state (parse-partial-sexp startpos (point))) + (if (and (zerop (car state)) ; not in a bracket + (null (nth 3 state))) ; & not in a string + (progn + (setq searching nil) ; done searching in any case + (setq found + (not (or + (eq (following-char) ?=) + (memq (char-after (- (point) 2)) + '(?< ?> ?!))))))))) + (if (or (not found) ; not an assignment + (looking-at "[ \t]*\\\\")) ; <=> + (progn + (goto-char startpos) + (skip-chars-forward "^ \t\n"))) + ;; if this is a continuation for a block opening + ;; statement, add some extra offset. + (+ (current-column) (if (py-statement-opens-block-p) + py-continuation-offset 0) + 1) + )))) + + ;; not on a continuation line + ((bobp) (current-indentation)) + + ;; Dfn: "Indenting comment line". A line containing only a + ;; comment, but which is treated like a statement for + ;; indentation calculation purposes. Such lines are only + ;; treated specially by the mode; they are not treated + ;; specially by the Python interpreter. + + ;; The rules for indenting comment lines are a line where: + ;; - the first non-whitespace character is `#', and + ;; - the character following the `#' is whitespace, and + ;; - the line is dedented with respect to (i.e. to the left + ;; of) the indentation of the preceding non-blank line. + + ;; The first non-blank line following an indenting comment + ;; line is given the same amount of indentation as the + ;; indenting comment line. + + ;; All other comment-only lines are ignored for indentation + ;; purposes. + + ;; Are we looking at a comment-only line which is *not* an + ;; indenting comment line? If so, we assume that it's been + ;; placed at the desired indentation, so leave it alone. + ;; Indenting comment lines are aligned as statements down + ;; below. + ((and (looking-at "[ \t]*#[^ \t\n]") + ;; NOTE: this test will not be performed in older Emacsen + (fboundp 'forward-comment) + (<= (current-indentation) + (save-excursion + (forward-comment (- (point-max))) + (current-indentation)))) + (current-indentation)) + + ;; else indentation based on that of the statement that + ;; precedes us; use the first line of that statement to + ;; establish the base, in case the user forced a non-std + ;; indentation for the continuation lines (if any) + (t + ;; skip back over blank & non-indenting comment lines note: + ;; will skip a blank or non-indenting comment line that + ;; happens to be a continuation line too. use fast Emacs 19 + ;; function if it's there. + (if (and (eq py-honor-comment-indentation nil) + (fboundp 'forward-comment)) + (forward-comment (- (point-max))) + (let ((prefix-re (concat py-block-comment-prefix "[ \t]*")) + done) + (while (not done) + (re-search-backward "^[ \t]*\\([^ \t\n#]\\|#\\)" nil 'move) + (setq done (or (bobp) + (and (eq py-honor-comment-indentation t) + (save-excursion + (back-to-indentation) + (not (looking-at prefix-re)) + )) + (and (not (eq py-honor-comment-indentation t)) + (save-excursion + (back-to-indentation) + (and (not (looking-at prefix-re)) + (or (looking-at "[^#]") + (not (zerop (current-column))) + )) + )) + )) + ))) + ;; if we landed inside a string, go to the beginning of that + ;; string. this handles triple quoted, multi-line spanning + ;; strings. + (py-goto-beginning-of-tqs (nth 3 (parse-partial-sexp bod (point)))) + ;; now skip backward over continued lines + (setq placeholder (point)) + (py-goto-initial-line) + ;; we may *now* have landed in a TQS, so find the beginning of + ;; this string. + (py-goto-beginning-of-tqs + (save-excursion (nth 3 (parse-partial-sexp + placeholder (point))))) + (+ (current-indentation) + (if (py-statement-opens-block-p) + py-indent-offset + (if (and honor-block-close-p (py-statement-closes-block-p)) + (- py-indent-offset) + 0))) + ))))) + +(defun py-guess-indent-offset (&optional global) + "Guess a good value for, and change, `py-indent-offset'. + +By default, make a buffer-local copy of `py-indent-offset' with the +new value, so that other Python buffers are not affected. With +\\[universal-argument] (programmatically, optional argument GLOBAL), +change the global value of `py-indent-offset'. This affects all +Python buffers (that don't have their own buffer-local copy), both +those currently existing and those created later in the Emacs session. + +Some people use a different value for `py-indent-offset' than you use. +There's no excuse for such foolishness, but sometimes you have to deal +with their ugly code anyway. This function examines the file and sets +`py-indent-offset' to what it thinks it was when they created the +mess. + +Specifically, it searches forward from the statement containing point, +looking for a line that opens a block of code. `py-indent-offset' is +set to the difference in indentation between that line and the Python +statement following it. If the search doesn't succeed going forward, +it's tried again going backward." + (interactive "P") ; raw prefix arg + (let (new-value + (start (point)) + (restart (point)) + (found nil) + colon-indent) + (py-goto-initial-line) + (while (not (or found (eobp))) + (when (and (re-search-forward ":[ \t]*\\($\\|[#\\]\\)" nil 'move) + (not (py-in-literal restart))) + (setq restart (point)) + (py-goto-initial-line) + (if (py-statement-opens-block-p) + (setq found t) + (goto-char restart)))) + (unless found + (goto-char start) + (py-goto-initial-line) + (while (not (or found (bobp))) + (setq found (and + (re-search-backward ":[ \t]*\\($\\|[#\\]\\)" nil 'move) + (or (py-goto-initial-line) t) ; always true -- side effect + (py-statement-opens-block-p))))) + (setq colon-indent (current-indentation) + found (and found (zerop (py-next-statement 1))) + new-value (- (current-indentation) colon-indent)) + (goto-char start) + (if (not found) + (error "Sorry, couldn't guess a value for py-indent-offset") + (funcall (if global 'kill-local-variable 'make-local-variable) + 'py-indent-offset) + (setq py-indent-offset new-value) + (or noninteractive + (message "%s value of py-indent-offset set to %d" + (if global "Global" "Local") + py-indent-offset))) + )) + +(defun py-comment-indent-function () + "Python version of `comment-indent-function'." + ;; This is required when filladapt is turned off. Without it, when + ;; filladapt is not used, comments which start in column zero + ;; cascade one character to the right + (save-excursion + (beginning-of-line) + (let ((eol (py-point 'eol))) + (and comment-start-skip + (re-search-forward comment-start-skip eol t) + (setq eol (match-beginning 0))) + (goto-char eol) + (skip-chars-backward " \t") + (max comment-column (+ (current-column) (if (bolp) 0 1))) + ))) + +(defun py-narrow-to-defun (&optional class) + "Make text outside current defun invisible. +The defun visible is the one that contains point or follows point. +Optional CLASS is passed directly to `py-beginning-of-def-or-class'." + (interactive "P") + (save-excursion + (widen) + (py-end-of-def-or-class class) + (let ((end (point))) + (py-beginning-of-def-or-class class) + (narrow-to-region (point) end)))) + + +(defun py-shift-region (start end count) + "Indent lines from START to END by COUNT spaces." + (save-excursion + (goto-char end) + (beginning-of-line) + (setq end (point)) + (goto-char start) + (beginning-of-line) + (setq start (point)) + (let (deactivate-mark) + (indent-rigidly start end count)))) + +(defun py-shift-region-left (start end &optional count) + "Shift region of Python code to the left. +The lines from the line containing the start of the current region up +to (but not including) the line containing the end of the region are +shifted to the left, by `py-indent-offset' columns. + +If a prefix argument is given, the region is instead shifted by that +many columns. With no active region, dedent only the current line. +You cannot dedent the region if any line is already at column zero." + (interactive + (let ((p (point)) + (m (condition-case nil (mark) (mark-inactive nil))) + (arg current-prefix-arg)) + (if m + (list (min p m) (max p m) arg) + (list p (save-excursion (forward-line 1) (point)) arg)))) + ;; if any line is at column zero, don't shift the region + (save-excursion + (goto-char start) + (while (< (point) end) + (back-to-indentation) + (if (and (zerop (current-column)) + (not (looking-at "\\s *$"))) + (error "Region is at left edge")) + (forward-line 1))) + (py-shift-region start end (- (prefix-numeric-value + (or count py-indent-offset)))) + (py-keep-region-active)) + +(defun py-shift-region-right (start end &optional count) + "Shift region of Python code to the right. +The lines from the line containing the start of the current region up +to (but not including) the line containing the end of the region are +shifted to the right, by `py-indent-offset' columns. + +If a prefix argument is given, the region is instead shifted by that +many columns. With no active region, indent only the current line." + (interactive + (let ((p (point)) + (m (condition-case nil (mark) (mark-inactive nil))) + (arg current-prefix-arg)) + (if m + (list (min p m) (max p m) arg) + (list p (save-excursion (forward-line 1) (point)) arg)))) + (py-shift-region start end (prefix-numeric-value + (or count py-indent-offset))) + (py-keep-region-active)) + +(defun py-indent-region (start end &optional indent-offset) + "Reindent a region of Python code. + +The lines from the line containing the start of the current region up +to (but not including) the line containing the end of the region are +reindented. If the first line of the region has a non-whitespace +character in the first column, the first line is left alone and the +rest of the region is reindented with respect to it. Else the entire +region is reindented with respect to the (closest code or indenting +comment) statement immediately preceding the region. + +This is useful when code blocks are moved or yanked, when enclosing +control structures are introduced or removed, or to reformat code +using a new value for the indentation offset. + +If a numeric prefix argument is given, it will be used as the value of +the indentation offset. Else the value of `py-indent-offset' will be +used. + +Warning: The region must be consistently indented before this function +is called! This function does not compute proper indentation from +scratch (that's impossible in Python), it merely adjusts the existing +indentation to be correct in context. + +Warning: This function really has no idea what to do with +non-indenting comment lines, and shifts them as if they were indenting +comment lines. Fixing this appears to require telepathy. + +Special cases: whitespace is deleted from blank lines; continuation +lines are shifted by the same amount their initial line was shifted, +in order to preserve their relative indentation with respect to their +initial line; and comment lines beginning in column 1 are ignored." + (interactive "*r\nP") ; region; raw prefix arg + (save-excursion + (goto-char end) (beginning-of-line) (setq end (point-marker)) + (goto-char start) (beginning-of-line) + (let ((py-indent-offset (prefix-numeric-value + (or indent-offset py-indent-offset))) + (indents '(-1)) ; stack of active indent levels + (target-column 0) ; column to which to indent + (base-shifted-by 0) ; amount last base line was shifted + (indent-base (if (looking-at "[ \t\n]") + (py-compute-indentation t) + 0)) + ci) + (while (< (point) end) + (setq ci (current-indentation)) + ;; figure out appropriate target column + (cond + ((or (eq (following-char) ?#) ; comment in column 1 + (looking-at "[ \t]*$")) ; entirely blank + (setq target-column 0)) + ((py-continuation-line-p) ; shift relative to base line + (setq target-column (+ ci base-shifted-by))) + (t ; new base line + (if (> ci (car indents)) ; going deeper; push it + (setq indents (cons ci indents)) + ;; else we should have seen this indent before + (setq indents (memq ci indents)) ; pop deeper indents + (if (null indents) + (error "Bad indentation in region, at line %d" + (save-restriction + (widen) + (1+ (count-lines 1 (point))))))) + (setq target-column (+ indent-base + (* py-indent-offset + (- (length indents) 2)))) + (setq base-shifted-by (- target-column ci)))) + ;; shift as needed + (if (/= ci target-column) + (progn + (delete-horizontal-space) + (indent-to target-column))) + (forward-line 1)))) + (set-marker end nil)) + +(defun py-comment-region (beg end &optional arg) + "Like `comment-region' but uses double hash (`#') comment starter." + (interactive "r\nP") + (let ((comment-start py-block-comment-prefix)) + (comment-region beg end arg))) + +(defun py-join-words-wrapping (words separator line-prefix line-length) + (let ((lines ()) + (current-line line-prefix)) + (while words + (let* ((word (car words)) + (maybe-line (concat current-line word separator))) + (if (> (length maybe-line) line-length) + (setq lines (cons (substring current-line 0 -1) lines) + current-line (concat line-prefix word separator " ")) + (setq current-line (concat maybe-line " ")))) + (setq words (cdr words))) + (setq lines (cons (substring + current-line 0 (- 0 (length separator) 1)) lines)) + (mapconcat 'identity (nreverse lines) "\n"))) + +(defun py-sort-imports () + "Sort multiline imports. +Put point inside the parentheses of a multiline import and hit +\\[py-sort-imports] to sort the imports lexicographically" + (interactive) + (save-excursion + (let ((open-paren (save-excursion (progn (up-list -1) (point)))) + (close-paren (save-excursion (progn (up-list 1) (point)))) + sorted-imports) + (goto-char (1+ open-paren)) + (skip-chars-forward " \n\t") + (setq sorted-imports + (sort + (delete-dups + (split-string (buffer-substring + (point) + (save-excursion (goto-char (1- close-paren)) + (skip-chars-backward " \n\t") + (point))) + ", *\\(\n *\\)?")) + ;; XXX Should this sort case insensitively? + 'string-lessp)) + ;; Remove empty strings. + (delete-region open-paren close-paren) + (goto-char open-paren) + (insert "(\n") + (insert (py-join-words-wrapping (remove "" sorted-imports) "," " " 78)) + (insert ")") + ))) + + + +;; Functions for moving point +(defun py-previous-statement (count) + "Go to the start of the COUNTth preceding Python statement. +By default, goes to the previous statement. If there is no such +statement, goes to the first statement. Return count of statements +left to move. `Statements' do not include blank, comment, or +continuation lines." + (interactive "p") ; numeric prefix arg + (if (< count 0) (py-next-statement (- count)) + (py-goto-initial-line) + (let (start) + (while (and + (setq start (point)) ; always true -- side effect + (> count 0) + (zerop (forward-line -1)) + (py-goto-statement-at-or-above)) + (setq count (1- count))) + (if (> count 0) (goto-char start))) + count)) + +(defun py-next-statement (count) + "Go to the start of next Python statement. +If the statement at point is the i'th Python statement, goes to the +start of statement i+COUNT. If there is no such statement, goes to the +last statement. Returns count of statements left to move. `Statements' +do not include blank, comment, or continuation lines." + (interactive "p") ; numeric prefix arg + (if (< count 0) (py-previous-statement (- count)) + (beginning-of-line) + (let (start) + (while (and + (setq start (point)) ; always true -- side effect + (> count 0) + (py-goto-statement-below)) + (setq count (1- count))) + (if (> count 0) (goto-char start))) + count)) + +(defalias 'py-goto-block-up 'py-beginning-of-block) +(defun py-beginning-of-block (&optional nomark) + "Move to start of current block. +Go to the statement that starts the smallest enclosing block; roughly +speaking, this will be the closest preceding statement that ends with a +colon and is indented less than the statement you started on. If +successful, also sets the mark to the starting point. + +`\\[py-mark-block]' can be used afterward to mark the whole code +block, if desired. + +If called from a program, the mark will not be set if optional argument +NOMARK is not nil." + (interactive) + (let ((start (point)) + (found nil) + initial-indent) + (py-goto-initial-line) + ;; if on blank or non-indenting comment line, use the preceding stmt + (if (looking-at "[ \t]*\\($\\|#[^ \t\n]\\)") + (progn + (py-goto-statement-at-or-above) + (setq found (py-statement-opens-block-p)))) + ;; search back for colon line indented less + (setq initial-indent (current-indentation)) + (if (zerop initial-indent) + ;; force fast exit + (goto-char (point-min))) + (while (not (or found (bobp))) + (setq found + (and + (re-search-backward ":[ \t]*\\($\\|[#\\]\\)" nil 'move) + (or (py-goto-initial-line) t) ; always true -- side effect + (< (current-indentation) initial-indent) + (py-statement-opens-block-p)))) + (if found + (progn + (or nomark (push-mark start)) + (back-to-indentation)) + (goto-char start) + (error "Enclosing block not found")))) + +(defun py-beginning-of-def-or-class (&optional class count) + "Move point to start of `def' or `class'. + +Searches back for the closest preceding `def'. If you supply a prefix +arg, looks for a `class' instead. The docs below assume the `def' +case; just substitute `class' for `def' for the other case. +Programmatically, if CLASS is `either', then moves to either `class' +or `def'. + +When second optional argument is given programmatically, move to the +COUNTth start of `def'. + +If point is in a `def' statement already, and after the `d', simply +moves point to the start of the statement. + +Otherwise (i.e. when point is not in a `def' statement, or at or +before the `d' of a `def' statement), searches for the closest +preceding `def' statement, and leaves point at its start. If no such +statement can be found, leaves point at the start of the buffer. + +Returns t iff a `def' statement is found by these rules. + +Note that doing this command repeatedly will take you closer to the +start of the buffer each time. + +To mark the current `def', see `\\[py-mark-def-or-class]'." + (interactive "P") ; raw prefix arg + (lexical-let* ((count (or count 1)) + (step (if (< 0 count) -1 1)) + (start-re (cond ((eq class 'either) "^[ \t]*\\(class\\|def\\)\\>") + (class "^[ \t]*class\\>") + (t "^[ \t]*def\\>")))) + (while (/= 0 count) + (if (< 0 count) + (unless (looking-at start-re) (end-of-line)) + (end-of-line)) + (if + (re-search-backward start-re nil 'move (- step)) + (unless + ;; if inside a string + (nth 3 (parse-partial-sexp (point-min) (point))) + (goto-char (match-beginning 0)) + (setq count (+ count step))) + (setq count 0))))) + +;; Backwards compatibility +(defalias 'beginning-of-python-def-or-class 'py-beginning-of-def-or-class) + +(defun py-end-of-def-or-class (&optional class count) + "Move point beyond end of `def' or `class' body. + +By default, looks for an appropriate `def'. If you supply a prefix +arg, looks for a `class' instead. The docs below assume the `def' +case; just substitute `class' for `def' for the other case. +Programmatically, if CLASS is `either', then moves to either `class' +or `def'. + +When second optional argument is given programmatically, move to the +COUNTth end of `def'. + +If point is in a `def' statement already, this is the `def' we use. + +Else, if the `def' found by `\\[py-beginning-of-def-or-class]' +contains the statement you started on, that's the `def' we use. + +Otherwise, we search forward for the closest following `def', and use that. + +If a `def' can be found by these rules, point is moved to the start of +the line immediately following the `def' block, and the position of the +start of the `def' is returned. + +Else point is moved to the end of the buffer, and nil is returned. + +Note that doing this command repeatedly will take you closer to the +end of the buffer each time. + +To mark the current `def', see `\\[py-mark-def-or-class]'." + (interactive "P") ; raw prefix arg + (if (and count (/= count 1)) + (py-beginning-of-def-or-class (- 1 count))) + (let ((start (progn (py-goto-initial-line) (point))) + (which (cond ((eq class 'either) "\\(class\\|def\\)") + (class "class") + (t "def"))) + (state 'not-found)) + ;; move point to start of appropriate def/class + (if (looking-at (concat "[ \t]*" which "\\>")) ; already on one + (setq state 'at-beginning) + ;; else see if py-beginning-of-def-or-class hits container + (if (and (py-beginning-of-def-or-class class) + (progn (py-goto-beyond-block) + (> (point) start))) + (setq state 'at-end) + ;; else search forward + (goto-char start) + (if (re-search-forward (concat "^[ \t]*" which "\\>") nil 'move) + (progn (setq state 'at-beginning) + (beginning-of-line))))) + (cond + ((eq state 'at-beginning) (py-goto-beyond-block) t) + ((eq state 'at-end) t) + ((eq state 'not-found) nil) + (t (error "Internal error in `py-end-of-def-or-class'"))))) + +;; Backwards compabitility +(defalias 'end-of-python-def-or-class 'py-end-of-def-or-class) + + +;; Functions for marking regions +(defun py-mark-block (&optional extend just-move) + "Mark following block of lines. With prefix arg, mark structure. +Easier to use than explain. It sets the region to an `interesting' +block of succeeding lines. If point is on a blank line, it goes down to +the next non-blank line. That will be the start of the region. The end +of the region depends on the kind of line at the start: + + - If a comment, the region will include all succeeding comment lines up + to (but not including) the next non-comment line (if any). + + - Else if a prefix arg is given, and the line begins one of these + structures: + + if elif else try except finally for while def class + + the region will be set to the body of the structure, including + following blocks that `belong' to it, but excluding trailing blank + and comment lines. E.g., if on a `try' statement, the `try' block + and all (if any) of the following `except' and `finally' blocks + that belong to the `try' structure will be in the region. Ditto + for if/elif/else, for/else and while/else structures, and (a bit + degenerate, since they're always one-block structures) def and + class blocks. + + - Else if no prefix argument is given, and the line begins a Python + block (see list above), and the block is not a `one-liner' (i.e., + the statement ends with a colon, not with code), the region will + include all succeeding lines up to (but not including) the next + code statement (if any) that's indented no more than the starting + line, except that trailing blank and comment lines are excluded. + E.g., if the starting line begins a multi-statement `def' + structure, the region will be set to the full function definition, + but without any trailing `noise' lines. + + - Else the region will include all succeeding lines up to (but not + including) the next blank line, or code or indenting-comment line + indented strictly less than the starting line. Trailing indenting + comment lines are included in this case, but not trailing blank + lines. + +A msg identifying the location of the mark is displayed in the echo +area; or do `\\[exchange-point-and-mark]' to flip down to the end. + +If called from a program, optional argument EXTEND plays the role of +the prefix arg, and if optional argument JUST-MOVE is not nil, just +moves to the end of the block (& does not set mark or display a msg)." + (interactive "P") ; raw prefix arg + (py-goto-initial-line) + ;; skip over blank lines + (while (and + (looking-at "[ \t]*$") ; while blank line + (not (eobp))) ; & somewhere to go + (forward-line 1)) + (if (eobp) + (error "Hit end of buffer without finding a non-blank stmt")) + (let ((initial-pos (point)) + (initial-indent (current-indentation)) + last-pos ; position of last stmt in region + (followers + '((if elif else) (elif elif else) (else) + (try except finally) (except except) (finally) + (for else) (while else) + (def) (class) ) ) + first-symbol next-symbol) + + (cond + ;; if comment line, suck up the following comment lines + ((looking-at "[ \t]*#") + (re-search-forward "^[ \t]*[^ \t#]" nil 'move) ; look for non-comment + (re-search-backward "^[ \t]*#") ; and back to last comment in block + (setq last-pos (point))) + + ;; else if line is a block line and EXTEND given, suck up + ;; the whole structure + ((and extend + (setq first-symbol (py-suck-up-first-keyword) ) + (assq first-symbol followers)) + (while (and + (or (py-goto-beyond-block) t) ; side effect + (forward-line -1) ; side effect + (setq last-pos (point)) ; side effect + (py-goto-statement-below) + (= (current-indentation) initial-indent) + (setq next-symbol (py-suck-up-first-keyword)) + (memq next-symbol (cdr (assq first-symbol followers)))) + (setq first-symbol next-symbol))) + + ;; else if line *opens* a block, search for next stmt indented <= + ((py-statement-opens-block-p) + (while (and + (setq last-pos (point)) ; always true -- side effect + (py-goto-statement-below) + (> (current-indentation) initial-indent) + ))) + + ;; else plain code line; stop at next blank line, or stmt or + ;; indenting comment line indented < + (t + (while (and + (setq last-pos (point)) ; always true -- side effect + (or (py-goto-beyond-final-line) t) + (not (looking-at "[ \t]*$")) ; stop at blank line + (or + (>= (current-indentation) initial-indent) + (looking-at "[ \t]*#[^ \t\n]"))) ; ignore non-indenting # + nil))) + + ;; skip to end of last stmt + (goto-char last-pos) + (py-goto-beyond-final-line) + + ;; set mark & display + (if just-move + () ; just return + (push-mark (point) 'no-msg) + (forward-line -1) + (message "Mark set after: %s" (py-suck-up-leading-text)) + (goto-char initial-pos) + (exchange-point-and-mark) + (py-keep-region-active) + ))) + +(defun py-mark-def-or-class (&optional class) + "Set region to body of def (or class, with prefix arg) enclosing point. +Pushes the current mark, then point, on the mark ring (all language +modes do this, but although it's handy it's never documented ...). + +In most Emacs language modes, this function bears at least a +hallucinogenic resemblance to `\\[py-end-of-def-or-class]' and +`\\[py-beginning-of-def-or-class]'. + +And in earlier versions of Python mode, all 3 were tightly connected. +Turned out that was more confusing than useful: the `goto start' and +`goto end' commands are usually used to search through a file, and +people expect them to act a lot like `search backward' and `search +forward' string-search commands. But because Python `def' and `class' +can nest to arbitrary levels, finding the smallest def containing +point cannot be done via a simple backward search: the def containing +point may not be the closest preceding def, or even the closest +preceding def that's indented less. The fancy algorithm required is +appropriate for the usual uses of this `mark' command, but not for the +`goto' variations. + +So the def marked by this command may not be the one either of the +`goto' commands find: If point is on a blank or non-indenting comment +line, moves back to start of the closest preceding code statement or +indenting comment line. If this is a `def' statement, that's the def +we use. Else searches for the smallest enclosing `def' block and uses +that. Else signals an error. + +When an enclosing def is found: The mark is left immediately beyond +the last line of the def block. Point is left at the start of the +def, except that: if the def is preceded by a number of comment lines +followed by (at most) one optional blank line, point is left at the +start of the comments; else if the def is preceded by a blank line, +point is left at its start. + +The intent is to mark the containing def/class and its associated +documentation, to make moving and duplicating functions and classes +pleasant." + (interactive "P") ; raw prefix arg + (let ((start (point)) + (which (cond ((eq class 'either) "\\(class\\|def\\)") + (class "class") + (t "def")))) + (push-mark start) + (if (not (py-go-up-tree-to-keyword which)) + (progn (goto-char start) + (error "Enclosing %s not found" + (if (eq class 'either) + "def or class" + which))) + ;; else enclosing def/class found + (setq start (point)) + (py-goto-beyond-block) + (push-mark (point)) + (goto-char start) + (if (zerop (forward-line -1)) ; if there is a preceding line + (progn + (if (looking-at "[ \t]*$") ; it's blank + (setq start (point)) ; so reset start point + (goto-char start)) ; else try again + (if (zerop (forward-line -1)) + (if (looking-at "[ \t]*#") ; a comment + ;; look back for non-comment line + ;; tricky: note that the regexp matches a blank + ;; line, cuz \n is in the 2nd character class + (and + (re-search-backward "^[ \t]*[^ \t#]" nil 'move) + (forward-line 1)) + ;; no comment, so go back + (goto-char start))))))) + (exchange-point-and-mark) + (py-keep-region-active)) + +;; ripped from cc-mode +(defun py-forward-into-nomenclature (&optional arg) + "Move forward to end of a nomenclature section or word. +With \\[universal-argument] (programmatically, optional argument ARG), +do it that many times. + +A `nomenclature' is a fancy way of saying AWordWithMixedCaseNotUnderscores." + (interactive "p") + (let ((case-fold-search nil)) + (if (> arg 0) + (re-search-forward + "\\(\\W\\|[_]\\)*\\([A-Z]*[a-z0-9]*\\)" + (point-max) t arg) + (while (and (< arg 0) + (re-search-backward + "\\(\\W\\|[a-z0-9]\\)[A-Z]+\\|\\(\\W\\|[_]\\)\\w+" + (point-min) 0)) + (forward-char 1) + (setq arg (1+ arg))))) + (py-keep-region-active)) + +(defun py-backward-into-nomenclature (&optional arg) + "Move backward to beginning of a nomenclature section or word. +With optional ARG, move that many times. If ARG is negative, move +forward. + +A `nomenclature' is a fancy way of saying AWordWithMixedCaseNotUnderscores." + (interactive "p") + (py-forward-into-nomenclature (- arg)) + (py-keep-region-active)) + + + +;; pdbtrack functions +(defun py-pdbtrack-toggle-stack-tracking (arg) + (interactive "P") + (if (not (get-buffer-process (current-buffer))) + (error "No process associated with buffer '%s'" (current-buffer))) + ;; missing or 0 is toggle, >0 turn on, <0 turn off + (if (or (not arg) + (zerop (setq arg (prefix-numeric-value arg)))) + (setq py-pdbtrack-do-tracking-p (not py-pdbtrack-do-tracking-p)) + (setq py-pdbtrack-do-tracking-p (> arg 0))) + (message "%sabled Python's pdbtrack" + (if py-pdbtrack-do-tracking-p "En" "Dis"))) + +(defun turn-on-pdbtrack () + (interactive) + (py-pdbtrack-toggle-stack-tracking 1)) + +(defun turn-off-pdbtrack () + (interactive) + (py-pdbtrack-toggle-stack-tracking 0)) + + + +;; Pychecker + +;; hack for FSF Emacs +(unless (fboundp 'read-shell-command) + (defalias 'read-shell-command 'read-string)) + +(defun py-pychecker-run (command) + "*Run pychecker (default on the file currently visited)." + (interactive + (let ((default + (format "%s %s %s" py-pychecker-command + (mapconcat 'identity py-pychecker-command-args " ") + (buffer-file-name))) + (last (when py-pychecker-history + (let* ((lastcmd (car py-pychecker-history)) + (cmd (cdr (reverse (split-string lastcmd)))) + (newcmd (reverse (cons (buffer-file-name) cmd)))) + (mapconcat 'identity newcmd " "))))) + + (list + (if (fboundp 'read-shell-command) + (read-shell-command "Run pychecker like this: " + (if last + last + default) + 'py-pychecker-history) + (read-string "Run pychecker like this: " + (if last + last + default) + 'py-pychecker-history)) + ))) + (save-some-buffers (not py-ask-about-save) nil) + (if (fboundp 'compilation-start) + ;; Emacs. + (compilation-start command) + ;; XEmacs. + (compile-internal command "No more errors"))) + + + +;; pydoc commands. The guts of this function is stolen from XEmacs's +;; symbol-near-point, but without the useless regexp-quote call on the +;; results, nor the interactive bit. Also, we've added the temporary +;; syntax table setting, which Skip originally had broken out into a +;; separate function. Note that Emacs doesn't have the original +;; function. +(defun py-symbol-near-point () + "Return the first textual item to the nearest point." + ;; alg stolen from etag.el + (save-excursion + (with-syntax-table py-dotted-expression-syntax-table + (if (or (bobp) (not (memq (char-syntax (char-before)) '(?w ?_)))) + (while (not (looking-at "\\sw\\|\\s_\\|\\'")) + (forward-char 1))) + (while (looking-at "\\sw\\|\\s_") + (forward-char 1)) + (if (re-search-backward "\\sw\\|\\s_" nil t) + (progn (forward-char 1) + (buffer-substring (point) + (progn (forward-sexp -1) + (while (looking-at "\\s'") + (forward-char 1)) + (point)))) + nil)))) + +(defun py-help-at-point () + "Get help from Python based on the symbol nearest point." + (interactive) + (let* ((sym (py-symbol-near-point)) + (base (substring sym 0 (or (search "." sym :from-end t) 0))) + cmd) + (if (not (equal base "")) + (setq cmd (concat "import " base "\n"))) + (setq cmd (concat "import pydoc\n" + cmd + "try: pydoc.help('" sym "')\n" + "except: print 'No help available on:', \"" sym "\"")) + (message cmd) + (py-execute-string cmd) + (set-buffer "*Python Output*") + ;; BAW: Should we really be leaving the output buffer in help-mode? + (help-mode))) + + + +;; Documentation functions + +;; dump the long form of the mode blurb; does the usual doc escapes, +;; plus lines of the form ^[vc]:name$ to suck variable & command docs +;; out of the right places, along with the keys they're on & current +;; values +(defun py-dump-help-string (str) + (with-output-to-temp-buffer "*Help*" + (let ((locals (buffer-local-variables)) + funckind funcname func funcdoc + (start 0) mstart end + keys ) + (while (string-match "^%\\([vc]\\):\\(.+\\)\n" str start) + (setq mstart (match-beginning 0) end (match-end 0) + funckind (substring str (match-beginning 1) (match-end 1)) + funcname (substring str (match-beginning 2) (match-end 2)) + func (intern funcname)) + (princ (substitute-command-keys (substring str start mstart))) + (cond + ((equal funckind "c") ; command + (setq funcdoc (documentation func) + keys (concat + "Key(s): " + (mapconcat 'key-description + (where-is-internal func py-mode-map) + ", ")))) + ((equal funckind "v") ; variable + (setq funcdoc (documentation-property func 'variable-documentation) + keys (if (assq func locals) + (concat + "Local/Global values: " + (prin1-to-string (symbol-value func)) + " / " + (prin1-to-string (default-value func))) + (concat + "Value: " + (prin1-to-string (symbol-value func)))))) + (t ; unexpected + (error "Error in py-dump-help-string, tag `%s'" funckind))) + (princ (format "\n-> %s:\t%s\t%s\n\n" + (if (equal funckind "c") "Command" "Variable") + funcname keys)) + (princ funcdoc) + (terpri) + (setq start end)) + (princ (substitute-command-keys (substring str start)))) + (print-help-return-message))) + +(defun py-describe-mode () + "Dump long form of Python-mode docs." + (interactive) + (py-dump-help-string "Major mode for editing Python files. +Knows about Python indentation, tokens, comments and continuation lines. +Paragraphs are separated by blank lines only. + +Major sections below begin with the string `@'; specific function and +variable docs begin with `->'. + +@EXECUTING PYTHON CODE + +\\[py-execute-import-or-reload]\timports or reloads the file in the Python interpreter +\\[py-execute-buffer]\tsends the entire buffer to the Python interpreter +\\[py-execute-region]\tsends the current region +\\[py-execute-def-or-class]\tsends the current function or class definition +\\[py-execute-string]\tsends an arbitrary string +\\[py-shell]\tstarts a Python interpreter window; this will be used by +\tsubsequent Python execution commands +%c:py-execute-import-or-reload +%c:py-execute-buffer +%c:py-execute-region +%c:py-execute-def-or-class +%c:py-execute-string +%c:py-shell + +@VARIABLES + +py-indent-offset\tindentation increment +py-block-comment-prefix\tcomment string used by comment-region + +py-python-command\tshell command to invoke Python interpreter +py-temp-directory\tdirectory used for temp files (if needed) + +py-beep-if-tab-change\tring the bell if tab-width is changed +%v:py-indent-offset +%v:py-block-comment-prefix +%v:py-python-command +%v:py-temp-directory +%v:py-beep-if-tab-change + +@KINDS OF LINES + +Each physical line in the file is either a `continuation line' (the +preceding line ends with a backslash that's not part of a comment, or +the paren/bracket/brace nesting level at the start of the line is +non-zero, or both) or an `initial line' (everything else). + +An initial line is in turn a `blank line' (contains nothing except +possibly blanks or tabs), a `comment line' (leftmost non-blank +character is `#'), or a `code line' (everything else). + +Comment Lines + +Although all comment lines are treated alike by Python, Python mode +recognizes two kinds that act differently with respect to indentation. + +An `indenting comment line' is a comment line with a blank, tab or +nothing after the initial `#'. The indentation commands (see below) +treat these exactly as if they were code lines: a line following an +indenting comment line will be indented like the comment line. All +other comment lines (those with a non-whitespace character immediately +following the initial `#') are `non-indenting comment lines', and +their indentation is ignored by the indentation commands. + +Indenting comment lines are by far the usual case, and should be used +whenever possible. Non-indenting comment lines are useful in cases +like these: + +\ta = b # a very wordy single-line comment that ends up being +\t #... continued onto another line + +\tif a == b: +##\t\tprint 'panic!' # old code we've `commented out' +\t\treturn a + +Since the `#...' and `##' comment lines have a non-whitespace +character following the initial `#', Python mode ignores them when +computing the proper indentation for the next line. + +Continuation Lines and Statements + +The Python-mode commands generally work on statements instead of on +individual lines, where a `statement' is a comment or blank line, or a +code line and all of its following continuation lines (if any) +considered as a single logical unit. The commands in this mode +generally (when it makes sense) automatically move to the start of the +statement containing point, even if point happens to be in the middle +of some continuation line. + + +@INDENTATION + +Primarily for entering new code: +\t\\[indent-for-tab-command]\t indent line appropriately +\t\\[py-newline-and-indent]\t insert newline, then indent +\t\\[py-electric-backspace]\t reduce indentation, or delete single character + +Primarily for reindenting existing code: +\t\\[py-guess-indent-offset]\t guess py-indent-offset from file content; change locally +\t\\[universal-argument] \\[py-guess-indent-offset]\t ditto, but change globally + +\t\\[py-indent-region]\t reindent region to match its context +\t\\[py-shift-region-left]\t shift region left by py-indent-offset +\t\\[py-shift-region-right]\t shift region right by py-indent-offset + +Unlike most programming languages, Python uses indentation, and only +indentation, to specify block structure. Hence the indentation supplied +automatically by Python-mode is just an educated guess: only you know +the block structure you intend, so only you can supply correct +indentation. + +The \\[indent-for-tab-command] and \\[py-newline-and-indent] keys try to suggest plausible indentation, based on +the indentation of preceding statements. E.g., assuming +py-indent-offset is 4, after you enter +\tif a > 0: \\[py-newline-and-indent] +the cursor will be moved to the position of the `_' (_ is not a +character in the file, it's just used here to indicate the location of +the cursor): +\tif a > 0: +\t _ +If you then enter `c = d' \\[py-newline-and-indent], the cursor will move +to +\tif a > 0: +\t c = d +\t _ +Python-mode cannot know whether that's what you intended, or whether +\tif a > 0: +\t c = d +\t_ +was your intent. In general, Python-mode either reproduces the +indentation of the (closest code or indenting-comment) preceding +statement, or adds an extra py-indent-offset blanks if the preceding +statement has `:' as its last significant (non-whitespace and non- +comment) character. If the suggested indentation is too much, use +\\[py-electric-backspace] to reduce it. + +Continuation lines are given extra indentation. If you don't like the +suggested indentation, change it to something you do like, and Python- +mode will strive to indent later lines of the statement in the same way. + +If a line is a continuation line by virtue of being in an unclosed +paren/bracket/brace structure (`list', for short), the suggested +indentation depends on whether the current line contains the first item +in the list. If it does, it's indented py-indent-offset columns beyond +the indentation of the line containing the open bracket. If you don't +like that, change it by hand. The remaining items in the list will mimic +whatever indentation you give to the first item. + +If a line is a continuation line because the line preceding it ends with +a backslash, the third and following lines of the statement inherit their +indentation from the line preceding them. The indentation of the second +line in the statement depends on the form of the first (base) line: if +the base line is an assignment statement with anything more interesting +than the backslash following the leftmost assigning `=', the second line +is indented two columns beyond that `='. Else it's indented to two +columns beyond the leftmost solid chunk of non-whitespace characters on +the base line. + +Warning: indent-region should not normally be used! It calls \\[indent-for-tab-command] +repeatedly, and as explained above, \\[indent-for-tab-command] can't guess the block +structure you intend. +%c:indent-for-tab-command +%c:py-newline-and-indent +%c:py-electric-backspace + + +The next function may be handy when editing code you didn't write: +%c:py-guess-indent-offset + + +The remaining `indent' functions apply to a region of Python code. They +assume the block structure (equals indentation, in Python) of the region +is correct, and alter the indentation in various ways while preserving +the block structure: +%c:py-indent-region +%c:py-shift-region-left +%c:py-shift-region-right + +@MARKING & MANIPULATING REGIONS OF CODE + +\\[py-mark-block]\t mark block of lines +\\[py-mark-def-or-class]\t mark smallest enclosing def +\\[universal-argument] \\[py-mark-def-or-class]\t mark smallest enclosing class +\\[comment-region]\t comment out region of code +\\[universal-argument] \\[comment-region]\t uncomment region of code +%c:py-mark-block +%c:py-mark-def-or-class +%c:comment-region + +@MOVING POINT + +\\[py-previous-statement]\t move to statement preceding point +\\[py-next-statement]\t move to statement following point +\\[py-goto-block-up]\t move up to start of current block +\\[py-beginning-of-def-or-class]\t move to start of def +\\[universal-argument] \\[py-beginning-of-def-or-class]\t move to start of class +\\[py-end-of-def-or-class]\t move to end of def +\\[universal-argument] \\[py-end-of-def-or-class]\t move to end of class + +The first two move to one statement beyond the statement that contains +point. A numeric prefix argument tells them to move that many +statements instead. Blank lines, comment lines, and continuation lines +do not count as `statements' for these commands. So, e.g., you can go +to the first code statement in a file by entering +\t\\[beginning-of-buffer]\t to move to the top of the file +\t\\[py-next-statement]\t to skip over initial comments and blank lines +Or do `\\[py-previous-statement]' with a huge prefix argument. +%c:py-previous-statement +%c:py-next-statement +%c:py-goto-block-up +%c:py-beginning-of-def-or-class +%c:py-end-of-def-or-class + +@LITTLE-KNOWN EMACS COMMANDS PARTICULARLY USEFUL IN PYTHON MODE + +`\\[indent-new-comment-line]' is handy for entering a multi-line comment. + +`\\[set-selective-display]' with a `small' prefix arg is ideally suited for viewing the +overall class and def structure of a module. + +`\\[back-to-indentation]' moves point to a line's first non-blank character. + +`\\[indent-relative]' is handy for creating odd indentation. + +@OTHER EMACS HINTS + +If you don't like the default value of a variable, change its value to +whatever you do like by putting a `setq' line in your .emacs file. +E.g., to set the indentation increment to 4, put this line in your +.emacs: +\t(setq py-indent-offset 4) +To see the value of a variable, do `\\[describe-variable]' and enter the variable +name at the prompt. + +When entering a key sequence like `C-c C-n', it is not necessary to +release the CONTROL key after doing the `C-c' part -- it suffices to +press the CONTROL key, press and release `c' (while still holding down +CONTROL), press and release `n' (while still holding down CONTROL), & +then release CONTROL. + +Entering Python mode calls with no arguments the value of the variable +`python-mode-hook', if that value exists and is not nil; for backward +compatibility it also tries `py-mode-hook'; see the `Hooks' section of +the Elisp manual for details. + +Obscure: When python-mode is first loaded, it looks for all bindings +to newline-and-indent in the global keymap, and shadows them with +local bindings to py-newline-and-indent.")) + +(require 'info-look) +;; The info-look package does not always provide this function (it +;; appears this is the case with XEmacs 21.1) +(when (fboundp 'info-lookup-maybe-add-help) + (info-lookup-maybe-add-help + :mode 'python-mode + :regexp "[a-zA-Z0-9_]+" + :doc-spec '(("(python-lib)Module Index") + ("(python-lib)Class-Exception-Object Index") + ("(python-lib)Function-Method-Variable Index") + ("(python-lib)Miscellaneous Index"))) + ) + + +;; Helper functions +(defvar py-parse-state-re + (concat + "^[ \t]*\\(elif\\|else\\|while\\|def\\|class\\)\\>" + "\\|" + "^[^ #\t\n]")) + +(defun py-parse-state () + "Return the parse state at point (see `parse-partial-sexp' docs)." + (save-excursion + (let ((here (point)) + pps done) + (while (not done) + ;; back up to the first preceding line (if any; else start of + ;; buffer) that begins with a popular Python keyword, or a + ;; non- whitespace and non-comment character. These are good + ;; places to start parsing to see whether where we started is + ;; at a non-zero nesting level. It may be slow for people who + ;; write huge code blocks or huge lists ... tough beans. + (re-search-backward py-parse-state-re nil 'move) + (beginning-of-line) + ;; In XEmacs, we have a much better way to test for whether + ;; we're in a triple-quoted string or not. Emacs does not + ;; have this built-in function, which is its loss because + ;; without scanning from the beginning of the buffer, there's + ;; no accurate way to determine this otherwise. + (save-excursion (setq pps (parse-partial-sexp (point) here))) + ;; make sure we don't land inside a triple-quoted string + (setq done (or (not (nth 3 pps)) + (bobp))) + ;; Just go ahead and short circuit the test back to the + ;; beginning of the buffer. This will be slow, but not + ;; nearly as slow as looping through many + ;; re-search-backwards. + (if (not done) + (goto-char (point-min)))) + pps))) + +(defun py-nesting-level () + "Return the buffer position of the last unclosed enclosing list. +If nesting level is zero, return nil." + (let ((status (py-parse-state))) + (if (zerop (car status)) + nil ; not in a nest + (car (cdr status))))) ; char# of open bracket + +(defun py-backslash-continuation-preceding-line-p () + "Return t if preceding line ends with backslash. " + (save-excursion + (beginning-of-line) + (and + ;; use a cheap test first to avoid the regexp if possible + ;; use 'eq' because char-after may return nil + (eq (char-after (- (point) 2)) ?\\ ) + ;; make sure; since eq test passed, there is a preceding line + (forward-line -1) ; always true -- side effect + (looking-at py-continued-re)))) + +(defun py-continuation-line-p () + "Return t iff current line is a continuation line." + (save-excursion + (beginning-of-line) + (or (py-backslash-continuation-preceding-line-p) + (py-nesting-level)))) + +(defun py-goto-beginning-of-tqs (delim) + "Go to the beginning of the triple quoted string we find ourselves in. +DELIM is the TQS string delimiter character we're searching backwards +for." + (let ((skip (and delim (make-string 1 delim))) + (continue t)) + (when skip + (save-excursion + (while continue + (py-safe (search-backward skip)) + (setq continue (and (not (bobp)) + (= (char-before) ?\\)))) + (if (and (= (char-before) delim) + (= (char-before (1- (point))) delim)) + (setq skip (make-string 3 delim)))) + ;; we're looking at a triple-quoted string + (py-safe (search-backward skip))))) + +(defun py-goto-initial-line () + "Go to the initial line of a simple or compound statement. +If inside a compound statement, go to the line that introduces +the suite, i.e. the clause header. + +The Python language reference: + + \"Compound statements consist of one or more ‘clauses.’ A clause consists + of a header and a ‘suite.’ The clause headers of a particular compound + statement are all at the same indentation level. Each clause header begins + with a uniquely identifying keyword and ends with a colon. A suite is a + group of statements controlled by a clause. A suite can be one or more + semicolon-separated simple statements on the same line as the header, + following the header’s colon, or it can be one or more indented statements + on subsequent lines. [...]\" + +See: http://docs.python.org/reference/compound_stmts.html +" + ;; Tricky: We want to avoid quadratic-time behavior for long + ;; continued blocks, whether of the backslash or open-bracket + ;; varieties, or a mix of the two. The following manages to do that + ;; in the usual cases. + ;; + ;; Also, if we're sitting inside a triple quoted string, this will + ;; drop us at the line that begins the string. + (let (open-bracket-pos pos) + (while (py-continuation-line-p) + (beginning-of-line) + (if (py-backslash-continuation-preceding-line-p) + (while (py-backslash-continuation-preceding-line-p) + (forward-line -1)) + ;; else zip out of nested brackets/braces/parens + (while (setq open-bracket-pos (py-nesting-level)) + (goto-char open-bracket-pos)))) + (if (and (setq pos (python-in-string/comment)) + (< pos (point))) + (progn + (goto-char pos) + (py-goto-initial-line)) + (beginning-of-line) + (when + (and (setq pos (python-in-string/comment)) + (< pos (point))) + (goto-char pos) + (py-goto-initial-line))))) + +(defun py-goto-beyond-final-line () + "Go to the point just beyond the final line of the current statement. " + + ;; Tricky: Again we need to be clever to avoid quadratic time + ;; behavior. + ;; + ;; XXX: Not quite the right solution, but deals with multi-line doc + ;; strings + (if (looking-at (concat "[ \t]*\\(" py-stringlit-re "\\)")) + (goto-char (match-end 0))) + ;; + (forward-line 1) + (let (state) + (while (and (py-continuation-line-p) + (not (eobp))) + ;; skip over the backslash flavor + (while (and (py-backslash-continuation-preceding-line-p) + (not (eobp))) + (forward-line 1)) + ;; if in nest, zip to the end of the nest + (setq state (py-parse-state)) + (if (and (not (zerop (car state))) + (not (eobp))) + (progn + (parse-partial-sexp (point) (point-max) 0 nil state) + (forward-line 1)))))) + +(defun py-statement-opens-block-p () + "Return t iff the current statement opens a block. +I.e., iff it ends with a colon that is not in a comment. Point should +be at the start of a statement." + (save-excursion + (let ((start (point)) + (finish (progn (py-goto-beyond-final-line) (1- (point)))) + (searching t) + (answer nil) + state) + (goto-char start) + (while searching + ;; look for a colon with nothing after it except whitespace, and + ;; maybe a comment + (if (re-search-forward ":\\([ \t]\\|\\\\\n\\)*\\(#.*\\)?$" + finish t) + (if (eq (point) finish) ; note: no `else' clause; just + ; keep searching if we're not at + ; the end yet + ;; sure looks like it opens a block -- but it might + ;; be in a comment + (progn + (setq searching nil) ; search is done either way + (setq state (parse-partial-sexp start + (match-beginning 0))) + (setq answer (not (nth 4 state))))) + ;; search failed: couldn't find another interesting colon + (setq searching nil))) + answer))) + +(defun py-statement-closes-block-p () + "Return t iff the current statement closes a block. +I.e., if the line starts with `return', `raise', `break', `continue', +and `pass'. This doesn't catch embedded statements." + (let ((here (point))) + (py-goto-initial-line) + (back-to-indentation) + (prog1 + (looking-at (concat py-block-closing-keywords-re "\\>")) + (goto-char here)))) + +(defun py-goto-beyond-block () + "Go to point just beyond the final line of block begun by the current line. +This is the same as where `py-goto-beyond-final-line' goes unless +we're on colon line, in which case we go to the end of the block. +Assumes point is at the beginning of the line." + (if (py-statement-opens-block-p) + (py-mark-block nil 'just-move) + (py-goto-beyond-final-line))) + +(defun py-goto-statement-at-or-above () + "Go to the start of the first statement at or preceding point. +Return t if there is such a statement, otherwise nil. `Statement' +does not include blank lines, comments, or continuation lines." + (py-goto-initial-line) + (if (looking-at py-blank-or-comment-re) + ;; skip back over blank & comment lines + ;; note: will skip a blank or comment line that happens to be + ;; a continuation line too + (if (re-search-backward "^[ \t]*[^ \t#\n]" nil t) + (progn (py-goto-initial-line) t) + nil) + t)) + +(defun py-goto-statement-below () + "Go to start of the first statement following the statement containing point. +Return t if there is such a statement, otherwise nil. " + (beginning-of-line) + (let ((start (point))) + (py-goto-beyond-final-line) + (while (and + (or (looking-at py-blank-or-comment-re) + (py-in-literal)) + (not (eobp))) + (forward-line 1)) + (if (eobp) + (progn (goto-char start) nil) + t))) + +(defun py-go-up-tree-to-keyword (key) + "Go to begining of statement starting with KEY, at or preceding point. + +KEY is a regular expression describing a Python keyword. Skip blank +lines and non-indenting comments. If the statement found starts with +KEY, then stop, otherwise go back to first enclosing block starting +with KEY. If successful, leave point at the start of the KEY line and +return t. Otherwise, leave point at an undefined place and return nil." + ;; skip blanks and non-indenting # + (py-goto-initial-line) + (while (and + (looking-at "[ \t]*\\($\\|#[^ \t\n]\\)") + (zerop (forward-line -1))) ; go back + nil) + (py-goto-initial-line) + (let* ((re (concat "[ \t]*" key "\\>")) + (case-fold-search nil) ; let* so looking-at sees this + (found (looking-at re)) + (dead nil)) + (while (not (or found dead)) + (condition-case nil ; in case no enclosing block + (py-goto-block-up 'no-mark) + (error (setq dead t))) + (or dead (setq found (looking-at re)))) + (beginning-of-line) + found)) + +(defun py-suck-up-leading-text () + "Return string in buffer from start of indentation to end of line. +Prefix with \"...\" if leading whitespace was skipped." + (save-excursion + (back-to-indentation) + (concat + (if (bolp) "" "...") + (buffer-substring (point) (progn (end-of-line) (point)))))) + +(defun py-suck-up-first-keyword () + "Return first keyword on the line as a Lisp symbol. +`Keyword' is defined (essentially) as the regular expression +([a-z]+). Returns nil if none was found." + (let ((case-fold-search nil)) + (if (looking-at "[ \t]*\\([a-z]+\\)\\>") + (intern (buffer-substring (match-beginning 1) (match-end 1))) + nil))) + +(defun py-current-defun () + "Python value for `add-log-current-defun-function'. +This tells add-log.el how to find the current function/method/variable." + (save-excursion + + ;; Move back to start of the current statement. + + (py-goto-initial-line) + (back-to-indentation) + (while (and (or (looking-at py-blank-or-comment-re) + (py-in-literal)) + (not (bobp))) + (backward-to-indentation 1)) + (py-goto-initial-line) + + (let ((scopes "") + (sep "") + dead assignment) + + ;; Check for an assignment. If this assignment exists inside a + ;; def, it will be overwritten inside the while loop. If it + ;; exists at top lever or inside a class, it will be preserved. + + (when (looking-at "[ \t]*\\([a-zA-Z0-9_]+\\)[ \t]*=") + (setq scopes (buffer-substring (match-beginning 1) (match-end 1))) + (setq assignment t) + (setq sep ".")) + + ;; Prepend the name of each outer socpe (def or class). + + (while (not dead) + (if (and (py-go-up-tree-to-keyword "\\(class\\|def\\)") + (looking-at + "[ \t]*\\(class\\|def\\)[ \t]*\\([a-zA-Z0-9_]+\\)[ \t]*")) + (let ((name (buffer-substring (match-beginning 2) (match-end 2)))) + (if (and assignment (looking-at "[ \t]*def")) + (setq scopes name) + (setq scopes (concat name sep scopes)) + (setq sep ".")))) + (setq assignment nil) + (condition-case nil ; Terminate nicely at top level. + (py-goto-block-up 'no-mark) + (error (setq dead t)))) + (if (string= scopes "") + nil + scopes)))) + + + +(defconst py-help-address "python-mode@python.org" + "Address accepting submission of bug reports.") + +(defun py-version () + "Echo the current version of `python-mode' in the minibuffer." + (interactive) + (message "Using `python-mode' version %s" py-version) + (py-keep-region-active)) + +;; only works under Emacs 19 +;(eval-when-compile +; (require 'reporter)) + +(defun py-submit-bug-report (enhancement-p) + "Submit via mail a bug report on `python-mode'. +With \\[universal-argument] (programmatically, argument ENHANCEMENT-P +non-nil) just submit an enhancement request." + (interactive + (list (not (y-or-n-p + "Is this a bug report (hit `n' to send other comments)? ")))) + (let ((reporter-prompt-for-summary-p (if enhancement-p + "(Very) brief summary: " + t))) + (require 'reporter) + (reporter-submit-bug-report + py-help-address ;address + (concat "python-mode " py-version) ;pkgname + ;; varlist + (if enhancement-p nil + '(py-python-command + py-indent-offset + py-block-comment-prefix + py-temp-directory + py-beep-if-tab-change)) + nil ;pre-hooks + nil ;post-hooks + "Dear Barry,") ;salutation + (if enhancement-p nil + (set-mark (point)) + (insert +"Please replace this text with a sufficiently large code sample\n\ +and an exact recipe so that I can reproduce your problem. Failure\n\ +to do so may mean a greater delay in fixing your bug.\n\n") + (exchange-point-and-mark) + (py-keep-region-active)))) + + +(defun py-kill-emacs-hook () + "Delete files in `py-file-queue'. +These are Python temporary files awaiting execution." + (mapc #'(lambda (filename) + (py-safe (delete-file filename))) + py-file-queue)) + +;; arrange to kill temp files when Emacs exists +(add-hook 'kill-emacs-hook 'py-kill-emacs-hook) +(add-hook 'comint-output-filter-functions 'py-pdbtrack-track-stack-file) + +;; Add a designator to the minor mode strings +(or (assq 'py-pdbtrack-is-tracking-p minor-mode-alist) + (push '(py-pdbtrack-is-tracking-p py-pdbtrack-minor-mode-string) + minor-mode-alist)) + + + +;;; paragraph and string filling code from Bernhard Herzog +;;; see http://mail.python.org/pipermail/python-list/2002-May/103189.html + +(defun py-fill-comment (&optional justify) + "Fill the comment paragraph around point" + (let (;; Non-nil if the current line contains a comment. + has-comment + + ;; If has-comment, the appropriate fill-prefix for the comment. + comment-fill-prefix) + + ;; Figure out what kind of comment we are looking at. + (save-excursion + (beginning-of-line) + (cond + ;; A line with nothing but a comment on it? + ((looking-at "[ \t]*#[# \t]*") + (setq has-comment t + comment-fill-prefix (buffer-substring (match-beginning 0) + (match-end 0)))) + + ;; A line with some code, followed by a comment? Remember that the hash + ;; which starts the comment shouldn't be part of a string or character. + ((progn + (while (not (looking-at "#\\|$")) + (skip-chars-forward "^#\n\"'\\") + (cond + ((eq (char-after (point)) ?\\) (forward-char 2)) + ((memq (char-after (point)) '(?\" ?')) (forward-sexp 1)))) + (looking-at "#+[\t ]*")) + (setq has-comment t) + (setq comment-fill-prefix + (concat (make-string (current-column) ? ) + (buffer-substring (match-beginning 0) (match-end 0))))))) + + (if (not has-comment) + (fill-paragraph justify) + + ;; Narrow to include only the comment, and then fill the region. + (save-restriction + (narrow-to-region + + ;; Find the first line we should include in the region to fill. + (save-excursion + (while (and (zerop (forward-line -1)) + (looking-at "^[ \t]*#"))) + + ;; We may have gone to far. Go forward again. + (or (looking-at "^[ \t]*#") + (forward-line 1)) + (point)) + + ;; Find the beginning of the first line past the region to fill. + (save-excursion + (while (progn (forward-line 1) + (looking-at "^[ \t]*#"))) + (point))) + + ;; Lines with only hashes on them can be paragraph boundaries. + (let ((paragraph-start (concat paragraph-start "\\|[ \t#]*$")) + (paragraph-separate (concat paragraph-separate "\\|[ \t#]*$")) + (fill-prefix comment-fill-prefix)) + ;;(message "paragraph-start %S paragraph-separate %S" + ;;paragraph-start paragraph-separate) + (fill-paragraph justify)))) + t)) + + +(defun py-fill-string (start &optional justify) + "Fill the paragraph around (point) in the string starting at start" + ;; basic strategy: narrow to the string and call the default + ;; implementation + (let (;; the start of the string's contents + string-start + ;; the end of the string's contents + string-end + ;; length of the string's delimiter + delim-length + ;; The string delimiter + delim + ) + + (save-excursion + (goto-char start) + (if (looking-at "\\([urbURB]*\\(?:'''\\|\"\"\"\\|'\\|\"\\)\\)\\\\?\n?") + (setq string-start (match-end 0) + delim-length (- (match-end 1) (match-beginning 1)) + delim (buffer-substring-no-properties (match-beginning 1) + (match-end 1))) + (error "The parameter start is not the beginning of a python string")) + + ;; if the string is the first token on a line and doesn't start with + ;; a newline, fill as if the string starts at the beginning of the + ;; line. this helps with one line docstrings + (save-excursion + (beginning-of-line) + (and (/= (char-before string-start) ?\n) + (looking-at (concat "[ \t]*" delim)) + (setq string-start (point)))) + + ;; move until after end of string, then the end of the string's contents + ;; is delim-length characters before that + (forward-sexp) + (setq string-end (- (point) delim-length))) + + ;; Narrow to the string's contents and fill the current paragraph + (save-restriction + (narrow-to-region string-start string-end) + (let ((ends-with-newline (= (char-before (point-max)) ?\n))) + (fill-paragraph justify) + (if (and (not ends-with-newline) + (= (char-before (point-max)) ?\n)) + ;; the default fill-paragraph implementation has inserted a + ;; newline at the end. Remove it again. + (save-excursion + (goto-char (point-max)) + (delete-char -1))))) + + ;; return t to indicate that we've done our work + t)) + +(defun py-fill-paragraph (&optional justify) + "Like \\[fill-paragraph], but handle Python comments and strings. +If any of the current line is a comment, fill the comment or the +paragraph of it that point is in, preserving the comment's indentation +and initial `#'s. +If point is inside a string, narrow to that string and fill. +" + (interactive "P") + ;; fill-paragraph will narrow incorrectly + (save-restriction + (widen) + (let* ((bod (py-point 'bod)) + (pps (parse-partial-sexp bod (point)))) + (cond + ;; are we inside a comment or on a line with only whitespace before + ;; the comment start? + ((or (nth 4 pps) + (save-excursion (beginning-of-line) (looking-at "[ \t]*#"))) + (py-fill-comment justify)) + ;; are we inside a string? + ((nth 3 pps) + (py-fill-string (nth 8 pps))) + ;; are we at the opening quote of a string, or in the indentation? + ((save-excursion + (forward-word 1) + (eq (py-in-literal) 'string)) + (save-excursion + (py-fill-string (py-point 'boi)))) + ;; are we at or after the closing quote of a string? + ((save-excursion + (backward-word 1) + (eq (py-in-literal) 'string)) + (save-excursion + (py-fill-string (py-point 'boi)))) + ;; otherwise: do not ever fill code + (t nil))))) + + + +(provide 'python-mode) +;;; python-mode.el ends here diff --git a/conf/emacs.d/snippets/text-mode/cc-mode/c++-mode/beginend b/conf/emacs.d/snippets/text-mode/cc-mode/c++-mode/beginend new file mode 100644 index 0000000..68303e2 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/cc-mode/c++-mode/beginend @@ -0,0 +1,3 @@ +#name : v.begin(), v.end() +# -- +${1:v}.begin(), $1.end \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/cc-mode/c++-mode/class b/conf/emacs.d/snippets/text-mode/cc-mode/c++-mode/class new file mode 100644 index 0000000..820fc6c --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/cc-mode/c++-mode/class @@ -0,0 +1,8 @@ +#name : class ... { ... } +# -- +class ${1:Name} +{ +public: + ${1:$(yas/substr text "[^: ]*")}($2); + virtual ~${1:$(yas/substr text "[^: ]*")}(); +}; \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/cc-mode/c++-mode/ns b/conf/emacs.d/snippets/text-mode/cc-mode/c++-mode/ns new file mode 100644 index 0000000..0c2513f --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/cc-mode/c++-mode/ns @@ -0,0 +1,3 @@ +#name : namespace ... +# -- +namespace \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/cc-mode/c++-mode/template b/conf/emacs.d/snippets/text-mode/cc-mode/c++-mode/template new file mode 100644 index 0000000..7e50616 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/cc-mode/c++-mode/template @@ -0,0 +1,3 @@ +#name : template +# -- +template \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/cc-mode/c++-mode/using b/conf/emacs.d/snippets/text-mode/cc-mode/c++-mode/using new file mode 100644 index 0000000..13d0f5d --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/cc-mode/c++-mode/using @@ -0,0 +1,4 @@ +#name : using namespace ... +# -- +using namespace ${std}; +$0 \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/cc-mode/c-mode/fopen b/conf/emacs.d/snippets/text-mode/cc-mode/c-mode/fopen new file mode 100644 index 0000000..044c743 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/cc-mode/c-mode/fopen @@ -0,0 +1,3 @@ +#name : FILE *fp = fopen(..., ...); +# -- +FILE *${fp} = fopen(${"file"}, "${r}"); diff --git a/conf/emacs.d/snippets/text-mode/cc-mode/c-mode/printf b/conf/emacs.d/snippets/text-mode/cc-mode/c-mode/printf new file mode 100644 index 0000000..055461d --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/cc-mode/c-mode/printf @@ -0,0 +1,6 @@ +# -*- mode: snippet -*- +# name : printf +# contributor : joaotavora +# -- +printf ("${1:%s}\\n"${1:$(if (string-match "%" text) "," "\);") +}$2${1:$(if (string-match "%" text) "\);" "")} \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/cc-mode/csharp-mode/attrib b/conf/emacs.d/snippets/text-mode/cc-mode/csharp-mode/attrib new file mode 100644 index 0000000..9e14e22 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/cc-mode/csharp-mode/attrib @@ -0,0 +1,7 @@ +#contributor : Alejandro Espinoza Esparza +#name : private attribute ....; +# -- +/// +/// $3 +/// +private $1 $2; diff --git a/conf/emacs.d/snippets/text-mode/cc-mode/csharp-mode/attrib.1 b/conf/emacs.d/snippets/text-mode/cc-mode/csharp-mode/attrib.1 new file mode 100644 index 0000000..099cc7b --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/cc-mode/csharp-mode/attrib.1 @@ -0,0 +1,21 @@ +#contributor : Alejandro Espinoza Esparza +#name : private attribute ....; public property ... ... { ... } +# -- +/// +/// $3 +/// +private $1 $2; + +/// +/// $4 +/// +/// $5 +public $1 $2 +{ + get { + return this.$2; + } + set { + this.$2 = value; + } +} diff --git a/conf/emacs.d/snippets/text-mode/cc-mode/csharp-mode/attrib.2 b/conf/emacs.d/snippets/text-mode/cc-mode/csharp-mode/attrib.2 new file mode 100644 index 0000000..566eacf --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/cc-mode/csharp-mode/attrib.2 @@ -0,0 +1,21 @@ +#contributor : Alejandro Espinoza Esparza +#name : private _attribute ....; public Property ... ... { ... } +# -- +/// +/// $3 +/// +private $1 ${2:$(if (> (length text) 0) (format "_%s%s" (downcase (substring text 0 1)) (substring text 1 (length text))) "")}; + +/// +/// ${3:Description} +/// +/// $1 +public ${1:Type} ${2:Name} +{ + get { + return this.${2:$(if (> (length text) 0) (format "_%s%s" (downcase (substring text 0 1)) (substring text 1 (length text))) "")}; + } + set { + this.${2:$(if (> (length text) 0) (format "_%s%s" (downcase (substring text 0 1)) (substring text 1 (length text))) "")} = value; + } +} diff --git a/conf/emacs.d/snippets/text-mode/cc-mode/csharp-mode/class b/conf/emacs.d/snippets/text-mode/cc-mode/csharp-mode/class new file mode 100644 index 0000000..1cce2e8 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/cc-mode/csharp-mode/class @@ -0,0 +1,21 @@ +#contributor : Alejandro Espinoza Esparza +#name : class ... { ... } +# -- +${5:public} class ${1:Name} +{ + #region Ctor & Destructor + /// + /// ${3:Standard Constructor} + /// + public $1($2) + { + } + + /// + /// ${4:Default Destructor} + /// + public ~$1() + { + } + #endregion +} diff --git a/conf/emacs.d/snippets/text-mode/cc-mode/csharp-mode/comment b/conf/emacs.d/snippets/text-mode/cc-mode/csharp-mode/comment new file mode 100644 index 0000000..3bd20d3 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/cc-mode/csharp-mode/comment @@ -0,0 +1,6 @@ +#contributor : Alejandro Espinoza Esparza +#name : /// ... +# -- +/// +/// $1 +/// diff --git a/conf/emacs.d/snippets/text-mode/cc-mode/csharp-mode/comment.1 b/conf/emacs.d/snippets/text-mode/cc-mode/csharp-mode/comment.1 new file mode 100644 index 0000000..3c14ad9 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/cc-mode/csharp-mode/comment.1 @@ -0,0 +1,4 @@ +#contributor : Alejandro Espinoza Esparza +#name : /// ... +# -- +/// $2 diff --git a/conf/emacs.d/snippets/text-mode/cc-mode/csharp-mode/comment.2 b/conf/emacs.d/snippets/text-mode/cc-mode/csharp-mode/comment.2 new file mode 100644 index 0000000..63a6a20 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/cc-mode/csharp-mode/comment.2 @@ -0,0 +1,4 @@ +#contributor : Alejandro Espinoza Esparza +#name : /// ... +# -- +/// $1 diff --git a/conf/emacs.d/snippets/text-mode/cc-mode/csharp-mode/comment.3 b/conf/emacs.d/snippets/text-mode/cc-mode/csharp-mode/comment.3 new file mode 100644 index 0000000..394c323 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/cc-mode/csharp-mode/comment.3 @@ -0,0 +1,4 @@ +#contributor : Alejandro Espinoza Esparza +#name : /// ... +# -- +/// $2 diff --git a/conf/emacs.d/snippets/text-mode/cc-mode/csharp-mode/method b/conf/emacs.d/snippets/text-mode/cc-mode/csharp-mode/method new file mode 100644 index 0000000..e9a5906 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/cc-mode/csharp-mode/method @@ -0,0 +1,10 @@ +#contributor : Alejandro Espinoza Esparza +#name : public void Method { ... } +# -- +/// +/// ${5:Description} +/// ${2:$(if (string= (upcase text) "VOID") "" (format "%s%s%s" "\n/// " text ""))} +${1:public} ${2:void} ${3:MethodName}($4) +{ +$0 +} diff --git a/conf/emacs.d/snippets/text-mode/cc-mode/csharp-mode/namespace b/conf/emacs.d/snippets/text-mode/cc-mode/csharp-mode/namespace new file mode 100644 index 0000000..af7c928 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/cc-mode/csharp-mode/namespace @@ -0,0 +1,7 @@ +#contributor : Alejandro Espinoza Esparza +#name : namespace .. { ... } +# -- +namespace $1 +{ +$0 +} diff --git a/conf/emacs.d/snippets/text-mode/cc-mode/csharp-mode/prop b/conf/emacs.d/snippets/text-mode/cc-mode/csharp-mode/prop new file mode 100644 index 0000000..df9df91 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/cc-mode/csharp-mode/prop @@ -0,0 +1,16 @@ +#contributor : Alejandro Espinoza Esparza +#name : property ... ... { ... } +# -- +/// +/// $5 +/// +/// $6 +$1 $2 $3 +{ + get { + return this.$4; + } + set { + this.$4 = value; + } +} diff --git a/conf/emacs.d/snippets/text-mode/cc-mode/csharp-mode/region b/conf/emacs.d/snippets/text-mode/cc-mode/csharp-mode/region new file mode 100644 index 0000000..83f9a24 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/cc-mode/csharp-mode/region @@ -0,0 +1,6 @@ +#contributor : Alejandro Espinoza Esparza +#name : #region ... #endregion +# -- +#region $1 +$0 +#endregion diff --git a/conf/emacs.d/snippets/text-mode/cc-mode/csharp-mode/using b/conf/emacs.d/snippets/text-mode/cc-mode/csharp-mode/using new file mode 100644 index 0000000..704637e --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/cc-mode/csharp-mode/using @@ -0,0 +1,4 @@ +#contributor : Alejandro Espinoza Esparza +#name : using ...; +# -- +using $1; diff --git a/conf/emacs.d/snippets/text-mode/cc-mode/csharp-mode/using.1 b/conf/emacs.d/snippets/text-mode/cc-mode/csharp-mode/using.1 new file mode 100644 index 0000000..e9f0bb0 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/cc-mode/csharp-mode/using.1 @@ -0,0 +1,4 @@ +#contributor : Alejandro Espinoza Esparza +#name : using System; +# -- +using System; diff --git a/conf/emacs.d/snippets/text-mode/cc-mode/csharp-mode/using.2 b/conf/emacs.d/snippets/text-mode/cc-mode/csharp-mode/using.2 new file mode 100644 index 0000000..0a3c07d --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/cc-mode/csharp-mode/using.2 @@ -0,0 +1,4 @@ +#contributor : Alejandro Espinoza Esparza +#name : using System....; +# -- +using System.$1; diff --git a/conf/emacs.d/snippets/text-mode/cc-mode/do b/conf/emacs.d/snippets/text-mode/cc-mode/do new file mode 100644 index 0000000..5f7a313 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/cc-mode/do @@ -0,0 +1,6 @@ +#name : do { ... } while (...) +# -- +do +{ + $0 +} while (${1:condition}); \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/cc-mode/for b/conf/emacs.d/snippets/text-mode/cc-mode/for new file mode 100644 index 0000000..c4cade6 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/cc-mode/for @@ -0,0 +1,6 @@ +#name : for (...; ...; ...) { ... } +# -- +for (${1:int i = 0}; ${2:i < N}; ${3:++i}) +{ + $0 +} \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/cc-mode/if b/conf/emacs.d/snippets/text-mode/cc-mode/if new file mode 100644 index 0000000..c3fe10d --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/cc-mode/if @@ -0,0 +1,6 @@ +#name : if (...) { ... } +# -- +if (${1:condition}) +{ + $0 +} \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/cc-mode/inc b/conf/emacs.d/snippets/text-mode/cc-mode/inc new file mode 100644 index 0000000..ae33328 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/cc-mode/inc @@ -0,0 +1,3 @@ +#name : #include "..." +# -- +#include "$1" diff --git a/conf/emacs.d/snippets/text-mode/cc-mode/inc.1 b/conf/emacs.d/snippets/text-mode/cc-mode/inc.1 new file mode 100644 index 0000000..66326cd --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/cc-mode/inc.1 @@ -0,0 +1,3 @@ +#name : #include <...> +# -- +#include <$1> diff --git a/conf/emacs.d/snippets/text-mode/cc-mode/main b/conf/emacs.d/snippets/text-mode/cc-mode/main new file mode 100644 index 0000000..9249049 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/cc-mode/main @@ -0,0 +1,7 @@ +#name: int main(argc, argv) { ... } +# -- +int main(int argc, char *argv[]) +{ + $0 + return 0; +} diff --git a/conf/emacs.d/snippets/text-mode/cc-mode/objc-mode/prop b/conf/emacs.d/snippets/text-mode/cc-mode/objc-mode/prop new file mode 100644 index 0000000..4d585db --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/cc-mode/objc-mode/prop @@ -0,0 +1,13 @@ +#name : foo { ... } ; setFoo { ... } +# -- +- (${1:id})${2:foo} +{ + return $2; +} + +- (void)set${2:$(capitalize text)}:($1)aValue +{ + [$2 autorelease]; + $2 = [aValue retain]; +} +$0 \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/cc-mode/once b/conf/emacs.d/snippets/text-mode/cc-mode/once new file mode 100644 index 0000000..1b63c39 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/cc-mode/once @@ -0,0 +1,8 @@ +#name : #ifndef XXX; #define XXX; #endif +# -- +#ifndef ${1:_`(upcase (file-name-nondirectory (file-name-sans-extension (buffer-file-name))))`_H_} +#define $1 + +$0 + +#endif /* $1 */ \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/cc-mode/struct b/conf/emacs.d/snippets/text-mode/cc-mode/struct new file mode 100644 index 0000000..f50dabf --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/cc-mode/struct @@ -0,0 +1,6 @@ +#name : struct ... { ... } +# -- +struct ${1:name} +{ + $0 +}; \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/css-mode/bg b/conf/emacs.d/snippets/text-mode/css-mode/bg new file mode 100644 index 0000000..d731807 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/css-mode/bg @@ -0,0 +1,3 @@ +#name : background-color: ... +# -- +background-color: #${1:DDD}; \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/css-mode/bg.1 b/conf/emacs.d/snippets/text-mode/css-mode/bg.1 new file mode 100644 index 0000000..d31f540 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/css-mode/bg.1 @@ -0,0 +1,3 @@ +#name : background-image: ... +# -- +background-image: url($1); \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/css-mode/bor b/conf/emacs.d/snippets/text-mode/css-mode/bor new file mode 100644 index 0000000..eb3a2b4 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/css-mode/bor @@ -0,0 +1,3 @@ +#name : border size style color +# -- +border: ${1:1px} ${2:solid} #${3:999}; \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/css-mode/cl b/conf/emacs.d/snippets/text-mode/css-mode/cl new file mode 100644 index 0000000..4fc7a8d --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/css-mode/cl @@ -0,0 +1,4 @@ +#contributor : rejeep +#name : clear: ... +# -- +clear: $1; diff --git a/conf/emacs.d/snippets/text-mode/css-mode/disp.block b/conf/emacs.d/snippets/text-mode/css-mode/disp.block new file mode 100644 index 0000000..f74ea3c --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/css-mode/disp.block @@ -0,0 +1,4 @@ +#contributor : rejeep +#name : display: block +# -- +display: block; diff --git a/conf/emacs.d/snippets/text-mode/css-mode/disp.inline b/conf/emacs.d/snippets/text-mode/css-mode/disp.inline new file mode 100644 index 0000000..30275a8 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/css-mode/disp.inline @@ -0,0 +1,4 @@ +#contributor : rejeep +#name : display: inline +# -- +display: inline; diff --git a/conf/emacs.d/snippets/text-mode/css-mode/disp.none b/conf/emacs.d/snippets/text-mode/css-mode/disp.none new file mode 100644 index 0000000..80632a5 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/css-mode/disp.none @@ -0,0 +1,4 @@ +#contributor : rejeep +#name : display: none +# -- +display: none; diff --git a/conf/emacs.d/snippets/text-mode/css-mode/ff b/conf/emacs.d/snippets/text-mode/css-mode/ff new file mode 100644 index 0000000..a7352cf --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/css-mode/ff @@ -0,0 +1,4 @@ +#contributor : rejeep +#name : font-family: ... +# -- +font-family: $1; diff --git a/conf/emacs.d/snippets/text-mode/css-mode/fs b/conf/emacs.d/snippets/text-mode/css-mode/fs new file mode 100644 index 0000000..c28cdbb --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/css-mode/fs @@ -0,0 +1,4 @@ +#contributor : rejeep +#name : font-size: ... +# -- +font-size: ${12px}; diff --git a/conf/emacs.d/snippets/text-mode/css-mode/mar.bottom b/conf/emacs.d/snippets/text-mode/css-mode/mar.bottom new file mode 100644 index 0000000..9672f60 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/css-mode/mar.bottom @@ -0,0 +1,4 @@ +#contributor : rejeep +#name : margin-bottom: ... +# -- +margin-bottom: $1; diff --git a/conf/emacs.d/snippets/text-mode/css-mode/mar.left b/conf/emacs.d/snippets/text-mode/css-mode/mar.left new file mode 100644 index 0000000..414353e --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/css-mode/mar.left @@ -0,0 +1,4 @@ +#contributor : rejeep +#name : margin-left: ... +# -- +margin-left: $1; diff --git a/conf/emacs.d/snippets/text-mode/css-mode/mar.mar b/conf/emacs.d/snippets/text-mode/css-mode/mar.mar new file mode 100644 index 0000000..13354db --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/css-mode/mar.mar @@ -0,0 +1,4 @@ +#contributor : rejeep +#name : margin: ... +# -- +margin: $1; diff --git a/conf/emacs.d/snippets/text-mode/css-mode/mar.margin b/conf/emacs.d/snippets/text-mode/css-mode/mar.margin new file mode 100644 index 0000000..97de70c --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/css-mode/mar.margin @@ -0,0 +1,4 @@ +#contributor : rejeep +#name : margin top right bottom left +# -- +margin: ${top} ${right} ${bottom} ${left}; diff --git a/conf/emacs.d/snippets/text-mode/css-mode/mar.right b/conf/emacs.d/snippets/text-mode/css-mode/mar.right new file mode 100644 index 0000000..47a4973 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/css-mode/mar.right @@ -0,0 +1,4 @@ +#contributor : rejeep +#name : margin-right: ... +# -- +margin-right: $1; diff --git a/conf/emacs.d/snippets/text-mode/css-mode/mar.top b/conf/emacs.d/snippets/text-mode/css-mode/mar.top new file mode 100644 index 0000000..c805754 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/css-mode/mar.top @@ -0,0 +1,4 @@ +#contributor : rejeep +#name : margin-top: ... +# -- +margin-top: $1; diff --git a/conf/emacs.d/snippets/text-mode/css-mode/pad.bottom b/conf/emacs.d/snippets/text-mode/css-mode/pad.bottom new file mode 100644 index 0000000..3b9495e --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/css-mode/pad.bottom @@ -0,0 +1,4 @@ +#contributor : rejeep +#name : padding-bottom: ... +# -- +padding-bottom: $1; diff --git a/conf/emacs.d/snippets/text-mode/css-mode/pad.left b/conf/emacs.d/snippets/text-mode/css-mode/pad.left new file mode 100644 index 0000000..ecae515 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/css-mode/pad.left @@ -0,0 +1,4 @@ +#contributor : rejeep +#name : padding-left: ... +# -- +padding-left: $1; diff --git a/conf/emacs.d/snippets/text-mode/css-mode/pad.pad b/conf/emacs.d/snippets/text-mode/css-mode/pad.pad new file mode 100644 index 0000000..ee3a682 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/css-mode/pad.pad @@ -0,0 +1,4 @@ +#contributor : rejeep +#name : padding: ... +# -- +padding: $1; diff --git a/conf/emacs.d/snippets/text-mode/css-mode/pad.padding b/conf/emacs.d/snippets/text-mode/css-mode/pad.padding new file mode 100644 index 0000000..c1009d3 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/css-mode/pad.padding @@ -0,0 +1,4 @@ +#contributor : rejeep +#name : padding: top right bottom left +# -- +padding: ${top} ${right} ${bottom} ${left}; diff --git a/conf/emacs.d/snippets/text-mode/css-mode/pad.right b/conf/emacs.d/snippets/text-mode/css-mode/pad.right new file mode 100644 index 0000000..98a9e12 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/css-mode/pad.right @@ -0,0 +1,4 @@ +#contributor : rejeep +#name : padding-right: ... +# -- +padding-right: $1; diff --git a/conf/emacs.d/snippets/text-mode/css-mode/pad.top b/conf/emacs.d/snippets/text-mode/css-mode/pad.top new file mode 100644 index 0000000..34987f6 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/css-mode/pad.top @@ -0,0 +1,4 @@ +#contributor : rejeep +#name : padding-top: ... +# -- +padding-top: $1; diff --git a/conf/emacs.d/snippets/text-mode/emacs-lisp-mode/.read_me b/conf/emacs.d/snippets/text-mode/emacs-lisp-mode/.read_me new file mode 100644 index 0000000..9e6e532 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/emacs-lisp-mode/.read_me @@ -0,0 +1,11 @@ +TITLE: Emacs Idiom Template Set. Version 1. 2009-02-22 + +DESCRIPTION: Some useful templates for emacs lisp. This template set is based on useful elisp idioms on common tasks. + +LICENSING: GPL version 3. + +AUTHOR: Xah Lee + +Home Page: latest version at: +• Emacs Lisp Idiom Templates + http://xahlee.org/emacs/elisp_idiom_templates.html diff --git a/conf/emacs.d/snippets/text-mode/emacs-lisp-mode/defun b/conf/emacs.d/snippets/text-mode/emacs-lisp-mode/defun new file mode 100644 index 0000000..0105d20 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/emacs-lisp-mode/defun @@ -0,0 +1,11 @@ +#name : function template +#contributor : Xah Lee +# -- +(defun $1 () + "thisandthat." + (interactive) + (let (var1) + (setq var1 some) + $0 + ) +) \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/emacs-lisp-mode/dired.process_marked b/conf/emacs.d/snippets/text-mode/emacs-lisp-mode/dired.process_marked new file mode 100644 index 0000000..1b42597 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/emacs-lisp-mode/dired.process_marked @@ -0,0 +1,16 @@ +#name : process marked files in dired +#contributor : Xah Lee +# -- +;; idiom for processing a list of files in dired's marked files + +;; suppose myProcessFile is your function that takes a file path +;; and do some processing on the file + +(defun dired-myProcessFile () + "apply myProcessFile function to marked files in dired." + (interactive) + (require 'dired) + (mapc 'myProcessFile (dired-get-marked-files)) +) + +;; to use it, type M-x dired-myProcessFile diff --git a/conf/emacs.d/snippets/text-mode/emacs-lisp-mode/file.process b/conf/emacs.d/snippets/text-mode/emacs-lisp-mode/file.process new file mode 100644 index 0000000..abd1a33 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/emacs-lisp-mode/file.process @@ -0,0 +1,17 @@ +#name : a function that process a file +#contributor : Xah Lee +# -- +(defun doThisFile (fpath) + "Process the file at path FPATH ..." + (let () + ;; create temp buffer without undo record or font lock. (more efficient) + ;; first space in temp buff name is necessary + (set-buffer (get-buffer-create " myTemp")) + (insert-file-contents fpath nil nil nil t) + + ;; process it ... + ;; (goto-char 0) ; move to begining of file's content (in case it was open) + ;; ... do something here + ;; (write-file fpath) ;; write back to the file + + (kill-buffer " myTemp"))) diff --git a/conf/emacs.d/snippets/text-mode/emacs-lisp-mode/file.read-lines b/conf/emacs.d/snippets/text-mode/emacs-lisp-mode/file.read-lines new file mode 100644 index 0000000..b4a1942 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/emacs-lisp-mode/file.read-lines @@ -0,0 +1,17 @@ +#name : read lines of a file +#contributor : Xah Lee +# -- +(defun read-lines (filePath) + "Return a list of lines in FILEPATH." + (with-temp-buffer + (insert-file-contents filePath) + (split-string + (buffer-string) "\n" t)) ) + +;; process all lines +(mapc + (lambda (aLine) + (message aLine) ; do your stuff here + ) + (read-lines "inputFilePath") +) \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/emacs-lisp-mode/find-replace b/conf/emacs.d/snippets/text-mode/emacs-lisp-mode/find-replace new file mode 100644 index 0000000..cefcf51 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/emacs-lisp-mode/find-replace @@ -0,0 +1,17 @@ +#name : find and replace on region +#contributor : Xah Lee +# -- +(defun replace-html-chars-region (start end) + "Replace “<” to “<” and other chars in HTML. +This works on the current region." + (interactive "r") + (save-restriction + (narrow-to-region start end) + (goto-char (point-min)) + (while (search-forward "&" nil t) (replace-match "&" nil t)) + (goto-char (point-min)) + (while (search-forward "<" nil t) (replace-match "<" nil t)) + (goto-char (point-min)) + (while (search-forward ">" nil t) (replace-match ">" nil t)) + ) + ) diff --git a/conf/emacs.d/snippets/text-mode/emacs-lisp-mode/grabstring b/conf/emacs.d/snippets/text-mode/emacs-lisp-mode/grabstring new file mode 100644 index 0000000..55600b1 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/emacs-lisp-mode/grabstring @@ -0,0 +1,4 @@ +#name : grab buffer substring +#contributor : Xah Lee +# -- +(setq $0 (buffer-substring-no-properties myStartPos myEndPos)) diff --git a/conf/emacs.d/snippets/text-mode/emacs-lisp-mode/grabthing b/conf/emacs.d/snippets/text-mode/emacs-lisp-mode/grabthing new file mode 100644 index 0000000..772b8dc --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/emacs-lisp-mode/grabthing @@ -0,0 +1,4 @@ +#name : grab word under cursor +#contributor : Xah Lee +# -- +(setq $0 (thing-at-point 'symbol)) diff --git a/conf/emacs.d/snippets/text-mode/emacs-lisp-mode/traverse_dir b/conf/emacs.d/snippets/text-mode/emacs-lisp-mode/traverse_dir new file mode 100644 index 0000000..2859cbd --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/emacs-lisp-mode/traverse_dir @@ -0,0 +1,6 @@ +#name : traversing a directory +#contributor : Xah Lee +# -- +;; apply a function to all files in a dir +(require 'find-lisp) +(mapc 'my-process-file (find-lisp-find-files "~/myweb/" "\\.html$")) diff --git a/conf/emacs.d/snippets/text-mode/emacs-lisp-mode/word-or-region b/conf/emacs.d/snippets/text-mode/emacs-lisp-mode/word-or-region new file mode 100644 index 0000000..66a59e4 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/emacs-lisp-mode/word-or-region @@ -0,0 +1,27 @@ +#name : Command that works on region or word +#contributor : Xah Lee +# -- +;; example of a command that works on current word or text selection +(defun down-case-word-or-region () + "Lower case the current word or text selection." +(interactive) +(let (pos1 pos2 meat) + (if (and transient-mark-mode mark-active) + (setq pos1 (region-beginning) + pos2 (region-end)) + (setq pos1 (car (bounds-of-thing-at-point 'symbol)) + pos2 (cdr (bounds-of-thing-at-point 'symbol)))) + + ; now, pos1 and pos2 are the starting and ending positions + ; of the current word, or current text selection if exists + + ;; put your code here. + $0 + ;; Some example of things you might want to do + (downcase-region pos1 pos2) ; example of a func that takes region as args + (setq meat (buffer-substring-no-properties pos1 pos2)) ; grab the text. + (delete-region pos1 pos2) ; get rid of it + (insert "newText") ; insert your new text + + ) +) diff --git a/conf/emacs.d/snippets/text-mode/email b/conf/emacs.d/snippets/text-mode/email new file mode 100644 index 0000000..1ac7f94 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/email @@ -0,0 +1,3 @@ +#name : (user's email) +# -- +`(replace-regexp-in-string "@" "@NOSPAM." user-mail-address)` \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/erlang-mode/after b/conf/emacs.d/snippets/text-mode/erlang-mode/after new file mode 100644 index 0000000..264e201 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/erlang-mode/after @@ -0,0 +1,4 @@ +#name : after ... -> +# -- +after + $1 -> $0 diff --git a/conf/emacs.d/snippets/text-mode/erlang-mode/begin b/conf/emacs.d/snippets/text-mode/erlang-mode/begin new file mode 100644 index 0000000..7b48494 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/erlang-mode/begin @@ -0,0 +1,5 @@ +#name : begin ... end +# -- +begin + $0 +end diff --git a/conf/emacs.d/snippets/text-mode/erlang-mode/beh b/conf/emacs.d/snippets/text-mode/erlang-mode/beh new file mode 100644 index 0000000..4975b26 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/erlang-mode/beh @@ -0,0 +1,4 @@ +#name : -behaviour(...). +# -- +-behaviour(${1:gen_server}). +$0 diff --git a/conf/emacs.d/snippets/text-mode/erlang-mode/case b/conf/emacs.d/snippets/text-mode/erlang-mode/case new file mode 100644 index 0000000..5bed114 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/erlang-mode/case @@ -0,0 +1,5 @@ +#name : case ... of ... end +# -- +case $1 of + $0 +end diff --git a/conf/emacs.d/snippets/text-mode/erlang-mode/compile b/conf/emacs.d/snippets/text-mode/erlang-mode/compile new file mode 100644 index 0000000..ae3a4d8 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/erlang-mode/compile @@ -0,0 +1,4 @@ +#name : -compile(...). +# -- +-compile([${1:export_all}]). +$0 diff --git a/conf/emacs.d/snippets/text-mode/erlang-mode/def b/conf/emacs.d/snippets/text-mode/erlang-mode/def new file mode 100644 index 0000000..6fb92f1 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/erlang-mode/def @@ -0,0 +1,4 @@ +#name : -define(...,...). +# -- +-define($1,$2). +$0 diff --git a/conf/emacs.d/snippets/text-mode/erlang-mode/exp b/conf/emacs.d/snippets/text-mode/erlang-mode/exp new file mode 100644 index 0000000..67f56da --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/erlang-mode/exp @@ -0,0 +1,5 @@ +#name : -export([]). +#contributor : hitesh +# -- +-export([${1:start/0}]). +$0 diff --git a/conf/emacs.d/snippets/text-mode/erlang-mode/fun b/conf/emacs.d/snippets/text-mode/erlang-mode/fun new file mode 100644 index 0000000..77f8293 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/erlang-mode/fun @@ -0,0 +1,3 @@ +#name : fun (...) -> ... end +# -- +fun ($1) -> $0 end diff --git a/conf/emacs.d/snippets/text-mode/erlang-mode/if b/conf/emacs.d/snippets/text-mode/erlang-mode/if new file mode 100644 index 0000000..45674c4 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/erlang-mode/if @@ -0,0 +1,6 @@ +#name : if ... -> ... ; true -> ... end +# -- +if + $1 -> $2; + true -> $0 +end diff --git a/conf/emacs.d/snippets/text-mode/erlang-mode/ifdef b/conf/emacs.d/snippets/text-mode/erlang-mode/ifdef new file mode 100644 index 0000000..ea89ecf --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/erlang-mode/ifdef @@ -0,0 +1,5 @@ +#name : -ifdef(...). ... -endif. +# -- +-ifdef($1). +$0 +-endif. diff --git a/conf/emacs.d/snippets/text-mode/erlang-mode/ifndef b/conf/emacs.d/snippets/text-mode/erlang-mode/ifndef new file mode 100644 index 0000000..dcd67a7 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/erlang-mode/ifndef @@ -0,0 +1,5 @@ +#name : -ifndef(...). ... -endif. +# -- +-ifndef($1). +$0 +-endif. diff --git a/conf/emacs.d/snippets/text-mode/erlang-mode/imp b/conf/emacs.d/snippets/text-mode/erlang-mode/imp new file mode 100644 index 0000000..c035ddd --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/erlang-mode/imp @@ -0,0 +1,5 @@ +#name : -import([]). +#contributor : hitesh +# -- +-import(${1:lists}, [${2:map/2, sum/1}]). +$0 diff --git a/conf/emacs.d/snippets/text-mode/erlang-mode/inc b/conf/emacs.d/snippets/text-mode/erlang-mode/inc new file mode 100644 index 0000000..f7b2161 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/erlang-mode/inc @@ -0,0 +1,4 @@ +#name : -include("..."). +# -- +-include("$1"). +$0 diff --git a/conf/emacs.d/snippets/text-mode/erlang-mode/inc.lib b/conf/emacs.d/snippets/text-mode/erlang-mode/inc.lib new file mode 100644 index 0000000..09a6723 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/erlang-mode/inc.lib @@ -0,0 +1,4 @@ +#name : -include_lib("..."). +# -- +-include_lib("$1"). +$0 diff --git a/conf/emacs.d/snippets/text-mode/erlang-mode/loop b/conf/emacs.d/snippets/text-mode/erlang-mode/loop new file mode 100644 index 0000000..0205802 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/erlang-mode/loop @@ -0,0 +1,8 @@ +#name : loop(...) -> receive _ -> loop(...) end. +# -- +${1:loop}($2) -> + receive + ${3:_} -> + $1($2) + end. +$0 diff --git a/conf/emacs.d/snippets/text-mode/erlang-mode/mod b/conf/emacs.d/snippets/text-mode/erlang-mode/mod new file mode 100644 index 0000000..7275d39 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/erlang-mode/mod @@ -0,0 +1,6 @@ +#name : -module(). +#contributor : hitesh +# -- +-module(${1:`(file-name-nondirectory + (file-name-sans-extension (or (buffer-file-name) (buffer-name))))`}). +$0 diff --git a/conf/emacs.d/snippets/text-mode/erlang-mode/rcv b/conf/emacs.d/snippets/text-mode/erlang-mode/rcv new file mode 100644 index 0000000..804fb3f --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/erlang-mode/rcv @@ -0,0 +1,5 @@ +#name : receive ... -> ... end +# -- +receive + $1 -> $0 +end diff --git a/conf/emacs.d/snippets/text-mode/erlang-mode/rcv.after b/conf/emacs.d/snippets/text-mode/erlang-mode/rcv.after new file mode 100644 index 0000000..51046df --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/erlang-mode/rcv.after @@ -0,0 +1,6 @@ +#name : receive after ... -> ... end +# -- +receive +after + $1 -> $0 +end diff --git a/conf/emacs.d/snippets/text-mode/erlang-mode/rec b/conf/emacs.d/snippets/text-mode/erlang-mode/rec new file mode 100644 index 0000000..0d67834 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/erlang-mode/rec @@ -0,0 +1,4 @@ +#name : -record(...,{...}). +# -- +-record($1,{$2}). +$0 diff --git a/conf/emacs.d/snippets/text-mode/erlang-mode/try b/conf/emacs.d/snippets/text-mode/erlang-mode/try new file mode 100644 index 0000000..fa5c9c2 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/erlang-mode/try @@ -0,0 +1,7 @@ +#name : try ... of ... catch after end +# -- +try $1 of + $0 +catch +after +end diff --git a/conf/emacs.d/snippets/text-mode/erlang-mode/undef b/conf/emacs.d/snippets/text-mode/erlang-mode/undef new file mode 100644 index 0000000..7ab5dd4 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/erlang-mode/undef @@ -0,0 +1,4 @@ +#name : -undef(...). +# -- +-undef($1). +$0 diff --git a/conf/emacs.d/snippets/text-mode/f90-mode/au b/conf/emacs.d/snippets/text-mode/f90-mode/au new file mode 100644 index 0000000..1f0af73 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/f90-mode/au @@ -0,0 +1,4 @@ +#contributor: Li Zhu +#name : automatic +# -- +automatic $0 diff --git a/conf/emacs.d/snippets/text-mode/f90-mode/bd b/conf/emacs.d/snippets/text-mode/f90-mode/bd new file mode 100644 index 0000000..8840102 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/f90-mode/bd @@ -0,0 +1,4 @@ +#contributor: Li Zhu +#name : block data +# -- +block data $0 diff --git a/conf/emacs.d/snippets/text-mode/f90-mode/c b/conf/emacs.d/snippets/text-mode/f90-mode/c new file mode 100644 index 0000000..c7182e4 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/f90-mode/c @@ -0,0 +1,4 @@ +#contributor: Li Zhu +#name : continue +# -- +continue $0 diff --git a/conf/emacs.d/snippets/text-mode/f90-mode/ch b/conf/emacs.d/snippets/text-mode/f90-mode/ch new file mode 100644 index 0000000..7e6b4cb --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/f90-mode/ch @@ -0,0 +1,4 @@ +#contributor: Li Zhu +#name : character +# -- +character $0 diff --git a/conf/emacs.d/snippets/text-mode/f90-mode/cx b/conf/emacs.d/snippets/text-mode/f90-mode/cx new file mode 100644 index 0000000..8feb41e --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/f90-mode/cx @@ -0,0 +1,4 @@ +#contributor: Li Zhu +#name : complex +# -- +complex $0 diff --git a/conf/emacs.d/snippets/text-mode/f90-mode/dc b/conf/emacs.d/snippets/text-mode/f90-mode/dc new file mode 100644 index 0000000..1992b1b --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/f90-mode/dc @@ -0,0 +1,4 @@ +#contributor: Li Zhu +#name : double complex +# -- +double complex $0 diff --git a/conf/emacs.d/snippets/text-mode/f90-mode/do b/conf/emacs.d/snippets/text-mode/f90-mode/do new file mode 100644 index 0000000..2c117fd --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/f90-mode/do @@ -0,0 +1,6 @@ +#contributor: Li Zhu +#name : do while (...) end do +# -- +do while (${1:condition}) + $0 +end do diff --git a/conf/emacs.d/snippets/text-mode/f90-mode/dp b/conf/emacs.d/snippets/text-mode/f90-mode/dp new file mode 100644 index 0000000..ad014b7 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/f90-mode/dp @@ -0,0 +1,4 @@ +#contributor: Li Zhu +#name : double precision +# -- +double precision $0 diff --git a/conf/emacs.d/snippets/text-mode/f90-mode/eq b/conf/emacs.d/snippets/text-mode/f90-mode/eq new file mode 100644 index 0000000..0c6d09f --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/f90-mode/eq @@ -0,0 +1,4 @@ +#contributor: Li Zhu +#name : equivalence +# -- +equivalence $0 diff --git a/conf/emacs.d/snippets/text-mode/f90-mode/ib b/conf/emacs.d/snippets/text-mode/f90-mode/ib new file mode 100644 index 0000000..9275a12 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/f90-mode/ib @@ -0,0 +1,4 @@ +#contributor: Li Zhu +#name : implicit byte +# -- +implicit byte $0 diff --git a/conf/emacs.d/snippets/text-mode/f90-mode/ic b/conf/emacs.d/snippets/text-mode/f90-mode/ic new file mode 100644 index 0000000..79842ea --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/f90-mode/ic @@ -0,0 +1,4 @@ +#contributor: Li Zhu +#name : implicit complex +# -- +implicit complex $0 diff --git a/conf/emacs.d/snippets/text-mode/f90-mode/ich b/conf/emacs.d/snippets/text-mode/f90-mode/ich new file mode 100644 index 0000000..53c7f81 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/f90-mode/ich @@ -0,0 +1,4 @@ +#contributor: Li Zhu +#name : implicit character +# -- +implicit character $0 diff --git a/conf/emacs.d/snippets/text-mode/f90-mode/if b/conf/emacs.d/snippets/text-mode/f90-mode/if new file mode 100644 index 0000000..b4fb526 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/f90-mode/if @@ -0,0 +1,6 @@ +#contributor: Li Zhu +#name : if then end if +# -- +if ( ${1:condition} ) then + $0 +end if diff --git a/conf/emacs.d/snippets/text-mode/f90-mode/ii b/conf/emacs.d/snippets/text-mode/f90-mode/ii new file mode 100644 index 0000000..4b1fee5 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/f90-mode/ii @@ -0,0 +1,4 @@ +#contributor: Li Zhu +#name : implicit integer +# -- +implicit integer $0 diff --git a/conf/emacs.d/snippets/text-mode/f90-mode/il b/conf/emacs.d/snippets/text-mode/f90-mode/il new file mode 100644 index 0000000..8658af5 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/f90-mode/il @@ -0,0 +1,4 @@ +#contributor: Li Zhu +#name : implicit logical +# -- +implicit logical $0 diff --git a/conf/emacs.d/snippets/text-mode/f90-mode/in b/conf/emacs.d/snippets/text-mode/f90-mode/in new file mode 100644 index 0000000..0c1d5e1 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/f90-mode/in @@ -0,0 +1,4 @@ +#contributor: Li Zhu +#name : implicit none +# -- +implicit none diff --git a/conf/emacs.d/snippets/text-mode/f90-mode/inc b/conf/emacs.d/snippets/text-mode/f90-mode/inc new file mode 100644 index 0000000..dd649c4 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/f90-mode/inc @@ -0,0 +1,4 @@ +#contributor: Li Zhu +#name : include +# -- +include $0 diff --git a/conf/emacs.d/snippets/text-mode/f90-mode/intr b/conf/emacs.d/snippets/text-mode/f90-mode/intr new file mode 100644 index 0000000..147fffd --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/f90-mode/intr @@ -0,0 +1,4 @@ +#contributor: Li Zhu +#name : intrinsic +# -- +intrinsic $0 diff --git a/conf/emacs.d/snippets/text-mode/f90-mode/ir b/conf/emacs.d/snippets/text-mode/f90-mode/ir new file mode 100644 index 0000000..fb37082 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/f90-mode/ir @@ -0,0 +1,4 @@ +#contributor: Li Zhu +#name : implicit real +# -- +implicit real $0 diff --git a/conf/emacs.d/snippets/text-mode/f90-mode/l b/conf/emacs.d/snippets/text-mode/f90-mode/l new file mode 100644 index 0000000..8605d69 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/f90-mode/l @@ -0,0 +1,4 @@ +#contributor: Li Zhu +#name : logical +# -- +logical $0 diff --git a/conf/emacs.d/snippets/text-mode/f90-mode/pa b/conf/emacs.d/snippets/text-mode/f90-mode/pa new file mode 100644 index 0000000..1b1b503 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/f90-mode/pa @@ -0,0 +1,4 @@ +#contributor: Li Zhu +#name : parameter +# -- +parameter $0 diff --git a/conf/emacs.d/snippets/text-mode/f90-mode/pr b/conf/emacs.d/snippets/text-mode/f90-mode/pr new file mode 100644 index 0000000..e0f8baa --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/f90-mode/pr @@ -0,0 +1,6 @@ +#contributor: Li Zhu +#name : program ... end program ... +# -- +program ${1:name} + $0 +end program ${1:name} diff --git a/conf/emacs.d/snippets/text-mode/f90-mode/re b/conf/emacs.d/snippets/text-mode/f90-mode/re new file mode 100644 index 0000000..08c7ba0 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/f90-mode/re @@ -0,0 +1,4 @@ +#contributor: Li Zhu +#name : read (*,*) +# -- +read (${1:*},${2:*}) $0 diff --git a/conf/emacs.d/snippets/text-mode/f90-mode/st b/conf/emacs.d/snippets/text-mode/f90-mode/st new file mode 100644 index 0000000..23ae7d0 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/f90-mode/st @@ -0,0 +1,4 @@ +#contributor: Li Zhu +#name : structure +# -- +structure $0 diff --git a/conf/emacs.d/snippets/text-mode/f90-mode/su b/conf/emacs.d/snippets/text-mode/f90-mode/su new file mode 100644 index 0000000..d3857b8 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/f90-mode/su @@ -0,0 +1,4 @@ +#contributor: Li Zhu +#name : subroutine +# -- +subroutine $0 diff --git a/conf/emacs.d/snippets/text-mode/f90-mode/wr b/conf/emacs.d/snippets/text-mode/f90-mode/wr new file mode 100644 index 0000000..1ac3eb9 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/f90-mode/wr @@ -0,0 +1,4 @@ +#contributor: Li Zhu +#name : write (*,*) +# -- +write (${1:*},${2:*}) $0 diff --git a/conf/emacs.d/snippets/text-mode/html-mode/body b/conf/emacs.d/snippets/text-mode/html-mode/body new file mode 100644 index 0000000..c924f8c --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/html-mode/body @@ -0,0 +1,6 @@ +#contributor : Jimmy Wu +#name : ... +# -- + + $0 + \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/html-mode/br b/conf/emacs.d/snippets/text-mode/html-mode/br new file mode 100644 index 0000000..3492098 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/html-mode/br @@ -0,0 +1,4 @@ +#contributor : Jimmy Wu +#name :
+# -- +
\ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/html-mode/code b/conf/emacs.d/snippets/text-mode/html-mode/code new file mode 100644 index 0000000..6f558ec --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/html-mode/code @@ -0,0 +1,6 @@ +#contributor : Jimmy Wu +#name : ... +# -- + + $0 + \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/html-mode/code.class b/conf/emacs.d/snippets/text-mode/html-mode/code.class new file mode 100644 index 0000000..b910eb7 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/html-mode/code.class @@ -0,0 +1,6 @@ +#contributor : Jimmy Wu +#name : ... +# -- + + $0 + \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/html-mode/dd b/conf/emacs.d/snippets/text-mode/html-mode/dd new file mode 100644 index 0000000..8120b13 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/html-mode/dd @@ -0,0 +1,5 @@ +#contributor : Rodrigo Setti +#name :
...
+#group : list +# -- +
$1
\ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/html-mode/div b/conf/emacs.d/snippets/text-mode/html-mode/div new file mode 100644 index 0000000..1c9c0c8 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/html-mode/div @@ -0,0 +1,3 @@ +#name : ... +# -- +$0 \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/html-mode/div.class b/conf/emacs.d/snippets/text-mode/html-mode/div.class new file mode 100644 index 0000000..11c12d6 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/html-mode/div.class @@ -0,0 +1,6 @@ +#contributor : Jimmy Wu +#name :
...
+# -- +
+ $0 +
\ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/html-mode/div.id b/conf/emacs.d/snippets/text-mode/html-mode/div.id new file mode 100644 index 0000000..ccde64d --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/html-mode/div.id @@ -0,0 +1,6 @@ +#contributor : Jimmy Wu +#name :
...
+# -- +
+ $0 +
\ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/html-mode/div.id-class b/conf/emacs.d/snippets/text-mode/html-mode/div.id-class new file mode 100644 index 0000000..bce8920 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/html-mode/div.id-class @@ -0,0 +1,6 @@ +#contributor : Jimmy Wu +#name :
...
+# -- +
+ $0 +
\ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/html-mode/dl b/conf/emacs.d/snippets/text-mode/html-mode/dl new file mode 100644 index 0000000..be11bb5 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/html-mode/dl @@ -0,0 +1,7 @@ +#contributor : Rodrigo Setti +#name :
...
+#group : list +# -- +
+ $0 +
diff --git a/conf/emacs.d/snippets/text-mode/html-mode/dl.id b/conf/emacs.d/snippets/text-mode/html-mode/dl.id new file mode 100644 index 0000000..16aba53 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/html-mode/dl.id @@ -0,0 +1,7 @@ +#contributor : Rodrigo Setti +#name :
...
+#group : list +# -- +
+ $0 +
\ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/html-mode/doctype b/conf/emacs.d/snippets/text-mode/html-mode/doctype new file mode 100644 index 0000000..a60dfb6 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/html-mode/doctype @@ -0,0 +1,4 @@ +#name : Doctype HTML 4.01 Strict +#group : meta +# -- + \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/html-mode/doctype.xhml1 b/conf/emacs.d/snippets/text-mode/html-mode/doctype.xhml1 new file mode 100644 index 0000000..5d95e07 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/html-mode/doctype.xhml1 @@ -0,0 +1,4 @@ +#name : DocType XHTML 1.0 frameset +#group : meta +# -- + \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/html-mode/doctype.xhtml1_1 b/conf/emacs.d/snippets/text-mode/html-mode/doctype.xhtml1_1 new file mode 100644 index 0000000..fec46d7 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/html-mode/doctype.xhtml1_1 @@ -0,0 +1,4 @@ +#name : DocType XHTML 1.1 +#group : meta +# -- + \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/html-mode/doctype.xhtml1_strict b/conf/emacs.d/snippets/text-mode/html-mode/doctype.xhtml1_strict new file mode 100644 index 0000000..20d95d3 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/html-mode/doctype.xhtml1_strict @@ -0,0 +1,4 @@ +#name : DocType XHTML 1.0 Strict +#group : meta +# -- + \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/html-mode/doctype.xhtml1_transitional b/conf/emacs.d/snippets/text-mode/html-mode/doctype.xhtml1_transitional new file mode 100644 index 0000000..c5255fc --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/html-mode/doctype.xhtml1_transitional @@ -0,0 +1,4 @@ +#name : DocType XHTML 1.0 Transitional +#group : meta +# -- + \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/html-mode/dov b/conf/emacs.d/snippets/text-mode/html-mode/dov new file mode 100644 index 0000000..e8341ea --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/html-mode/dov @@ -0,0 +1,11 @@ +#name : ... +# -- +a mirror up here $3 + + + + $0 + + + actually some other shit and $3 + diff --git a/conf/emacs.d/snippets/text-mode/html-mode/dt b/conf/emacs.d/snippets/text-mode/html-mode/dt new file mode 100644 index 0000000..f385cec --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/html-mode/dt @@ -0,0 +1,5 @@ +#contributor : Rodrigo Setti +#name :
...
+#group : list +# -- +
$1
\ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/html-mode/form b/conf/emacs.d/snippets/text-mode/html-mode/form new file mode 100644 index 0000000..f1c066d --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/html-mode/form @@ -0,0 +1,6 @@ +#contributor : Jimmy Wu +#name :
+# -- +
+ $0 +
\ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/html-mode/h1 b/conf/emacs.d/snippets/text-mode/html-mode/h1 new file mode 100644 index 0000000..414e457 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/html-mode/h1 @@ -0,0 +1,5 @@ +#contributor : Jimmy Wu +#name :

...

+#group : header +# -- +

$1

\ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/html-mode/h2 b/conf/emacs.d/snippets/text-mode/html-mode/h2 new file mode 100644 index 0000000..3722a29 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/html-mode/h2 @@ -0,0 +1,5 @@ +#contributor : Jimmy Wu +#name :

...

+#group : header +# -- +

$1

\ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/html-mode/h3 b/conf/emacs.d/snippets/text-mode/html-mode/h3 new file mode 100644 index 0000000..a1eaab1 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/html-mode/h3 @@ -0,0 +1,5 @@ +#contributor : Jimmy Wu +#name :

...

+#group : header +# -- +

$1

\ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/html-mode/h4 b/conf/emacs.d/snippets/text-mode/html-mode/h4 new file mode 100644 index 0000000..df71628 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/html-mode/h4 @@ -0,0 +1,5 @@ +#contributor : Jimmy Wu +#name :

...

+#group : header +# -- +

$1

\ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/html-mode/h5 b/conf/emacs.d/snippets/text-mode/html-mode/h5 new file mode 100644 index 0000000..0109822 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/html-mode/h5 @@ -0,0 +1,5 @@ +#contributor : Jimmy Wu +#name :
...
+#group : header +# -- +
$1
\ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/html-mode/h6 b/conf/emacs.d/snippets/text-mode/html-mode/h6 new file mode 100644 index 0000000..21c718f --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/html-mode/h6 @@ -0,0 +1,5 @@ +#contributor : Jimmy Wu +#name :
...
+#group : header +# -- +
$1
\ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/html-mode/head b/conf/emacs.d/snippets/text-mode/html-mode/head new file mode 100644 index 0000000..d639a73 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/html-mode/head @@ -0,0 +1,6 @@ +#contributor : Jimmy Wu +#name : ... +# -- + + $0 + \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/html-mode/hr b/conf/emacs.d/snippets/text-mode/html-mode/hr new file mode 100644 index 0000000..c2c330c --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/html-mode/hr @@ -0,0 +1,4 @@ +#contributor : Jimmy Wu +#name :
+# -- +
diff --git a/conf/emacs.d/snippets/text-mode/html-mode/href b/conf/emacs.d/snippets/text-mode/html-mode/href new file mode 100644 index 0000000..121d589 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/html-mode/href @@ -0,0 +1,4 @@ +#contributor : Jimmy Wu +#name : ... +# -- +$2 \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/html-mode/html b/conf/emacs.d/snippets/text-mode/html-mode/html new file mode 100644 index 0000000..958aa6d --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/html-mode/html @@ -0,0 +1,6 @@ +#contributor : Jimmy Wu +#name : ... +# -- + + $0 + diff --git a/conf/emacs.d/snippets/text-mode/html-mode/html.xmlns b/conf/emacs.d/snippets/text-mode/html-mode/html.xmlns new file mode 100644 index 0000000..7dd7ee4 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/html-mode/html.xmlns @@ -0,0 +1,6 @@ +#contributor : Jimmy Wu +#name : ... +# -- + + $0 + diff --git a/conf/emacs.d/snippets/text-mode/html-mode/img b/conf/emacs.d/snippets/text-mode/html-mode/img new file mode 100644 index 0000000..897f605 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/html-mode/img @@ -0,0 +1,4 @@ +#contributor : Jimmy Wu +#name : ... +# -- +$3 \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/html-mode/input b/conf/emacs.d/snippets/text-mode/html-mode/input new file mode 100644 index 0000000..c79ba87 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/html-mode/input @@ -0,0 +1,4 @@ +#contributor : Jimmy Wu +#name : +# -- + \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/html-mode/li b/conf/emacs.d/snippets/text-mode/html-mode/li new file mode 100644 index 0000000..c5139fa --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/html-mode/li @@ -0,0 +1,5 @@ +#contributor : Jimmy Wu +#name :
  • ...
  • +#group : list +# -- +
  • $1
  • \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/html-mode/li.class b/conf/emacs.d/snippets/text-mode/html-mode/li.class new file mode 100644 index 0000000..90f0c65 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/html-mode/li.class @@ -0,0 +1,5 @@ +#contributor : Jimmy Wu +#name :
  • ...
  • +#group : list +# -- +
  • $2
  • \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/html-mode/link.stylesheet b/conf/emacs.d/snippets/text-mode/html-mode/link.stylesheet new file mode 100644 index 0000000..6c9de74 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/html-mode/link.stylesheet @@ -0,0 +1,4 @@ +#contributor : Jimmy Wu +#name : +# -- + \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/html-mode/link.stylesheet-ie b/conf/emacs.d/snippets/text-mode/html-mode/link.stylesheet-ie new file mode 100644 index 0000000..4f6a776 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/html-mode/link.stylesheet-ie @@ -0,0 +1,6 @@ +#contributor : Jimmy Wu +#name : +# -- + \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/html-mode/mailto b/conf/emacs.d/snippets/text-mode/html-mode/mailto new file mode 100644 index 0000000..419f2a5 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/html-mode/mailto @@ -0,0 +1,4 @@ +#contributor : Jimmy Wu +#name : ... +# -- +$0 \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/html-mode/meta b/conf/emacs.d/snippets/text-mode/html-mode/meta new file mode 100644 index 0000000..30319ef --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/html-mode/meta @@ -0,0 +1,5 @@ +#contributor : Jimmy Wu +#group : meta +#name : +# -- + \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/html-mode/meta.http-equiv b/conf/emacs.d/snippets/text-mode/html-mode/meta.http-equiv new file mode 100644 index 0000000..c059a44 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/html-mode/meta.http-equiv @@ -0,0 +1,5 @@ +#contributor : Jimmy Wu +#name : +#group : meta +# -- + \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/html-mode/ol b/conf/emacs.d/snippets/text-mode/html-mode/ol new file mode 100644 index 0000000..58899fa --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/html-mode/ol @@ -0,0 +1,7 @@ +#contributor : Jimmy Wu +#name :
      ...
    +#group : list +# -- +
      + $0 +
    \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/html-mode/ol.class b/conf/emacs.d/snippets/text-mode/html-mode/ol.class new file mode 100644 index 0000000..b091f08 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/html-mode/ol.class @@ -0,0 +1,7 @@ +#contributor : Jimmy Wu +#name :
      ...
    +#group : list +# -- +
      + $0 +
    \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/html-mode/ol.id b/conf/emacs.d/snippets/text-mode/html-mode/ol.id new file mode 100644 index 0000000..13c7c06 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/html-mode/ol.id @@ -0,0 +1,7 @@ +#contributor : Jimmy Wu +#name :
      ...
    +#group : list +# -- +
      + $0 +
    \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/html-mode/p b/conf/emacs.d/snippets/text-mode/html-mode/p new file mode 100644 index 0000000..649d9a2 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/html-mode/p @@ -0,0 +1,4 @@ +#contributor : Jimmy Wu +#name :

    ...

    +# -- +

    $1

    \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/html-mode/pre b/conf/emacs.d/snippets/text-mode/html-mode/pre new file mode 100644 index 0000000..bfebb3c --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/html-mode/pre @@ -0,0 +1,6 @@ +#contributor : Jimmy Wu +#name :
    ...
    +# -- +
    +  $0
    +
    \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/html-mode/quote b/conf/emacs.d/snippets/text-mode/html-mode/quote new file mode 100644 index 0000000..65ded74 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/html-mode/quote @@ -0,0 +1,6 @@ +#contributor : Jimmy Wu +#name :
    ...
    +# -- +
    + $1 +
    \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/html-mode/script.javascript b/conf/emacs.d/snippets/text-mode/html-mode/script.javascript new file mode 100644 index 0000000..bf0c3b5 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/html-mode/script.javascript @@ -0,0 +1,6 @@ +#contributor : Jimmy Wu +#name : +# -- + \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/html-mode/script.javascript-src b/conf/emacs.d/snippets/text-mode/html-mode/script.javascript-src new file mode 100644 index 0000000..b64c4dc --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/html-mode/script.javascript-src @@ -0,0 +1,4 @@ +#contributor : Jimmy Wu +#name : +# -- + \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/html-mode/span b/conf/emacs.d/snippets/text-mode/html-mode/span new file mode 100644 index 0000000..149758d --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/html-mode/span @@ -0,0 +1,4 @@ +#contributor : Jimmy Wu +#name : ... +# -- +$1 \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/html-mode/span.class b/conf/emacs.d/snippets/text-mode/html-mode/span.class new file mode 100644 index 0000000..2d5ee55 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/html-mode/span.class @@ -0,0 +1,4 @@ +#contributor : Jimmy Wu +#name : ... +# -- +$2 \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/html-mode/span.id b/conf/emacs.d/snippets/text-mode/html-mode/span.id new file mode 100644 index 0000000..30a81bc --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/html-mode/span.id @@ -0,0 +1,4 @@ +#contributor : Jimmy Wu +#name : ... +# -- +$2 \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/html-mode/style b/conf/emacs.d/snippets/text-mode/html-mode/style new file mode 100644 index 0000000..300bead --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/html-mode/style @@ -0,0 +1,6 @@ +#contributor : Jimmy Wu +#name : +# -- + \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/html-mode/table b/conf/emacs.d/snippets/text-mode/html-mode/table new file mode 100644 index 0000000..561614f --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/html-mode/table @@ -0,0 +1,7 @@ +#contributor : Jimmy Wu +#name : ...
    +#group : table +# -- + + $0 +
    \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/html-mode/td b/conf/emacs.d/snippets/text-mode/html-mode/td new file mode 100644 index 0000000..4f494eb --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/html-mode/td @@ -0,0 +1,5 @@ +#contributor : Jimmy Wu +#name : ... +#group : table +# -- +$2 \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/html-mode/textarea b/conf/emacs.d/snippets/text-mode/html-mode/textarea new file mode 100644 index 0000000..058498f --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/html-mode/textarea @@ -0,0 +1,4 @@ +#contributor : Jimmy Wu +#name : +# -- + \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/html-mode/th b/conf/emacs.d/snippets/text-mode/html-mode/th new file mode 100644 index 0000000..3b5fab1 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/html-mode/th @@ -0,0 +1,5 @@ +#contributor : Jimmy Wu +#name : ... +#group : table +# -- +$2 \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/html-mode/title b/conf/emacs.d/snippets/text-mode/html-mode/title new file mode 100644 index 0000000..21794cd --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/html-mode/title @@ -0,0 +1,4 @@ +#contributor : Jimmy Wu +#name : ... +# -- +$1 \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/html-mode/tr b/conf/emacs.d/snippets/text-mode/html-mode/tr new file mode 100644 index 0000000..3878a1c --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/html-mode/tr @@ -0,0 +1,7 @@ +#contributor : Jimmy Wu +#name : ... +#group : table +# -- + + $0 + \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/html-mode/ul b/conf/emacs.d/snippets/text-mode/html-mode/ul new file mode 100644 index 0000000..981e6e7 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/html-mode/ul @@ -0,0 +1,7 @@ +#contributor : Jimmy Wu +#name :
      ...
    +#group : list +# -- +
      + $0 +
    \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/html-mode/ul.class b/conf/emacs.d/snippets/text-mode/html-mode/ul.class new file mode 100644 index 0000000..c1e3e91 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/html-mode/ul.class @@ -0,0 +1,7 @@ +#contributor : Jimmy Wu +#name :
      ...
    +#group : list +# -- +
      + $0 +
    \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/html-mode/ul.id b/conf/emacs.d/snippets/text-mode/html-mode/ul.id new file mode 100644 index 0000000..ababf37 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/html-mode/ul.id @@ -0,0 +1,7 @@ +#contributor : Jimmy Wu +#name :
      ...
    +#group : list +# -- +
      + $0 +
    \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/latex-mode/begin b/conf/emacs.d/snippets/text-mode/latex-mode/begin new file mode 100644 index 0000000..dc42d2f --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/latex-mode/begin @@ -0,0 +1,7 @@ +#contributor : Rodrigo Setti +#name : \begin{environment} ... \end{environment} +# -- + +\begin{${1:environment}} +$0 +\end{$1} diff --git a/conf/emacs.d/snippets/text-mode/markdown-mode/+ b/conf/emacs.d/snippets/text-mode/markdown-mode/+ new file mode 100644 index 0000000..0407169 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/markdown-mode/+ @@ -0,0 +1,5 @@ +#name : Unordered List +#contributor: Peng Deng +# -- ++ ${1:Text} ++$0 diff --git a/conf/emacs.d/snippets/text-mode/markdown-mode/- b/conf/emacs.d/snippets/text-mode/markdown-mode/- new file mode 100644 index 0000000..9d5c51d --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/markdown-mode/- @@ -0,0 +1,5 @@ +#name : Unordered List +#contributor: Peng Deng +# -- +- ${1:Text} +-$0 diff --git a/conf/emacs.d/snippets/text-mode/markdown-mode/_ b/conf/emacs.d/snippets/text-mode/markdown-mode/_ new file mode 100644 index 0000000..50ab476 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/markdown-mode/_ @@ -0,0 +1,4 @@ +#name : Emphasis +#contributor: Peng Deng +# -- +_${1:Text}_ $0 diff --git a/conf/emacs.d/snippets/text-mode/markdown-mode/__ b/conf/emacs.d/snippets/text-mode/markdown-mode/__ new file mode 100644 index 0000000..b6304f3 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/markdown-mode/__ @@ -0,0 +1,4 @@ +#name : Strong +#contributor: Peng Deng +# -- +**${1:Text}** $0 diff --git a/conf/emacs.d/snippets/text-mode/markdown-mode/` b/conf/emacs.d/snippets/text-mode/markdown-mode/` new file mode 100644 index 0000000..ae58211 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/markdown-mode/` @@ -0,0 +1,4 @@ +#name : Inline Code +#contributor: Peng Deng +# -- +\`${1:Code}\` $0 diff --git a/conf/emacs.d/snippets/text-mode/markdown-mode/h1.1 b/conf/emacs.d/snippets/text-mode/markdown-mode/h1.1 new file mode 100644 index 0000000..8bb7ea2 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/markdown-mode/h1.1 @@ -0,0 +1,6 @@ +#name : Header 1 (#) +#contributor: Peng Deng +# -- +# ${1:Header 1} # + +$0 diff --git a/conf/emacs.d/snippets/text-mode/markdown-mode/h1.2 b/conf/emacs.d/snippets/text-mode/markdown-mode/h1.2 new file mode 100644 index 0000000..d2e7b5b --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/markdown-mode/h1.2 @@ -0,0 +1,7 @@ +#name : Header 1 (=) +#contributor: Peng Deng +# -- +${1:Header 1} +${1:$(make-string (string-width text) ?\=)} + +$0 diff --git a/conf/emacs.d/snippets/text-mode/markdown-mode/h2.1 b/conf/emacs.d/snippets/text-mode/markdown-mode/h2.1 new file mode 100644 index 0000000..bfee3fc --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/markdown-mode/h2.1 @@ -0,0 +1,6 @@ +#name : Header 2 (##) +#contributor: Peng Deng +# -- +## ${1:Header 1} ## + +$0 diff --git a/conf/emacs.d/snippets/text-mode/markdown-mode/h2.2 b/conf/emacs.d/snippets/text-mode/markdown-mode/h2.2 new file mode 100644 index 0000000..af06045 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/markdown-mode/h2.2 @@ -0,0 +1,7 @@ +#name : Header 2 (-) +#contributor: Peng Deng +# -- +${1:Header 2} +${1:$(make-string (string-width text) ?\-)} + +$0 diff --git a/conf/emacs.d/snippets/text-mode/markdown-mode/h3 b/conf/emacs.d/snippets/text-mode/markdown-mode/h3 new file mode 100644 index 0000000..44a6104 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/markdown-mode/h3 @@ -0,0 +1,6 @@ +#name : Header 3 +#contributor: Peng Deng +# -- +### ${1:Header 3} ### + +$0 diff --git a/conf/emacs.d/snippets/text-mode/markdown-mode/h4 b/conf/emacs.d/snippets/text-mode/markdown-mode/h4 new file mode 100644 index 0000000..315140a --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/markdown-mode/h4 @@ -0,0 +1,6 @@ +#name : Header 4 +#contributor: Peng Deng +# -- +#### ${1:Header 4} #### + +$0 diff --git a/conf/emacs.d/snippets/text-mode/markdown-mode/h5 b/conf/emacs.d/snippets/text-mode/markdown-mode/h5 new file mode 100644 index 0000000..f50a785 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/markdown-mode/h5 @@ -0,0 +1,6 @@ +#name : Header 5 +#contributor: Peng Deng +# -- +##### ${1:Header 5} ##### + +$0 diff --git a/conf/emacs.d/snippets/text-mode/markdown-mode/h6 b/conf/emacs.d/snippets/text-mode/markdown-mode/h6 new file mode 100644 index 0000000..1cdfebb --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/markdown-mode/h6 @@ -0,0 +1,6 @@ +#name : Header 6 +#contributor: Peng Deng +# -- +###### ${1:Header 6} ###### + +$0 diff --git a/conf/emacs.d/snippets/text-mode/markdown-mode/hr.1 b/conf/emacs.d/snippets/text-mode/markdown-mode/hr.1 new file mode 100644 index 0000000..5fbe4f4 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/markdown-mode/hr.1 @@ -0,0 +1,7 @@ +#name : Horizontal Rule (-) +#contributor: Peng Deng +# -- + +---------- + +$0 diff --git a/conf/emacs.d/snippets/text-mode/markdown-mode/hr.2 b/conf/emacs.d/snippets/text-mode/markdown-mode/hr.2 new file mode 100644 index 0000000..2d4de22 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/markdown-mode/hr.2 @@ -0,0 +1,7 @@ +#name : Horizontal Rule (*) +#contributor: Peng Deng +# -- + +******* + +$0 diff --git a/conf/emacs.d/snippets/text-mode/markdown-mode/img b/conf/emacs.d/snippets/text-mode/markdown-mode/img new file mode 100644 index 0000000..69ee77d --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/markdown-mode/img @@ -0,0 +1,4 @@ +#name : Image +#contributor: Peng Deng +# -- +![${1:Alt Text}](${2:URL} $3) $0 diff --git a/conf/emacs.d/snippets/text-mode/markdown-mode/link b/conf/emacs.d/snippets/text-mode/markdown-mode/link new file mode 100644 index 0000000..dd7f99b --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/markdown-mode/link @@ -0,0 +1,4 @@ +#name : Link +#contributor: Peng Deng +# -- +[${1:Link Text}](${2:URL} $3) $0 diff --git a/conf/emacs.d/snippets/text-mode/markdown-mode/ol b/conf/emacs.d/snippets/text-mode/markdown-mode/ol new file mode 100644 index 0000000..e715669 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/markdown-mode/ol @@ -0,0 +1,5 @@ +#name : Ordered List +#contributor: Peng Deng +# -- +${1:1}. ${2:Text} +${1:$(number-to-string (1+ (string-to-number text)))}. $0 diff --git a/conf/emacs.d/snippets/text-mode/markdown-mode/rimg b/conf/emacs.d/snippets/text-mode/markdown-mode/rimg new file mode 100644 index 0000000..caafb60 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/markdown-mode/rimg @@ -0,0 +1,4 @@ +#name : Referenced Image +#contributor: Peng Deng +# -- +![${1:Alt Text}][$2] $0 diff --git a/conf/emacs.d/snippets/text-mode/markdown-mode/rlb b/conf/emacs.d/snippets/text-mode/markdown-mode/rlb new file mode 100644 index 0000000..681d9f0 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/markdown-mode/rlb @@ -0,0 +1,5 @@ +#name : Reference Label +#contributor: Peng Deng +# -- +[${1:Reference}]: ${2:URL} $3 +$0 diff --git a/conf/emacs.d/snippets/text-mode/markdown-mode/rlink b/conf/emacs.d/snippets/text-mode/markdown-mode/rlink new file mode 100644 index 0000000..e35a0c0 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/markdown-mode/rlink @@ -0,0 +1,4 @@ +#name : Reference Link +#contributor: Peng Deng +# -- +[${1:Link Text}][$2] $0 diff --git a/conf/emacs.d/snippets/text-mode/nxml-mode/body b/conf/emacs.d/snippets/text-mode/nxml-mode/body new file mode 100644 index 0000000..ddcf0cf --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/nxml-mode/body @@ -0,0 +1,6 @@ +#contributor : Anders Bach Nielsen +#name : ... +# -- + + $0 + \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/nxml-mode/br b/conf/emacs.d/snippets/text-mode/nxml-mode/br new file mode 100644 index 0000000..ba35773 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/nxml-mode/br @@ -0,0 +1,4 @@ +#contributor : Anders Bach Nielsen +#name :
    +# -- +
    \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/nxml-mode/code b/conf/emacs.d/snippets/text-mode/nxml-mode/code new file mode 100644 index 0000000..b7c43fd --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/nxml-mode/code @@ -0,0 +1,6 @@ +#contributor : Anders Bach Nielsen +#name : ... +# -- + + $0 + \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/nxml-mode/div b/conf/emacs.d/snippets/text-mode/nxml-mode/div new file mode 100644 index 0000000..90fbc2e --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/nxml-mode/div @@ -0,0 +1,4 @@ +#contributor : Anders Bach Nielsen +#name : ... +# -- +$0 \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/nxml-mode/doctype b/conf/emacs.d/snippets/text-mode/nxml-mode/doctype new file mode 100644 index 0000000..3fdcf17 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/nxml-mode/doctype @@ -0,0 +1,5 @@ +#contributor : Anders Bach Nielsen +#name : DocType XHTML 1.1 +#group : meta +# -- + \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/nxml-mode/doctype.xhtml1_strict b/conf/emacs.d/snippets/text-mode/nxml-mode/doctype.xhtml1_strict new file mode 100644 index 0000000..eca5860 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/nxml-mode/doctype.xhtml1_strict @@ -0,0 +1,5 @@ +#contributor : Anders Bach Nielsen +#name : DocType XHTML 1.0 Strict +#group : meta +# -- + \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/nxml-mode/doctype.xhtml1_transitional b/conf/emacs.d/snippets/text-mode/nxml-mode/doctype.xhtml1_transitional new file mode 100644 index 0000000..fba232a --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/nxml-mode/doctype.xhtml1_transitional @@ -0,0 +1,5 @@ +#contributor : Anders Bach Nielsen +#name : DocType XHTML 1.0 Transitional +#group : meta +# -- + \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/nxml-mode/form b/conf/emacs.d/snippets/text-mode/nxml-mode/form new file mode 100644 index 0000000..252253e --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/nxml-mode/form @@ -0,0 +1,6 @@ +#contributor : Anders Bach Nielsen +#name :
    +# -- +
    + $0 +
    \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/nxml-mode/h1 b/conf/emacs.d/snippets/text-mode/nxml-mode/h1 new file mode 100644 index 0000000..bc72fd6 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/nxml-mode/h1 @@ -0,0 +1,5 @@ +#contributor : Anders Bach Nielsen +#name :

    ...

    +#group : header +# -- +

    $1

    \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/nxml-mode/h2 b/conf/emacs.d/snippets/text-mode/nxml-mode/h2 new file mode 100644 index 0000000..b790e56 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/nxml-mode/h2 @@ -0,0 +1,5 @@ +#contributor : Anders Bach Nielsen +#name :

    ...

    +#group : header +# -- +

    $1

    \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/nxml-mode/h3 b/conf/emacs.d/snippets/text-mode/nxml-mode/h3 new file mode 100644 index 0000000..7dfd9d7 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/nxml-mode/h3 @@ -0,0 +1,5 @@ +#contributor : Anders Bach Nielsen +#name :

    ...

    +#group : header +# -- +

    $1

    \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/nxml-mode/h4 b/conf/emacs.d/snippets/text-mode/nxml-mode/h4 new file mode 100644 index 0000000..b782998 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/nxml-mode/h4 @@ -0,0 +1,5 @@ +#contributor : Anders Bach Nielsen +#name :

    ...

    +#group : header +# -- +

    $1

    \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/nxml-mode/h5 b/conf/emacs.d/snippets/text-mode/nxml-mode/h5 new file mode 100644 index 0000000..13a51a1 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/nxml-mode/h5 @@ -0,0 +1,5 @@ +#contributor : Anders Bach Nielsen +#name :
    ...
    +#group : header +# -- +
    $1
    \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/nxml-mode/h6 b/conf/emacs.d/snippets/text-mode/nxml-mode/h6 new file mode 100644 index 0000000..b2f0c55 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/nxml-mode/h6 @@ -0,0 +1,5 @@ +#contributor : Anders Bach Nielsen +#name :
    ...
    +#group : header +# -- +
    $1
    \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/nxml-mode/head b/conf/emacs.d/snippets/text-mode/nxml-mode/head new file mode 100644 index 0000000..91347b9 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/nxml-mode/head @@ -0,0 +1,6 @@ +#contributor : Anders Bach Nielsen +#name : ... +# -- + + $0 + \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/nxml-mode/hr b/conf/emacs.d/snippets/text-mode/nxml-mode/hr new file mode 100644 index 0000000..a17e1db --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/nxml-mode/hr @@ -0,0 +1,4 @@ +#contributor : Anders Bach Nielsen +#name :
    +# -- +
    diff --git a/conf/emacs.d/snippets/text-mode/nxml-mode/href b/conf/emacs.d/snippets/text-mode/nxml-mode/href new file mode 100644 index 0000000..0db2fae --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/nxml-mode/href @@ -0,0 +1,4 @@ +#contributor : Anders Bach Nielsen +#name : ... +# -- +$2 \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/nxml-mode/html b/conf/emacs.d/snippets/text-mode/nxml-mode/html new file mode 100644 index 0000000..85e09f7 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/nxml-mode/html @@ -0,0 +1,6 @@ +#contributor : Anders Bach Nielsen +#name : ... +# -- + + $0 + diff --git a/conf/emacs.d/snippets/text-mode/nxml-mode/img b/conf/emacs.d/snippets/text-mode/nxml-mode/img new file mode 100644 index 0000000..1f4382b --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/nxml-mode/img @@ -0,0 +1,4 @@ +#contributor : Anders Bach Nielsen +#name : ... +# -- +$2 \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/nxml-mode/input b/conf/emacs.d/snippets/text-mode/nxml-mode/input new file mode 100644 index 0000000..80c3503 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/nxml-mode/input @@ -0,0 +1,4 @@ +#contributor : Anders Bach Nielsen +#name : +# -- + \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/nxml-mode/li b/conf/emacs.d/snippets/text-mode/nxml-mode/li new file mode 100644 index 0000000..c952682 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/nxml-mode/li @@ -0,0 +1,4 @@ +#contributor : Anders Bach Nielsen +#name :
  • ...
  • +# -- +
  • $1
  • \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/nxml-mode/link b/conf/emacs.d/snippets/text-mode/nxml-mode/link new file mode 100644 index 0000000..d93b7a5 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/nxml-mode/link @@ -0,0 +1,4 @@ +#contributor : Anders Bach Nielsen +#name : +# -- + \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/nxml-mode/meta b/conf/emacs.d/snippets/text-mode/nxml-mode/meta new file mode 100644 index 0000000..dfee1f2 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/nxml-mode/meta @@ -0,0 +1,5 @@ +#contributor : Anders Bach Nielsen +#name : +#group : meta +# -- + \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/nxml-mode/name b/conf/emacs.d/snippets/text-mode/nxml-mode/name new file mode 100644 index 0000000..592d0da --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/nxml-mode/name @@ -0,0 +1,4 @@ +#contributor : Anders Bach Nielsen +#name : +# -- + \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/nxml-mode/ol b/conf/emacs.d/snippets/text-mode/nxml-mode/ol new file mode 100644 index 0000000..16cfe8d --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/nxml-mode/ol @@ -0,0 +1,6 @@ +#contributor : Anders Bach Nielsen +#name :
      ...
    +# -- +
      + $0 +
    \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/nxml-mode/p b/conf/emacs.d/snippets/text-mode/nxml-mode/p new file mode 100644 index 0000000..6845ba5 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/nxml-mode/p @@ -0,0 +1,4 @@ +#contributor : Anders Bach Nielsen +#name :

    ...

    +# -- +

    $1

    \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/nxml-mode/pre b/conf/emacs.d/snippets/text-mode/nxml-mode/pre new file mode 100644 index 0000000..d70b722 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/nxml-mode/pre @@ -0,0 +1,6 @@ +#contributor : Anders Bach Nielsen +#name :
    ...
    +# -- +
    +  $0
    +
    \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/nxml-mode/quote b/conf/emacs.d/snippets/text-mode/nxml-mode/quote new file mode 100644 index 0000000..20fed1e --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/nxml-mode/quote @@ -0,0 +1,6 @@ +#contributor : Anders Bach Nielsen +#name :
    ...
    +# -- +
    + $1 +
    \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/nxml-mode/span b/conf/emacs.d/snippets/text-mode/nxml-mode/span new file mode 100644 index 0000000..a0bba2a --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/nxml-mode/span @@ -0,0 +1,4 @@ +#contributor : Anders Bach Nielsen +#name : ... +# -- +$1 \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/nxml-mode/style b/conf/emacs.d/snippets/text-mode/nxml-mode/style new file mode 100644 index 0000000..b80be1c --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/nxml-mode/style @@ -0,0 +1,6 @@ +#contributor : Anders Bach Nielsen +#name : +# -- + \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/nxml-mode/table b/conf/emacs.d/snippets/text-mode/nxml-mode/table new file mode 100644 index 0000000..03fd119 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/nxml-mode/table @@ -0,0 +1,6 @@ +#contributor : Anders Bach Nielsen +#name : ...
    +# -- + + $0 +
    \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/nxml-mode/tag.1l b/conf/emacs.d/snippets/text-mode/nxml-mode/tag.1l new file mode 100644 index 0000000..8988635 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/nxml-mode/tag.1l @@ -0,0 +1,4 @@ +#contributor : Anders Bach Nielsen +#name : ... +# -- +<${1:tag}>$2$0 \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/nxml-mode/tag.2l b/conf/emacs.d/snippets/text-mode/nxml-mode/tag.2l new file mode 100644 index 0000000..08b4a26 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/nxml-mode/tag.2l @@ -0,0 +1,6 @@ +#contributor : Anders Bach Nielsen +#name : \n...\n +# -- +<${1:tag}> + $2 +$0 \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/nxml-mode/td b/conf/emacs.d/snippets/text-mode/nxml-mode/td new file mode 100644 index 0000000..f4615a7 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/nxml-mode/td @@ -0,0 +1,4 @@ +#contributor : Anders Bach Nielsen +#name : ... +# -- +$2 \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/nxml-mode/th b/conf/emacs.d/snippets/text-mode/nxml-mode/th new file mode 100644 index 0000000..d988b20 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/nxml-mode/th @@ -0,0 +1,4 @@ +#contributor : Anders Bach Nielsen +#name : ... +# -- +$2 \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/nxml-mode/title b/conf/emacs.d/snippets/text-mode/nxml-mode/title new file mode 100644 index 0000000..7cd238a --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/nxml-mode/title @@ -0,0 +1,4 @@ +#contributor : Anders Bach Nielsen +#name : ... +# -- +$1 \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/nxml-mode/tr b/conf/emacs.d/snippets/text-mode/nxml-mode/tr new file mode 100644 index 0000000..c72daf2 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/nxml-mode/tr @@ -0,0 +1,6 @@ +#contributor : Anders Bach Nielsen +#name : ... +# -- + + $0 + \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/nxml-mode/ul b/conf/emacs.d/snippets/text-mode/nxml-mode/ul new file mode 100644 index 0000000..dac5a66 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/nxml-mode/ul @@ -0,0 +1,6 @@ +#contributor : Anders Bach Nielsen +#name :
      ...
    +# -- +
      + $0 +
    \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/perl-mode/eval b/conf/emacs.d/snippets/text-mode/perl-mode/eval new file mode 100644 index 0000000..c1f1e1b --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/perl-mode/eval @@ -0,0 +1,8 @@ +#name : eval { ... } if ($@) { ... } +# -- +eval { + ${1:# do something risky...} +}; +if (\$@) { + ${2:# handle failure...} +} \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/perl-mode/for b/conf/emacs.d/snippets/text-mode/perl-mode/for new file mode 100644 index 0000000..ec5532f --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/perl-mode/for @@ -0,0 +1,5 @@ +#name : for (...) { ... } +# -- +for (my \$${1:var} = 0; \$$1 < ${2:expression}; \$$1++) { + ${3:# body...} +} \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/perl-mode/fore b/conf/emacs.d/snippets/text-mode/perl-mode/fore new file mode 100644 index 0000000..c878a0e --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/perl-mode/fore @@ -0,0 +1,5 @@ +#name : foreach ... { ... } +# -- +foreach my \$${1:x} (@${2:array}) { + ${3:# body...} +} \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/perl-mode/if b/conf/emacs.d/snippets/text-mode/perl-mode/if new file mode 100644 index 0000000..3191b97 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/perl-mode/if @@ -0,0 +1,5 @@ +#name : if (...) { ... } +# -- +if ($1) { + $0 +} \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/perl-mode/ife b/conf/emacs.d/snippets/text-mode/perl-mode/ife new file mode 100644 index 0000000..23f7cf6 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/perl-mode/ife @@ -0,0 +1,7 @@ +#name : if (...) { ... } else { ... } +# -- +if ($1) { + $2 +} else { + $3 +} \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/perl-mode/ifee b/conf/emacs.d/snippets/text-mode/perl-mode/ifee new file mode 100644 index 0000000..7c187d1 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/perl-mode/ifee @@ -0,0 +1,9 @@ +#name : if, elsif, else ... +# -- +if ($1) { + ${2:# body...} +} elsif ($3) { + ${4:# elsif...} +} else { + ${5:# else...} +} \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/perl-mode/sub b/conf/emacs.d/snippets/text-mode/perl-mode/sub new file mode 100644 index 0000000..5ab54d7 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/perl-mode/sub @@ -0,0 +1,5 @@ +#name : sub ... { ... } +# -- +sub ${1:function_name} { + $0 +} \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/perl-mode/unless b/conf/emacs.d/snippets/text-mode/perl-mode/unless new file mode 100644 index 0000000..baeffa2 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/perl-mode/unless @@ -0,0 +1,5 @@ +#name : unless (...) { ... } +# -- +unless ($1) { + $0 +} \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/perl-mode/while b/conf/emacs.d/snippets/text-mode/perl-mode/while new file mode 100644 index 0000000..9c2c470 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/perl-mode/while @@ -0,0 +1,5 @@ +#name : while (...) { ... } +# -- +while ($1) { + $0 +} \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/perl-mode/xfore b/conf/emacs.d/snippets/text-mode/perl-mode/xfore new file mode 100644 index 0000000..58e455d --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/perl-mode/xfore @@ -0,0 +1,3 @@ +#name : ... foreach ... +# -- +${1:expression} foreach @${2:array}; \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/perl-mode/xif b/conf/emacs.d/snippets/text-mode/perl-mode/xif new file mode 100644 index 0000000..1d4dba8 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/perl-mode/xif @@ -0,0 +1,3 @@ +#name : ... if ... +# -- +${1:expression} if ${2:condition} \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/perl-mode/xunless b/conf/emacs.d/snippets/text-mode/perl-mode/xunless new file mode 100644 index 0000000..f456db3 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/perl-mode/xunless @@ -0,0 +1,3 @@ +#name : ... unless ... +# -- +${1:expression} unless ${2:condition} \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/perl-mode/xwhile b/conf/emacs.d/snippets/text-mode/perl-mode/xwhile new file mode 100644 index 0000000..2515586 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/perl-mode/xwhile @@ -0,0 +1,3 @@ +#name : ... while ... +# -- +${1:expression} while ${2:condition}; \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/python-mode/__ b/conf/emacs.d/snippets/text-mode/python-mode/__ new file mode 100644 index 0000000..a67dc49 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/python-mode/__ @@ -0,0 +1,3 @@ +#name : __...__ +# -- +__${init}__ \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/python-mode/class b/conf/emacs.d/snippets/text-mode/python-mode/class new file mode 100644 index 0000000..72f339b --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/python-mode/class @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +# name: class +# contributor: Orestis Markou +# contributor: Nishio Hirokazu +# contributor: Yasser González Fernández +# -- +class ${1:ClassName}(${2:object}): + """$3 + """ + + def __init__(self, $4): + """$5 + ${4:$ + (let* ((indent + (concat "\n" (make-string (current-column) 32))) + (args + (mapconcat + '(lambda (x) + (if (not (string= (nth 0 x) "")) + (concat "- " (char-to-string 96) (nth 0 x) + (char-to-string 96) ":"))) + (mapcar + '(lambda (x) + (mapcar + (lambda (x) + (replace-regexp-in-string "[[:blank:]]*$" "" + (replace-regexp-in-string "^[[:blank:]]*" "" x))) x)) + (mapcar '(lambda (x) (split-string x "=")) + (split-string text ","))) + indent))) + (if (string= args "") + (make-string 3 34) + (mapconcat + 'identity + (list "" "Arguments:" args (make-string 3 34)) + indent))) + } + ${4:$ + (mapconcat + '(lambda (x) + (if (not (string= (nth 0 x) "")) + (concat "self._" (nth 0 x) " = " (nth 0 x)))) + (mapcar + '(lambda (x) + (mapcar + '(lambda (x) + (replace-regexp-in-string "[[:blank:]]*$" "" + (replace-regexp-in-string "^[[:blank:]]*" "" x))) + x)) + (mapcar '(lambda (x) (split-string x "=")) + (split-string text ","))) + (concat "\n" (make-string (current-column) 32))) + } + $0 diff --git a/conf/emacs.d/snippets/text-mode/python-mode/def b/conf/emacs.d/snippets/text-mode/python-mode/def new file mode 100644 index 0000000..f82f791 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/python-mode/def @@ -0,0 +1,35 @@ +# -*- coding: utf-8 -*- +# name: def +# contributor: Orestis Markou +# contributor: Yasser González Fernández +# -- +def ${1:name}($2): + """$3 + ${2:$ + (let* + ((indent + (concat "\n" (make-string (current-column) 32))) + (args + (mapconcat + '(lambda (x) + (if (not (string= (nth 0 x) "")) + (concat "- " (char-to-string 96) (nth 0 x) + (char-to-string 96) ":"))) + (mapcar + '(lambda (x) + (mapcar + '(lambda (x) + (replace-regexp-in-string "[[:blank:]]*$" "" + (replace-regexp-in-string "^[[:blank:]]*" "" x))) + x)) + (mapcar '(lambda (x) (split-string x "=")) + (split-string text ","))) + indent))) + (if (string= args "") + (make-string 3 34) + (mapconcat + 'identity + (list "" "Arguments:" args (make-string 3 34)) + indent))) + } + $0 diff --git a/conf/emacs.d/snippets/text-mode/python-mode/defm b/conf/emacs.d/snippets/text-mode/python-mode/defm new file mode 100644 index 0000000..dc25827 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/python-mode/defm @@ -0,0 +1,33 @@ +# -*- coding: utf-8 -*- +# name: defm +# contributor: Yasser Gonz¨¢lez Fern¨¢ndez +# -- +def ${1:name}(self, $2): + """$3 + ${2:$ + (let* ((indent + (concat "\n" (make-string (current-column) 32))) + (args + (mapconcat + '(lambda (x) + (if (not (string= (nth 0 x) "")) + (concat "- " (char-to-string 96) (nth 0 x) + (char-to-string 96) ":"))) + (mapcar + '(lambda (x) + (mapcar + '(lambda (x) + (replace-regexp-in-string "[[:blank:]]*$" "" + (replace-regexp-in-string "^[[:blank:]]*" "" x))) + x)) + (mapcar '(lambda (x) (split-string x "=")) + (split-string text ","))) + indent))) + (if (string= args "") + (make-string 3 34) + (mapconcat + 'identity + (list "" "Arguments:" args (make-string 3 34)) + indent))) + } + $0 diff --git a/conf/emacs.d/snippets/text-mode/python-mode/for b/conf/emacs.d/snippets/text-mode/python-mode/for new file mode 100644 index 0000000..84f3ddd --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/python-mode/for @@ -0,0 +1,4 @@ +#name : for ... in ... : ... +# -- +for ${var} in ${collection}: + $0 \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/python-mode/ifmain b/conf/emacs.d/snippets/text-mode/python-mode/ifmain new file mode 100644 index 0000000..6224923 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/python-mode/ifmain @@ -0,0 +1,4 @@ +#name : if __name__ == '__main__': ... +# -- +if __name__ == '__main__': + $0 \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/python-mode/prop b/conf/emacs.d/snippets/text-mode/python-mode/prop new file mode 100644 index 0000000..107730a --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/python-mode/prop @@ -0,0 +1,15 @@ +# contributor: Mads D. Kristensen +# name: prop +# -- +def ${1:foo}(): + doc = """${2:Doc string}""" + def fget(self): + return self._$1 + def fset(self, value): + self._$1 = value + def fdel(self): + del self._$1 + return locals() +$1 = property(**$1()) + +$0 diff --git a/conf/emacs.d/snippets/text-mode/python-mode/propg b/conf/emacs.d/snippets/text-mode/python-mode/propg new file mode 100644 index 0000000..7e994b6 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/python-mode/propg @@ -0,0 +1,9 @@ +#contributor : Julio Carlos Menendez +#name : _get_foo ... foo=property(...) +# -- +def _get_${1:foo}(self): + return self._$1 + +$1 = property(_get_$1) + +$0 diff --git a/conf/emacs.d/snippets/text-mode/python-mode/propsg b/conf/emacs.d/snippets/text-mode/python-mode/propsg new file mode 100644 index 0000000..e09d82a --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/python-mode/propsg @@ -0,0 +1,12 @@ +#contributor : Julio Carlos Menendez +#name : _get_foo ... _set_foo ... foo=property(...) +# -- +def _set_${1:foo}(self, value): + self._$1 = value + +def _get_$1(self): + return self._$1 + +$1 = property(_get_$1, _set_$1) + +$0 diff --git a/conf/emacs.d/snippets/text-mode/python-mode/while b/conf/emacs.d/snippets/text-mode/python-mode/while new file mode 100644 index 0000000..704dd7c --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/python-mode/while @@ -0,0 +1,4 @@ +#name : while ... : ... +# -- +while ${condition}: + $0 \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/rst-mode/chap b/conf/emacs.d/snippets/text-mode/rst-mode/chap new file mode 100644 index 0000000..6474c00 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/rst-mode/chap @@ -0,0 +1,6 @@ +#name : Chapter title +# -- +${1:Chapter} +${1:$(make-string (string-width text) ?\=)} + +$0 \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/rst-mode/sec b/conf/emacs.d/snippets/text-mode/rst-mode/sec new file mode 100644 index 0000000..76087ed --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/rst-mode/sec @@ -0,0 +1,6 @@ +#name : Section title +# -- +${1:Section} +${1:$(make-string (string-width text) ?\-)} + +$0 \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/rst-mode/tit b/conf/emacs.d/snippets/text-mode/rst-mode/tit new file mode 100644 index 0000000..cac2e77 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/rst-mode/tit @@ -0,0 +1,7 @@ +#name : Document title +# -- +${1:$(make-string (string-width text) ?\=)} +${1:Title} +${1:$(make-string (string-width text) ?\=)} + +$0 \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/ruby-mode/=b b/conf/emacs.d/snippets/text-mode/ruby-mode/=b new file mode 100644 index 0000000..22a013f --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/ruby-mode/=b @@ -0,0 +1,6 @@ +#name : =begin rdoc ... =end +#group : general +# -- +=begin rdoc + $0 +=end \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/ruby-mode/Comp b/conf/emacs.d/snippets/text-mode/ruby-mode/Comp new file mode 100644 index 0000000..03f2b35 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/ruby-mode/Comp @@ -0,0 +1,8 @@ +#name : include Comparable; def <=> ... end +#group : definitions +# -- +include Comparable + +def <=> other + $0 +end \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/ruby-mode/all b/conf/emacs.d/snippets/text-mode/ruby-mode/all new file mode 100644 index 0000000..a98a9f4 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/ruby-mode/all @@ -0,0 +1,4 @@ +#name : all? { |...| ... } +#group : collections +# -- +all? { |${e}| $0 } \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/ruby-mode/am b/conf/emacs.d/snippets/text-mode/ruby-mode/am new file mode 100644 index 0000000..7675a97 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/ruby-mode/am @@ -0,0 +1,4 @@ +#name : alias_method new, old +#group : definitions +# -- +alias_method :${new_name}, :${old_name} \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/ruby-mode/any b/conf/emacs.d/snippets/text-mode/ruby-mode/any new file mode 100644 index 0000000..d0b6dd2 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/ruby-mode/any @@ -0,0 +1,4 @@ +#name : any? { |...| ... } +#group : collections +# -- +any? { |${e}| $0 } \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/ruby-mode/app b/conf/emacs.d/snippets/text-mode/ruby-mode/app new file mode 100644 index 0000000..19bf60a --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/ruby-mode/app @@ -0,0 +1,6 @@ +#name : if __FILE__ == $PROGRAM_NAME ... end +#group : general +# -- +if __FILE__ == $PROGRAM_NAME + $0 +end \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/ruby-mode/bm b/conf/emacs.d/snippets/text-mode/ruby-mode/bm new file mode 100644 index 0000000..4789f64 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/ruby-mode/bm @@ -0,0 +1,6 @@ +#name : Benchmark.bmbm(...) do ... end +#group : general +# -- +Benchmark.bmbm(${1:10}) do |x| + $0 +end \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/ruby-mode/case b/conf/emacs.d/snippets/text-mode/ruby-mode/case new file mode 100644 index 0000000..40c3529 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/ruby-mode/case @@ -0,0 +1,7 @@ +#name : case ... end +#group : general +# -- +case ${1:object} +when ${2:condition} + $0 +end \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/ruby-mode/cla b/conf/emacs.d/snippets/text-mode/ruby-mode/cla new file mode 100644 index 0000000..81ccf45 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/ruby-mode/cla @@ -0,0 +1,6 @@ +#name : class << self ... end +#group : definitions +# -- +class << ${self} + $0 +end \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/ruby-mode/classify b/conf/emacs.d/snippets/text-mode/ruby-mode/classify new file mode 100644 index 0000000..2378afa --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/ruby-mode/classify @@ -0,0 +1,4 @@ +#name : classify { |...| ... } +#group : collections +# -- +classify { |${e}| $0 } \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/ruby-mode/cls b/conf/emacs.d/snippets/text-mode/ruby-mode/cls new file mode 100644 index 0000000..da28fb7 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/ruby-mode/cls @@ -0,0 +1,13 @@ +#name : class ... end +#contributor : hitesh +#group : definitions +# -- +class ${1:`(let ((fn (capitalize (file-name-nondirectory + (file-name-sans-extension + (or (buffer-file-name) + (buffer-name (current-buffer)))))))) + (cond + ((string-match "_" fn) (replace-match "" nil nil fn)) + (t fn)))`} + $0 +end diff --git a/conf/emacs.d/snippets/text-mode/ruby-mode/collect b/conf/emacs.d/snippets/text-mode/ruby-mode/collect new file mode 100644 index 0000000..934014a --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/ruby-mode/collect @@ -0,0 +1,4 @@ +#name : collect { |...| ... } +#group : collections +# -- +collect { |${e}| $0 } \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/ruby-mode/dee b/conf/emacs.d/snippets/text-mode/ruby-mode/dee new file mode 100644 index 0000000..56d0a18 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/ruby-mode/dee @@ -0,0 +1,4 @@ +#name : deep_copy(...) +#group : general +# -- +Marshal.load(Marshal.dump($0)) \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/ruby-mode/deli b/conf/emacs.d/snippets/text-mode/ruby-mode/deli new file mode 100644 index 0000000..843b154 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/ruby-mode/deli @@ -0,0 +1,4 @@ +#name : delete_if { |...| ... } +#group : collections +# -- +delete_if { |${e} $0 } \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/ruby-mode/det b/conf/emacs.d/snippets/text-mode/ruby-mode/det new file mode 100644 index 0000000..6a17da9 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/ruby-mode/det @@ -0,0 +1,4 @@ +#name : detect { |...| ... } +#group : collections +# -- +detect { |${e}| $0 } \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/ruby-mode/dow b/conf/emacs.d/snippets/text-mode/ruby-mode/dow new file mode 100644 index 0000000..3b65271 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/ruby-mode/dow @@ -0,0 +1,6 @@ +#name : downto(...) { |n| ... } +#group : control structure +# -- +downto(${0}) { |${n}| + $0 +} \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/ruby-mode/ea b/conf/emacs.d/snippets/text-mode/ruby-mode/ea new file mode 100644 index 0000000..9cdf8dc --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/ruby-mode/ea @@ -0,0 +1,4 @@ +#name : each { |...| ... } +#group : collections +# -- +each { |${e}| $0 } \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/ruby-mode/eac b/conf/emacs.d/snippets/text-mode/ruby-mode/eac new file mode 100644 index 0000000..f0d9cb1 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/ruby-mode/eac @@ -0,0 +1,4 @@ +#name : each_cons(...) { |...| ... } +#group : collections +# -- +each_cons(${1:2}) { |${group}| $0 } \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/ruby-mode/eai b/conf/emacs.d/snippets/text-mode/ruby-mode/eai new file mode 100644 index 0000000..5b0ed67 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/ruby-mode/eai @@ -0,0 +1,4 @@ +#name : each_index { |i| ... } +#group : collections +# -- +each_index { |${i}| $0 } \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/ruby-mode/eav b/conf/emacs.d/snippets/text-mode/ruby-mode/eav new file mode 100644 index 0000000..558e5b4 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/ruby-mode/eav @@ -0,0 +1,4 @@ +#name : each_value { |val| ... } +#group : collections +# -- +each_value { |${val}| $0 } \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/ruby-mode/eawi b/conf/emacs.d/snippets/text-mode/ruby-mode/eawi new file mode 100644 index 0000000..edf8418 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/ruby-mode/eawi @@ -0,0 +1,4 @@ +#name : each_with_index { |e, i| ... } +#group : collections +# -- +each_with_index { |${e}, ${i}| $0 } \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/ruby-mode/forin b/conf/emacs.d/snippets/text-mode/ruby-mode/forin new file mode 100644 index 0000000..36b4387 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/ruby-mode/forin @@ -0,0 +1,6 @@ +#name : for ... in ...; ... end +#group : control structure +# -- +for ${1:element} in ${2:collection} + $0 +end \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/ruby-mode/if b/conf/emacs.d/snippets/text-mode/ruby-mode/if new file mode 100644 index 0000000..077b097 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/ruby-mode/if @@ -0,0 +1,6 @@ +#name : if ... end +#group : control structure +# -- +if ${1:condition} + $0 +end \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/ruby-mode/ife b/conf/emacs.d/snippets/text-mode/ruby-mode/ife new file mode 100644 index 0000000..e57d395 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/ruby-mode/ife @@ -0,0 +1,8 @@ +#name : if ... else ... end +#group : control structure +# -- +if ${1:condition} + $2 +else + $3 +end \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/ruby-mode/inject b/conf/emacs.d/snippets/text-mode/ruby-mode/inject new file mode 100644 index 0000000..37932e5 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/ruby-mode/inject @@ -0,0 +1,4 @@ +#name : inject(...) { |...| ... } +#group : collections +# -- +inject(${1:0}) { |${2:injection}, ${3:element}| $0 } \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/ruby-mode/mm b/conf/emacs.d/snippets/text-mode/ruby-mode/mm new file mode 100644 index 0000000..3f62b10 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/ruby-mode/mm @@ -0,0 +1,6 @@ +#name : def method_missing ... end +#group : definitions +# -- +def method_missing(method, *args) + $0 +end \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/ruby-mode/r b/conf/emacs.d/snippets/text-mode/ruby-mode/r new file mode 100644 index 0000000..2e7b797 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/ruby-mode/r @@ -0,0 +1,4 @@ +#name : attr_reader ... +#group : definitions +# -- +attr_reader : \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/ruby-mode/rb b/conf/emacs.d/snippets/text-mode/ruby-mode/rb new file mode 100644 index 0000000..74d26dd --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/ruby-mode/rb @@ -0,0 +1,4 @@ +#name : /usr/bin/ruby -wKU +#group : general +# -- +#!/usr/bin/ruby -wKU diff --git a/conf/emacs.d/snippets/text-mode/ruby-mode/reject b/conf/emacs.d/snippets/text-mode/ruby-mode/reject new file mode 100644 index 0000000..c2501bc --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/ruby-mode/reject @@ -0,0 +1,4 @@ +#name : reject { |...| ... } +#group : collections +# -- +reject { |${1:element}| $0 } \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/ruby-mode/req b/conf/emacs.d/snippets/text-mode/ruby-mode/req new file mode 100644 index 0000000..3e001ec --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/ruby-mode/req @@ -0,0 +1,4 @@ +#name : require "..." +#group : general +# -- +require "$0" \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/ruby-mode/rreq b/conf/emacs.d/snippets/text-mode/ruby-mode/rreq new file mode 100644 index 0000000..0b9c6a4 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/ruby-mode/rreq @@ -0,0 +1,4 @@ +#name : require File.join(File.dirname(__FILE__), ...) +#group : general +# -- +require File.join(File.dirname(__FILE__), $0) \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/ruby-mode/rw b/conf/emacs.d/snippets/text-mode/ruby-mode/rw new file mode 100644 index 0000000..a364675 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/ruby-mode/rw @@ -0,0 +1,4 @@ +#name : attr_accessor ... +#group : definitions +# -- +attr_accessor : \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/ruby-mode/select b/conf/emacs.d/snippets/text-mode/ruby-mode/select new file mode 100644 index 0000000..78bca8f --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/ruby-mode/select @@ -0,0 +1,4 @@ +#name : select { |...| ... } +#group : collections +# -- +select { |${1:element}| $0 } \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/ruby-mode/tim b/conf/emacs.d/snippets/text-mode/ruby-mode/tim new file mode 100644 index 0000000..0da115f --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/ruby-mode/tim @@ -0,0 +1,4 @@ +#name : times { |n| ... } +#group : control structure +# -- +times { |${n}| $0 } \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/ruby-mode/until b/conf/emacs.d/snippets/text-mode/ruby-mode/until new file mode 100644 index 0000000..476966a --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/ruby-mode/until @@ -0,0 +1,6 @@ +#name : until ... end +#group: control structure +# -- +until ${condition} + $0 +end \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/ruby-mode/upt b/conf/emacs.d/snippets/text-mode/ruby-mode/upt new file mode 100644 index 0000000..6fc6810 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/ruby-mode/upt @@ -0,0 +1,6 @@ +#name : upto(...) { |n| ... } +#group : control structure +# -- +upto(${n}) { |${i}| + $0 +} \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/ruby-mode/w b/conf/emacs.d/snippets/text-mode/ruby-mode/w new file mode 100644 index 0000000..9edbfcb --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/ruby-mode/w @@ -0,0 +1,4 @@ +#name : attr_writer ... +#group : definitions +# -- +attr_writer : \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/ruby-mode/when b/conf/emacs.d/snippets/text-mode/ruby-mode/when new file mode 100644 index 0000000..9b06f21 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/ruby-mode/when @@ -0,0 +1,6 @@ +#name : when ... end +#group : control structure +# -- +when ${condition} + $0 +end \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/ruby-mode/while b/conf/emacs.d/snippets/text-mode/ruby-mode/while new file mode 100644 index 0000000..4c9ad35 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/ruby-mode/while @@ -0,0 +1,6 @@ +#name : while ... end +#group : control structure +# -- +while ${condition} + $0 +end \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/ruby-mode/y b/conf/emacs.d/snippets/text-mode/ruby-mode/y new file mode 100644 index 0000000..0ddf0f9 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/ruby-mode/y @@ -0,0 +1,4 @@ +#name : :yields: arguments (rdoc) +#group : general +# -- +:yields: $0 \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/ruby-mode/zip b/conf/emacs.d/snippets/text-mode/ruby-mode/zip new file mode 100644 index 0000000..56f4266 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/ruby-mode/zip @@ -0,0 +1,4 @@ +#name : zip(...) { |...| ... } +#group : collections +# -- +zip(${enums}) { |${row}| $0 } \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/scala-mode/act b/conf/emacs.d/snippets/text-mode/scala-mode/act new file mode 100644 index 0000000..fce52fc --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/scala-mode/act @@ -0,0 +1,10 @@ +#Author : Jonas Bonèr +#name : def act = { ..} +# -- +def act = { + loop { + react { + $0 + } + } +} \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/scala-mode/act.arg b/conf/emacs.d/snippets/text-mode/scala-mode/act.arg new file mode 100644 index 0000000..fc6df9e --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/scala-mode/act.arg @@ -0,0 +1,10 @@ +#Author : Jonas Bonèr +#name : def act(arg: T) = { ..} +# -- +def act(${1:arg}: ${2:type}) = { + loop { + react { + $0 + } + } +} \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/scala-mode/actor b/conf/emacs.d/snippets/text-mode/scala-mode/actor new file mode 100644 index 0000000..d38a183 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/scala-mode/actor @@ -0,0 +1,10 @@ +#Author : Jonas Bonèr +#name : val a = actor { ..} +# -- +val a = actor { + loop { + react { + $0 + } + } +} \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/scala-mode/ano b/conf/emacs.d/snippets/text-mode/scala-mode/ano new file mode 100644 index 0000000..b949801 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/scala-mode/ano @@ -0,0 +1,4 @@ +#Author : Jonas Bonèr +#name : (args) => ... +# -- +($1) => ${2:body} $0 \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/scala-mode/app b/conf/emacs.d/snippets/text-mode/scala-mode/app new file mode 100644 index 0000000..b89bab9 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/scala-mode/app @@ -0,0 +1,6 @@ +#Author : Anders Bach Nielsen +#name : object name extends Application +# -- +object ${1:name} extends Application { + $0 +} \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/scala-mode/arr.new b/conf/emacs.d/snippets/text-mode/scala-mode/arr.new new file mode 100644 index 0000000..e3297ca --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/scala-mode/arr.new @@ -0,0 +1,4 @@ +#Author : Jonas Bonèr +#name : Array[T](..) +# -- +Array[${1:value}](${2:args}) $0 \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/scala-mode/arr.val-new b/conf/emacs.d/snippets/text-mode/scala-mode/arr.val-new new file mode 100644 index 0000000..4de4720 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/scala-mode/arr.val-new @@ -0,0 +1,4 @@ +#Author : Jonas Bonèr +#name : val a = Array[T](..) +# -- +val ${1:arr} = Array[${2:value}](${3:args}) $0 \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/scala-mode/asof b/conf/emacs.d/snippets/text-mode/scala-mode/asof new file mode 100644 index 0000000..3b2b209 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/scala-mode/asof @@ -0,0 +1,4 @@ +#Author : Jonas Bonèr +#name : asInstanceOf[T] +# -- +asInstanceOf[${1:type}] $0 \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/scala-mode/ass b/conf/emacs.d/snippets/text-mode/scala-mode/ass new file mode 100644 index 0000000..653dcef --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/scala-mode/ass @@ -0,0 +1,4 @@ +#Author : Jonas Bonèr +#name : assert(x === y) +# -- +assert(${1:x} === ${2:y}) $0 \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/scala-mode/ass.true b/conf/emacs.d/snippets/text-mode/scala-mode/ass.true new file mode 100644 index 0000000..923c518 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/scala-mode/ass.true @@ -0,0 +1,4 @@ +#Author : Jonas Bonèr +#name : assert(true) +# -- +assert(true) $0 \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/scala-mode/at.author b/conf/emacs.d/snippets/text-mode/scala-mode/at.author new file mode 100644 index 0000000..82fe4cc --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/scala-mode/at.author @@ -0,0 +1,4 @@ +#Author : Anders Bach Nielsen +#name : @author name +# -- +@author ${1:name} $0 \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/scala-mode/at.param b/conf/emacs.d/snippets/text-mode/scala-mode/at.param new file mode 100644 index 0000000..72b6e79 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/scala-mode/at.param @@ -0,0 +1,4 @@ +#Author : Anders Bach Nielsen +#name : @param name description +# -- +@param ${1:name} ${2:description} $0 \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/scala-mode/at.return b/conf/emacs.d/snippets/text-mode/scala-mode/at.return new file mode 100644 index 0000000..9c3f41c --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/scala-mode/at.return @@ -0,0 +1,4 @@ +#Author : Anders Bach Nielsen +#name : @return description +# -- +@return ${1:description} $0 \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/scala-mode/at.version b/conf/emacs.d/snippets/text-mode/scala-mode/at.version new file mode 100644 index 0000000..1158ce2 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/scala-mode/at.version @@ -0,0 +1,4 @@ +#Author : Anders Bach Nielsen +#name : @version number +# -- +@version ${1:0.1} $0 \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/scala-mode/bang b/conf/emacs.d/snippets/text-mode/scala-mode/bang new file mode 100644 index 0000000..a547da8 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/scala-mode/bang @@ -0,0 +1,4 @@ +#Author : Jonas Bonèr +#name : actor ! message +# -- +${1:actor} ! ${2:message} $0 \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/scala-mode/case b/conf/emacs.d/snippets/text-mode/scala-mode/case new file mode 100644 index 0000000..13d6aec --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/scala-mode/case @@ -0,0 +1,4 @@ +#Author : Jonas Bonèr +#name : case pattern => +# -- +case ${1:pattern} => $0 \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/scala-mode/case.match-all b/conf/emacs.d/snippets/text-mode/scala-mode/case.match-all new file mode 100644 index 0000000..028bf5f --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/scala-mode/case.match-all @@ -0,0 +1,4 @@ +#Author : Jonas Bonèr +#name : case _ => +# -- +case _ => $0 \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/scala-mode/cast b/conf/emacs.d/snippets/text-mode/scala-mode/cast new file mode 100644 index 0000000..3b2b209 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/scala-mode/cast @@ -0,0 +1,4 @@ +#Author : Jonas Bonèr +#name : asInstanceOf[T] +# -- +asInstanceOf[${1:type}] $0 \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/scala-mode/cc b/conf/emacs.d/snippets/text-mode/scala-mode/cc new file mode 100644 index 0000000..7ed1142 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/scala-mode/cc @@ -0,0 +1,4 @@ +#Author : Jonas Bonèr +#name : case class T(arg: A) +# -- +case class ${1:name}(${2:arg}: ${3:type}) $0 \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/scala-mode/cl b/conf/emacs.d/snippets/text-mode/scala-mode/cl new file mode 100644 index 0000000..1fd712c --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/scala-mode/cl @@ -0,0 +1,6 @@ +#Author : Jonas Bonèr +#name : class T { .. } +# -- +class ${1:name} { + $0 +} \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/scala-mode/cl.abs b/conf/emacs.d/snippets/text-mode/scala-mode/cl.abs new file mode 100644 index 0000000..402dec7 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/scala-mode/cl.abs @@ -0,0 +1,6 @@ +#Author : Jonas Bonèr +#name : abstract class T { .. } +# -- +abstract class ${1:name} { + $0 +} \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/scala-mode/cl.abs-arg b/conf/emacs.d/snippets/text-mode/scala-mode/cl.abs-arg new file mode 100644 index 0000000..fe29524 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/scala-mode/cl.abs-arg @@ -0,0 +1,6 @@ +#Author : Jonas Bonèr +#name : abstract class T(args) { .. } +# -- +abstract class ${1:name}(${2:args}) { + $0 +} \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/scala-mode/cl.arg b/conf/emacs.d/snippets/text-mode/scala-mode/cl.arg new file mode 100644 index 0000000..f82460f --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/scala-mode/cl.arg @@ -0,0 +1,6 @@ +#Author : Jonas Bonèr +#name : class T(args) { .. } +# -- +class ${1:name}(${2:args}) { + $0 +} \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/scala-mode/clof b/conf/emacs.d/snippets/text-mode/scala-mode/clof new file mode 100644 index 0000000..955726c --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/scala-mode/clof @@ -0,0 +1,4 @@ +#Author : Jonas Bonèr +#name : classOf[T] +# -- +classOf[${1:type}] $0 \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/scala-mode/co b/conf/emacs.d/snippets/text-mode/scala-mode/co new file mode 100644 index 0000000..75b1f3b --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/scala-mode/co @@ -0,0 +1,4 @@ +#Author : Jonas Bonèr +#name : case object T +# -- +case object ${1:name} $0 \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/scala-mode/cons b/conf/emacs.d/snippets/text-mode/scala-mode/cons new file mode 100644 index 0000000..a48e4ff --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/scala-mode/cons @@ -0,0 +1,4 @@ +#Author : Jonas Bonèr +#name : element1 :: element2 +# -- +${1:element1} :: ${2:element2} $0 \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/scala-mode/cons.nil b/conf/emacs.d/snippets/text-mode/scala-mode/cons.nil new file mode 100644 index 0000000..c288f93 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/scala-mode/cons.nil @@ -0,0 +1,4 @@ +#Author : Jonas Bonèr +#name : element1 :: Nil +# -- +${1:element1} :: Nil $0 diff --git a/conf/emacs.d/snippets/text-mode/scala-mode/def.arg b/conf/emacs.d/snippets/text-mode/scala-mode/def.arg new file mode 100644 index 0000000..7765bbf --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/scala-mode/def.arg @@ -0,0 +1,4 @@ +#Author : Jonas Bonèr +#name : def f(arg: T) = ... +# -- +def ${1:name}(${2:args}) = $0 \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/scala-mode/def.arg-body b/conf/emacs.d/snippets/text-mode/scala-mode/def.arg-body new file mode 100644 index 0000000..e6e278e --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/scala-mode/def.arg-body @@ -0,0 +1,6 @@ +#Author : Jonas Bonèr +#name : def f(arg: T) = {...} +# -- +def ${1:name}(${2:args}) = { + $0 +} \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/scala-mode/def.arg-ret b/conf/emacs.d/snippets/text-mode/scala-mode/def.arg-ret new file mode 100644 index 0000000..dddb9ce --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/scala-mode/def.arg-ret @@ -0,0 +1,4 @@ +#Author : Jonas Bonèr +#name : def f(arg: T): R = ... +# -- +def ${1:name}(${2:args}): ${3:Unit} = $0 \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/scala-mode/def.arg-ret-body b/conf/emacs.d/snippets/text-mode/scala-mode/def.arg-ret-body new file mode 100644 index 0000000..862f7fd --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/scala-mode/def.arg-ret-body @@ -0,0 +1,6 @@ +#Author : Jonas Bonèr +#name : def f(arg: T): R = {...} +# -- +def ${1:name}(${2:args}): ${3:Unit} = { + $0 +} \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/scala-mode/def.body b/conf/emacs.d/snippets/text-mode/scala-mode/def.body new file mode 100644 index 0000000..858908c --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/scala-mode/def.body @@ -0,0 +1,6 @@ +#Author : Jonas Bonèr +#name : def f = {...} +# -- +def ${1:name} = { + $0 +} \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/scala-mode/def.ret b/conf/emacs.d/snippets/text-mode/scala-mode/def.ret new file mode 100644 index 0000000..e5483fb --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/scala-mode/def.ret @@ -0,0 +1,4 @@ +#Author : Jonas Bonèr +#name : def f: R = ... +# -- +def ${1:name}: ${2:Unit} = $0 \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/scala-mode/def.ret-body b/conf/emacs.d/snippets/text-mode/scala-mode/def.ret-body new file mode 100644 index 0000000..f342e04 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/scala-mode/def.ret-body @@ -0,0 +1,6 @@ +#Author : Jonas Bonèr +#name : def f: R = {...} +# -- +def ${1:name}: ${3:Unit} = { + $0 +} \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/scala-mode/def.simple b/conf/emacs.d/snippets/text-mode/scala-mode/def.simple new file mode 100644 index 0000000..4814c73 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/scala-mode/def.simple @@ -0,0 +1,4 @@ +#Author : Jonas Bonèr +#name : def f = ... +# -- +def ${1:name} = $0 \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/scala-mode/doc.class b/conf/emacs.d/snippets/text-mode/scala-mode/doc.class new file mode 100644 index 0000000..60442f1 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/scala-mode/doc.class @@ -0,0 +1,8 @@ +#Author : Anders Bach Nielsen +#name : /** cls/trt/obj name */ +# -- +/** + * `(scala-mode-find-clstrtobj-name-doc)` + * ${1:description} + * $0 + */ \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/scala-mode/doc.def b/conf/emacs.d/snippets/text-mode/scala-mode/doc.def new file mode 100644 index 0000000..8a3d614 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/scala-mode/doc.def @@ -0,0 +1,6 @@ +#Author : Anders Bach Nielsen +#name : /** method name */ +# -- +/** + * `(scala-mode-def-and-args-doc)` + */ \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/scala-mode/doc.file b/conf/emacs.d/snippets/text-mode/scala-mode/doc.file new file mode 100644 index 0000000..7da4289 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/scala-mode/doc.file @@ -0,0 +1,9 @@ +#Author : Anders Bach Nielsen +#name : /** file name */ +# -- +/** + * `(scala-mode-file-doc)` + * $0 + * @author ${1:name} + * @version ${2:0.1} + */ \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/scala-mode/doc.file-scala b/conf/emacs.d/snippets/text-mode/scala-mode/doc.file-scala new file mode 100644 index 0000000..6719348 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/scala-mode/doc.file-scala @@ -0,0 +1,16 @@ +#Author : Anders Bach Nielsen +#name : /** scala file */ +# -- +/* __ *\ +** ________ ___ / / ___ Scala $3 ** +** / __/ __// _ | / / / _ | (c) 2005-`(format-time-string "%Y")` , LAMP/EPFL ** +** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** +** /____/\___/_/ |_/____/_/ | | ** +** |/ ** +\* */ +/** + * $0 + * @author ${1:name} + * @version ${2:0.1} + * $Id$ + */ \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/scala-mode/doc.file-scala-api b/conf/emacs.d/snippets/text-mode/scala-mode/doc.file-scala-api new file mode 100644 index 0000000..4a762f5 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/scala-mode/doc.file-scala-api @@ -0,0 +1,16 @@ +#Author : Anders Bach Nielsen +#name : /** scala api file */ +# -- +/* __ *\ +** ________ ___ / / ___ Scala API ** +** / __/ __// _ | / / / _ | (c) 2005-`(format-time-string "%Y")`, LAMP/EPFL ** +** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** +** /____/\___/_/ |_/____/_/ | | ** +** |/ ** +\* */ +/** + * $0 + * @author ${1:name} + * @version ${2:0.1} + * $Id$ + */ \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/scala-mode/doc.scaladoc b/conf/emacs.d/snippets/text-mode/scala-mode/doc.scaladoc new file mode 100644 index 0000000..038428c --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/scala-mode/doc.scaladoc @@ -0,0 +1,7 @@ +#Author : Anders Bach Nielsen +#name : /** ... */ +# -- +/** + * ${1:description} + * $0 + */ \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/scala-mode/expect b/conf/emacs.d/snippets/text-mode/scala-mode/expect new file mode 100644 index 0000000..94c742c --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/scala-mode/expect @@ -0,0 +1,6 @@ +#Author : Jonas Bonèr +#name : expect(value) { ..} +# -- +expect(${1:reply}) { + $0 +} \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/scala-mode/ext b/conf/emacs.d/snippets/text-mode/scala-mode/ext new file mode 100644 index 0000000..e256317 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/scala-mode/ext @@ -0,0 +1,4 @@ +#Author : Jonas Bonèr +#name : extends T +# -- +extends $0 \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/scala-mode/for.extract b/conf/emacs.d/snippets/text-mode/scala-mode/for.extract new file mode 100644 index 0000000..60f1155 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/scala-mode/for.extract @@ -0,0 +1,4 @@ +#Author : Jonas Bonèr +#name : x <- xs +# -- +${1:x} <- ${2:xs} \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/scala-mode/for.if b/conf/emacs.d/snippets/text-mode/scala-mode/for.if new file mode 100644 index 0000000..f44c544 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/scala-mode/for.if @@ -0,0 +1,6 @@ +#Author : Jonas Bonèr +#name : for (x <- xs if guard) { ... } +# -- +for (${1:x} <- ${2:xs} if ${3:guard}) { + $0 +} \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/scala-mode/for.loop b/conf/emacs.d/snippets/text-mode/scala-mode/for.loop new file mode 100644 index 0000000..050d5e8 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/scala-mode/for.loop @@ -0,0 +1,6 @@ +#Author : Jonas Bonèr +#name : for (x <- xs) { ... } +# -- +for (${1:x} <- ${2:xs}) { + $0 +} \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/scala-mode/for.multi b/conf/emacs.d/snippets/text-mode/scala-mode/for.multi new file mode 100644 index 0000000..c512067 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/scala-mode/for.multi @@ -0,0 +1,9 @@ +#Author : Jonas Bonèr +#name : for {x <- xs \ y <- ys} { yield } +# -- +for { + ${1:x} <- ${2:xs} + ${3:x} <- ${4:xs} +} { + yield $0 +} \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/scala-mode/foreach b/conf/emacs.d/snippets/text-mode/scala-mode/foreach new file mode 100644 index 0000000..cafdd00 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/scala-mode/foreach @@ -0,0 +1,4 @@ +#Author : Jonas Bonèr +#name : foreach(x => ..) +# -- +foreach(${1:x} => ${2:body}) $0 \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/scala-mode/hmap.new b/conf/emacs.d/snippets/text-mode/scala-mode/hmap.new new file mode 100644 index 0000000..dd564a0 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/scala-mode/hmap.new @@ -0,0 +1,4 @@ +#Author : Jonas Bonèr +#name : new HashMap[K, V] +# -- +new HashMap[${1:key}, ${2:value}] $0 \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/scala-mode/hmap.val-new b/conf/emacs.d/snippets/text-mode/scala-mode/hmap.val-new new file mode 100644 index 0000000..2f4a3c2 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/scala-mode/hmap.val-new @@ -0,0 +1,4 @@ +#Author : Jonas Bonèr +#name : val m = new HashMap[K, V] +# -- +val ${1:m} = new HashMap[${2:key}, ${3:value}] $0 \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/scala-mode/hset.new b/conf/emacs.d/snippets/text-mode/scala-mode/hset.new new file mode 100644 index 0000000..d1be3ee --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/scala-mode/hset.new @@ -0,0 +1,4 @@ +#Author : Jonas Bonèr +#name : new HashSet[K] +# -- +new HashSet[${1:key}] $0 diff --git a/conf/emacs.d/snippets/text-mode/scala-mode/hset.val-new b/conf/emacs.d/snippets/text-mode/scala-mode/hset.val-new new file mode 100644 index 0000000..ba792a2 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/scala-mode/hset.val-new @@ -0,0 +1,4 @@ +#Author : Jonas Bonèr +#name : val m = new HashSet[K] +# -- +val ${1:m} = new HashSet[${2:key}] $0 \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/scala-mode/if b/conf/emacs.d/snippets/text-mode/scala-mode/if new file mode 100644 index 0000000..24891c0 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/scala-mode/if @@ -0,0 +1,6 @@ +#Author : Jonas Bonèr +#name : if (cond) { .. } +# -- +if (${1:condition}) { + $0 +} \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/scala-mode/if.else b/conf/emacs.d/snippets/text-mode/scala-mode/if.else new file mode 100644 index 0000000..ebff471 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/scala-mode/if.else @@ -0,0 +1,8 @@ +#Author : Jonas Bonèr +#name : if (cond) { .. } else { .. } +# -- +if (${1:condition}) { + $2 +} else { + $0 +} \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/scala-mode/imp b/conf/emacs.d/snippets/text-mode/scala-mode/imp new file mode 100644 index 0000000..cf5efa1 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/scala-mode/imp @@ -0,0 +1,4 @@ +#Author : Jonas Bonèr +#name : import .. +# -- +import $0 \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/scala-mode/intercept b/conf/emacs.d/snippets/text-mode/scala-mode/intercept new file mode 100644 index 0000000..4725eaa --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/scala-mode/intercept @@ -0,0 +1,6 @@ +#Author : Jonas Bonèr +#name : intercept(classOf[T]) { ..} +# -- +intercept(classOf[${1:Exception]}) { + $0 +} \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/scala-mode/isof b/conf/emacs.d/snippets/text-mode/scala-mode/isof new file mode 100644 index 0000000..a3538c8 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/scala-mode/isof @@ -0,0 +1,4 @@ +#Author : Jonas Bonèr +#name : isInstanceOf[T] +# -- +isInstanceOf[${1:type}] $0 \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/scala-mode/ls.new b/conf/emacs.d/snippets/text-mode/scala-mode/ls.new new file mode 100644 index 0000000..7a28e61 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/scala-mode/ls.new @@ -0,0 +1,4 @@ +#Author : Jonas Bonèr +#name : List(..) +# -- +List(${1:args}, ${2:args}) $0 \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/scala-mode/ls.val-new b/conf/emacs.d/snippets/text-mode/scala-mode/ls.val-new new file mode 100644 index 0000000..37138f0 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/scala-mode/ls.val-new @@ -0,0 +1,4 @@ +#Author : Jonas Bonèr +#name : val l = List(..) +# -- +val ${1:l} = List(${2:args}, ${3:args}) $0 \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/scala-mode/main b/conf/emacs.d/snippets/text-mode/scala-mode/main new file mode 100644 index 0000000..ad314b3 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/scala-mode/main @@ -0,0 +1,6 @@ +#Author : Jonas Bonèr +#name: def main(args: Array[String]) = { ... } +# -- +def main(args: Array[String]) = { + $0 +} \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/scala-mode/map b/conf/emacs.d/snippets/text-mode/scala-mode/map new file mode 100644 index 0000000..17322a5 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/scala-mode/map @@ -0,0 +1,4 @@ +#Author : Jonas Bonèr +#name : map(x => ..) +# -- +map(${1:x} => ${2:body}) $0 \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/scala-mode/map.new b/conf/emacs.d/snippets/text-mode/scala-mode/map.new new file mode 100644 index 0000000..21c95fb --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/scala-mode/map.new @@ -0,0 +1,4 @@ +#Author : Jonas Bonèr +#name : Map(key -> value) +# -- +Map(${1:key} -> ${2:value}) $0 \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/scala-mode/match b/conf/emacs.d/snippets/text-mode/scala-mode/match new file mode 100644 index 0000000..e85fac1 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/scala-mode/match @@ -0,0 +1,6 @@ +#Author : Jonas Bonèr +#name : cc match { .. } +# -- +${1:cc} match { + case ${2:pattern} => $0 +} \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/scala-mode/match.can b/conf/emacs.d/snippets/text-mode/scala-mode/match.can new file mode 100644 index 0000000..77d475b --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/scala-mode/match.can @@ -0,0 +1,11 @@ +#Author : Jonas Bonèr +#name : can match { case Full(res) => .. } +# -- +${1:option} match { + case Full(res) => $0 + + case Empty => + + case Failure(msg, _, _) => + +} \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/scala-mode/match.option b/conf/emacs.d/snippets/text-mode/scala-mode/match.option new file mode 100644 index 0000000..5b098f1 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/scala-mode/match.option @@ -0,0 +1,8 @@ +#Author : Jonas Bonèr +#name : option match { case None => .. } +# -- +${1:option} match { + case None => $0 + case Some(res) => + +} \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/scala-mode/mix b/conf/emacs.d/snippets/text-mode/scala-mode/mix new file mode 100644 index 0000000..5261e32 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/scala-mode/mix @@ -0,0 +1,6 @@ +#Author : Jonas Bonèr +#name : trait T { .. } +# -- +trait ${1:name} { + $0 +} \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/scala-mode/ob b/conf/emacs.d/snippets/text-mode/scala-mode/ob new file mode 100644 index 0000000..efbc82e --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/scala-mode/ob @@ -0,0 +1,4 @@ +#Author : Jonas Bonèr +#name : object name extends T +# -- +object ${1:name} extends ${2:type} $0 \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/scala-mode/pac b/conf/emacs.d/snippets/text-mode/scala-mode/pac new file mode 100644 index 0000000..ed32216 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/scala-mode/pac @@ -0,0 +1,4 @@ +#Author : Jonas Bonèr +#name : package .. +# -- +package $0 \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/scala-mode/pr.newline b/conf/emacs.d/snippets/text-mode/scala-mode/pr.newline new file mode 100644 index 0000000..77088cb --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/scala-mode/pr.newline @@ -0,0 +1,4 @@ +#Author : Jonas Bonèr +#name : println(..) +# -- +println(${1:obj}) $0 \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/scala-mode/pr.simple b/conf/emacs.d/snippets/text-mode/scala-mode/pr.simple new file mode 100644 index 0000000..3a73f9d --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/scala-mode/pr.simple @@ -0,0 +1,4 @@ +#Author : Jonas Bonèr +#name : print(..) +# -- +print(${1:obj}) $0 \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/scala-mode/pr.string b/conf/emacs.d/snippets/text-mode/scala-mode/pr.string new file mode 100644 index 0000000..9c06ef7 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/scala-mode/pr.string @@ -0,0 +1,4 @@ +#Author : Jonas Bonèr +#name : println("..") +# -- +println("${1:msg}") $0 \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/scala-mode/pr.trace b/conf/emacs.d/snippets/text-mode/scala-mode/pr.trace new file mode 100644 index 0000000..9a0579c --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/scala-mode/pr.trace @@ -0,0 +1,4 @@ +#Author : Jonas Bonèr +#name : println("obj: " + obj) +# -- +println("${1:obj}: " + ${1:obj}) $0 \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/scala-mode/pri b/conf/emacs.d/snippets/text-mode/scala-mode/pri new file mode 100644 index 0000000..643ef2c --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/scala-mode/pri @@ -0,0 +1,4 @@ +#Author : Jonas Bonèr +#name : private +# -- +private $0 \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/scala-mode/pri.param b/conf/emacs.d/snippets/text-mode/scala-mode/pri.param new file mode 100644 index 0000000..e53638a --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/scala-mode/pri.param @@ -0,0 +1,4 @@ +#Author : Jonas Bonèr +#name : private[this] +# -- +private[${1:this}] $0 \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/scala-mode/pro b/conf/emacs.d/snippets/text-mode/scala-mode/pro new file mode 100644 index 0000000..e4b7b59 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/scala-mode/pro @@ -0,0 +1,4 @@ +#Author : Jonas Bonèr +#name : protected +# -- +protected $0 \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/scala-mode/pro.param b/conf/emacs.d/snippets/text-mode/scala-mode/pro.param new file mode 100644 index 0000000..712b050 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/scala-mode/pro.param @@ -0,0 +1,4 @@ +#Author : Jonas Bonèr +#name : protected[this] +# -- +protected[${1:this}] $0 \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/scala-mode/suite b/conf/emacs.d/snippets/text-mode/scala-mode/suite new file mode 100644 index 0000000..a65cea7 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/scala-mode/suite @@ -0,0 +1,8 @@ +#Author : Jonas Bonèr +#name : class T extends Suite { .. } +# -- +import org.scalatest._ + +class ${1:name} extends Suite { + $0 +} \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/scala-mode/test b/conf/emacs.d/snippets/text-mode/scala-mode/test new file mode 100644 index 0000000..c4d13f6 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/scala-mode/test @@ -0,0 +1,7 @@ +#Author : Jonas Bonèr +#name : @Test def testX = ... +# -- +//@Test +def test${1:name} = { + $0 +} \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/scala-mode/throw b/conf/emacs.d/snippets/text-mode/scala-mode/throw new file mode 100644 index 0000000..f9a4932 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/scala-mode/throw @@ -0,0 +1,4 @@ +#Author : Jonas Bonèr +#name : throw new Exception +# -- +throw new ${1:Exception}(${2:msg}) $0 \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/scala-mode/tr b/conf/emacs.d/snippets/text-mode/scala-mode/tr new file mode 100644 index 0000000..68d8162 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/scala-mode/tr @@ -0,0 +1,6 @@ +#Author : Anders Bach Nielsen +#name : trait T { .. } +# -- +trait ${1:name} { + $0 +} \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/scala-mode/tr.ext b/conf/emacs.d/snippets/text-mode/scala-mode/tr.ext new file mode 100644 index 0000000..2b82154 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/scala-mode/tr.ext @@ -0,0 +1,6 @@ +#Author : Anders Bach Nielsen +#name : trait T extends C { .. } +# -- +trait ${1:name} extends ${2:class} { + $0 +} \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/scala-mode/tr.ext-with b/conf/emacs.d/snippets/text-mode/scala-mode/tr.ext-with new file mode 100644 index 0000000..8edb409 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/scala-mode/tr.ext-with @@ -0,0 +1,6 @@ +#Author : Anders Bach Nielsen +#name : trait T1 extends C with T2 { .. } +# -- +trait ${1:name} extends ${2:class} with ${3:trait} { + $0 +} \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/scala-mode/tr.with b/conf/emacs.d/snippets/text-mode/scala-mode/tr.with new file mode 100644 index 0000000..19801eb --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/scala-mode/tr.with @@ -0,0 +1,6 @@ +#Author : Anders Bach Nielsen +#name : trait T1 with T2 { .. } +# -- +trait ${1:name} with ${2:trait} { + $0 +} \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/scala-mode/try b/conf/emacs.d/snippets/text-mode/scala-mode/try new file mode 100644 index 0000000..0c33f10 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/scala-mode/try @@ -0,0 +1,9 @@ +#Author : Jonas Bonèr +#name : try { .. } catch { case e => ..} +# -- +try { + $0 +} catch { + case ${1:e}: ${2:Exception} => + ${1:println(\"ERROR: \" + e) // TODO: handle exception}\n} +} \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/scala-mode/try.catch-finally b/conf/emacs.d/snippets/text-mode/scala-mode/try.catch-finally new file mode 100644 index 0000000..f146a20 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/scala-mode/try.catch-finally @@ -0,0 +1,11 @@ +#Author : Jonas Bonèr +#name : try { .. } catch { case e => ..} finally { ..} +# -- +try { + $0 +} catch { + case ${1:e}: ${2:Exception} => + ${1:println(\"ERROR: \" + e) // TODO: handle exception}\n} +} finally { + +} \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/scala-mode/try.finally b/conf/emacs.d/snippets/text-mode/scala-mode/try.finally new file mode 100644 index 0000000..63625f2 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/scala-mode/try.finally @@ -0,0 +1,8 @@ +#Author : Jonas Bonèr +#name : try { .. } finally { .. } +# -- +try { + +} finally { + $0 +} \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/scala-mode/tup.arrow b/conf/emacs.d/snippets/text-mode/scala-mode/tup.arrow new file mode 100644 index 0000000..4e7ad69 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/scala-mode/tup.arrow @@ -0,0 +1,4 @@ +#Author : Jonas Bonèr +#name : element1 -> element2 +# -- +${1:element1} -> ${2:element2} $0 \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/scala-mode/tup.paren b/conf/emacs.d/snippets/text-mode/scala-mode/tup.paren new file mode 100644 index 0000000..4bff202 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/scala-mode/tup.paren @@ -0,0 +1,4 @@ +#Author : Jonas Bonèr +#name : (element1, element2) +# -- +(${1:element1}, ${2:element2}) $0 \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/scala-mode/val b/conf/emacs.d/snippets/text-mode/scala-mode/val new file mode 100644 index 0000000..3067cd4 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/scala-mode/val @@ -0,0 +1,4 @@ +#Author : Jonas Bonèr +#name : val name = .. +# -- +val ${1:name} = ${2:obj} $0 \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/scala-mode/val.new b/conf/emacs.d/snippets/text-mode/scala-mode/val.new new file mode 100644 index 0000000..35a0c6a --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/scala-mode/val.new @@ -0,0 +1,4 @@ +#Author : Jonas Bonèr +#name : val name = new .. +# -- +val ${1:name} = new ${2:obj} $0 \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/scala-mode/val.ret b/conf/emacs.d/snippets/text-mode/scala-mode/val.ret new file mode 100644 index 0000000..4bf4f10 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/scala-mode/val.ret @@ -0,0 +1,4 @@ +#Author : Jonas Bonèr +#name : val name: T = .. +# -- +val ${1:name}: ${2:T} = ${3:obj} $0 diff --git a/conf/emacs.d/snippets/text-mode/scala-mode/var b/conf/emacs.d/snippets/text-mode/scala-mode/var new file mode 100644 index 0000000..662d6c8 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/scala-mode/var @@ -0,0 +1,4 @@ +#Author : Jonas Bonèr +#name : var name = .. +# -- +var ${1:name} = ${2:obj} $0 diff --git a/conf/emacs.d/snippets/text-mode/scala-mode/var.new b/conf/emacs.d/snippets/text-mode/scala-mode/var.new new file mode 100644 index 0000000..d681c4a --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/scala-mode/var.new @@ -0,0 +1,4 @@ +#Author : Jonas Bonèr +#name : var name = new .. +# -- +var ${1:name} = new ${2:obj} $0 diff --git a/conf/emacs.d/snippets/text-mode/scala-mode/var.ret b/conf/emacs.d/snippets/text-mode/scala-mode/var.ret new file mode 100644 index 0000000..9d0ac3a --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/scala-mode/var.ret @@ -0,0 +1,4 @@ +#Author : Jonas Bonèr +#name : var name: T = .. +# -- +var ${1:name}: ${2:T} = ${3:obj} $0 diff --git a/conf/emacs.d/snippets/text-mode/scala-mode/whi b/conf/emacs.d/snippets/text-mode/scala-mode/whi new file mode 100644 index 0000000..082c139 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/scala-mode/whi @@ -0,0 +1,6 @@ +#Author : Jonas Bonèr +#name : while(cond) { .. } +# -- +while (${1:condition}) { + $0 +} \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/scala-mode/with b/conf/emacs.d/snippets/text-mode/scala-mode/with new file mode 100644 index 0000000..6bd94e4 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/scala-mode/with @@ -0,0 +1,4 @@ +#Author : Jonas Bonèr +#name : with T +# -- +with $0 \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/snippet-mode/field b/conf/emacs.d/snippets/text-mode/snippet-mode/field new file mode 100644 index 0000000..bdaf0d4 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/snippet-mode/field @@ -0,0 +1,5 @@ +# name : ${ ... } field +# contributor : joaotavora +# key : $f +# -- +\${${1:${2:n}:}$3${4:\$(${5:lisp-fn})}\}$0 \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/snippet-mode/mirror b/conf/emacs.d/snippets/text-mode/snippet-mode/mirror new file mode 100644 index 0000000..1c32eeb --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/snippet-mode/mirror @@ -0,0 +1,5 @@ +# name : ${n:$(...)} mirror +# key : $m +# contributor : joaotavora +# -- +\${${2:n}:${4:\$(${5:reflection-fn})}\}$0 \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/snippet-mode/vars b/conf/emacs.d/snippets/text-mode/snippet-mode/vars new file mode 100644 index 0000000..ea5a8c7 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/snippet-mode/vars @@ -0,0 +1,9 @@ +# name : Snippet header +# contributor : joaotavora +# -- +# name : $1${2: +# key : ${3:expand-key}}${4: +# group : ${5:group}} +# contributor : $6 +# -- +$0 \ No newline at end of file diff --git a/conf/emacs.d/snippets/text-mode/sql-mode/column b/conf/emacs.d/snippets/text-mode/sql-mode/column new file mode 100644 index 0000000..90e4963 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/sql-mode/column @@ -0,0 +1,4 @@ +#contributor : Alejandro Espinoza Esparza +#name : , ColumnName ColumnType NOT NULL... +# -- + , ${1:Name} ${2:Type} ${3:NOT NULL} diff --git a/conf/emacs.d/snippets/text-mode/sql-mode/constraint b/conf/emacs.d/snippets/text-mode/sql-mode/constraint new file mode 100644 index 0000000..989e508 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/sql-mode/constraint @@ -0,0 +1,4 @@ +#contributor : Alejandro Espinoza Esparza +#name : CONSTRAINT [..] PRIMARY KEY ... +# -- +CONSTRAINT [${1:PK_Name}] PRIMARY KEY ${2:CLUSTERED} ([${3:ColumnName}]) diff --git a/conf/emacs.d/snippets/text-mode/sql-mode/constraint.1 b/conf/emacs.d/snippets/text-mode/sql-mode/constraint.1 new file mode 100644 index 0000000..98d89f0 --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/sql-mode/constraint.1 @@ -0,0 +1,4 @@ +#contributor : Alejandro Espinoza Esparza +#name : CONSTRAINT [..] FOREIGN KEY ... +# -- +CONSTRAINT [${1:FK_Name}] FOREIGN KEY ${2:CLUSTERED} ([${3:ColumnName}]) diff --git a/conf/emacs.d/snippets/text-mode/sql-mode/create b/conf/emacs.d/snippets/text-mode/sql-mode/create new file mode 100644 index 0000000..a34624d --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/sql-mode/create @@ -0,0 +1,10 @@ +#contributor : Alejandro Espinoza Esparza +#name : create table ... +# -- +CREATE TABLE [${1:dbo}].[${2:TableName}] +( + ${3:Id} ${4:INT IDENTITY(1,1)} ${5:NOT NULL} +$0 + CONSTRAINT [${6:PK_}] PRIMARY KEY ${7:CLUSTERED} ([$3]) +) +GO diff --git a/conf/emacs.d/snippets/text-mode/sql-mode/create.1 b/conf/emacs.d/snippets/text-mode/sql-mode/create.1 new file mode 100644 index 0000000..1323daf --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/sql-mode/create.1 @@ -0,0 +1,12 @@ +#contributor : Alejandro Espinoza Esparza +#name : create procedure ... +# -- +CREATE PROCEDURE [${1:dbo}].[${2:Name}] +( + $3 $4 = ${5:NULL} ${6:OUTPUT} +) +AS +BEGIN +$0 +END +GO diff --git a/conf/emacs.d/snippets/text-mode/sql-mode/references b/conf/emacs.d/snippets/text-mode/sql-mode/references new file mode 100644 index 0000000..f2e4eab --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/sql-mode/references @@ -0,0 +1,4 @@ +#contributor : Alejandro Espinoza Esparza +#name : REFERENCES ... +# -- +REFERENCES ${1:TableName}([${2:ColumnName}]) diff --git a/conf/emacs.d/snippets/text-mode/time b/conf/emacs.d/snippets/text-mode/time new file mode 100644 index 0000000..d744f1a --- /dev/null +++ b/conf/emacs.d/snippets/text-mode/time @@ -0,0 +1,3 @@ +#name : (current time) +# -- +`(current-time-string)` \ No newline at end of file diff --git a/conf/emacs.d/themes/color-theme-example.el b/conf/emacs.d/themes/color-theme-example.el new file mode 100644 index 0000000..f73b4f6 --- /dev/null +++ b/conf/emacs.d/themes/color-theme-example.el @@ -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 --git a/conf/emacs.d/themes/color-theme-library.el b/conf/emacs.d/themes/color-theme-library.el new file mode 100644 index 0000000..d194708 --- /dev/null +++ b/conf/emacs.d/themes/color-theme-library.el @@ -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 --git a/conf/emacs.d/tramp b/conf/emacs.d/tramp new file mode 100644 index 0000000..b37ec46 --- /dev/null +++ b/conf/emacs.d/tramp @@ -0,0 +1,21 @@ +;; -*- emacs-lisp -*- +;; Tramp connection history. Don't change this file. +;; You can delete it, forcing Tramp to reapply the checks. + +((["su" "root" "localhost" nil] + ("uname" "Linux 2.6.37-2") + ("test" "test") + ("remote-path" + ("/bin" "/usr/bin" "/usr/sbin" "/usr/local/bin")) + ("remote-shell" "/bin/sh") + ("stat" "\\stat") + ("file-exists" "test -e") + ("id" "/usr/bin/id") + ("gid-string" "root") + ("ls" "/bin/ls --color=never") + ("gid-integer" 0) + ("uid-integer" 0) + ("readlink" "\\readlink") + ("perl-file-spec" t) + ("perl-cwd-realpath" t) + ("perl" "\\perl"))) diff --git a/conf/emacs.d/yasnippet.el b/conf/emacs.d/yasnippet.el new file mode 100644 index 0000000..fcbce9e --- /dev/null +++ b/conf/emacs.d/yasnippet.el @@ -0,0 +1,3676 @@ +;;; Yasnippet.el --- Yet another snippet extension for Emacs. + +;; Copyright 2008 pluskid +;; 2009 pluskid, joaotavora + +;; Authors: pluskid , joaotavora +;; Version: 0.6.1 +;; Package-version: 0.6.1c +;; X-URL: http://code.google.com/p/yasnippet/ +;; Keywords: convenience, emulation +;; URL: http://code.google.com/p/yasnippet/ +;; EmacsWiki: YaSnippetMode + +;; 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 2, 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: + +;; Basic steps to setup: +;; +;; 1. In your .emacs file: +;; (add-to-list 'load-path "/dir/to/yasnippet.el") +;; (require 'yasnippet) +;; 2. Place the `snippets' directory somewhere. E.g: ~/.emacs.d/snippets +;; 3. In your .emacs file +;; (setq yas/root-directory "~/.emacs/snippets") +;; (yas/load-directory yas/root-directory) +;; 4. To enable the YASnippet menu and tab-trigger expansion +;; M-x yas/minor-mode +;; 5. To globally enable the minor mode in *all* buffers +;; M-x yas/global-mode +;; +;; Steps 4. and 5. are optional, you don't have to use the minor +;; mode to use YASnippet. +;; +;; Interesting variables are: +;; +;; `yas/root-directory' +;; +;; The directory where user-created snippets are to be +;; stored. Can also be a list of directories that +;; `yas/reload-all' will use for bulk-reloading snippets. In +;; that case the first directory the default for storing new +;; snippets. +;; +;; `yas/mode-symbol' +;; +;; A local variable that you can set in a hook to override +;; snippet-lookup based on major mode. It is a a symbol (or +;; list of symbols) that correspond to subdirectories of +;; `yas/root-directory' and is used for deciding which +;; snippets to consider for the active buffer. +;; +;; Major commands are: +;; +;; M-x yas/expand +;; +;; Try to expand snippets before point. In `yas/minor-mode', +;; this is bound to `yas/trigger-key' which you can customize. +;; +;; M-x yas/load-directory +;; +;; Prompts you for a directory hierarchy of snippets to load. +;; +;; M-x yas/insert-snippet +;; +;; Prompts you for possible snippet expansion if that is +;; possible according to buffer-local and snippet-local +;; expansion conditions. With prefix argument, ignore these +;; conditions. +;; +;; M-x yas/find-snippets +;; +;; Lets you find the snippet files in the correct +;; subdirectory of `yas/root-directory', according to the +;; active major mode (if it exists) like +;; `find-file-other-window'. +;; +;; M-x yas/visit-snippet-file +;; +;; Prompts you for possible snippet expansions like +;; `yas/insert-snippet', but instead of expanding it, takes +;; you directly to the snippet definition's file, if it +;; exists. +;; +;; M-x yas/new-snippet +;; +;; Lets you create a new snippet file in the correct +;; subdirectory of `yas/root-directory', according to the +;; active major mode. +;; +;; M-x yas/load-snippet-buffer +;; +;; When editing a snippet, this loads the snippet. This is +;; bound to "C-c C-c" while in the `snippet-mode' editing +;; mode. +;; +;; M-x yas/tryout-snippet +;; +;; When editing a snippet, this opens a new empty buffer, +;; sets it to the appropriate major mode and inserts the +;; snippet there, so you can see what it looks like. This is +;; bound to "C-c C-t" while in `snippet-mode'. +;; +;; The `dropdown-list.el' extension is bundled with YASnippet, you +;; can optionally use it the preferred "prompting method", puting in +;; your .emacs file, for example: +;; +;; (require 'dropdown-list) +;; (setq yas/prompt-functions '(yas/dropdown-prompt +;; yas/ido-prompt +;; yas/completing-prompt)) +;; +;; Also check out the customization group +;; +;; M-x customize-group RET yasnippet RET +;; +;; If you use the customization group to set variables +;; `yas/root-directory' or `yas/global-mode', make sure the path to +;; "yasnippet.el" is present in the `load-path' *before* the +;; `custom-set-variables' is executed in your .emacs file. +;; +;; For more information and detailed usage, refer to the project page: +;; http://code.google.com/p/yasnippet/ + +;;; Code: + +(require 'cl) +(require 'assoc) +(require 'easymenu) + + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; User customizable variables + + +(defgroup yasnippet nil + "Yet Another Snippet extension" + :group 'editing) + +;;;###autoload +(defcustom yas/root-directory nil + "Root directory that stores the snippets for each major mode. + +If you set this from your .emacs, can also be a list of strings, +for multiple root directories. If you make this a list, the first +element is always the user-created snippets directory. Other +directories are used for bulk reloading of all snippets using +`yas/reload-all'" + :type '(choice (string :tag "Single directory (string)") + (repeat :args (string) :tag "List of directories (strings)")) + :group 'yasnippet + :require 'yasnippet + :set #'(lambda (symbol new) + (let ((old (and (boundp symbol) + (symbol-value symbol)))) + (set-default symbol new) + (unless (or (not (fboundp 'yas/reload-all)) + (equal old new)) + (yas/reload-all))))) + +(defcustom yas/prompt-functions '(yas/x-prompt + yas/dropdown-prompt + yas/completing-prompt + yas/ido-prompt + yas/no-prompt) + "Functions to prompt for keys, templates, etc interactively. + +These functions are called with the following arguments: + +- PROMPT: A string to prompt the user + +- CHOICES: a list of strings or objects. + +- optional DISPLAY-FN : A function that, when applied to each of +the objects in CHOICES will return a string. + +The return value of any function you put here should be one of +the objects in CHOICES, properly formatted with DISPLAY-FN (if +that is passed). + +- To signal that your particular style of prompting is +unavailable at the moment, you can also have the function return +nil. + +- To signal that the user quit the prompting process, you can +signal `quit' with + + (signal 'quit \"user quit!\")." + :type '(repeat function) + :group 'yasnippet) + +(defcustom yas/indent-line 'auto + "Controls indenting applied to a recent snippet expansion. + +The following values are possible: + +- `fixed' Indent the snippet to the current column; + +- `auto' Indent each line of the snippet with `indent-according-to-mode' + +Every other value means don't apply any snippet-side indendation +after expansion (the manual per-line \"$>\" indentation still +applies)." + :type '(choice (const :tag "Nothing" nothing) + (const :tag "Fixed" fixed) + (const :tag "Auto" auto)) + :group 'yasnippet) + +(defcustom yas/also-auto-indent-first-line nil + "Non-nil means also auto indent first line according to mode. + +Naturally this is only valid when `yas/indent-line' is `auto'" + :type 'boolean + :group 'yasnippet) + +(defcustom yas/snippet-revival t + "Non-nil means re-activate snippet fields after undo/redo." + :type 'boolean + :group 'yasnippet) + +(defcustom yas/trigger-key "TAB" + "The key bound to `yas/expand' when function `yas/minor-mode' is active. + +Value is a string that is converted to the internal Emacs key +representation using `read-kbd-macro'." + :type 'string + :group 'yasnippet + :set #'(lambda (symbol key) + (let ((old (and (boundp symbol) + (symbol-value symbol)))) + (set-default symbol key) + ;; On very first loading of this defcustom, + ;; `yas/trigger-key' is *not* loaded. + (if (fboundp 'yas/trigger-key-reload) + (yas/trigger-key-reload old))))) + +(defcustom yas/next-field-key '("TAB" "") + "The key to navigate to next field when a snippet is active. + +Value is a string that is converted to the internal Emacs key +representation using `read-kbd-macro'. + +Can also be a list of strings." + :type '(choice (string :tag "String") + (repeat :args (string) :tag "List of strings")) + :group 'yasnippet + :set #'(lambda (symbol val) + (set-default symbol val) + (if (fboundp 'yas/init-yas-in-snippet-keymap) + (yas/init-yas-in-snippet-keymap)))) + + +(defcustom yas/prev-field-key '("" "") + "The key to navigate to previous field when a snippet is active. + +Value is a string that is converted to the internal Emacs key +representation using `read-kbd-macro'. + +Can also be a list of strings." + :type '(choice (string :tag "String") + (repeat :args (string) :tag "List of strings")) + :group 'yasnippet + :set #'(lambda (symbol val) + (set-default symbol val) + (if (fboundp 'yas/init-yas-in-snippet-keymap) + (yas/init-yas-in-snippet-keymap)))) + +(defcustom yas/skip-and-clear-key "C-d" + "The key to clear the currently active field. + +Value is a string that is converted to the internal Emacs key +representation using `read-kbd-macro'. + +Can also be a list of strings." + :type '(choice (string :tag "String") + (repeat :args (string) :tag "List of strings")) + :group 'yasnippet + :set #'(lambda (symbol val) + (set-default symbol val) + (if (fboundp 'yas/init-yas-in-snippet-keymap) + (yas/init-yas-in-snippet-keymap)))) + +(defcustom yas/triggers-in-field nil + "If non-nil, `yas/next-field-key' can trigger stacked expansions. + +Otherwise, `yas/next-field-key' just tries to move on to the next +field" + :type 'boolean + :group 'yasnippet) + +(defcustom yas/fallback-behavior 'call-other-command + "How to act when `yas/trigger-key' does *not* expand a snippet. + +- `call-other-command' means try to temporarily disable YASnippet + and call the next command bound to `yas/trigger-key'. + +- nil or the symbol `return-nil' mean do nothing. (and + `yas/expand-returns' nil) + +- A lisp form (apply COMMAND . ARGS) means interactively call + COMMAND, if ARGS is non-nil, call COMMAND non-interactively + with ARGS as arguments." + :type '(choice (const :tag "Call previous command" call-other-command) + (const :tag "Do nothing" return-nil)) + :group 'yasnippet) +(make-variable-buffer-local 'yas/fallback-behavior) + +(defcustom yas/choose-keys-first nil + "If non-nil, prompt for snippet key first, then for template. + +Otherwise prompts for all possible snippet names. + +This affects `yas/insert-snippet' and `yas/visit-snippet-file'." + :type 'boolean + :group 'yasnippet) + +(defcustom yas/choose-tables-first nil + "If non-nil, and multiple eligible snippet tables, prompts user for tables first. + +Otherwise, user chooses between the merging together of all +eligible tables. + +This affects `yas/insert-snippet', `yas/visit-snippet-file'" + :type 'boolean + :group 'yasnippet) + +(defcustom yas/use-menu 'real-modes + "Display a YASnippet menu in the menu bar. + +When non-nil, submenus for each snippet table will be listed +under the menu \"Yasnippet\". + +- If set to `real-modes' only submenus whose name more or less +corresponds to a major mode are listed. + +- If set to `abbreviate', only the current major-mode +menu and the modes set in `yas/mode-symbol' are listed. + +Any other non-nil value, every submenu is listed." + :type '(choice (const :tag "Full" t) + (const :tag "Real modes only" real-modes) + (const :tag "Abbreviate" abbreviate)) + :group 'yasnippet) + +(defcustom yas/trigger-symbol " =>" + "The text that will be used in menu to represent the trigger." + :type 'string + :group 'yasnippet) + +(defcustom yas/wrap-around-region nil + "If non-nil, snippet expansion wraps around selected region. + +The wrapping occurs just before the snippet's exit marker. This +can be overriden on a per-snippet basis." + :type 'boolean + :group 'yasnippet) + +(defcustom yas/good-grace t + "If non-nil, don't raise errors in inline elisp evaluation. + +An error string \"[yas] error\" is returned instead." + :type 'boolean + :group 'yasnippet) + +(defcustom yas/ignore-filenames-as-triggers nil + "If non-nil, don't derive tab triggers from filenames. + +This means a snippet without a \"# key:'\ directive wont have a +tab trigger." + :type 'boolean + :group 'yasnippet) + +(defcustom yas/visit-from-menu nil + "If non-nil visit snippets's files from menu, instead of expanding them. + +This cafn only work when snippets are loaded from files." + :type 'boolean + :group 'yasnippet) + +(defface yas/field-highlight-face + '((((class color) (background light)) (:background "DarkSeaGreen1")) + (t (:background "DimGrey"))) + "The face used to highlight the currently active field of a snippet" + :group 'yasnippet) + +(defface yas/field-debug-face + '() + "The face used for debugging some overlays normally hidden" + :group 'yasnippet) + + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; User can also customize the next defvars +(defun yas/define-some-keys (keys keymap definition) + "Bind KEYS to DEFINITION in KEYMAP, read with `read-kbd-macro'." + (let ((keys (or (and (listp keys) keys) + (list keys)))) + (dolist (key keys) + (define-key keymap (read-kbd-macro key) definition)))) + +(defvar yas/keymap + (let ((map (make-sparse-keymap))) + (mapc #'(lambda (binding) + (yas/define-some-keys (car binding) map (cdr binding))) + `((,yas/next-field-key . yas/next-field-or-maybe-expand) + (,yas/prev-field-key . yas/prev-field) + ("C-g" . yas/abort-snippet) + (,yas/skip-and-clear-key . yas/skip-and-clear-or-delete-char))) + map) + "The keymap active while a snippet expansion is in progress.") + +(defvar yas/key-syntaxes (list "w" "w_" "w_." "^ ") + "A list of syntax of a key. This list is tried in the order +to try to find a key. For example, if the list is '(\"w\" \"w_\"). +And in emacs-lisp-mode, where \"-\" has the syntax of \"_\": + +foo-bar + +will first try \"bar\", if not found, then \"foo-bar\" is tried.") + +(defvar yas/after-exit-snippet-hook + '() + "Hooks to run after a snippet exited. + +The hooks will be run in an environment where some variables bound to +proper values: + +`yas/snippet-beg' : The beginning of the region of the snippet. + +`yas/snippet-end' : Similar to beg. + +Attention: These hooks are not run when exiting nested/stackd snippet expansion!") + +(defvar yas/before-expand-snippet-hook + '() + "Hooks to run just before expanding a snippet.") + +(defvar yas/buffer-local-condition + '(if (and (not (bobp)) + (or (equal 'font-lock-comment-face + (get-char-property (1- (point)) + 'face)) + (equal 'font-lock-string-face + (get-char-property (1- (point)) + 'face)))) + '(require-snippet-condition . force-in-comment) + t) + "Snippet expanding condition. + +This variable is a lisp form: + + * If it evaluates to nil, no snippets can be expanded. + + * If it evaluates to the a cons (require-snippet-condition + . REQUIREMENT) + + * Snippets bearing no \"# condition:\" directive are not + considered + + * Snippets bearing conditions that evaluate to nil (or + produce an error) won't be onsidered. + + * If the snippet has a condition that evaluates to non-nil + RESULT: + + * If REQUIREMENT is t, the snippet is considered + + * If REQUIREMENT is `eq' RESULT, the snippet is + considered + + * Otherwise, the snippet is not considered. + + * If it evaluates to the symbol 'always, all snippets are + considered for expansion, regardless of any conditions. + + * If it evaluates to t or some other non-nil value + + * Snippet bearing no conditions, or conditions that + evaluate to non-nil, are considered for expansion. + + * Otherwise, the snippet is not considered. + +Here's an example preventing snippets from being expanded from +inside comments, in `python-mode' only, with the exception of +snippets returning the symbol 'force-in-comment in their +conditions. + + (add-hook 'python-mode-hook + '(lambda () + (setq yas/buffer-local-condition + '(if (python-in-string/comment) + '(require-snippet-condition . force-in-comment) + t)))) + +The default value is similar, it filters out potential snippet +expansions inside comments and string literals, unless the +snippet itself contains a condition that returns the symbol +`force-in-comment'.") +(make-variable-buffer-local 'yas/buffer-local-condition) + + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Internal variables + +(defvar yas/version "0.6.1b") + +(defvar yas/menu-table (make-hash-table) + "A hash table of MAJOR-MODE symbols to menu keymaps.") + +(defvar yas/active-keybindings nil + "A list of cons (KEYMAP . KEY) setup from defining snippets.") + +(defvar yas/known-modes + '(ruby-mode rst-mode markdown-mode) + "A list of mode which is well known but not part of emacs.") + +(defvar yas/escaped-characters + '(?\\ ?` ?' ?$ ?} ) + "List of characters which *might* need to be escaped.") + +(defconst yas/field-regexp + "${\\([0-9]+:\\)?\\([^}]*\\)}" + "A regexp to *almost* recognize a field.") + +(defconst yas/multi-dollar-lisp-expression-regexp + "$+[ \t\n]*\\(([^)]*)\\)" + "A regexp to *almost* recognize a \"$(...)\" expression.") + +(defconst yas/backquote-lisp-expression-regexp + "`\\([^`]*\\)`" + "A regexp to recognize a \"`lisp-expression`\" expression." ) + +(defconst yas/transform-mirror-regexp + "${\\(?:\\([0-9]+\\):\\)?$\\([ \t\n]*([^}]*\\)" + "A regexp to *almost* recognize a mirror with a transform.") + +(defconst yas/simple-mirror-regexp + "$\\([0-9]+\\)" + "A regexp to recognize a simple mirror.") + +(defvar yas/snippet-id-seed 0 + "Contains the next id for a snippet.") + +(defun yas/snippet-next-id () + (let ((id yas/snippet-id-seed)) + (incf yas/snippet-id-seed) + id)) + + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Minor mode stuff + +;; XXX: `last-buffer-undo-list' is somehow needed in Carbon Emacs for MacOSX +(defvar last-buffer-undo-list nil) + +(defvar yas/minor-mode-menu nil + "Holds the YASnippet menu") + +(defun yas/init-minor-keymap () + (let ((map (make-sparse-keymap))) + (easy-menu-define yas/minor-mode-menu + map + "Menu used when YAS/minor-mode is active." + '("YASnippet" + "----" + ["Expand trigger" yas/expand + :help "Possibly expand tab trigger before point"] + ["Insert at point..." yas/insert-snippet + :help "Prompt for an expandable snippet and expand it at point"] + ["New snippet..." yas/new-snippet + :help "Create a new snippet in an appropriate directory"] + ["Visit snippet file..." yas/visit-snippet-file + :help "Prompt for an expandable snippet and find its file"] + ["Find snippets..." yas/find-snippets + :help "Invoke `find-file' in the appropriate snippet directory"] + "----" + ("Snippet menu behaviour" + ["Visit snippets" (setq yas/visit-from-menu t) + :help "Visit snippets from the menu" + :active t :style radio :selected yas/visit-from-menu] + ["Expand snippets" (setq yas/visit-from-menu nil) + :help "Expand snippets from the menu" + :active t :style radio :selected (not yas/visit-from-menu)] + "----" + ["Show \"Real\" modes only" (setq yas/use-menu 'real-modes) + :help "Show snippet submenus for modes that appear to be real major modes" + :active t :style radio :selected (eq yas/use-menu 'real-modes)] + ["Show all modes" (setq yas/use-menu 't) + :help "Show one snippet submenu for each loaded table" + :active t :style radio :selected (eq yas/use-menu 't)] + ["Abbreviate according to current mode" (setq yas/use-menu 'abbreviate) + :help "Show only snippet submenus for the current active modes" + :active t :style radio :selected (eq yas/use-menu 'abbreviate)]) + ("Indenting" + ["Auto" (setq yas/indent-line 'auto) + :help "Indent each line of the snippet with `indent-according-to-mode'" + :active t :style radio :selected (eq yas/indent-line 'auto)] + ["Fixed" (setq yas/indent-line 'fixed) + :help "Indent the snippet to the current column" + :active t :style radio :selected (eq yas/indent-line 'fixed)] + ["None" (setq yas/indent-line 'none) + :help "Don't apply any particular snippet indentation after expansion" + :active t :style radio :selected (not (member yas/indent-line '(fixed auto)))] + "----" + ["Also auto indent first line" (setq yas/also-auto-indent-first-line + (not yas/also-auto-indent-first-line)) + :help "When auto-indenting also, auto indent the first line menu" + :active (eq yas/indent-line 'auto) + :style toggle :selected yas/also-auto-indent-first-line] + ) + ("Prompting method" + ["System X-widget" (setq yas/prompt-functions + (cons 'yas/x-prompt + (remove 'yas/x-prompt + yas/prompt-functions))) + :help "Use your windowing system's (gtk, mac, windows, etc...) default menu" + :active t :style radio :selected (eq (car yas/prompt-functions) + 'yas/x-prompt)] + ["Dropdown-list" (setq yas/prompt-functions + (cons 'yas/dropdown-prompt + (remove 'yas/dropdown-prompt + yas/prompt-functions))) + :help "Use a special dropdown list" + :active t :style radio :selected (eq (car yas/prompt-functions) + 'yas/dropdown-prompt)] + ["Ido" (setq yas/prompt-functions + (cons 'yas/ido-prompt + (remove 'yas/ido-prompt + yas/prompt-functions))) + :help "Use an ido-style minibuffer prompt" + :active t :style radio :selected (eq (car yas/prompt-functions) + 'yas/ido-prompt)] + ["Completing read" (setq yas/prompt-functions + (cons 'yas/completing-prompt + (remove 'yas/completing-prompt-prompt + yas/prompt-functions))) + :help "Use a normal minibuffer prompt" + :active t :style radio :selected (eq (car yas/prompt-functions) + 'yas/completing-prompt-prompt)] + ) + ("Misc" + ["Wrap region in exit marker" + (setq yas/wrap-around-region + (not yas/wrap-around-region)) + :help "If non-nil automatically wrap the selected text in the $0 snippet exit" + :style toggle :selected yas/wrap-around-region] + ["Allow stacked expansions " + (setq yas/triggers-in-field + (not yas/triggers-in-field)) + :help "If non-nil allow snippets to be triggered inside other snippet fields" + :style toggle :selected yas/triggers-in-field] + ["Revive snippets on undo " + (setq yas/snippet-revival + (not yas/snippet-revival)) + :help "If non-nil allow snippets to become active again after undo" + :style toggle :selected yas/snippet-revival] + ["Good grace " + (setq yas/good-grace + (not yas/good-grace)) + :help "If non-nil don't raise errors in bad embedded eslip in snippets" + :style toggle :selected yas/good-grace] + ["Ignore filenames as triggers" + (setq yas/ignore-filenames-as-triggers + (not yas/ignore-filenames-as-triggers)) + :help "If non-nil don't derive tab triggers from filenames" + :style toggle :selected yas/ignore-filenames-as-triggers] + ) + "----" + ["Load snippets..." yas/load-directory + :help "Load snippets from a specific directory"] + ["Reload everything" yas/reload-all + :help "Cleanup stuff, reload snippets, rebuild menus"] + ["About" yas/about + :help "Display some information about YASsnippet"])) + ;; Now for the stuff that has direct keybindings + ;; + (define-key map "\C-c&\C-s" 'yas/insert-snippet) + (define-key map "\C-c&\C-n" 'yas/new-snippet) + (define-key map "\C-c&\C-v" 'yas/visit-snippet-file) + (define-key map "\C-c&\C-f" 'yas/find-snippets) + map)) + +(defvar yas/minor-mode-map (yas/init-minor-keymap) + "The keymap used when `yas/minor-mode' is active.") + +(defun yas/trigger-key-reload (&optional unbind-key) + "Rebind `yas/expand' to the new value of `yas/trigger-key'. + +With optional UNBIND-KEY, try to unbind that key from +`yas/minor-mode-map'." + (when (and unbind-key + (stringp unbind-key) + (not (string= unbind-key ""))) + (define-key yas/minor-mode-map (read-kbd-macro unbind-key) nil)) + (when (and yas/trigger-key + (stringp yas/trigger-key) + (not (string= yas/trigger-key ""))) + (define-key yas/minor-mode-map (read-kbd-macro yas/trigger-key) 'yas/expand))) + +;;;###autoload +(define-minor-mode yas/minor-mode + "Toggle YASnippet mode. + +When YASnippet mode is enabled, the `tas/trigger-key' key expands +snippets of code depending on the mode. + +With no argument, this command toggles the mode. +positive prefix argument turns on the mode. +Negative prefix argument turns off the mode. + +You can customize the key through `yas/trigger-key'. + +Key bindings: +\\{yas/minor-mode-map}" + nil + ;; The indicator for the mode line. + " yas" + :group 'yasnippet + (when yas/minor-mode + (yas/trigger-key-reload) + ;; load all snippets definitions unless we still don't have a + ;; root-directory or some snippets have already been loaded. + (unless (or (null yas/root-directory) + (> (hash-table-count yas/snippet-tables) 0)) + (yas/reload-all)))) + +(defvar yas/dont-activate #'(lambda () + (and yas/root-directory + (null (yas/get-snippet-tables)))) + "If non-nil don't let `yas/minor-mode-on' active yas for this buffer. + +`yas/minor-mode-on' is usually called by `yas/global-mode' so +this effectively lets you define exceptions to the \"global\" +behaviour.") +(make-variable-buffer-local 'yas/dont-activate) + + +(defun yas/minor-mode-on () + "Turn on YASnippet minor mode. + +Do this unless `yas/dont-activate' is t or the function +`yas/get-snippet-tables' (which see), returns an empty list." + (interactive) + (unless (or (and (functionp yas/dont-activate) + (funcall yas/dont-activate)) + (and (not (functionp yas/dont-activate)) + yas/dont-activate)) + (yas/minor-mode 1))) + +(defun yas/minor-mode-off () + "Turn off YASnippet minor mode." + (interactive) + (yas/minor-mode -1)) + +(define-globalized-minor-mode yas/global-mode yas/minor-mode yas/minor-mode-on + :group 'yasnippet + :require 'yasnippet) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Major mode stuff +;; +(defvar yas/font-lock-keywords + (append '(("^#.*$" . font-lock-comment-face)) + lisp-font-lock-keywords + lisp-font-lock-keywords-1 + lisp-font-lock-keywords-2 + '(("$\\([0-9]+\\)" + (0 font-lock-keyword-face) + (1 font-lock-string-face t)) + ("${\\([0-9]+\\):?" + (0 font-lock-keyword-face) + (1 font-lock-warning-face t)) + ("${" font-lock-keyword-face) + ("$[0-9]+?" font-lock-preprocessor-face) + ("\\(\\$(\\)" 1 font-lock-preprocessor-face) + ("}" + (0 font-lock-keyword-face))))) + +(defun yas/init-major-keymap () + (let ((map (make-sparse-keymap))) + (easy-menu-define nil + map + "Menu used when snippet-mode is active." + (cons "Snippet" + (mapcar #'(lambda (ent) + (when (third ent) + (define-key map (third ent) (second ent))) + (vector (first ent) (second ent) t)) + (list + (list "Load this snippet" 'yas/load-snippet-buffer "\C-c\C-c") + (list "Try out this snippet" 'yas/tryout-snippet "\C-c\C-t"))))) + map)) + +(defvar snippet-mode-map + (yas/init-major-keymap) + "The keymap used when `snippet-mode' is active") + + +(define-derived-mode snippet-mode text-mode "Snippet" + "A mode for editing yasnippets" + (set-syntax-table (standard-syntax-table)) + (setq font-lock-defaults '(yas/font-lock-keywords)) + (set (make-local-variable 'require-final-newline) nil) + (use-local-map snippet-mode-map)) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Internal structs for template management + +(defstruct (yas/template (:constructor yas/make-template + (content name condition expand-env file keybinding))) + "A template for a snippet." + content + name + condition + expand-env + file + keybinding) + +(defvar yas/snippet-tables (make-hash-table) + "A hash table of MAJOR-MODE symbols to `yas/snippet-table' objects.") + +(defstruct (yas/snippet-table (:constructor yas/make-snippet-table (name))) + "A table to store snippets for a particular mode. + +Has the following fields: + +`yas/snippet-table-name' + + A symbol normally corresponding to a major mode, but can also be + a pseudo major-mode to be referenced in `yas/mode-symbol', for + example. + +`yas/snippet-table-hash' + + A hash table the key is a string (the snippet key) and the + value is yet another hash of (NAME TEMPLATE), where NAME is the + snippet name and TEMPLATE is a `yas/template' object name. + +`yas/snippet-table-parents' + + A list of tables considered parents of this table: i.e. when + searching for expansions they are searched as well." + name + (hash (make-hash-table :test 'equal)) + (parents nil)) + +(defvar yas/better-guess-for-replacements nil + "If non-nil `yas/store' better guess snippet replacements.") + +(defun yas/store (table name key template) + "Store a snippet template in the TABLE." + + ;; This is dones by searching twice: + ;; + ;; * Try to get the existing namehash from TABLE using key. + ;; + ;; * Try to get the existing namehash from by searching the *whole* + ;; snippet table for NAME. This is becuase they user might have + ;; changed the key and that can no longer be used to locate the + ;; previous `yas/template-structure'. + ;; + ;; * If that returns nothing, oh well... + ;; + (dolist (existing-namehash (remove nil (list (gethash key (yas/snippet-table-hash table)) + (when yas/better-guess-for-replacements + (let (a) + (maphash #'(lambda (key namehash) + (when (gethash name namehash) + (setq a namehash))) + (yas/snippet-table-hash table)) + a))))) + (let ((existing-template (gethash name existing-namehash))) + (when existing-template + ;; Remove the existing keybinding + (when (yas/template-keybinding existing-template) + (define-key + (symbol-value (first (yas/template-keybinding existing-template))) + (second (yas/template-keybinding existing-template)) + nil) + (setq yas/active-keybindings + (delete (yas/template-keybinding existing-template) + yas/active-keybindings))) + ;; Remove the (name . template) mapping from existing-namehash. + (remhash name existing-namehash)))) + ;; Now store the new template independent of the previous steps. + ;; + (puthash name + template + (or (gethash key + (yas/snippet-table-hash table)) + (puthash key + (make-hash-table :test 'equal) + (yas/snippet-table-hash table))))) + +(defun yas/fetch (table key) + "Fetch a snippet binding to KEY from TABLE." + (let* ((keyhash (yas/snippet-table-hash table)) + (namehash (and keyhash (gethash key keyhash)))) + (when namehash + (yas/filter-templates-by-condition + (let (alist) + (maphash #'(lambda (k v) + (push (cons k v) alist)) + namehash) + alist))))) + + +;; Filtering/condition logic + +(defun yas/eval-condition (condition) + (condition-case err + (save-excursion + (save-restriction + (save-match-data + (eval condition)))) + (error (progn + (message (format "[yas] error in condition evaluation: %s" + (error-message-string err))) + nil)))) + + +(defun yas/filter-templates-by-condition (templates) + "Filter the templates using the applicable condition. + +TEMPLATES is a list of cons (NAME . TEMPLATE) where NAME is a +string and TEMPLATE is a `yas/template' structure. + +This function implements the rules described in +`yas/buffer-local-condition'. See that variables documentation." + (let ((requirement (yas/require-template-specific-condition-p))) + (if (eq requirement 'always) + templates + (remove-if-not #'(lambda (pair) + (yas/template-can-expand-p (yas/template-condition (cdr pair)) requirement)) + templates)))) + +(defun yas/require-template-specific-condition-p () + "Decides if this buffer requests/requires snippet-specific +conditions to filter out potential expansions." + (if (eq 'always yas/buffer-local-condition) + 'always + (let ((local-condition (or (and (consp yas/buffer-local-condition) + (yas/eval-condition yas/buffer-local-condition)) + yas/buffer-local-condition))) + (when local-condition + (if (eq local-condition t) + t + (and (consp local-condition) + (eq 'require-snippet-condition (car local-condition)) + (symbolp (cdr local-condition)) + (cdr local-condition))))))) + +(defun yas/template-can-expand-p (condition &optional requirement) + "Evaluates CONDITION and REQUIREMENT and returns a boolean" + (let* ((requirement (or requirement + (yas/require-template-specific-condition-p))) + (result (or (null condition) + (yas/eval-condition + (condition-case err + (read condition) + (error (progn + (message (format "[yas] error reading condition: %s" + (error-message-string err)))) + nil)))))) + (cond ((eq requirement t) + result) + (t + (eq requirement result))))) + +(defun yas/snippet-table-get-all-parents (table) + (let ((parents (yas/snippet-table-parents table))) + (when parents + (append (copy-list parents) + (mapcan #'yas/snippet-table-get-all-parents parents))))) + +(defun yas/snippet-table-templates (table) + (when table + (let ((acc (list))) + (maphash #'(lambda (key namehash) + (maphash #'(lambda (name template) + (push (cons name template) acc)) + namehash)) + (yas/snippet-table-hash table)) + (yas/filter-templates-by-condition acc)))) + +(defun yas/current-key () + "Get the key under current position. A key is used to find +the template of a snippet in the current snippet-table." + (let ((start (point)) + (end (point)) + (syntaxes yas/key-syntaxes) + syntax + done + templates) + (while (and (not done) syntaxes) + (setq syntax (car syntaxes)) + (setq syntaxes (cdr syntaxes)) + (save-excursion + (skip-syntax-backward syntax) + (setq start (point))) + (setq templates + (mapcan #'(lambda (table) + (yas/fetch table (buffer-substring-no-properties start end))) + (yas/get-snippet-tables))) + (if templates + (setq done t) + (setq start end))) + (list templates + start + end))) + + +(defun yas/snippet-table-all-keys (table) + (when table + (let ((acc)) + (maphash #'(lambda (key templates) + (when (yas/filter-templates-by-condition templates) + (push key acc))) + (yas/snippet-table-hash table)) + acc))) + + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Internal functions + +(defun yas/real-mode? (mode) + "Try to find out if MODE is a real mode. The MODE bound to +a function (like `c-mode') is considered real mode. Other well +known mode like `ruby-mode' which is not part of Emacs might +not bound to a function until it is loaded. So yasnippet keeps +a list of modes like this to help the judgement." + (or (fboundp mode) + (find mode yas/known-modes))) + +(defun yas/read-and-eval-string (string) + ;; TODO: This is a possible optimization point, the expression could + ;; be stored in cons format instead of string, + "Evaluate STRING and convert the result to string." + (let ((retval (catch 'yas/exception + (condition-case err + (save-excursion + (save-restriction + (save-match-data + (widen) + (let ((result (eval (read string)))) + (when result + (format "%s" result)))))) + (error (if yas/good-grace + "[yas] elisp error!" + (error (format "[yas] elisp error: %s" + (error-message-string err))))))))) + (when (and (consp retval) + (eq 'yas/exception (car retval))) + (error (cdr retval))) + retval)) + +(defvar yas/mode-symbol nil + "If non-nil, lookup snippets using this instead of `major-mode'.") +(make-variable-buffer-local 'yas/mode-symbol) + +(defun yas/snippet-table-get-create (mode) + "Get the snippet table corresponding to MODE. + +Optional DIRECTORY gets recorded as the default directory to +search for snippet files if the retrieved/created table didn't +already have such a property." + (let ((table (gethash mode + yas/snippet-tables))) + (unless table + (setq table (yas/make-snippet-table (symbol-name mode))) + (puthash mode table yas/snippet-tables)) + table)) + +(defun yas/get-snippet-tables (&optional mode-symbol dont-search-parents) + "Get snippet tables for current buffer. + +Return a list of 'yas/snippet-table' objects indexed by mode. + +The modes are tried in this order: optional MODE-SYMBOL, then +`yas/mode-symbol', then `major-mode' then, unless +DONT-SEARCH-PARENTS is non-nil, the guessed parent mode of either +MODE-SYMBOL or `major-mode'. + +Guessing is done by looking up the MODE-SYMBOL's +`derived-mode-parent' property, see also `derived-mode-p'." + (let ((mode-tables + (mapcar #'(lambda (mode) + (gethash mode yas/snippet-tables)) + (append (list mode-symbol) + (if (listp yas/mode-symbol) + yas/mode-symbol + (list yas/mode-symbol)) + (list major-mode + (and (not dont-search-parents) + (get (or mode-symbol major-mode) + 'derived-mode-parent)))))) + (all-tables)) + (dolist (table (remove nil mode-tables)) + (push table all-tables) + (nconc all-tables (yas/snippet-table-get-all-parents table))) + (remove-duplicates all-tables))) + +(defun yas/menu-keymap-get-create (mode) + "Get the menu keymap correspondong to MODE." + (or (gethash mode yas/menu-table) + (puthash mode (make-sparse-keymap) yas/menu-table))) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; Template-related and snippet loading functions + +(defun yas/parse-template (&optional file) + "Parse the template in the current buffer. + +Optional FILE is the absolute file name of the file being +parsed. + +Return a snippet-definition, i.e. a list + + (KEY TEMPLATE NAME CONDITION GROUP VARS FILE KEYBINDING) + +If the buffer contains a line of \"# --\" then the contents +above this line are ignored. Variables can be set above this +line through the syntax: + +#name : value + +Here's a list of currently recognized variables: + + * name + * contributor + * condition + * key + * group + * expand-env + +#name: #include \"...\" +# -- +#include \"$1\"" + ;; + ;; + (goto-char (point-min)) + (let* ((name (and file + (file-name-nondirectory file))) + (key (unless yas/ignore-filenames-as-triggers + (and name + (file-name-sans-extension name)))) + template + bound + condition + (group (and file + (yas/calculate-group file))) + expand-env + binding) + (if (re-search-forward "^# --\n" nil t) + (progn (setq template + (buffer-substring-no-properties (point) + (point-max))) + (setq bound (point)) + (goto-char (point-min)) + (while (re-search-forward "^# *\\([^ ]+?\\) *: *\\(.*\\)$" bound t) + (when (string= "name" (match-string-no-properties 1)) + (setq name (match-string-no-properties 2))) + (when (string= "condition" (match-string-no-properties 1)) + (setq condition (match-string-no-properties 2))) + (when (string= "group" (match-string-no-properties 1)) + (setq group (match-string-no-properties 2))) + (when (string= "expand-env" (match-string-no-properties 1)) + (setq expand-env (match-string-no-properties 2))) + (when (string= "key" (match-string-no-properties 1)) + (setq key (match-string-no-properties 2))) + (when (string= "binding" (match-string-no-properties 1)) + (setq binding (match-string-no-properties 2))))) + (setq template + (buffer-substring-no-properties (point-min) (point-max)))) + (list key template name condition group expand-env file binding))) + +(defun yas/calculate-group (file) + "Calculate the group for snippet file path FILE." + (let* ((dominating-dir (locate-dominating-file file + ".yas-make-groups")) + (extra-path (and dominating-dir + (replace-regexp-in-string (concat "^" + (expand-file-name dominating-dir)) + "" + (expand-file-name file)))) + (extra-dir (and extra-path + (file-name-directory extra-path))) + (group (and extra-dir + (replace-regexp-in-string "/" + "." + (directory-file-name extra-dir))))) + group)) + +;; (defun yas/glob-files (directory &optional recurse-p append) +;; "Returns files under DIRECTORY ignoring dirs and hidden files. + +;; If RECURSE in non-nil, do that recursively." +;; (let (ret +;; (default-directory directory)) +;; (dolist (entry (directory-files ".")) +;; (cond ((or (string-match "^\\." +;; (file-name-nondirectory entry)) +;; (string-match "~$" +;; (file-name-nondirectory entry))) +;; nil) +;; ((and recurse-p +;; (file-directory-p entry)) +;; (setq ret (nconc ret +;; (yas/glob-files (expand-file-name entry) +;; recurse-p +;; (if append +;; (concat append "/" entry) +;; entry))))) +;; ((file-directory-p entry) +;; nil) +;; (t +;; (push (if append +;; (concat append "/" entry) +;; entry) ret)))) +;; ret)) + +(defun yas/subdirs (directory &optional file?) + "Return subdirs or files of DIRECTORY according to FILE?." + (remove-if (lambda (file) + (or (string-match "^\\." + (file-name-nondirectory file)) + (string-match "~$" + (file-name-nondirectory file)) + (if file? + (file-directory-p file) + (not (file-directory-p file))))) + (directory-files directory t))) + +(defun yas/make-menu-binding (template) + `(lambda () (interactive) (yas/expand-or-visit-from-menu ,template))) + +(defun yas/expand-or-visit-from-menu (template) + (if yas/visit-from-menu + (yas/visit-snippet-file-1 template) + (let ((where (if mark-active + (cons (region-beginning) (region-end)) + (cons (point) (point))))) + (yas/expand-snippet (yas/template-content template) + (car where) + (cdr where))))) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Popping up for keys and templates +;; +(defun yas/prompt-for-template (templates &optional prompt) + "Interactively choose a template from the list TEMPLATES. + +TEMPLATES is a list of `yas/template'." + (when templates + (some #'(lambda (fn) + (funcall fn (or prompt "Choose a snippet: ") + templates + #'yas/template-name)) + yas/prompt-functions))) + +(defun yas/prompt-for-keys (keys &optional prompt) + "Interactively choose a template key from the list KEYS." + (when keys + (some #'(lambda (fn) + (funcall fn (or prompt "Choose a snippet key: ") keys)) + yas/prompt-functions))) + +(defun yas/prompt-for-table (tables &optional prompt) + (when tables + (some #'(lambda (fn) + (funcall fn (or prompt "Choose a snippet table: ") + tables + #'yas/snippet-table-name)) + yas/prompt-functions))) + +(defun yas/x-prompt (prompt choices &optional display-fn) + (when (and window-system choices) + (let ((keymap (cons 'keymap + (cons + prompt + (mapcar (lambda (choice) + (list choice + 'menu-item + (if display-fn + (funcall display-fn choice) + choice) + t)) + choices))))) + (when (cdr keymap) + (car (x-popup-menu (if (fboundp 'posn-at-point) + (let ((x-y (posn-x-y (posn-at-point (point))))) + (list (list (+ (car x-y) 10) + (+ (cdr x-y) 20)) + (selected-window))) + t) + keymap)))))) + +(defun yas/ido-prompt (prompt choices &optional display-fn) + (when (and (featurep 'ido) + ido-mode) + (let* ((formatted-choices (or (and display-fn + (mapcar display-fn choices)) + choices)) + (chosen (and formatted-choices + (ido-completing-read prompt + formatted-choices + nil + 'require-match + nil + nil)))) + (when chosen + (nth (position chosen formatted-choices :test #'string=) choices))))) + +(eval-when-compile (require 'dropdown-list nil t)) +(defun yas/dropdown-prompt (prompt choices &optional display-fn) + (when (featurep 'dropdown-list) + (let* ((formatted-choices (or (and display-fn + (mapcar display-fn choices)) + choices)) + (chosen (and formatted-choices + (nth (dropdown-list formatted-choices) + choices)))) + chosen))) + +(defun yas/completing-prompt (prompt choices &optional display-fn) + (let* ((formatted-choices (or (and display-fn + (mapcar display-fn choices)) + choices)) + (chosen (and formatted-choices + (completing-read prompt + formatted-choices + nil + 'require-match + nil + nil)))) + (when chosen + (nth (position chosen formatted-choices :test #'string=) choices)))) + +(defun yas/no-prompt (prompt choices &optional display-fn) + (first choices)) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Loading snippets from files +;; +(defun yas/load-directory-1 (directory &optional parents no-hierarchy-parents making-groups-sym) + "Recursively load snippet templates from DIRECTORY." + ;; TODO: Rewrite this horrible, horrible monster I created + (unless (file-exists-p (concat directory "/" ".yas-skip")) + (let* ((major-mode-and-parents (unless making-groups-sym + (yas/compute-major-mode-and-parents (concat directory "/dummy") + nil + no-hierarchy-parents))) + (yas/ignore-filenames-as-triggers (or yas/ignore-filenames-as-triggers + (file-exists-p (concat directory "/" ".yas-ignore-filenames-as-triggers")))) + (mode-sym (and major-mode-and-parents + (car major-mode-and-parents))) + (parents (if making-groups-sym + parents + (rest major-mode-and-parents))) + (snippet-defs nil) + (make-groups-p (or making-groups-sym + (file-exists-p (concat directory "/" ".yas-make-groups"))))) + (with-temp-buffer + (dolist (file (yas/subdirs directory 'no-subdirs-just-files)) + (when (file-readable-p file) + (insert-file-contents file nil nil nil t) + (push (yas/parse-template file) + snippet-defs)))) + (yas/define-snippets (or mode-sym + making-groups-sym) + snippet-defs + parents) + (dolist (subdir (yas/subdirs directory)) + (if make-groups-p + (yas/load-directory-1 subdir parents 't (or mode-sym + making-groups-sym)) + (yas/load-directory-1 subdir (list mode-sym))))))) + +(defun yas/load-directory (directory) + "Load snippet definition from a directory hierarchy. + +Below the top-level directory, each directory is a mode +name. And under each subdirectory, each file is a definition +of a snippet. The file name is the trigger key and the +content of the file is the template." + (interactive "DSelect the root directory: ") + (unless (file-directory-p directory) + (error "Error %s not a directory" directory)) + (unless yas/root-directory + (setq yas/root-directory directory)) + (dolist (dir (yas/subdirs directory)) + (yas/load-directory-1 dir nil 'no-hierarchy-parents)) + (when (interactive-p) + (message "done."))) + +(defun yas/kill-snippet-keybindings () + "Remove the all active snippet keybindings." + (interactive) + (dolist (keybinding yas/active-keybindings) + (define-key (symbol-value (first keybinding)) (second keybinding) nil)) + (setq yas/active-keybindings nil)) + +(defun yas/reload-all (&optional reset-root-directory) + "Reload all snippets and rebuild the YASnippet menu. " + (interactive "P") + ;; Turn off global modes and minor modes, save their state though + ;; + (let ((restore-global-mode (prog1 yas/global-mode + (yas/global-mode -1))) + (restore-minor-mode (prog1 yas/minor-mode + (yas/minor-mode -1)))) + ;; Empty all snippet tables and all menu tables + ;; + (setq yas/snippet-tables (make-hash-table)) + (setq yas/menu-table (make-hash-table)) + + ;; Init the `yas/minor-mode-map', taking care not to break the + ;; menu.... + ;; + (setf (cdr yas/minor-mode-map) + (cdr (yas/init-minor-keymap))) + + ;; Now, clean up the other keymaps we might have cluttered up. + (yas/kill-snippet-keybindings) + + (when reset-root-directory + (setq yas/root-directory nil)) + + ;; Reload the directories listed in `yas/root-directory' or prompt + ;; the user to select one. + ;; + (if yas/root-directory + (if (listp yas/root-directory) + (dolist (directory yas/root-directory) + (yas/load-directory directory)) + (yas/load-directory yas/root-directory)) + (call-interactively 'yas/load-directory)) + + ;; Restore the mode configuration + ;; + (when restore-minor-mode + (yas/minor-mode 1)) + (when restore-global-mode + (yas/global-mode 1)) + + (message "[yas] Reloading everything... Done."))) + +(defun yas/quote-string (string) + "Escape and quote STRING. +foo\"bar\\! -> \"foo\\\"bar\\\\!\"" + (concat "\"" + (replace-regexp-in-string "[\\\"]" + "\\\\\\&" + string + t) + "\"")) +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; Yasnippet Bundle + +(defun yas/initialize () + "For backward compatibility, enable `yas/minor-mode' globally" + (yas/global-mode 1)) + +(defun yas/compile-bundle + (&optional yasnippet yasnippet-bundle snippet-roots code dropdown) + "Compile snippets in SNIPPET-ROOTS to a single bundle file. + +YASNIPPET is the yasnippet.el file path. + +YASNIPPET-BUNDLE is the output file of the compile result. + +SNIPPET-ROOTS is a list of root directories that contains the +snippets definition. + +CODE is the code to be placed at the end of the generated file +and that can initialize the YASnippet bundle. + +Last optional argument DROPDOWN is the filename of the +dropdown-list.el library. + +Here's the default value for all the parameters: + + (yas/compile-bundle \"yasnippet.el\" + \"yasnippet-bundle.el\" + \"snippets\") + \"(yas/initialize-bundle) + ### autoload + (require 'yasnippet-bundle)`\" + \"dropdown-list.el\") +" + (interactive "ffind the yasnippet.el file: \nFTarget bundle file: \nDSnippet directory to bundle: \nMExtra code? \nfdropdown-library: ") + + (let* ((yasnippet (or yasnippet + "yasnippet.el")) + (yasnippet-bundle (or yasnippet-bundle + "./yasnippet-bundle.el")) + (snippet-roots (or snippet-roots + "snippets")) + (dropdown (or dropdown + "dropdown-list.el")) + (code (or (and code + (condition-case err (read code) (error nil)) + code) + (concat "(yas/initialize-bundle)" + "\n;;;###autoload" ; break through so that won't + "(require 'yasnippet-bundle)"))) + (dirs (or (and (listp snippet-roots) snippet-roots) + (list snippet-roots))) + (bundle-buffer nil)) + (with-temp-file yasnippet-bundle + (insert ";;; yasnippet-bundle.el --- " + "Yet another snippet extension (Auto compiled bundle)\n") + (insert-file-contents yasnippet) + (goto-char (point-max)) + (insert "\n") + (when dropdown + (insert-file-contents dropdown)) + (goto-char (point-max)) + (insert ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\n") + (insert ";;;; Auto-generated code ;;;;\n") + (insert ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\n") + (insert "(defun yas/initialize-bundle ()\n" + " \"Initialize YASnippet and load snippets in the bundle.\"") + (flet ((yas/define-snippets + (mode snippets &optional parent-or-parents) + (insert ";;; snippets for " (symbol-name mode) "\n") + (let ((literal-snippets (list))) + (dolist (snippet snippets) + (let ((key (first snippet)) + (template-content (second snippet)) + (name (third snippet)) + (condition (fourth snippet)) + (group (fifth snippet)) + (expand-env (sixth snippet)) + ;; Omit the file on purpose + (file nil) ;; (seventh snippet)) + (binding (eighth snippet))) + (push `(,key + ,template-content + ,name + ,condition + ,group + ,expand-env + ,file + ,binding) + literal-snippets))) + (insert (pp-to-string `(yas/define-snippets ',mode ',literal-snippets ',parent-or-parents))) + (insert "\n\n")))) + (dolist (dir dirs) + (dolist (subdir (yas/subdirs dir)) + (yas/load-directory-1 subdir nil 'no-hierarchy-parents)))) + + (insert (pp-to-string `(yas/global-mode 1))) + (insert ")\n\n" code "\n") + + ;; bundle-specific provide and value for yas/dont-activate + (let ((bundle-feature-name (file-name-nondirectory + (file-name-sans-extension + yasnippet-bundle)))) + (insert (pp-to-string `(set-default 'yas/dont-activate + #'(lambda () + (and (or yas/root-directory + (featurep ',(make-symbol bundle-feature-name))) + (null (yas/get-snippet-tables))))))) + (insert (pp-to-string `(provide ',(make-symbol bundle-feature-name))))) + + (insert ";;; " + (file-name-nondirectory yasnippet-bundle) + " ends here\n")))) + +(defun yas/compile-textmate-bundle () + (interactive) + (yas/compile-bundle "yasnippet.el" + "./yasnippet-textmate-bundle.el" + "extras/imported/" + (concat "(yas/initialize-bundle)" + "\n;;;###autoload" ; break through so that won't + "(require 'yasnippet-textmate-bundle)") + "dropdown-list.el")) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; Some user level functions +;;; + +(defun yas/about () + (interactive) + (message (concat "yasnippet (version " + yas/version + ") -- pluskid /joaotavora "))) + +(defun yas/define-snippets (mode snippets &optional parent-mode) + "Define SNIPPETS for MODE. + +SNIPPETS is a list of snippet definitions, each taking the +following form: + + (KEY TEMPLATE NAME CONDITION GROUP EXPAND-ENV FILE KEYBINDING) + +Within these, only TEMPLATE is actually mandatory. + +All the elelements are strings, including CONDITION, EXPAND-ENV +and KEYBINDING which will be `read' and eventually `eval'-ed. + +FILE is probably of very little use if you're programatically +defining snippets. + +You can use `yas/parse-template' to return such lists based on +the current buffers contents. + +Optional PARENT-MODE can be used to specify the parent tables of +MODE. It can be a mode symbol of a list of mode symbols. It does +not need to be a real mode." + (let ((snippet-table (yas/snippet-table-get-create mode)) + (parent-tables (mapcar #'yas/snippet-table-get-create + (if (listp parent-mode) + parent-mode + (list parent-mode)))) + (keymap (if yas/use-menu + (yas/menu-keymap-get-create mode) + nil))) + ;; Setup the menu + ;; + (when parent-tables + (setf (yas/snippet-table-parents snippet-table) + parent-tables) + (when yas/use-menu + (let ((parent-menu-syms-and-names + (if (listp parent-mode) + (mapcar #'(lambda (sym) + (cons sym (concat "parent mode - " (symbol-name sym)))) + parent-mode) + '((parent-mode . "parent mode"))))) + (mapc #'(lambda (sym-and-name) + (define-key keymap + (vector (intern (replace-regexp-in-string " " "_" (cdr sym-and-name)))) + (list 'menu-item (cdr sym-and-name) + (yas/menu-keymap-get-create (car sym-and-name))))) + (reverse parent-menu-syms-and-names))))) + (when yas/use-menu + (define-key yas/minor-mode-menu (vector mode) + `(menu-item ,(symbol-name mode) ,keymap + :visible (yas/show-menu-p ',mode)))) + ;; Iterate the recently parsed snippets definition + ;; + (dolist (snippet snippets) + (let* ((file (seventh snippet)) + (key (or (car snippet) + (unless yas/ignore-filenames-as-triggers + (and file + (file-name-sans-extension (file-name-nondirectory file)))))) + (name (or (third snippet) + (and file + (file-name-directory file)))) + (condition (fourth snippet)) + (group (fifth snippet)) + (keybinding (eighth snippet)) + (template nil)) + ;; Read the snippet's "binding :" expression + ;; + (condition-case err + (when keybinding + (setq keybinding (read (eighth snippet))) + (let* ((this-mode-map-symbol (intern (concat (symbol-name mode) "-map"))) + (keys (or (and (consp keybinding) + (read-kbd-macro (cdr keybinding))) + (read-kbd-macro keybinding))) + (keymap-symbol (or (and (consp keybinding) + (car keybinding)) + this-mode-map-symbol))) + (if (and (boundp keymap-symbol) + (keymapp (symbol-value keymap-symbol))) + (setq keybinding (list keymap-symbol + keys + name)) + (error (format "keymap \"%s\" does not (yet?) exist" keymap-symbol))))) + (error + (message "[yas] warning: keybinding \"%s\" invalid for snippet \"%s\" since %s." + keybinding name (error-message-string err)) + (setf keybinding nil))) + + ;; Create the `yas/template' object and store in the + ;; appropriate snippet table. This only done if we have found + ;; a key and a name for the snippet, because that is what + ;; indexes the snippet tables + ;; + (setq template (yas/make-template (second snippet) + (or name key) + condition + (sixth snippet) + (seventh snippet) + keybinding)) + (when (and key + name) + (yas/store snippet-table + name + key + template)) + ;; If we have a keybinding, register it if it does not + ;; conflict! + ;; + (when keybinding + (let ((lookup (lookup-key (symbol-value (first keybinding)) (second keybinding)))) + (if (and lookup + (not (numberp lookup))) + (message "[yas] warning: won't overwrite keybinding \"%s\" for snippet \"%s\" in `%s'" + (key-description (second keybinding)) name (first keybinding)) + (define-key + (symbol-value (first keybinding)) + (second keybinding) + `(lambda (&optional yas/prefix) + (interactive "P") + (when (yas/template-can-expand-p ,(yas/template-condition template)) + (yas/expand-snippet ,(yas/template-content template) + nil + nil + ,(yas/template-expand-env template))))) + (add-to-list 'yas/active-keybindings keybinding)))) + + ;; Setup the menu groups, reorganizing from group to group if + ;; necessary + ;; + (when yas/use-menu + (let ((group-keymap keymap)) + ;; Delete this entry from another group if already exists + ;; in some other group. An entry is considered as existing + ;; in another group if its name string-matches. + ;; + (yas/delete-from-keymap group-keymap name) + + ;; ... then add this entry to the correct group + (when (and (not (null group)) + (not (string= "" group))) + (dolist (subgroup (mapcar #'make-symbol + (split-string group "\\."))) + (let ((subgroup-keymap (lookup-key group-keymap + (vector subgroup)))) + (when (null subgroup-keymap) + (setq subgroup-keymap (make-sparse-keymap)) + (define-key group-keymap (vector subgroup) + `(menu-item ,(symbol-name subgroup) + ,subgroup-keymap))) + (setq group-keymap subgroup-keymap)))) + (define-key group-keymap (vector (gensym)) + `(menu-item ,(yas/template-name template) + ,(yas/make-menu-binding template) + :help ,name + :keys ,(when (and key name) + (concat key yas/trigger-symbol)))))))))) + +(defun yas/show-menu-p (mode) + (cond ((eq yas/use-menu 'abbreviate) + (find mode + (mapcar #'(lambda (table) + (intern (yas/snippet-table-name table))) + (yas/get-snippet-tables)))) + ((eq yas/use-menu 'real-modes) + (yas/real-mode? mode)) + (t + t))) + +(defun yas/delete-from-keymap (keymap name) + "Recursively delete items name NAME from KEYMAP and its submenus. + +Skip any submenus named \"parent mode\"" + ;; First of all, recursively enter submenus, i.e. the tree is + ;; searched depth first so that stale submenus can be found in the + ;; higher passes. + ;; + (mapc #'(lambda (item) + (when (and (keymapp (fourth item)) + (stringp (third item)) + (not (string-match "parent mode" (third item)))) + (yas/delete-from-keymap (fourth item) name))) + (rest keymap)) + ;; + (when (keymapp keymap) + (let ((pos-in-keymap)) + (while (setq pos-in-keymap + (position-if #'(lambda (item) + (and (listp item) + (or + ;; the menu item we want to delete + (and (eq 'menu-item (second item)) + (third item) + (and (string= (third item) name))) + ;; a stale subgroup + (and (keymapp (fourth item)) + (not (and (stringp (third item)) + (string-match "parent mode" + (third item)))) + (null (rest (fourth item))))))) + keymap)) + (setf (nthcdr pos-in-keymap keymap) + (nthcdr (+ 1 pos-in-keymap) keymap)))))) + +(defun yas/define (mode key template &optional name condition group) + "Define a snippet. Expanding KEY into TEMPLATE. + +NAME is a description to this template. Also update the menu if +`yas/use-menu' is `t'. CONDITION is the condition attached to +this snippet. If you attach a condition to a snippet, then it +will only be expanded when the condition evaluated to non-nil." + (yas/define-snippets mode + (list (list key template name condition group)))) + +(defun yas/hippie-try-expand (first-time?) + "Integrate with hippie expand. Just put this function in +`hippie-expand-try-functions-list'." + (if (not first-time?) + (let ((yas/fallback-behavior 'return-nil)) + (yas/expand)) + (undo 1) + nil)) + +(defun yas/expand () + "Expand a snippet before point. + +If no snippet expansion is possible, fall back to the behaviour +defined in `yas/fallback-behavior'" + (interactive) + (yas/expand-1)) + +(defun yas/expand-1 (&optional field) + "Actually fo the work for `yas/expand'" + (multiple-value-bind (templates start end) (if field + (save-restriction + (narrow-to-region (yas/field-start field) (yas/field-end field)) + (yas/current-key)) + (yas/current-key)) + (if templates + (let ((template (or (and (rest templates) ;; more than one + (yas/prompt-for-template (mapcar #'cdr templates))) + (cdar templates)))) + (when template + (yas/expand-snippet (yas/template-content template) + start + end + (yas/template-expand-env template)))) + (cond ((eq yas/fallback-behavior 'return-nil) + ;; return nil + nil) + ((eq yas/fallback-behavior 'call-other-command) + (let* ((yas/minor-mode nil) + (keys-1 (this-command-keys-vector)) + (keys-2 (and yas/trigger-key + (stringp yas/trigger-key) + (read-kbd-macro yas/trigger-key))) + (command-1 (and keys-1 (key-binding keys-1))) + (command-2 (and keys-2 (key-binding keys-2))) + (command (or (and (not (eq command-1 'yas/expand)) + command-1) + command-2))) + (when (and (commandp command) + (not (eq 'yas/expand command))) + (setq this-command command) + (call-interactively command)))) + ((and (listp yas/fallback-behavior) + (cdr yas/fallback-behavior) + (eq 'apply (car yas/fallback-behavior))) + (if (cddr yas/fallback-behavior) + (apply (cadr yas/fallback-behavior) + (cddr yas/fallback-behavior)) + (when (commandp (cadr yas/fallback-behavior)) + (setq this-command (cadr yas/fallback-behavior)) + (call-interactively (cadr yas/fallback-behavior))))) + (t + ;; also return nil if all the other fallbacks have failed + nil))))) + + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; Snippet development + +(defun yas/all-templates (tables) + "Return all snippet tables applicable for the current buffer. + +Honours `yas/choose-tables-first', `yas/choose-keys-first' and +`yas/buffer-local-condition'" + (when yas/choose-tables-first + (setq tables (list (yas/prompt-for-table tables)))) + (mapcar #'cdr + (if yas/choose-keys-first + (let ((key (yas/prompt-for-keys + (mapcan #'yas/snippet-table-all-keys tables)))) + (when key + (mapcan #'(lambda (table) + (yas/fetch table key)) + tables))) + (mapcan #'yas/snippet-table-templates tables)))) + +(defun yas/insert-snippet (&optional no-condition) + "Choose a snippet to expand, pop-up a list of choices according +to `yas/prompt-function'. + +With prefix argument NO-CONDITION, bypass filtering of snippets +by condition." + (interactive "P") + (let* ((yas/buffer-local-condition (or (and no-condition + 'always) + yas/buffer-local-condition)) + (templates (yas/all-templates (yas/get-snippet-tables))) + (template (and templates + (or (and (rest templates) ;; more than one template for same key + (yas/prompt-for-template templates)) + (car templates)))) + (where (if mark-active + (cons (region-beginning) (region-end)) + (cons (point) (point))))) + (if template + (yas/expand-snippet (yas/template-content template) + (car where) + (cdr where) + (yas/template-expand-env template)) + (message "[yas] No snippets can be inserted here!")))) + +(defun yas/visit-snippet-file () + "Choose a snippet to edit, selection like `yas/insert-snippet'. + +Only success if selected snippet was loaded from a file. Put the +visited file in `snippet-mode'." + (interactive) + (let* ((yas/buffer-local-condition 'always) + (templates (yas/all-templates (yas/get-snippet-tables))) + (template (and templates + (or (and (rest templates) ;; more than one template for same key + (yas/prompt-for-template templates + "Choose a snippet template to edit: ")) + (car templates))))) + + (when template + (yas/visit-snippet-file-1 template)))) + +(defun yas/visit-snippet-file-1 (template) + (let ((file (yas/template-file template))) + (cond ((and file (file-exists-p file)) + (find-file-other-window file) + (snippet-mode)) + (file + (message "Original file %s no longer exists!" file)) + (t + (message "This snippet was not loaded from a file!"))))) + +(defun yas/guess-snippet-directories-1 (table &optional suffix) + "Guesses possible snippet subdirsdirectories for TABLE." + (unless suffix + (setq suffix (yas/snippet-table-name table))) + (cons suffix + (mapcan #'(lambda (parent) + (yas/guess-snippet-directories-1 + parent + (concat (yas/snippet-table-name parent) "/" suffix))) + (yas/snippet-table-parents table)))) + +(defun yas/guess-snippet-directories () + "Try to guess suitable directories based on the current active +tables. + +Returns a a list of options alist TABLE -> DIRS where DIRS are +all the possibly directories where snippets of table might be +lurking." + (let ((main-dir (or (and (listp yas/root-directory) + (first yas/root-directory)) + yas/root-directory + (setq yas/root-directory "~/.emacs.d/snippets"))) + (tables (yas/get-snippet-tables))) + ;; HACK! the snippet table created here is a dummy table that + ;; holds the correct name so that `yas/make-directory-maybe' can + ;; work. The real table, if it does not exist in + ;; yas/snippet-tables will be created when the first snippet for + ;; that mode is loaded. + ;; + (unless (gethash major-mode yas/snippet-tables) + (setq tables (cons (yas/make-snippet-table (symbol-name major-mode)) + tables))) + + (mapcar #'(lambda (table) + (cons table + (mapcar #'(lambda (subdir) + (concat main-dir "/" subdir)) + (yas/guess-snippet-directories-1 table)))) + tables))) + +(defun yas/make-directory-maybe (table-and-dirs &optional main-table-string) + "Returns a dir inside TABLE-AND-DIRS, prompts for creation if none exists." + (or (some #'(lambda (dir) (when (file-directory-p dir) dir)) (cdr table-and-dirs)) + (let ((candidate (first (cdr table-and-dirs)))) + (if (y-or-n-p (format "Guessed directory (%s) for%s%s table \"%s\" does not exist! Create? " + candidate + (if (gethash (intern (yas/snippet-table-name (car table-and-dirs))) + yas/snippet-tables) + "" + " brand new") + (or main-table-string + "") + (yas/snippet-table-name (car table-and-dirs)))) + (progn + (make-directory candidate 'also-make-parents) + ;; create the .yas-parents file here... + candidate))))) + +(defun yas/new-snippet (&optional choose-instead-of-guess) + "" + (interactive "P") + (let* ((guessed-directories (yas/guess-snippet-directories)) + (option (or (and choose-instead-of-guess + (some #'(lambda (fn) + (funcall fn "Choose a snippet table: " + guessed-directories + #'(lambda (option) + (yas/snippet-table-name (car option))))) + yas/prompt-functions)) + (first guessed-directories))) + (chosen)) + (setq chosen (yas/make-directory-maybe option (unless choose-instead-of-guess + " main"))) + (unless (or chosen + choose-instead-of-guess) + (if (y-or-n-p (format "Continue guessing for other active tables %s? " + (mapcar #'(lambda (table-and-dirs) + (yas/snippet-table-name (car table-and-dirs))) + (rest guessed-directories)))) + (setq chosen (some #'yas/make-directory-maybe + (rest guessed-directories))))) + (unless (or chosen + choose-instead-of-guess) + (when (y-or-n-p "Having trouble... use snippet root dir? ") + (setq chosen (if (listp yas/root-directory) + (first yas/root-directory) + yas/root-directory)))) + (if chosen + (let ((default-directory chosen) + (name (read-from-minibuffer "Enter a snippet name: "))) + (find-file-other-window (concat name + ".yasnippet")) + (snippet-mode) + (unless (and choose-instead-of-guess + (not (y-or-n-p "Insert a snippet with useful headers? "))) + (yas/expand-snippet (format + "\ +# -*- mode: snippet -*- +# name: %s +# key: $1${2: +# binding: \"${3:keybinding}\"}${4: +# expand-env: ((${5:some-var} ${6:some-value}))} +# -- +$0" name)))) + (message "[yas] aborted snippet creation.")))) + +(defun yas/find-snippets (&optional same-window ) + "Look for user snippets in guessed current mode's directory. + +Calls `find-file' interactively in the guessed directory. + +With prefix arg SAME-WINDOW opens the buffer in the same window. + +Because snippets can be loaded from many different locations, +this has to guess the correct directory using +`yas/guess-snippet-directories', which returns a list of +options. + +If any one of these exists, it is taken and `find-file' is called +there, otherwise, proposes to create the first option returned by +`yas/guess-snippet-directories'." + (interactive "P") + (let* ((guessed-directories (yas/guess-snippet-directories)) + (chosen) + (buffer)) + (setq chosen (yas/make-directory-maybe (first guessed-directories) " main")) + (unless chosen + (if (y-or-n-p (format "Continue guessing for other active tables %s? " + (mapcar #'(lambda (table-and-dirs) + (yas/snippet-table-name (car table-and-dirs))) + (rest guessed-directories)))) + (setq chosen (some #'yas/make-directory-maybe + (rest guessed-directories))))) + (unless chosen + (when (y-or-n-p "Having trouble... go to snippet root dir? ") + (setq chosen (if (listp yas/root-directory) + (first yas/root-directory) + yas/root-directory)))) + (if chosen + (let ((default-directory chosen)) + (setq buffer (call-interactively (if same-window + 'find-file + 'find-file-other-window))) + (when buffer + (save-excursion + (set-buffer buffer) + (when (eq major-mode 'fundamental-mode) + (snippet-mode))))) + (message "Could not guess snippet dir!")))) + +(defun yas/compute-major-mode-and-parents (file &optional prompt-if-failed no-hierarchy-parents) + (let* ((file-dir (and file + (directory-file-name (or (locate-dominating-file file ".yas-make-groups") + (directory-file-name (file-name-directory file)))))) + (major-mode-name (and file-dir + (file-name-nondirectory file-dir))) + (parent-file-dir (and file-dir + (directory-file-name (file-name-directory file-dir)))) + (parent-mode-name (and parent-file-dir + (not no-hierarchy-parents) + (file-name-nondirectory parent-file-dir))) + (major-mode-sym (or (and major-mode-name + (intern major-mode-name)) + (when prompt-if-failed + (read-from-minibuffer + "[yas] Cannot auto-detect major mode! Enter a major mode: ")))) + (parent-mode-sym (and parent-mode-name + (intern parent-mode-name))) + (extra-parents-file-name (concat file-dir "/.yas-parents")) + (more-parents (when (file-readable-p extra-parents-file-name) + (mapcar #'intern + (split-string + (with-temp-buffer + (insert-file-contents extra-parents-file-name) + (buffer-substring-no-properties (point-min) + (point-max)))))))) + (when major-mode-sym + (remove nil (append (list major-mode-sym parent-mode-sym) + more-parents))))) + +(defun yas/load-snippet-buffer (&optional kill) + "Parse and load current buffer's snippet definition. + +With optional prefix argument KILL quit the window and buffer." + (interactive "P") + (if buffer-file-name + (let ((major-mode-and-parent (yas/compute-major-mode-and-parents buffer-file-name))) + (if major-mode-and-parent + (let* ((parsed (yas/parse-template buffer-file-name)) + (name (and parsed + (third parsed)))) + (when name + (let ((yas/better-guess-for-replacements t)) + (yas/define-snippets (car major-mode-and-parent) + (list parsed) + (cdr major-mode-and-parent))) + (when (and (buffer-modified-p) + (y-or-n-p "Save snippet? ")) + (save-buffer)) + (if kill + (quit-window kill) + (message "[yas] Snippet \"%s\" loaded for %s." + name + (car major-mode-and-parent))))) + (message "[yas] Cannot load snippet for unknown major mode"))) + (message "Save the buffer as a file first!"))) + +(defun yas/tryout-snippet (&optional debug) + "Test current buffers's snippet template in other buffer." + (interactive "P") + (let* ((major-mode-and-parent (yas/compute-major-mode-and-parents buffer-file-name)) + (parsed (yas/parse-template)) + (test-mode (or (and (car major-mode-and-parent) + (fboundp (car major-mode-and-parent)) + (car major-mode-and-parent)) + (intern (read-from-minibuffer "[yas] please input a mode: ")))) + (template (and parsed + (fboundp test-mode) + (yas/make-template (second parsed) + (third parsed) + nil + (sixth parsed) + nil + nil)))) + (cond (template + (let ((buffer-name (format "*YAS TEST: %s*" (yas/template-name template)))) + (set-buffer (switch-to-buffer buffer-name)) + (erase-buffer) + (setq buffer-undo-list nil) + (funcall test-mode) + (yas/expand-snippet (yas/template-content template) + (point-min) + (point-max) + (yas/template-expand-env template)) + (when debug + (add-hook 'post-command-hook 'yas/debug-snippet-vars 't 'local)))) + (t + (message "[yas] Cannot test snippet for unknown major mode"))))) + + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; User convenience functions, for using in snippet definitions + +(defvar yas/modified-p nil + "Non-nil if field has been modified by user or transformation.") + +(defvar yas/moving-away-p nil + "Non-nil if user is about to exit field.") + +(defvar yas/text nil + "Contains current field text.") + +(defun yas/substr (str pattern &optional subexp) + "Search PATTERN in STR and return SUBEXPth match. + +If found, the content of subexp group SUBEXP (default 0) is + returned, or else the original STR will be returned." + (let ((grp (or subexp 0))) + (save-match-data + (if (string-match pattern str) + (match-string-no-properties grp str) + str)))) + +(defun yas/choose-value (possibilities) + "Prompt for a string in the list POSSIBILITIES and return it." + (unless (or yas/moving-away-p + yas/modified-p) + (some #'(lambda (fn) + (funcall fn "Choose: " possibilities)) + yas/prompt-functions))) + +(defun yas/key-to-value (alist) + "Prompt for a string in the list POSSIBILITIES and return it." + (unless (or yas/moving-away-p + yas/modified-p) + (let ((key (read-key-sequence ""))) + (when (stringp key) + (or (cdr (find key alist :key #'car :test #'string=)) + key))))) + +(defun yas/throw (text) + "Throw a yas/exception with TEXT as the reason." + (throw 'yas/exception (cons 'yas/exception text))) + +(defun yas/verify-value (possibilities) + "Verify that the current field value is in POSSIBILITIES + +Otherwise throw exception." + (when (and yas/moving-away-p (notany #'(lambda (pos) (string= pos yas/text)) possibilities)) + (yas/throw (format "[yas] field only allows %s" possibilities)))) + +(defun yas/field-value (number) + (let* ((snippet (car (yas/snippets-at-point))) + (field (and snippet + (yas/snippet-find-field snippet number)))) + (when field + (yas/field-text-for-display field)))) + +(defun yas/default-from-field (number) + (unless yas/modified-p + (yas/field-value number))) + +(defun yas/inside-string () + (equal 'font-lock-string-face (get-char-property (1- (point)) 'face))) + + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; Snippet expansion and field management + +(defvar yas/active-field-overlay nil + "Overlays the currently active field.") + +(defvar yas/field-protection-overlays nil + "Two overlays protect the current active field ") + +(defconst yas/prefix nil + "A prefix argument for expansion direct from keybindings") + +(defvar yas/deleted-text nil + "The text deleted in the last snippet expansion.") + +(defvar yas/selected-text nil + "The selected region deleted on the last snippet expansion.") + +(defvar yas/start-column nil + "The column where the snippet expansion started.") + +(make-variable-buffer-local 'yas/active-field-overlay) +(make-variable-buffer-local 'yas/field-protection-overlays) +(make-variable-buffer-local 'yas/deleted-text) + +(defstruct (yas/snippet (:constructor yas/make-snippet ())) + "A snippet. + +..." + (fields '()) + (exit nil) + (id (yas/snippet-next-id) :read-only t) + (control-overlay nil) + active-field + ;; stacked expansion: the `previous-active-field' slot saves the + ;; active field where the child expansion took place + previous-active-field + force-exit) + +(defstruct (yas/field (:constructor yas/make-field (number start end parent-field))) + "A field." + number + start end + parent-field + (mirrors '()) + (transform nil) + (modified-p nil) + next) + +(defstruct (yas/mirror (:constructor yas/make-mirror (start end transform))) + "A mirror." + start end + (transform nil) + next) + +(defstruct (yas/exit (:constructor yas/make-exit (marker))) + marker + next) + +(defun yas/apply-transform (field-or-mirror field) + "Calculate the value of the field/mirror. If there's a transform +for this field, apply it. Otherwise, returned nil." + (let* ((yas/text (yas/field-text-for-display field)) + (text yas/text) + (yas/modified-p (yas/field-modified-p field)) + (yas/moving-away-p nil) + (transform (if (yas/mirror-p field-or-mirror) + (yas/mirror-transform field-or-mirror) + (yas/field-transform field-or-mirror))) + (start-point (if (yas/mirror-p field-or-mirror) + (yas/mirror-start field-or-mirror) + (yas/field-start field-or-mirror))) + (transformed (and transform + (save-excursion + (goto-char start-point) + (yas/read-and-eval-string transform))))) + transformed)) + +(defsubst yas/replace-all (from to &optional text) + "Replace all occurance from FROM to TO. + +With optional string TEXT do it in that string." + (if text + (replace-regexp-in-string (regexp-quote from) to text t t) + (goto-char (point-min)) + (while (search-forward from nil t) + (replace-match to t t text)))) + +(defun yas/snippet-find-field (snippet number) + (find-if #'(lambda (field) + (eq number (yas/field-number field))) + (yas/snippet-fields snippet))) + +(defun yas/snippet-sort-fields (snippet) + "Sort the fields of SNIPPET in navigation order." + (setf (yas/snippet-fields snippet) + (sort (yas/snippet-fields snippet) + '(lambda (field1 field2) + (yas/snippet-field-compare field1 field2))))) + +(defun yas/snippet-field-compare (field1 field2) + "Compare two fields. The field with a number is sorted first. +If they both have a number, compare through the number. If neither +have, compare through the field's start point" + (let ((n1 (yas/field-number field1)) + (n2 (yas/field-number field2))) + (if n1 + (if n2 + (< n1 n2) + t) + (if n2 + nil + (< (yas/field-start field1) + (yas/field-start field2)))))) + +(defun yas/field-probably-deleted-p (snippet field) + "Guess if SNIPPET's FIELD should be skipped." + (and (zerop (- (yas/field-start field) (yas/field-end field))) + (or (yas/field-parent-field field) + (and (eq field (car (last (yas/snippet-fields snippet)))) + (= (yas/field-start field) (overlay-end (yas/snippet-control-overlay snippet))))))) + +(defun yas/snippets-at-point (&optional all-snippets) + "Return a sorted list of snippets at point, most recently +inserted first." + (sort + (remove nil (remove-duplicates (mapcar #'(lambda (ov) + (overlay-get ov 'yas/snippet)) + (if all-snippets + (overlays-in (point-min) (point-max)) + (overlays-at (point)))))) + #'(lambda (s1 s2) + (<= (yas/snippet-id s2) (yas/snippet-id s1))))) + +(defun yas/next-field-or-maybe-expand () + "Try to expand a snippet at a key before point, otherwise +delegate to `yas/next-field'." + (interactive) + (if yas/triggers-in-field + (let ((yas/fallback-behavior 'return-nil) + (active-field (overlay-get yas/active-field-overlay 'yas/field))) + (when active-field + (unless (yas/expand-1 active-field) + (yas/next-field)))) + (yas/next-field))) + +(defun yas/next-field (&optional arg) + "Navigate to next field. If there's none, exit the snippet." + (interactive) + (let* ((arg (or arg + 1)) + (snippet (first (yas/snippets-at-point))) + (active-field (overlay-get yas/active-field-overlay 'yas/field)) + (live-fields (remove-if #'(lambda (field) + (and (not (eq field active-field)) + (yas/field-probably-deleted-p snippet field))) + (yas/snippet-fields snippet))) + (active-field-pos (position active-field live-fields)) + (target-pos (and active-field-pos (+ arg active-field-pos))) + (target-field (nth target-pos live-fields))) + ;; First check if we're moving out of a field with a transform + ;; + (when (and active-field + (yas/field-transform active-field)) + (let* ((yas/moving-away-p t) + (yas/text (yas/field-text-for-display active-field)) + (text yas/text) + (yas/modified-p (yas/field-modified-p active-field))) + ;; primary field transform: exit call to field-transform + (yas/read-and-eval-string (yas/field-transform active-field)))) + ;; Now actually move... + (cond ((>= target-pos (length live-fields)) + (yas/exit-snippet snippet)) + (target-field + (yas/move-to-field snippet target-field)) + (t + nil)))) + +(defun yas/place-overlays (snippet field) + "Correctly place overlays for SNIPPET's FIELD" + (yas/make-move-field-protection-overlays snippet field) + (yas/make-move-active-field-overlay snippet field)) + +(defun yas/move-to-field (snippet field) + "Update SNIPPET to move to field FIELD. + +Also create some protection overlays" + (goto-char (yas/field-start field)) + (setf (yas/snippet-active-field snippet) field) + (yas/place-overlays snippet field) + (overlay-put yas/active-field-overlay 'yas/field field) + ;; primary field transform: first call to snippet transform + (unless (yas/field-modified-p field) + (if (yas/field-update-display field snippet) + (let ((inhibit-modification-hooks t)) + (yas/update-mirrors snippet)) + (setf (yas/field-modified-p field) nil)))) + +(defun yas/prev-field () + "Navigate to prev field. If there's none, exit the snippet." + (interactive) + (yas/next-field -1)) + +(defun yas/abort-snippet (&optional snippet) + (interactive) + (let ((snippet (or snippet + (car (yas/snippets-at-point))))) + (when snippet + (setf (yas/snippet-force-exit snippet) t)))) + +(defun yas/exit-snippet (snippet) + "Goto exit-marker of SNIPPET." + (interactive) + (setf (yas/snippet-force-exit snippet) t) + (goto-char (if (yas/snippet-exit snippet) + (yas/exit-marker (yas/snippet-exit snippet)) + (overlay-end (yas/snippet-control-overlay snippet))))) + +(defun yas/exit-all-snippets () + "Exit all snippets." + (interactive) + (mapc #'(lambda (snippet) + (yas/exit-snippet snippet) + (yas/check-commit-snippet)) + (yas/snippets-at-point))) + + +;;; Apropos markers-to-points: +;;; +;;; This was found useful for performance reasons, so that an +;;; excessive number of live markers aren't kept around in the +;;; `buffer-undo-list'. However, in `markers-to-points', the +;;; set-to-nil markers can't simply be discarded and replaced with +;;; fresh ones in `points-to-markers'. The original marker that was +;;; just set to nil has to be reused. +;;; +;;; This shouldn't bring horrible problems with undo/redo, but it +;;; you never know +;;; + +(defun yas/markers-to-points (snippet) + "Convert all markers in SNIPPET to a cons (POINT . MARKER) +where POINT is the original position of the marker and MARKER is +the original marker object with the position set to nil." + (dolist (field (yas/snippet-fields snippet)) + (let ((start (marker-position (yas/field-start field))) + (end (marker-position (yas/field-end field)))) + (set-marker (yas/field-start field) nil) + (set-marker (yas/field-end field) nil) + (setf (yas/field-start field) (cons start (yas/field-start field))) + (setf (yas/field-end field) (cons end (yas/field-end field)))) + (dolist (mirror (yas/field-mirrors field)) + (let ((start (marker-position (yas/mirror-start mirror))) + (end (marker-position (yas/mirror-end mirror)))) + (set-marker (yas/mirror-start mirror) nil) + (set-marker (yas/mirror-end mirror) nil) + (setf (yas/mirror-start mirror) (cons start (yas/mirror-start mirror))) + (setf (yas/mirror-end mirror) (cons end (yas/mirror-end mirror)))))) + (let ((snippet-exit (yas/snippet-exit snippet))) + (when snippet-exit + (let ((exit (marker-position (yas/exit-marker snippet-exit)))) + (set-marker (yas/exit-marker snippet-exit) nil) + (setf (yas/exit-marker snippet-exit) (cons exit (yas/exit-marker snippet-exit))))))) + +(defun yas/points-to-markers (snippet) + "Convert all cons (POINT . MARKER) in SNIPPET to markers. This +is done by setting MARKER to POINT with `set-marker'." + (dolist (field (yas/snippet-fields snippet)) + (setf (yas/field-start field) (set-marker (cdr (yas/field-start field)) + (car (yas/field-start field)))) + (setf (yas/field-end field) (set-marker (cdr (yas/field-end field)) + (car (yas/field-end field)))) + (dolist (mirror (yas/field-mirrors field)) + (setf (yas/mirror-start mirror) (set-marker (cdr (yas/mirror-start mirror)) + (car (yas/mirror-start mirror)))) + (setf (yas/mirror-end mirror) (set-marker (cdr (yas/mirror-end mirror)) + (car (yas/mirror-end mirror)))))) + (let ((snippet-exit (yas/snippet-exit snippet))) + (when snippet-exit + (setf (yas/exit-marker snippet-exit) (set-marker (cdr (yas/exit-marker snippet-exit)) + (car (yas/exit-marker snippet-exit))))))) + +(defun yas/commit-snippet (snippet &optional no-hooks) + "Commit SNIPPET, but leave point as it is. This renders the +snippet as ordinary text. + +Return a buffer position where the point should be placed if +exiting the snippet. + +NO-HOOKS means don't run the `yas/after-exit-snippet-hook' hooks." + + (let ((control-overlay (yas/snippet-control-overlay snippet)) + yas/snippet-beg + yas/snippet-end) + ;; + ;; Save the end of the moribund snippet in case we need to revive it + ;; its original expansion. + ;; + (when (and control-overlay + (overlay-buffer control-overlay)) + (setq yas/snippet-beg (overlay-start control-overlay)) + (setq yas/snippet-end (overlay-end control-overlay)) + (delete-overlay control-overlay)) + + (let ((inhibit-modification-hooks t)) + (when yas/active-field-overlay + (delete-overlay yas/active-field-overlay)) + (when yas/field-protection-overlays + (mapc #'delete-overlay yas/field-protection-overlays))) + + ;; stacked expansion: if the original expansion took place from a + ;; field, make sure we advance it here at least to + ;; `yas/snippet-end'... + ;; + (let ((previous-field (yas/snippet-previous-active-field snippet))) + (when (and yas/snippet-end previous-field) + (yas/advance-end-maybe previous-field yas/snippet-end))) + + ;; Convert all markers to points, + ;; + (yas/markers-to-points snippet) + + ;; Take care of snippet revival + ;; + (if yas/snippet-revival + (push `(apply yas/snippet-revive ,yas/snippet-beg ,yas/snippet-end ,snippet) + buffer-undo-list) + ;; Dismember the snippet... this is useful if we get called + ;; again from `yas/take-care-of-redo'.... + (setf (yas/snippet-fields snippet) nil)) + + ;; XXX: `yas/after-exit-snippet-hook' should be run with + ;; `yas/snippet-beg' and `yas/snippet-end' bound. That might not + ;; be the case if the main overlay had somehow already + ;; disappeared, which sometimes happens when the snippet's messed + ;; up... + ;; + (unless no-hooks (run-hooks 'yas/after-exit-snippet-hook))) + + (message "[yas] snippet exited.")) + +(defun yas/check-commit-snippet () + "Checks if point exited the currently active field of the +snippet, if so cleans up the whole snippet up." + (let* ((snippets (yas/snippets-at-point 'all-snippets)) + (snippets-left snippets)) + (dolist (snippet snippets) + (let ((active-field (yas/snippet-active-field snippet))) + (cond ((or (prog1 (yas/snippet-force-exit snippet) + (setf (yas/snippet-force-exit snippet) nil)) + (not (and active-field (yas/field-contains-point-p active-field)))) + (setq snippets-left (delete snippet snippets-left)) + (yas/commit-snippet snippet snippets-left)) + ((and active-field + (or (not yas/active-field-overlay) + (not (overlay-buffer yas/active-field-overlay)))) + ;; + ;; stacked expansion: this case is mainly for recent + ;; snippet exits that place us back int the field of + ;; another snippet + ;; + (save-excursion + (yas/move-to-field snippet active-field) + (yas/update-mirrors snippet))) + (t + nil)))) + (unless snippets-left + (remove-hook 'post-command-hook 'yas/post-command-handler 'local) + (remove-hook 'pre-command-hook 'yas/pre-command-handler 'local)))) + +(defun yas/field-contains-point-p (field &optional point) + (let ((point (or point + (point)))) + (and (>= point (yas/field-start field)) + (<= point (yas/field-end field))))) + +(defun yas/field-text-for-display (field) + "Return the propertized display text for field FIELD. " + (buffer-substring (yas/field-start field) (yas/field-end field))) + +(defun yas/undo-in-progress () + "True if some kind of undo is in progress" + (or undo-in-progress + (eq this-command 'undo) + (eq this-command 'redo))) + +(defun yas/make-control-overlay (snippet start end) + "Creates the control overlay that surrounds the snippet and +holds the keymap." + (let ((overlay (make-overlay start + end + nil + nil + t))) + (overlay-put overlay 'keymap yas/keymap) + (overlay-put overlay 'yas/snippet snippet) + overlay)) + +(defun yas/skip-and-clear-or-delete-char (&optional field) + "Clears unmodified field if at field start, skips to next tab. + +Otherwise deletes a character normally by calling `delete-char'." + (interactive) + (let ((field (or field + (and yas/active-field-overlay + (overlay-buffer yas/active-field-overlay) + (overlay-get yas/active-field-overlay 'yas/field))))) + (cond ((and field + (not (yas/field-modified-p field)) + (eq (point) (marker-position (yas/field-start field)))) + (yas/skip-and-clear field) + (yas/next-field 1)) + (t + (call-interactively 'delete-char))))) + +(defun yas/skip-and-clear (field) + "Deletes the region of FIELD and sets it modified state to t" + (setf (yas/field-modified-p field) t) + (delete-region (yas/field-start field) (yas/field-end field))) + +(defun yas/make-move-active-field-overlay (snippet field) + "Place the active field overlay in SNIPPET's FIELD. + +Move the overlay, or create it if it does not exit." + (if (and yas/active-field-overlay + (overlay-buffer yas/active-field-overlay)) + (move-overlay yas/active-field-overlay + (yas/field-start field) + (yas/field-end field)) + (setq yas/active-field-overlay + (make-overlay (yas/field-start field) + (yas/field-end field) + nil nil t)) + (overlay-put yas/active-field-overlay 'priority 100) + (overlay-put yas/active-field-overlay 'face 'yas/field-highlight-face) + (overlay-put yas/active-field-overlay 'yas/snippet snippet) + (overlay-put yas/active-field-overlay 'modification-hooks '(yas/on-field-overlay-modification)) + (overlay-put yas/active-field-overlay 'insert-in-front-hooks + '(yas/on-field-overlay-modification)) + (overlay-put yas/active-field-overlay 'insert-behind-hooks + '(yas/on-field-overlay-modification)))) + +(defun yas/on-field-overlay-modification (overlay after? beg end &optional length) + "Clears the field and updates mirrors, conditionally. + +Only clears the field if it hasn't been modified and it point it +at field start. This hook doesn't do anything if an undo is in +progress." + (unless (yas/undo-in-progress) + (let ((field (overlay-get yas/active-field-overlay 'yas/field))) + (cond (after? + (yas/advance-end-maybe field (overlay-end overlay)) +;;; primary field transform: normal calls to expression + (let ((saved-point (point))) + (yas/field-update-display field (car (yas/snippets-at-point))) + (goto-char saved-point)) + (yas/update-mirrors (car (yas/snippets-at-point)))) + (field + (when (and (not after?) + (not (yas/field-modified-p field)) + (eq (point) (if (markerp (yas/field-start field)) + (marker-position (yas/field-start field)) + (yas/field-start field)))) + (yas/skip-and-clear field)) + (setf (yas/field-modified-p field) t)))))) + +;;; Apropos protection overlays: +;;; +;;; These exist for nasty users who will try to delete parts of the +;;; snippet outside the active field. Actual protection happens in +;;; `yas/on-protection-overlay-modification'. +;;; +;;; Currently this signals an error which inhibits the command. For +;;; commands that move point (like `kill-line'), point is restored in +;;; the `yas/post-command-handler' using a global +;;; `yas/protection-violation' variable. +;;; +;;; Alternatively, I've experimented with an implementation that +;;; commits the snippet before actually calling `this-command' +;;; interactively, and then signals an eror, which is ignored. but +;;; blocks all other million modification hooks. This presented some +;;; problems with stacked expansion. +;;; + +(defun yas/make-move-field-protection-overlays (snippet field) + "Place protection overlays surrounding SNIPPET's FIELD. + +Move the overlays, or create them if they do not exit." + (let ((start (yas/field-start field)) + (end (yas/field-end field))) + ;; First check if the (1+ end) is contained in the buffer, + ;; otherwise we'll have to do a bit of cheating and silently + ;; insert a newline. the `(1+ (buffer-size))' should prevent this + ;; when using stacked expansion + ;; + (when (< (buffer-size) end) + (save-excursion + (let ((inhibit-modification-hooks t)) + (goto-char (point-max)) + (newline)))) + ;; go on to normal overlay creation/moving + ;; + (cond ((and yas/field-protection-overlays + (every #'overlay-buffer yas/field-protection-overlays)) + (move-overlay (first yas/field-protection-overlays) (1- start) start) + (move-overlay (second yas/field-protection-overlays) end (1+ end))) + (t + (setq yas/field-protection-overlays + (list (make-overlay (1- start) start nil t nil) + (make-overlay end (1+ end) nil t nil))) + (dolist (ov yas/field-protection-overlays) + (overlay-put ov 'face 'yas/field-debug-face) + (overlay-put ov 'yas/snippet snippet) + ;; (overlay-put ov 'evaporate t) + (overlay-put ov 'modification-hooks '(yas/on-protection-overlay-modification))))))) + +(defvar yas/protection-violation nil + "When non-nil, signals attempts to erronesly exit or modify the snippet. + +Functions in the `post-command-hook', for example +`yas/post-command-handler' can check it and reset its value to +nil. The variables value is the point where the violation +originated") + +(defun yas/on-protection-overlay-modification (overlay after? beg end &optional length) + "Signals a snippet violation, then issues error. + +The error should be ignored in `debug-ignored-errors'" + (cond ((not (or after? + (yas/undo-in-progress))) + (setq yas/protection-violation (point)) + (error "Exit the snippet first!")))) + +(add-to-list 'debug-ignored-errors "^Exit the snippet first!$") + + +;;; Apropos stacked expansion: +;;; +;;; the parent snippet does not run its fields modification hooks +;;; (`yas/on-field-overlay-modification' and +;;; `yas/on-protection-overlay-modification') while the child snippet +;;; is active. This means, among other things, that the mirrors of the +;;; parent snippet are not updated, this only happening when one exits +;;; the child snippet. +;;; +;;; Unfortunately, this also puts some ugly (and not fully-tested) +;;; bits of code in `yas/expand-snippet' and +;;; `yas/commit-snippet'. I've tried to mark them with "stacked +;;; expansion:". +;;; +;;; This was thought to be safer in in an undo/redo perpective, but +;;; maybe the correct implementation is to make the globals +;;; `yas/active-field-overlay' and `yas/field-protection-overlays' be +;;; snippet-local and be active even while the child snippet is +;;; running. This would mean a lot of overlay modification hooks +;;; running, but if managed correctly (including overlay priorities) +;;; they should account for all situations... +;;; + +(defun yas/expand-snippet (template &optional start end expand-env) + "Expand snippet at current point. Text between START and END +will be deleted before inserting template." + (run-hooks 'yas/before-expand-snippet-hook) + + ;; If a region is active, set `yas/selected-text' + (setq yas/selected-text + (when mark-active + (prog1 (buffer-substring-no-properties (region-beginning) + (region-end)) + (unless start (setq start (region-beginning)) + (unless end (setq end (region-end))))))) + + (when start + (goto-char start)) + + ;; stacked expansion: shoosh the overlay modification hooks + ;; + (let ((to-delete (and start end (buffer-substring-no-properties start end))) + (start (or start (point))) + (end (or end (point))) + (inhibit-modification-hooks t) + (column (current-column)) + snippet) + + ;; Delete the region to delete, this *does* get undo-recorded. + ;; + (when (and to-delete + (> end start)) + (delete-region start end) + (setq yas/deleted-text to-delete)) + + ;; Narrow the region down to the template, shoosh the + ;; `buffer-undo-list', and create the snippet, the new snippet + ;; updates its mirrors once, so we are left with some plain text. + ;; The undo action for deleting this plain text will get recorded + ;; at the end of this function. + (save-restriction + (narrow-to-region start start) + (let ((buffer-undo-list t)) + ;; snippet creation might evaluate users elisp, which + ;; might generate errors, so we have to be ready to catch + ;; them mostly to make the undo information + ;; + (setq yas/start-column (save-restriction (widen) (current-column))) + (insert template) + + (setq snippet + (if expand-env + (let ((read-vars (condition-case err + (read expand-env) + (error nil)))) + (eval `(let ,read-vars + (yas/snippet-create (point-min) (point-max))))) + (yas/snippet-create (point-min) (point-max)))))) + + ;; stacked-expansion: This checks for stacked expansion, save the + ;; `yas/previous-active-field' and advance its boudary. + ;; + (let ((existing-field (and yas/active-field-overlay + (overlay-buffer yas/active-field-overlay) + (overlay-get yas/active-field-overlay 'yas/field)))) + (when existing-field + (setf (yas/snippet-previous-active-field snippet) existing-field) + (yas/advance-end-maybe existing-field (overlay-end yas/active-field-overlay)))) + + ;; Exit the snippet immediately if no fields + ;; + (unless (yas/snippet-fields snippet) + (yas/exit-snippet snippet)) + + ;; Push two undo actions: the deletion of the inserted contents of + ;; the new snippet (without the "key") followed by an apply of + ;; `yas/take-care-of-redo' on the newly inserted snippet boundaries + ;; + (let ((start (overlay-start (yas/snippet-control-overlay snippet))) + (end (overlay-end (yas/snippet-control-overlay snippet)))) + (push (cons start end) buffer-undo-list) + (push `(apply yas/take-care-of-redo ,start ,end ,snippet) + buffer-undo-list)) + ;; Now, move to the first field + ;; + (let ((first-field (car (yas/snippet-fields snippet)))) + (when first-field + (yas/move-to-field snippet first-field)))) + (message "[yas] snippet expanded.")) + +(defun yas/take-care-of-redo (beg end snippet) + "Commits SNIPPET, which in turn pushes an undo action for +reviving it. + +Meant to exit in the `buffer-undo-list'." + ;; slightly optimize: this action is only needed for snippets with + ;; at least one field + (when (yas/snippet-fields snippet) + (yas/commit-snippet snippet 'no-hooks))) + +(defun yas/snippet-revive (beg end snippet) + "Revives the SNIPPET and creates a control overlay from BEG to +END. + +BEG and END are, we hope, the original snippets boudaries. All +the markers/points exiting existing inside SNIPPET should point +to their correct locations *at the time the snippet is revived*. + +After revival, push the `yas/take-care-of-redo' in the +`buffer-undo-list'" + ;; Reconvert all the points to markers + ;; + (yas/points-to-markers snippet) + ;; When at least one editable field existed in the zombie snippet, + ;; try to revive the whole thing... + ;; + (let ((target-field (or (yas/snippet-active-field snippet) + (car (yas/snippet-fields snippet))))) + (when target-field + (setf (yas/snippet-control-overlay snippet) (yas/make-control-overlay snippet beg end)) + (overlay-put (yas/snippet-control-overlay snippet) 'yas/snippet snippet) + + (yas/move-to-field snippet target-field) + + (add-hook 'post-command-hook 'yas/post-command-handler nil t) + (add-hook 'pre-command-hook 'yas/pre-command-handler t t) + + (push `(apply yas/take-care-of-redo ,beg ,end ,snippet) + buffer-undo-list)))) + +(defun yas/snippet-create (begin end) + "Creates a snippet from an template inserted between BEGIN and END. + +Returns the newly created snippet." + (let ((snippet (yas/make-snippet))) + (goto-char begin) + (yas/snippet-parse-create snippet) + + ;; Sort and link each field + (yas/snippet-sort-fields snippet) + + ;; Create keymap overlay for snippet + (setf (yas/snippet-control-overlay snippet) + (yas/make-control-overlay snippet (point-min) (point-max))) + + ;; Move to end + (goto-char (point-max)) + + ;; Setup hooks + (add-hook 'post-command-hook 'yas/post-command-handler nil t) + (add-hook 'pre-command-hook 'yas/pre-command-handler t t) + + snippet)) + + +;;; Apropos adjacencies: Once the $-constructs bits like "$n" and +;;; "${:n" are deleted in the recently expanded snippet, we might +;;; actually have many fields, mirrors (and the snippet exit) in the +;;; very same position in the buffer. Therefore we need to single-link +;;; the fields-or-mirrors-or-exit, which I have called "fom", +;;; according to their original positions in the buffer. +;;; +;;; Then we have operation `yas/advance-end-maybe' and +;;; `yas/advance-start-maybe', which conditionally push the starts and +;;; ends of these foms down the chain. +;;; +;;; This allows for like the printf with the magic ",": +;;; +;;; printf ("${1:%s}\\n"${1:$(if (string-match "%" text) "," "\);")} \ +;;; $2${1:$(if (string-match "%" text) "\);" "")}$0 +;;; + +(defun yas/fom-start (fom) + (cond ((yas/field-p fom) + (yas/field-start fom)) + ((yas/mirror-p fom) + (yas/mirror-start fom)) + (t + (yas/exit-marker fom)))) + +(defun yas/fom-end (fom) + (cond ((yas/field-p fom) + (yas/field-end fom)) + ((yas/mirror-p fom) + (yas/mirror-end fom)) + (t + (yas/exit-marker fom)))) + +(defun yas/fom-next (fom) + (cond ((yas/field-p fom) + (yas/field-next fom)) + ((yas/mirror-p fom) + (yas/mirror-next fom)) + (t + (yas/exit-next fom)))) + +(defun yas/calculate-adjacencies (snippet) + "Calculate adjacencies for fields or mirrors of SNIPPET. + +This is according to their relative positions in the buffer, and +has to be called before the $-constructs are deleted." + (flet ((yas/fom-set-next-fom (fom nextfom) + (cond ((yas/field-p fom) + (setf (yas/field-next fom) nextfom)) + ((yas/mirror-p fom) + (setf (yas/mirror-next fom) nextfom)) + (t + (setf (yas/exit-next fom) nextfom)))) + (yas/compare-fom-begs (fom1 fom2) + (> (yas/fom-start fom2) (yas/fom-start fom1))) + (yas/link-foms (fom1 fom2) + (yas/fom-set-next-fom fom1 fom2))) + ;; make some yas/field, yas/mirror and yas/exit soup + (let ((soup)) + (when (yas/snippet-exit snippet) + (push (yas/snippet-exit snippet) soup)) + (dolist (field (yas/snippet-fields snippet)) + (push field soup) + (dolist (mirror (yas/field-mirrors field)) + (push mirror soup))) + (setq soup + (sort soup + #'yas/compare-fom-begs)) + (when soup + (reduce #'yas/link-foms soup))))) + +(defun yas/advance-end-maybe (fom newend) + "Maybe advance FOM's end to NEWEND if it needs it. + +If it does, also: + +* call `yas/advance-start-maybe' on FOM's next fom. + +* in case FOM is field call `yas/advance-end-maybe' on its parent + field" + (when (and fom (< (yas/fom-end fom) newend)) + (set-marker (yas/fom-end fom) newend) + (yas/advance-start-maybe (yas/fom-next fom) newend) + (if (and (yas/field-p fom) + (yas/field-parent-field fom)) + (yas/advance-end-maybe (yas/field-parent-field fom) newend)))) + +(defun yas/advance-start-maybe (fom newstart) + "Maybe advance FOM's start to NEWSTART if it needs it. + +If it does, also call `yas/advance-end-maybe' on FOM." + (when (and fom (< (yas/fom-start fom) newstart)) + (set-marker (yas/fom-start fom) newstart) + (yas/advance-end-maybe fom newstart))) + +(defvar yas/dollar-regions nil + "When expanding the snippet the \"parse-create\" functions add + cons cells to this var") + +(defun yas/snippet-parse-create (snippet) + "Parse a recently inserted snippet template, creating all +necessary fields, mirrors and exit points. + +Meant to be called in a narrowed buffer, does various passes" + (let ((parse-start (point))) + ;; Reset the yas/dollar-regions + ;; + (setq yas/dollar-regions nil) + ;; protect escaped quote, backquotes and backslashes + ;; + (yas/protect-escapes nil '(?\\ ?` ?')) + ;; replace all backquoted expressions + ;; + (goto-char parse-start) + (yas/replace-backquotes) + ;; protect escapes again since previous steps might have generated + ;; more characters needing escaping + ;; + (goto-char parse-start) + (yas/protect-escapes) + ;; parse fields with {} + ;; + (goto-char parse-start) + (yas/field-parse-create snippet) + ;; parse simple mirrors and fields + ;; + (goto-char parse-start) + (yas/simple-mirror-parse-create snippet) + ;; parse mirror transforms + ;; + (goto-char parse-start) + (yas/transform-mirror-parse-create snippet) + ;; calculate adjacencies of fields and mirrors + ;; + (yas/calculate-adjacencies snippet) + ;; Delete $-constructs + ;; + (yas/delete-regions yas/dollar-regions) + ;; restore escapes + ;; + (goto-char parse-start) + (yas/restore-escapes) + ;; update mirrors for the first time + ;; + (yas/update-mirrors snippet) + ;; indent the best we can + ;; + (goto-char parse-start) + (yas/indent snippet))) + +(defun yas/indent-according-to-mode (snippet-markers) + "Indent current line according to mode, preserving +SNIPPET-MARKERS." + ;; XXX: Here seems to be the indent problem: + ;; + ;; `indent-according-to-mode' uses whatever + ;; `indent-line-function' is available. Some + ;; implementations of these functions delete text + ;; before they insert. If there happens to be a marker + ;; just after the text being deleted, the insertion + ;; actually happens after the marker, which misplaces + ;; it. + ;; + ;; This would also happen if we had used overlays with + ;; the `front-advance' property set to nil. + ;; + ;; This is why I have these `trouble-markers', they are the ones at + ;; they are the ones at the first non-whitespace char at the line + ;; (i.e. at `yas/real-line-beginning'. After indentation takes place + ;; we should be at the correct to restore them to. All other + ;; non-trouble-markers have been *pushed* and don't need special + ;; attention. + ;; + (goto-char (yas/real-line-beginning)) + (let ((trouble-markers (remove-if-not #'(lambda (marker) + (= marker (point))) + snippet-markers))) + (save-restriction + (widen) + (condition-case err + (indent-according-to-mode) + (error (message "[yas] warning: yas/indent-according-to-mode habing problems running %s" indent-line-function) + nil))) + (mapc #'(lambda (marker) + (set-marker marker (point))) + trouble-markers))) + +(defun yas/indent (snippet) + (let ((snippet-markers (yas/collect-snippet-markers snippet))) + ;; Look for those $> + (save-excursion + (while (re-search-forward "$>" nil t) + (delete-region (match-beginning 0) (match-end 0)) + (when (not (eq yas/indent-line 'auto)) + (yas/indent-according-to-mode snippet-markers)))) + ;; Now do stuff for 'fixed and 'auto + (save-excursion + (cond ((eq yas/indent-line 'fixed) + (while (and (zerop (forward-line)) + (zerop (current-column))) + (indent-to-column column))) + ((eq yas/indent-line 'auto) + (let ((end (set-marker (make-marker) (point-max))) + (indent-first-line-p yas/also-auto-indent-first-line)) + (while (and (zerop (if indent-first-line-p + (prog1 + (forward-line 0) + (setq indent-first-line-p nil)) + (forward-line 1))) + (not (eobp)) + (<= (point) end)) + (yas/indent-according-to-mode snippet-markers)))) + (t + nil))))) + +(defun yas/collect-snippet-markers (snippet) + "Make a list of all the markers used by SNIPPET." + (let (markers) + (dolist (field (yas/snippet-fields snippet)) + (push (yas/field-start field) markers) + (push (yas/field-end field) markers) + (dolist (mirror (yas/field-mirrors field)) + (push (yas/mirror-start mirror) markers) + (push (yas/mirror-end mirror) markers))) + (let ((snippet-exit (yas/snippet-exit snippet))) + (when (and snippet-exit + (marker-buffer (yas/exit-marker snippet-exit))) + (push (yas/exit-marker snippet-exit) markers))) + markers)) + +(defun yas/real-line-beginning () + (let ((c (char-after (line-beginning-position))) + (n (line-beginning-position))) + (while (or (eql c ?\ ) + (eql c ?\t)) + (incf n) + (setq c (char-after n))) + n)) + +(defun yas/escape-string (escaped) + (concat "YASESCAPE" (format "%d" escaped) "PROTECTGUARD")) + +(defun yas/protect-escapes (&optional text escaped) + "Protect all escaped characters with their numeric ASCII value. + +With optional string TEXT do it in string instead of buffer." + (let ((changed-text text) + (text-provided-p text)) + (mapc #'(lambda (escaped) + (setq changed-text + (yas/replace-all (concat "\\" (char-to-string escaped)) + (yas/escape-string escaped) + (when text-provided-p changed-text)))) + (or escaped yas/escaped-characters)) + changed-text)) + +(defun yas/restore-escapes (&optional text escaped) + "Restore all escaped characters from their numeric ASCII value. + +With optional string TEXT do it in string instead of the buffer." + (let ((changed-text text) + (text-provided-p text)) + (mapc #'(lambda (escaped) + (setq changed-text + (yas/replace-all (yas/escape-string escaped) + (char-to-string escaped) + (when text-provided-p changed-text)))) + (or escaped yas/escaped-characters)) + changed-text)) + +(defun yas/replace-backquotes () + "Replace all the \"`(lisp-expression)`\"-style expression + with their evaluated value" + (while (re-search-forward yas/backquote-lisp-expression-regexp nil t) + (let ((transformed (yas/read-and-eval-string (yas/restore-escapes (match-string 1))))) + (goto-char (match-end 0)) + (when transformed (insert transformed)) + (delete-region (match-beginning 0) (match-end 0))))) + +(defun yas/scan-sexps (from count) + (condition-case err + (with-syntax-table (standard-syntax-table) + (scan-sexps from count)) + (error + nil))) + +(defun yas/make-marker (pos) + "Create a marker at POS with `nil' `marker-insertion-type'" + (let ((marker (set-marker (make-marker) pos))) + (set-marker-insertion-type marker nil) + marker)) + +(defun yas/field-parse-create (snippet &optional parent-field) + "Parse most field expressions, except for the simple one \"$n\". + +The following count as a field: + +* \"${n: text}\", for a numbered field with default text, as long as N is not 0; + +* \"${n: text$(expression)}, the same with a lisp expression; + this is caught with the curiously named `yas/multi-dollar-lisp-expression-regexp' + +* the same as above but unnumbered, (no N:) and number is calculated automatically. + +When multiple expressions are found, only the last one counts." + ;; + (save-excursion + (while (re-search-forward yas/field-regexp nil t) + (let* ((real-match-end-0 (yas/scan-sexps (1+ (match-beginning 0)) 1)) + (number (and (match-string-no-properties 1) + (string-to-number (match-string-no-properties 1)))) + (brand-new-field (and real-match-end-0 + ;; break if on "$(" immediately + ;; after the ":", this will be + ;; caught as a mirror with + ;; transform later. + (not (save-match-data + (eq (string-match "$[ \t\n]*(" + (match-string-no-properties 2)) 0))) + (not (and number (zerop number))) + (yas/make-field number + (yas/make-marker (match-beginning 2)) + (yas/make-marker (1- real-match-end-0)) + parent-field)))) + (when brand-new-field + (goto-char real-match-end-0) + (push (cons (1- real-match-end-0) real-match-end-0) + yas/dollar-regions) + (push (cons (match-beginning 0) (match-beginning 2)) + yas/dollar-regions) + (push brand-new-field (yas/snippet-fields snippet)) + (save-excursion + (save-restriction + (narrow-to-region (yas/field-start brand-new-field) (yas/field-end brand-new-field)) + (goto-char (point-min)) + (yas/field-parse-create snippet brand-new-field))))))) + ;; if we entered from a parent field, now search for the + ;; `yas/multi-dollar-lisp-expression-regexp'. THis is used for + ;; primary field transformations + ;; + (when parent-field + (save-excursion + (while (re-search-forward yas/multi-dollar-lisp-expression-regexp nil t) + (let* ((real-match-end-1 (yas/scan-sexps (match-beginning 1) 1))) + ;; commit the primary field transformation if we don't find + ;; it in yas/dollar-regions (a subnested field) might have + ;; already caught it. + (when (and real-match-end-1 + (not (member (cons (match-beginning 0) + real-match-end-1) + yas/dollar-regions))) + (let ((lisp-expression-string (buffer-substring-no-properties (match-beginning 1) + real-match-end-1))) + (setf (yas/field-transform parent-field) (yas/restore-escapes lisp-expression-string))) + (push (cons (match-beginning 0) real-match-end-1) + yas/dollar-regions))))))) + +(defun yas/transform-mirror-parse-create (snippet) + "Parse the \"${n:$(lisp-expression)}\" mirror transformations." + (while (re-search-forward yas/transform-mirror-regexp nil t) + (let* ((real-match-end-0 (yas/scan-sexps (1+ (match-beginning 0)) 1)) + (number (string-to-number (match-string-no-properties 1))) + (field (and number + (not (zerop number)) + (yas/snippet-find-field snippet number)))) + (when (and real-match-end-0 + field) + (push (yas/make-mirror (yas/make-marker (match-beginning 0)) + (yas/make-marker (match-beginning 0)) + (yas/restore-escapes + (buffer-substring-no-properties (match-beginning 2) + (1- real-match-end-0)))) + (yas/field-mirrors field)) + (push (cons (match-beginning 0) real-match-end-0) yas/dollar-regions))))) + +(defun yas/simple-mirror-parse-create (snippet) + "Parse the simple \"$n\" mirrors and the exit-marker." + (while (re-search-forward yas/simple-mirror-regexp nil t) + (let ((number (string-to-number (match-string-no-properties 1)))) + (cond ((zerop number) + + (setf (yas/snippet-exit snippet) + (yas/make-exit (yas/make-marker (match-end 0)))) + (save-excursion + (goto-char (match-beginning 0)) + (when yas/wrap-around-region + (cond (yas/selected-text + (insert yas/selected-text)) + ((and (eq yas/wrap-around-region 'cua) + cua-mode + (get-register ?0)) + (insert (prog1 (get-register ?0) + (set-register ?0 nil)))))) + (push (cons (point) (yas/exit-marker (yas/snippet-exit snippet))) + yas/dollar-regions))) + (t + (let ((field (yas/snippet-find-field snippet number))) + (if field + (push (yas/make-mirror (yas/make-marker (match-beginning 0)) + (yas/make-marker (match-beginning 0)) + nil) + (yas/field-mirrors field)) + (push (yas/make-field number + (yas/make-marker (match-beginning 0)) + (yas/make-marker (match-beginning 0)) + nil) + (yas/snippet-fields snippet)))) + (push (cons (match-beginning 0) (match-end 0)) + yas/dollar-regions)))))) + +(defun yas/delete-regions (regions) + "Sort disjuct REGIONS by start point, then delete from the back." + (mapc #'(lambda (reg) + (delete-region (car reg) (cdr reg))) + (sort regions + #'(lambda (r1 r2) + (>= (car r1) (car r2)))))) + +(defun yas/update-mirrors (snippet) + "Updates all the mirrors of SNIPPET." + (save-excursion + (dolist (field (yas/snippet-fields snippet)) + (dolist (mirror (yas/field-mirrors field)) + ;; stacked expansion: I added an `inhibit-modification-hooks' + ;; here, for safety, may need to remove if we the mechanism is + ;; altered. + ;; + (let ((inhibit-modification-hooks t)) + (yas/mirror-update-display mirror field) + ;; `yas/place-overlays' is needed if the active field and + ;; protected overlays have been changed because of insertions + ;; in `yas/mirror-update-display' + ;; + (when (eq field (yas/snippet-active-field snippet)) + (yas/place-overlays snippet field))))))) + +(defun yas/mirror-update-display (mirror field) + "Update MIRROR according to FIELD (and mirror transform)." + (let ((reflection (or (yas/apply-transform mirror field) + (yas/field-text-for-display field)))) + (when (and reflection + (not (string= reflection (buffer-substring-no-properties (yas/mirror-start mirror) + (yas/mirror-end mirror))))) + (goto-char (yas/mirror-start mirror)) + (insert reflection) + (if (> (yas/mirror-end mirror) (point)) + (delete-region (point) (yas/mirror-end mirror)) + (set-marker (yas/mirror-end mirror) (point)) + (yas/advance-start-maybe (yas/mirror-next mirror) (point)))))) + +(defun yas/field-update-display (field snippet) + "Much like `yas/mirror-update-display', but for fields" + (when (yas/field-transform field) + (let ((inhibit-modification-hooks t) + (transformed (yas/apply-transform field field)) + (point (point))) + (when (and transformed + (not (string= transformed (buffer-substring-no-properties (yas/field-start field) + (yas/field-end field))))) + (setf (yas/field-modified-p field) t) + (goto-char (yas/field-start field)) + (insert transformed) + (if (> (yas/field-end field) (point)) + (delete-region (point) (yas/field-end field)) + (set-marker (yas/field-end field) (point)) + (yas/advance-start-maybe (yas/field-next field) (point))) + t)))) + + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Pre- and post-command hooks +;; +(defun yas/pre-command-handler () ) + +(defun yas/post-command-handler () + "Handles various yasnippet conditions after each command." + (cond (yas/protection-violation + (goto-char yas/protection-violation) + (setq yas/protection-violation nil)) + ((eq 'undo this-command) + ;; + ;; After undo revival the correct field is sometimes not + ;; restored correctly, this condition handles that + ;; + (let* ((snippet (car (yas/snippets-at-point))) + (target-field (and snippet + (find-if-not #'(lambda (field) + (yas/field-probably-deleted-p snippet field)) + (remove nil + (cons (yas/snippet-active-field snippet) + (yas/snippet-fields snippet))))))) + (when target-field + (yas/move-to-field snippet target-field)))) + ((not (yas/undo-in-progress)) + ;; When not in an undo, check if we must commit the snippet (use exited it). + (yas/check-commit-snippet)))) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Debug functions. Use (or change) at will whenever needed. +;; +;; some useful debug code for looking up snippet tables +;; +;; (insert (pp +;; (let ((shit)) +;; (maphash #'(lambda (k v) +;; (push k shit)) +;; (yas/snippet-table-hash (gethash 'ruby-mode yas/snippet-tables))) +;; shit))) +;; + +(defun yas/debug-tables () + (interactive) + (with-output-to-temp-buffer "*YASnippet tables*" + (dolist (symbol (remove nil (append (list major-mode) + (if (listp yas/mode-symbol) + yas/mode-symbol + (list yas/mode-symbol))))) + (princ (format "Snippet table hash keys for %s:\n\n" symbol)) + (let ((keys)) + (maphash #'(lambda (k v) + (push k keys)) + (yas/snippet-table-hash (gethash symbol yas/snippet-tables))) + (princ keys)) + + (princ (format "Keymap for %s:\n\n" symbol)) + (princ (gethash symbol yas/menu-table))))) + +(defun yas/debug-snippet-vars () + "Debug snippets, fields, mirrors and the `buffer-undo-list'." + (interactive) + (with-output-to-temp-buffer "*YASnippet trace*" + (princ "Interesting YASnippet vars: \n\n") + + (princ (format "\nPost command hook: %s\n" post-command-hook)) + (princ (format "\nPre command hook: %s\n" pre-command-hook)) + + (princ (format "%s live snippets in total\n" (length (yas/snippets-at-point (quote all-snippets))))) + (princ (format "%s overlays in buffer:\n\n" (length (overlays-in (point-min) (point-max))))) + (princ (format "%s live snippets at point:\n\n" (length (yas/snippets-at-point)))) + + + (dolist (snippet (yas/snippets-at-point)) + (princ (format "\tsid: %d control overlay from %d to %d\n" + (yas/snippet-id snippet) + (overlay-start (yas/snippet-control-overlay snippet)) + (overlay-end (yas/snippet-control-overlay snippet)))) + (princ (format "\tactive field: %d from %s to %s covering \"%s\"\n" + (yas/field-number (yas/snippet-active-field snippet)) + (marker-position (yas/field-start (yas/snippet-active-field snippet))) + (marker-position (yas/field-end (yas/snippet-active-field snippet))) + (buffer-substring-no-properties (yas/field-start (yas/snippet-active-field snippet)) (yas/field-end (yas/snippet-active-field snippet))))) + (when (yas/snippet-exit snippet) + (princ (format "\tsnippet-exit: at %s next: %s\n" + (yas/exit-marker (yas/snippet-exit snippet)) + (yas/exit-next (yas/snippet-exit snippet))))) + (dolist (field (yas/snippet-fields snippet)) + (princ (format "\tfield: %d from %s to %s covering \"%s\" next: %s\n" + (yas/field-number field) + (marker-position (yas/field-start field)) + (marker-position (yas/field-end field)) + (buffer-substring-no-properties (yas/field-start field) (yas/field-end field)) + (yas/debug-format-fom-concise (yas/field-next field)))) + (dolist (mirror (yas/field-mirrors field)) + (princ (format "\t\tmirror: from %s to %s covering \"%s\" next: %s\n" + (marker-position (yas/mirror-start mirror)) + (marker-position (yas/mirror-end mirror)) + (buffer-substring-no-properties (yas/mirror-start mirror) (yas/mirror-end mirror)) + (yas/debug-format-fom-concise (yas/mirror-next mirror))))))) + + (princ (format "\nUndo is %s and point-max is %s.\n" + (if (eq buffer-undo-list t) + "DISABLED" + "ENABLED") + (point-max))) + (unless (eq buffer-undo-list t) + (princ (format "Undpolist has %s elements. First 10 elements follow:\n" (length buffer-undo-list))) + (let ((first-ten (subseq buffer-undo-list 0 19))) + (dolist (undo-elem first-ten) + (princ (format "%2s: %s\n" (position undo-elem first-ten) (truncate-string-to-width (format "%s" undo-elem) 70)))))))) + +(defun yas/debug-format-fom-concise (fom) + (when fom + (cond ((yas/field-p fom) + (format "field %d from %d to %d" + (yas/field-number fom) + (marker-position (yas/field-start fom)) + (marker-position (yas/field-end fom)))) + ((yas/mirror-p fom) + (format "mirror from %d to %d" + (marker-position (yas/mirror-start fom)) + (marker-position (yas/mirror-end fom)))) + (t + (format "snippet exit at %d" + (marker-position (yas/fom-start fom))))))) + + +(defun yas/exterminate-package () + (interactive) + (yas/global-mode -1) + (yas/minor-mode -1) + (yas/kill-snippet-keybindings) + (mapatoms #'(lambda (atom) + (when (string-match "yas/" (symbol-name atom)) + (unintern atom))))) + +(defun yas/debug-test (&optional quiet) + (interactive "P") + (yas/load-directory (or (and (listp yas/root-directory) + (first yas/root-directory)) + yas/root-directory + "~/Source/yasnippet/snippets/")) + (set-buffer (switch-to-buffer "*YAS TEST*")) + (mapc #'yas/commit-snippet (yas/snippets-at-point 'all-snippets)) + (erase-buffer) + (setq buffer-undo-list nil) + (setq undo-in-progress nil) + (snippet-mode) + (yas/minor-mode 1) + (let ((abbrev)) + (setq abbrev "$f") + (insert abbrev)) + (unless quiet + (add-hook 'post-command-hook 'yas/debug-snippet-vars 't 'local))) + + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; `locate-dominating-file' is added for compatibility in emacs < 23 +(unless (or (eq emacs-major-version 23) + (fboundp 'locate-dominating-file)) + (defvar locate-dominating-stop-dir-regexp + "\\`\\(?:[\\/][\\/][^\\/]+[\\/]\\|/\\(?:net\\|afs\\|\\.\\.\\.\\)/\\)\\'" + "Regexp of directory names which stop the search in `locate-dominating-file'. +Any directory whose name matches this regexp will be treated like +a kind of root directory by `locate-dominating-file' which will stop its search +when it bumps into it. +The default regexp prevents fruitless and time-consuming attempts to find +special files in directories in which filenames are interpreted as hostnames, +or mount points potentially requiring authentication as a different user.") + + (defun locate-dominating-file (file name) + "Look up the directory hierarchy from FILE for a file named NAME. +Stop at the first parent directory containing a file NAME, +and return the directory. Return nil if not found." + ;; We used to use the above locate-dominating-files code, but the + ;; directory-files call is very costly, so we're much better off doing + ;; multiple calls using the code in here. + ;; + ;; Represent /home/luser/foo as ~/foo so that we don't try to look for + ;; `name' in /home or in /. + (setq file (abbreviate-file-name file)) + (let ((root nil) + (prev-file file) + ;; `user' is not initialized outside the loop because + ;; `file' may not exist, so we may have to walk up part of the + ;; hierarchy before we find the "initial UID". + (user nil) + try) + (while (not (or root + (null file) + ;; FIXME: Disabled this heuristic because it is sometimes + ;; inappropriate. + ;; As a heuristic, we stop looking up the hierarchy of + ;; directories as soon as we find a directory belonging + ;; to another user. This should save us from looking in + ;; things like /net and /afs. This assumes that all the + ;; files inside a project belong to the same user. + ;; (let ((prev-user user)) + ;; (setq user (nth 2 (file-attributes file))) + ;; (and prev-user (not (equal user prev-user)))) + (string-match locate-dominating-stop-dir-regexp file))) + (setq try (file-exists-p (expand-file-name name file))) + (cond (try (setq root file)) + ((equal file (setq prev-file file + file (file-name-directory + (directory-file-name file)))) + (setq file nil)))) + root))) + +(provide 'yasnippet) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Monkey patching for other functions that's causing +;; problems to yasnippet. For details on why I patch +;; those functions, refer to +;; http://code.google.com/p/yasnippet/wiki/MonkeyPatching +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +(defadvice c-neutralize-syntax-in-CPP + (around yas-mp/c-neutralize-syntax-in-CPP activate) + "Adviced `c-neutralize-syntax-in-CPP' to properly +handle the end-of-buffer error fired in it by calling +`forward-char' at the end of buffer." + (condition-case err + ad-do-it + (error (message (error-message-string err))))) + +;; disable c-electric-* serial command in YAS fields +(add-hook 'c-mode-common-hook + '(lambda () + (dolist (k '(":" ">" ";" "<" "{" "}")) + (define-key (symbol-value (make-local-variable 'yas/keymap)) + k 'self-insert-command)))) + + +;;; yasnippet.el ends here diff --git a/install.sh b/install.sh new file mode 100644 index 0000000..5ee1351 --- /dev/null +++ b/install.sh @@ -0,0 +1,22 @@ +#! /bin/bash + +echo "Enter your full name (you can change it later in top level customization): " +fullname=`read` +echo "Enter your mail: " +mail=`read` +echo "Where is your workspace directory: " +workspace=`read` +echo "Where do you want to put pyemacs.sh file: " +addr=`read` +kusohome=`pwd` +mkdir -p ~/.emacs.d +if [ -x ~/.emacs ]; then + cp ~/.emacs ~/.emacs.backup +fi + +cp conf/emacs.d/* ~/.emacs.d -rv +echo "Creating ~/.emacs" +mkdir -p $addr +cp conf/bin/pyemacs.sh $addr/ -rv +chmod u+x $addr/pyemacs.sh +sed "s/--EMAIL--/$mail/" conf/dotemacs| sed "s/--FULLNAME--/$fullname/"| sed "--WORKSPACE--" | sed "s/--ADDR--/$addrcp/" | sed "s/--KUSOHOME--/$kusohome/" > ~/.emacs diff --git a/src/plugins/django.el b/src/plugins/django.el index 604091d..7fb7031 100644 --- a/src/plugins/django.el +++ b/src/plugins/django.el @@ -236,6 +236,8 @@ binding for Kuso IDE django plugin" ) ) + + ;; ---------------------------------------------------------------------- ;; Minor Modes ;; ----------------------------------------------------------------------