Taylor Venable avatar Taylor Venable committed 1189b88

More information on colors and themes

Comments (0)

Files changed (1)

          (not (boundp 'aquamacs-version)))
     (tcv-adjust-font))
 
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;
+;;  Colors
+;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+;; Note that themes work sort of like a stack: You can apply multiple themes,
+;; and the order matters. When you remove the last theme from the list, the
+;; colors set prior to all theme applications are restored. So it's all right to
+;; set custom colors below, because even if you apply and then remove a theme,
+;; your original colors will get put back.
+
 (if tcv-adjust-colors
   (progn
     (set-face-attribute 'cursor                 nil :background "Gray50")
     (set-face-attribute 'font-lock-doc-face     nil :foreground "Firebrick")
     (set-face-attribute 'font-lock-string-face  nil :foreground "RoyalBlue")
     (set-face-attribute 'highlight              nil :background "LightSteelBlue")
-    (set-face-attribute 'region                 nil :background "LemonChiffon2")
     (set-face-attribute 'show-paren-match       nil :background "SkyBlue3" :foreground "White")
     (set-face-attribute 'show-paren-mismatch    nil :background "IndianRed3" :foreground "White")))
 
+;; I hate the way Emacs tries to match the selection color to the current GTK
+;; theme. Use what would be the default value without GTK instead.
+
+(set-face-attribute 'region nil :background "lightgoldenrod2" :foreground nil)
+
 ;; (set-face-attribute 'mode-line              nil :background "gray75" :box nil)
 ;; (set-face-attribute 'mode-line-highlight    nil :box nil :foreground "Firebrick")
 ;; (set-face-attribute 'mode-line-inactive     nil :background "grey90" :box nil)
 
+;; The Sanity Inc "Tomorrow" themes set `font-lock-doc-string-face' which seems
+;; like an XEmacs thing. Without this theme, that face doesn't exist, so cc-mode
+;; uses the dark red `font-lock-doc-face' to highlight documentation comments.
+;; In "Tomorrow" that face is purple, which doesn't match well the orange doc
+;; keywords (e.g. "@param") -- on the other hand, `font-lock-doc-string-face' is
+;; a nice yellow. So when editing C code, if a "Tomorrow" theme is in use, make
+;; cc-mode use the `font-lock-doc-string-face'. But take away the "Tomorrow"
+;; theme, and `font-lock-doc-string-face' becomes the same as `default', making
+;; it necessary to also switch back to `font-lock-doc-face' when no "Tomorrow"
+;; theme is in use (lest your doc comments look the same as your code).
+
 (add-hook 'c-mode-hook
   (lambda ()
     (if (cl-find-if (lambda (x) (string-prefix-p "sanityinc-tomorrow-" x))
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.