aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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