2012-10-12 15:23:36 +02:00
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
;; THEME
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
|
2013-01-08 23:57:55 +01:00
|
|
|
;; To find the variable associated to a currently used color, place the cursor
|
|
|
|
;; on it and call 'customize-face'.
|
|
|
|
|
2013-03-02 19:34:12 +01:00
|
|
|
;; General
|
2013-05-25 13:43:22 +02:00
|
|
|
(set-face-foreground 'default "white" )
|
|
|
|
(set-face-background 'default "black" )
|
2013-05-24 11:44:23 +02:00
|
|
|
|
2013-05-25 13:43:22 +02:00
|
|
|
(set-face-foreground 'link "#00ffff" )
|
2013-03-02 19:34:12 +01:00
|
|
|
(set-face-underline-p 'link t)
|
2013-05-24 12:03:48 +02:00
|
|
|
(set-face-foreground 'minibuffer-prompt "#00ffff" )
|
2013-05-24 11:44:23 +02:00
|
|
|
(set-face-background 'region "#262626")
|
|
|
|
(set-face-background 'isearch "#00002a" )
|
2013-03-02 19:34:12 +01:00
|
|
|
(set-face-foreground 'isearch nil )
|
2013-05-24 11:44:23 +02:00
|
|
|
(set-face-background 'isearch-lazy-highlight-face "#3a3a3a" )
|
2013-05-22 17:35:54 +02:00
|
|
|
(if (string-match "^24.*" emacs-version )
|
2013-05-25 13:43:22 +02:00
|
|
|
(progn
|
2013-05-22 17:35:54 +02:00
|
|
|
(set-face-foreground 'error "red")
|
|
|
|
(set-face-bold-p 'error t)))
|
2013-03-02 19:34:12 +01:00
|
|
|
|
2013-05-25 13:43:22 +02:00
|
|
|
;; Font size
|
|
|
|
(if (fboundp 'tool-bar-mode) (set-face-attribute 'default nil :height 100))
|
|
|
|
|
2013-05-24 17:23:01 +02:00
|
|
|
;; Line numbers. Graphic version has a gray bar separating text from line
|
|
|
|
;; numbers, so we can leave the background black.
|
|
|
|
(if (display-graphic-p)
|
|
|
|
(set-face-background 'shadow "black" )
|
|
|
|
(set-face-background 'shadow "#1c1c1c" ))
|
|
|
|
|
2013-03-02 19:34:12 +01:00
|
|
|
;; Programming
|
2013-05-24 11:44:23 +02:00
|
|
|
(set-face-foreground 'font-lock-builtin-face "#2a80d4" )
|
2013-03-02 19:34:12 +01:00
|
|
|
(set-face-bold-p 'font-lock-builtin-face t )
|
2013-05-24 11:44:23 +02:00
|
|
|
(set-face-foreground 'font-lock-comment-delimiter-face "#6c6c6c" )
|
|
|
|
(set-face-foreground 'font-lock-comment-face "#6c6c6c" )
|
|
|
|
(set-face-foreground 'font-lock-constant-face "#5555d4" )
|
|
|
|
(set-face-foreground 'font-lock-doc-face "#005500" )
|
|
|
|
(set-face-foreground 'font-lock-function-name-face "#2a80d4" )
|
2013-03-02 19:34:12 +01:00
|
|
|
(set-face-bold-p 'font-lock-function-name-face t )
|
2013-05-24 12:03:48 +02:00
|
|
|
(set-face-foreground 'font-lock-keyword-face "#ff0000" )
|
2012-10-12 15:23:36 +02:00
|
|
|
(set-face-bold-p 'font-lock-keyword-face t )
|
2013-05-24 11:44:23 +02:00
|
|
|
(set-face-foreground 'font-lock-preprocessor-face "#552ad4" )
|
|
|
|
(set-face-foreground 'font-lock-string-face "#0080d4" )
|
|
|
|
(set-face-foreground 'font-lock-type-face "#aa2a00" )
|
2013-05-24 12:03:48 +02:00
|
|
|
(set-face-foreground 'font-lock-variable-name-face "#ffff00" )
|
2013-03-02 19:34:12 +01:00
|
|
|
(set-face-foreground 'font-lock-warning-face "DarkOrange" )
|
2012-10-12 15:23:36 +02:00
|
|
|
|
2013-01-08 23:57:55 +01:00
|
|
|
;; Ediff
|
|
|
|
(add-hook
|
|
|
|
'ediff-mode-hook
|
|
|
|
(lambda ()
|
2013-05-24 11:44:23 +02:00
|
|
|
(set-face-background 'ediff-fine-diff-A "#2a0000")
|
2013-03-15 22:38:01 +01:00
|
|
|
(set-face-foreground 'ediff-fine-diff-A nil)
|
2013-05-24 11:44:23 +02:00
|
|
|
(set-face-background 'ediff-fine-diff-B "#2a0000")
|
2013-03-15 22:38:01 +01:00
|
|
|
(set-face-foreground 'ediff-fine-diff-B nil)
|
2013-05-24 11:44:23 +02:00
|
|
|
(set-face-background 'ediff-fine-diff-C "#2a0000")
|
2013-03-15 22:38:01 +01:00
|
|
|
(set-face-foreground 'ediff-fine-diff-C nil)
|
2013-02-17 21:35:32 +01:00
|
|
|
|
2013-05-24 11:44:23 +02:00
|
|
|
(set-face-background 'ediff-current-diff-A "#00002a")
|
2013-03-15 22:38:01 +01:00
|
|
|
(set-face-foreground 'ediff-current-diff-A nil)
|
2013-05-24 11:44:23 +02:00
|
|
|
(set-face-background 'ediff-current-diff-B "#00002a")
|
2013-03-15 22:38:01 +01:00
|
|
|
(set-face-foreground 'ediff-current-diff-B nil)
|
2013-05-24 11:44:23 +02:00
|
|
|
(set-face-background 'ediff-current-diff-C "#00002a")
|
2013-03-15 22:38:01 +01:00
|
|
|
(set-face-foreground 'ediff-current-diff-C nil)
|
2013-02-17 21:35:32 +01:00
|
|
|
|
2013-05-24 11:44:23 +02:00
|
|
|
(set-face-background 'ediff-even-diff-A "#303030")
|
2013-03-15 22:38:01 +01:00
|
|
|
(set-face-foreground 'ediff-even-diff-A nil)
|
2013-05-24 11:44:23 +02:00
|
|
|
(set-face-background 'ediff-even-diff-B "#303030")
|
2013-03-15 22:38:01 +01:00
|
|
|
(set-face-foreground 'ediff-even-diff-B nil)
|
2013-05-24 11:44:23 +02:00
|
|
|
(set-face-background 'ediff-even-diff-C "#303030")
|
2013-03-15 22:38:01 +01:00
|
|
|
(set-face-foreground 'ediff-even-diff-C nil)
|
2013-02-17 21:35:32 +01:00
|
|
|
|
|
|
|
(set-face-background 'ediff-odd-diff-A "brightblack")
|
2013-03-15 22:38:01 +01:00
|
|
|
(set-face-foreground 'ediff-odd-diff-A nil)
|
2013-02-17 21:35:32 +01:00
|
|
|
(set-face-background 'ediff-odd-diff-B "brightblack")
|
2013-03-15 22:38:01 +01:00
|
|
|
(set-face-foreground 'ediff-odd-diff-B nil)
|
2013-03-04 23:03:23 +01:00
|
|
|
(set-face-background 'ediff-odd-diff-C "brightblack")
|
2013-03-15 22:38:01 +01:00
|
|
|
(set-face-foreground 'ediff-odd-diff-C nil)))
|
2012-10-12 15:23:36 +02:00
|
|
|
|
2013-01-10 15:57:07 +01:00
|
|
|
;; Show paren.
|
|
|
|
(set-face-background 'show-paren-match-face (face-background 'default))
|
|
|
|
(set-face-foreground 'show-paren-match-face "#def")
|
|
|
|
(set-face-attribute 'show-paren-match-face nil :weight 'extra-bold)
|
2012-10-12 15:23:36 +02:00
|
|
|
|
2013-01-08 23:57:55 +01:00
|
|
|
;; Make Emacs and Mutt colors fit.
|
2012-10-12 15:23:36 +02:00
|
|
|
(font-lock-add-keywords
|
|
|
|
'mail-mode
|
|
|
|
'(
|
|
|
|
("^From:" . font-lock-preprocessor-face)
|
|
|
|
("^Subject:" . font-lock-warning-face)
|
|
|
|
("^In-Reply-To:" . font-lock-builtin-face)
|
|
|
|
;; Mail addresses.
|
2013-02-05 22:32:30 +01:00
|
|
|
("\\([[:alnum:]._-]+@[[:alnum:]._-]+\.[[:alnum:]._-]+\\)" 1 font-lock-string-face)
|
2012-10-12 15:23:36 +02:00
|
|
|
;; Quote
|
|
|
|
("^\> *\\([^\> ]\\).*$" . font-lock-doc-face)
|
|
|
|
;; Quote1
|
|
|
|
("^\> *\> *\\([^\> ]\\).*$" . font-lock-constant-face)
|
|
|
|
("^\> *\> *\> *\\([^\> ]\\).*$" . font-lock-type-face)
|
|
|
|
("^\> *\> *\> *\> *\\([^\> ]\\).*$" . font-lock-variable-name-face)
|
|
|
|
("^\> *\> *\> *\> *\> *\\([^\> ]\\).*$" . font-lock-comment-face)
|
|
|
|
("^\> *\> *\> *\> *\> *\> *\\([^\> ]\\).*$" . font-lock-comment-face)
|
|
|
|
("^\> *\> *\> *\> *\> *\> *\> *\\([^\> ]\\).*$" . font-lock-comment-face)
|
|
|
|
("^\> *\> *\> *\> *\> *\> *\> *\> *\\([^\> ]\\).*$" . font-lock-comment-face)
|
|
|
|
;; Signature
|
2013-02-05 22:32:30 +01:00
|
|
|
;; TODO: does not work properly.
|
2013-03-02 19:34:12 +01:00
|
|
|
("^--.*\\(\n.*\\)*" . font-lock-comment-face)))
|
2012-10-12 15:23:36 +02:00
|
|
|
|
2013-03-02 19:34:12 +01:00
|
|
|
;; Key notes highlighting. We need to apply it to the mode hook since
|
|
|
|
;; font-lock-add-keywords has no inheritance support.
|
2012-10-12 15:23:36 +02:00
|
|
|
(mapcar
|
2013-03-02 19:34:12 +01:00
|
|
|
(lambda (mode-hook)
|
|
|
|
(add-hook
|
|
|
|
mode-hook
|
|
|
|
(lambda () (interactive)
|
|
|
|
(font-lock-add-keywords
|
|
|
|
nil
|
|
|
|
'(("\\<\\(FIXME\\):" 1 font-lock-warning-face prepend)
|
|
|
|
("\\<\\(TODO\\):" 1 font-lock-warning-face prepend)
|
|
|
|
("\\<\\(WARNING\\):" 1 font-lock-warning-face prepend))))))
|
2013-03-17 12:20:32 +01:00
|
|
|
'(lua-mode-hook prog-mode-hook tex-mode-hook texinfo-mode-hook))
|
2013-03-02 19:34:12 +01:00
|
|
|
;; Digits regex are not perfect, and may make emacs slow. Sure?
|
|
|
|
;; ("[^[:digit:][:space:]][[:space:]]*\\(-\\)[[:digit:]]+" 1 font-lock-constant-face)
|
|
|
|
;; ("\\(0x[[:digit:]a-fA-F]+\\)[^[:alnum:]_]" 1 font-lock-constant-face)
|
|
|
|
;; ("[^[:alnum:]_]\\([[:digit:]]*\\.?[[:digit:]]+\\)[^[:alnum:]_.]" 1 font-lock-constant-face)
|
|
|
|
|
|
|
|
;; C '&' address as keyword.
|
|
|
|
(font-lock-add-keywords
|
|
|
|
'c-mode
|
|
|
|
'(("&" . font-lock-keyword-face)
|
|
|
|
("\\<\\(and\\|or\\|not\\)\\>" . font-lock-keyword-face)))
|
|
|
|
|
|
|
|
|
2013-01-10 15:57:07 +01:00
|
|
|
|
2012-10-12 15:23:36 +02:00
|
|
|
;; C-mode printf highlight.
|
2013-01-10 15:57:07 +01:00
|
|
|
;; (defvar font-lock-format-specifier-face 'font-lock-format-specifier-face
|
|
|
|
;; "Face name to use for format specifiers.")
|
2012-10-12 15:23:36 +02:00
|
|
|
|
2013-01-10 15:57:07 +01:00
|
|
|
;; (defface font-lock-format-specifier-face
|
|
|
|
;; '((t (:foreground "OrangeRed1")))
|
|
|
|
;; "Font Lock mode face used to highlight format specifiers."
|
|
|
|
;; :group 'font-lock-faces)
|
2012-10-12 15:23:36 +02:00
|
|
|
|
2013-02-26 18:30:31 +01:00
|
|
|
;; TODO: disable highlighting outside of string.
|
2013-01-10 15:57:07 +01:00
|
|
|
;; (add-hook
|
|
|
|
;; 'c-mode-common-hook
|
|
|
|
;; (lambda ()
|
|
|
|
;; (font-lock-add-keywords
|
|
|
|
;; nil
|
|
|
|
;; '(("[^%]\\(%\\([[:digit:]]+\\$\\)?[-+' #0*]*\\([[:digit:]]*\\|\\*\\|\\*[[:digit:]]+\\$\\)\\(\\.\\([[:digit:]]*\\|\\*\\|\\*[[:digit:]]+\\$\\)\\)?\\([hlLjzt]\\|ll\\|hh\\)?\\([aAbdiuoxXDOUfFeEgGcCsSpn]\\|\\[\\^?.[^]]*\\]\\)\\)"
|
|
|
|
;; 1 font-lock-format-specifier-face t)
|
2013-03-02 19:34:12 +01:00
|
|
|
;; ("\\(%%\\)"
|
2013-01-10 15:57:07 +01:00
|
|
|
;; 1 font-lock-format-specifier-face t)) )))
|
2012-10-12 15:23:36 +02:00
|
|
|
|
2013-02-26 18:30:31 +01:00
|
|
|
;; TODO: Does not work.
|
2012-10-12 15:23:36 +02:00
|
|
|
;; (add-hook
|
|
|
|
;; 'c-mode-common-hook
|
|
|
|
;; (set-face-foreground 'compilation-column-number "magenta")
|
|
|
|
;; )
|