• このエントリーをはてなブックマークに追加


メモ

Solarlized な配色(color-theme)の Emacs で textile-mode を使用していると,特定の記法に対するハイライト色が,少々見づらい感じになってアレなので,同モードのハイライト色の定義を,Solarized な配色に従ったものに置き換えるようなことをしてみました.色コード直接指定してて残念な感じですが.

diff --git a/site-lisp/lang/textile-mode.el b/site-lisp/lang/textile-mode.el
index d794c09..cbf3a05 100644
--- a/site-lisp/lang/textile-mode.el
+++ b/site-lisp/lang/textile-mode.el
@@ -278,32 +278,32 @@ non-matching parentheses"
   :group 'textile-faces)
 
 (defface textile-blockquote-face
-  '((t (:foreground "ivory4")))
+  '((t (:foreground "#93A1A1")))  ;; base0
   "Face used to highlight bq blocks."
   :group 'textile-faces)
 
 (defface textile-footnote-face
-  '((t (:foreground "orange red")))
+  '((t (:foreground "#CB4B16"))) ;; orange
   "Face used to highlight footnote blocks."
   :group 'textile-faces)
 
 (defface textile-footnotemark-face
-  '((t (:foreground "orange red")))
+  '((t (:foreground "#CB4B16"))) ;; orange
   "Face used to highlight footnote marks."
   :group 'textile-faces)
 
 (defface textile-style-face
-  '((t (:foreground "sandy brown")))
+  '((t (:foreground "#CB4B16"))) ;; orange
   "Face used to highlight style parameters."
   :group 'textile-faces)
 
 (defface textile-class-face
-  '((t (:foreground "yellow green")))
+  '((t (:foreground "#859900"))) ;; green
   "Face used to highlight class and id parameters."
   :group 'textile-faces)
 
 (defface textile-lang-face
-  '((t (:foreground "sky blue")))
+  '((t (:foreground "#268BD2"))) ;; blue
   "Face used to highlight lang parameters."
   :group 'textile-faces)
 
@@ -318,7 +318,7 @@ non-matching parentheses"
   :group 'textile-faces)
 
 (defface textile-code-face
-  '((t (:foreground "ivory3")))
+  '((t (:foreground "#6C71C4"))) ;; violet
   "Face used to highlight inline code."
   :group 'textile-faces)
 
@@ -348,52 +348,52 @@ non-matching parentheses"
   :group 'textile-faces)
 
 (defface textile-span-face
-  '((t (:foreground "pink")))
+  '((t (:foreground "#D33682"))) ;; magenta
   "Face used to highlight span words."
   :group 'textile-faces)
 
 (defface textile-alignments-face
-  '((t (:foreground "cyan")))
+  '((t (:foreground "#2AA198"))) ;; cyan
   "Face used to highlight alignments."
   :group 'textile-faces)
 
 (defface textile-ol-bullet-face
-  '((t (:foreground "red")))
+  '((t (:foreground "#DC322F"))) ;; red
   "Face used to highlight ordered lists bullets."
   :group 'textile-faces)
 
 (defface textile-ul-bullet-face
-  '((t (:foreground "blue")))
+  '((t (:foreground "#268BD2"))) ;; blue
   "Face used to highlight unordered list bullets."
   :group 'textile-faces)
 
 (defface textile-pre-face
-  '((t (:foreground "green")))
+  '((t (:foreground "#859900"))) ;; green
   "Face used to highlight <pre> blocks."
   :group 'textile-faces)
 
 (defface textile-code-face
-  '((t (:foreground "yellow")))
+  '((t (:foreground "#6C71C4"))) ;; violet
   "Face used to highlight <code> blocks."
   :group 'textile-faces)
 
 (defface textile-table-face
-  '((t (:foreground "red")))
+  '((t (:foreground "#DC322F"))) ;; red
   "Face used to highlight tables."
   :group 'textile-faces)
 
 (defface textile-link-face
-  '((t (:foreground "blue")))
+  '((t (:foreground "#268BD2"))) ;; blue
   "Face used to highlight links."
   :group 'textile-faces)
 
 (defface textile-image-face
-  '((t (:foreground "pink")))
+  '((t (:foreground "#D33682"))) ;; magenta
   "Face used to highlight image links."
   :group 'textile-faces)
 
 (defface textile-acronym-face
-  '((t (:foreground "cyan")))
+  '((t (:foreground "#2AA198"))) ;; cyan
   "Face used to highlight acronyms links."
   :group 'textile-faces)

おまけ

あと,bc. なブロックに対する定義が入っていないようなので,<code>...</code> と同様のハイライト色となるようにもしてみました.

diff --git a/site-lisp/lang/textile-mode.el b/site-lisp/lang/textile-mode.el
index cbf3a05..7c5998c 100644
--- a/site-lisp/lang/textile-mode.el
+++ b/site-lisp/lang/textile-mode.el
@@ -165,6 +165,8 @@ non-matching parentheses"
        `(,(textile-block-matcher "h6") 1 'textile-h6-face t t)
        ;; blockquotes
        `(,(textile-block-matcher "bq") 1 'textile-blockquote-face t t)
+       ;; block codes
+       `(,(textile-block-matcher "bc") 1 'textile-code-face t t)
        ;; footnotes
        `(,(textile-block-matcher "fn[0-9]+") 1 'textile-footnote-face t t)
        ;; footnote marks