branch: elpa/moe-theme
commit 075f91acc2a7ad722bdda0ab945a7fb0f7c4565f
Author: ono ono <[email protected]>
Commit: ono ono <[email protected]>

    Add adoc-mode (AsciiDoc) support
---
 README.org         |  5 +++--
 moe-dark-theme.el  | 21 +++++++++++++++++++++
 moe-light-theme.el | 21 +++++++++++++++++++++
 moe-theme.el       | 23 ++++++++++++++++++++++-
 4 files changed, 67 insertions(+), 3 deletions(-)

diff --git a/README.org b/README.org
index c5185b1f71..01e78812e5 100644
--- a/README.org
+++ b/README.org
@@ -37,7 +37,7 @@ And more:
    - Helm / ido
    - Org-mode / Agenda / calfw
    - Magit / Git-commit / Git-gutter
-   - Markdown-mode / ReStructText-mode
+   - Markdown-mode / adoc-mode / ReStructText-mode
    - Auto-complete-mode / Company
    - Rainbow-delimiters
    - Swoop
@@ -125,12 +125,13 @@ to get more detailed information first.
 #+END_QUOTE
 
 *** Resize Titles
-You may want to resize titles in =markdown-mode=, =org-mode=, or
+You may want to resize titles in =markdown-mode=, =adoc-mode=, =org-mode=, or
 =ReStructuredText-mode=:
 
 #+BEGIN_SRC lisp
       ;; Resize titles
       (setq moe-theme-resize-title-markdown '(2.0 1.7 1.5 1.3 1.0 1.0))
+      (setq moe-theme-resize-title-adoc '(2.0 1.7 1.5 1.3 1.0 1.0))
       (setq moe-theme-resize-title-org '(2.2 1.8 1.6 1.4 1.2 1.0 1.0 1.0 1.0))
       (setq moe-theme-resize-title-rst '(2.0 1.7 1.5 1.3 1.1 1.0))
 #+END_SRC
diff --git a/moe-dark-theme.el b/moe-dark-theme.el
index 455b4ae4ed..5223a17905 100644
--- a/moe-dark-theme.el
+++ b/moe-dark-theme.el
@@ -251,6 +251,27 @@ Moe, moe, kyun!")
    `(markdown-reference-face ((,class (:foreground ,orange-2 :italic t))))
    `(markdown-url-face ((,class (:foreground ,magenta-3 :underline 
,magenta-3))))
 
+   ;; adoc-mode (AsciiDoc)
+   `(adoc-anchor-face ((,class (:foreground ,white-1 :background ,black-2-5 
:underline t))))
+   `(adoc-bold-face ((,class (:foreground ,white-1 :bold t))))
+   `(adoc-comment-face ((,class (:foreground ,black-2 :italic t))))
+   `(adoc-meta-face ((,class (:foreground ,cyan-4 :bold t))))
+   `(adoc-meta-hide-face ((,class (:foreground ,black-2))))
+   `(adoc-internal-reference-face ((,class (:foreground ,magenta-2 :bold nil 
:underline t))))
+   `(adoc-reference-face ((,class (:foreground ,blue-1 :bold t :underline t))))
+   `(adoc-title-0-face ((,class (:foreground ,blue-1 :bold t))))
+   `(adoc-title-1-face ((,class (:foreground ,green-2 :bold t))))
+   `(adoc-title-2-face ((,class (:foreground ,orange-2 :bold t))))
+   `(adoc-title-3-face ((,class (:foreground ,cyan-3 :bold t))))
+   `(adoc-title-4-face ((,class (:foreground ,red-1 :bold t))))
+   `(adoc-title-5-face ((,class (:foreground ,purple-2 :bold t))))
+   `(adoc-markup-face  ((,class (:foreground ,black-1 :background 
unspecified))))
+   `(adoc-list-face ((,class (:foreground ,orange-2 :background ,black-5 :bold 
t))))
+   `(adoc-link-title-face ((,class (:foreground ,magenta-1 :bold t :underline 
t))))
+   `(adoc-code-face ((,class (:foreground unspecified :background ,black-4 
:extend t))))
+   `(adoc-verbatim-face ((,class (:foreground ,blue-1 :background ,black-3 
:bold nil))))
+   `(adoc-value-face ((,class (:foreground ,green-2 :background ,black-3 :bold 
nil))))
+
    ;; Twittering-mode
    `(twittering-username-face ((,class (:foreground ,blue-1 :background 
,black-4 :bold t :underline t))))
    `(twittering-uri-face ((,class (:foreground ,blue-1 :underline t))))
diff --git a/moe-light-theme.el b/moe-light-theme.el
index c987b52ac2..96830bae77 100644
--- a/moe-light-theme.el
+++ b/moe-light-theme.el
@@ -251,6 +251,27 @@ Moe, moe, kyun!")
    `(markdown-reference-face ((,class (:foreground ,orange-2 :italic t))))
    `(markdown-url-face ((,class (:foreground ,magenta-3 :underline 
,magenta-3))))
 
+   ;; adoc-mode (AsciiDoc)
+   `(adoc-anchor-face ((,class (:foreground ,black-3 :background ,white-1 
:underline t))))
+   `(adoc-bold-face ((,class (:foreground ,black-5 :bold t))))
+   `(adoc-comment-face ((,class (:foreground ,white-4 :italic t))))
+   `(adoc-meta-face ((,class (:foreground ,cyan-4 :bold t))))
+   `(adoc-meta-hide-face ((,class (:foreground ,white-4))))
+   `(adoc-internal-reference-face ((,class (:foreground ,magenta-3 :bold nil 
:underline t))))
+   `(adoc-reference-face ((,class (:foreground ,blue-2 :bold t :underline t))))
+   `(adoc-title-0-face ((,class (:foreground ,blue-1 :bold t))))
+   `(adoc-title-1-face ((,class (:foreground ,green-02 :bold t))))
+   `(adoc-title-2-face ((,class (:foreground ,orange-2 :bold t))))
+   `(adoc-title-3-face ((,class (:foreground ,cyan-3 :bold t))))
+   `(adoc-title-4-face ((,class (:foreground ,red-2 :bold t))))
+   `(adoc-title-5-face ((,class (:foreground ,purple-2 :bold t))))
+   `(adoc-markup-face  ((,class (:foreground ,black-1 :background 
unspecified))))
+   `(adoc-list-face ((,class (:foreground ,orange-2 :background ,LIGHT_BG 
:bold t))))
+   `(adoc-link-title-face ((,class (:foreground ,magenta-1 :bold t :underline 
t))))
+   `(adoc-code-face ((,class (:foreground unspecified :background ,white-1 
:extend t))))
+   `(adoc-verbatim-face ((,class (:foreground ,blue-3 :background ,blue-00 
:bold nil))))
+   `(adoc-value-face ((,class (:foreground ,green-4 :background ,yellow-00 
:bold nil))))
+
    ;; Twittering-mode
    `(twittering-username-face ((,class (:foreground ,blue-3 :background 
,blue-00 :bold t :underline t))))
    `(twittering-uri-face ((,class (:foreground ,blue-2 :underline ,blue-2))))
diff --git a/moe-theme.el b/moe-theme.el
index dca6597f40..ad14db87ff 100644
--- a/moe-theme.el
+++ b/moe-theme.el
@@ -89,7 +89,7 @@ If you encounter this problem, and want to have a background 
of #ffffff, set
 the value of `moe-light-pure-white-background-in-terminal' to t.")
 
 ;; ======================================================
-;; Resize Titles (Markdown / Org / RST)
+;; Resize Titles (Markdown / AsciiDoc / Org / RST)
 ;; ======================================================
 (defvar moe-theme-resize-title-markdown nil
   "Resize header/title faces of Markdown-mode or not. (default value is nil)
@@ -100,6 +100,15 @@ of each level.
 
 If the vaule is nil, all the titles will be the same size.")
 
+(defvar moe-theme-resize-title-adoc nil
+  "Resize header/title faces of adoc-mode (AsciiDoc) or not. (default value is 
nil)
+The value should be a list with 6 items of number, which decide title font 
sizes
+of each level.
+
+  (setq moe-theme-resize-title-adoc '(2.0 1.7 1.5 1.3 1.0 1.0))
+
+If the vaule is nil, all the titles will be the same size.")
+
 (defvar moe-theme-resize-title-org nil
   "Resize outline/title faces of Org-mode or not. (default value is nil)
 
@@ -143,6 +152,17 @@ Avoid unnecessary load-theme")
     (setq list (append list '(1.0))))
   list)
 
+(with-eval-after-load 'adoc-mode
+  (defun moe-theme-resize-title-apply-adoc ()
+    (setq moe-theme-resize-title-adoc (moe-theme-resize-title--repaire-list 
moe-theme-resize-title-adoc 6))
+    (set-face-attribute 'adoc-title-0-face nil :height (nth 0 
moe-theme-resize-title-adoc))
+    (set-face-attribute 'adoc-title-1-face nil :height (nth 1 
moe-theme-resize-title-adoc))
+    (set-face-attribute 'adoc-title-2-face nil :height (nth 2 
moe-theme-resize-title-adoc))
+    (set-face-attribute 'adoc-title-3-face nil :height (nth 3 
moe-theme-resize-title-adoc))
+    (set-face-attribute 'adoc-title-4-face nil :height (nth 4 
moe-theme-resize-title-adoc))
+    (set-face-attribute 'adoc-title-5-face nil :height (nth 5 
moe-theme-resize-title-adoc)))
+  (moe-theme-resize-title-apply-adoc))
+
 (with-eval-after-load 'markdown-mode
   (defun moe-theme-resize-title-apply-markdown ()
     (setq moe-theme-resize-title-markdown 
(moe-theme-resize-title--repaire-list moe-theme-resize-title-markdown 6))
@@ -191,6 +211,7 @@ Avoid unnecessary load-theme")
 (defun moe-theme--common-setup ()
   (if (functionp 'powerline) (powerline-moe-theme))
   (if (functionp 'moe-theme-resize-title-apply-markdown) 
(moe-theme-resize-title-apply-markdown))
+  (if (functionp 'moe-theme-resize-title-apply-adoc) 
(moe-theme-resize-title-apply-adoc))
   (if (functionp 'moe-theme-resize-title-apply-org) 
(moe-theme-resize-title-apply-org))
   (if (functionp 'moe-theme-resize-title-apply-rst) 
(moe-theme-resize-title-apply-rst))
   )

Reply via email to