aboutsummaryrefslogtreecommitdiff
path: root/sx-question-mode.el
diff options
context:
space:
mode:
authorArtur Malabarba <bruce.connor.am@gmail.com>2014-11-14 15:07:01 +0000
committerArtur Malabarba <bruce.connor.am@gmail.com>2014-11-14 15:07:01 +0000
commit0a655dfaab1651eeeffed53bf4bbec443a5ce91b (patch)
treeadfebdc54405fde2f2768f4881d48b4ff0237470 /sx-question-mode.el
parentf1218544993322fa7c54d095a03761f86586c88d (diff)
Font lock @usernames
Diffstat (limited to 'sx-question-mode.el')
-rw-r--r--sx-question-mode.el5
1 files changed, 5 insertions, 0 deletions
diff --git a/sx-question-mode.el b/sx-question-mode.el
index e80f3d9..4f5116c 100644
--- a/sx-question-mode.el
+++ b/sx-question-mode.el
@@ -267,6 +267,11 @@ DATA can represent a question or an answer."
(with-temp-buffer
(insert text)
(markdown-mode)
+ ;; Highlight usernames.
+ (font-lock-add-keywords
+ nil
+ '(("\\(?: \\|^\\)\\(@\\(?:\\sw\\|\\s_\\)+\\)\\_>"
+ 1 font-lock-builtin-face)))
(goto-char (point-min))
(font-lock-fontify-region (point-min) (point-max))
;; Do something here