diff options
author | Artur Malabarba <bruce.connor.am@gmail.com> | 2014-11-14 15:07:01 +0000 |
---|---|---|
committer | Artur Malabarba <bruce.connor.am@gmail.com> | 2014-11-14 15:07:01 +0000 |
commit | 0a655dfaab1651eeeffed53bf4bbec443a5ce91b (patch) | |
tree | adfebdc54405fde2f2768f4881d48b4ff0237470 /sx-question-mode.el | |
parent | f1218544993322fa7c54d095a03761f86586c88d (diff) |
Font lock @usernames
Diffstat (limited to 'sx-question-mode.el')
-rw-r--r-- | sx-question-mode.el | 5 |
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 |