forked from alphapapa/matrix-client.el
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmatrix-client-modes.el
78 lines (62 loc) · 2.65 KB
/
matrix-client-modes.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
;;; matrix-client-modes.el --- Modes for a Matrix.org chat client
;; Copyright (C) 2015 Ryan Rix
;; Author: Ryan Rix <[email protected]>
;; Maintainer: Ryan Rix <[email protected]>
;; Created: 21 June 2015
;; Keywords: web
;; Homepage: http://doc.rix.si/matrix.html
;; Package-Version: 0.1.0
;; Package-Requires: ((json))
;; This file is not part of GNU Emacs.
;; matrix-client-modes.el is free software: you can redistribute it and/or modify it
;; under the terms of the GNU General Public License as published by the Free
;; Software Foundation, either version 3 of the License, or (at your option) any
;; later version.
;;
;; matrix-client-modes.el is distributed in the hope that it will be useful, but
;; WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
;; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
;; more details.
;;
;; You should have received a copy of the GNU General Public License along with
;; this file. If not, see <http://www.gnu.org/licenses/>.
;;; Commentary:
;; this file describes the major-mode for Matrix-Client buffers. See the docstring
;; for `matrix-client-mode' for more information.
;;; Code:
(require 'simple)
(define-derived-mode matrix-client-mode fundamental-mode "Matrix Client"
"Major mode for Matrix client buffers.
\\{matrix-client-mode-map}")
(defface matrix-client-metadata
'((((class color) (background light)) (:foreground "#000088" :weight bold))
(((class color) (background dark)) (:foreground "#4444FF" :weight bold))
(t (:weight bold)))
"Face for chat metadata properties."
:group 'matrix-client)
(defface matrix-client-own-metadata
'((((class color) (background light)) (:foreground "#268bd2" :weight bold))
(((class color) (background dark)) (:foreground "#268bd2" :weight bold))
(t (:weight bold)))
"Face for user's own chat metadata properties."
:group 'matrix-client)
(defface matrix-client-own-message-body
'((((class color) (background light)) (:foreground "#586e75" :weight bold :slant italic))
(((class color) (background dark)) (:foreground "#586e75" :weight bold :slant italic))
(t (:weight bold :slant italic)))
"Face for user's own chat messages."
:group 'matrix-client)
(defface matrix-client-notice
'((t :inherit font-lock-comment-face))
"Face for notices."
:group 'matrix-client)
(defface matrix-client-notice-metadata
'((t :inherit font-lock-comment-face))
"Face for notices."
:group 'matrix-client)
(defface matrix-client-last-seen
'((t (:inherit 'highlight :height 0.1)))
"Face for last-seen overlay."
:group 'matrix-client)
(provide 'matrix-client-modes)
;;; matrix-client-modes.el ends here