|
24 | 24 |
|
25 | 25 | ;;; Code: |
26 | 26 |
|
27 | | -(defface docstr-tag-face |
| 27 | +(require 'docstr) |
| 28 | + |
| 29 | +(defface docstr-faces-tag-face |
28 | 30 | '((t (:foreground "SlateGray"))) |
29 | 31 | "Highlighting for Docstring tag." |
30 | 32 | :group 'docstr) |
31 | | -(defvar docstr-tag-face 'docstr-tag-face) |
| 33 | +(defvar docstr-faces-tag-face 'docstr-faces-tag-face) |
32 | 34 |
|
33 | | -(defface docstr-type-face |
| 35 | +(defface docstr-faces-type-face |
34 | 36 | '((t (:foreground "SteelBlue"))) |
35 | 37 | "Highlighting for Docstring type." |
36 | 38 | :group 'docstr) |
37 | | -(defvar docstr-type-face 'docstr-type-face) |
| 39 | +(defvar docstr-faces-type-face 'docstr-faces-type-face) |
38 | 40 |
|
39 | | -(defface docstr-value-face |
| 41 | +(defface docstr-faces-value-face |
40 | 42 | '((t (:foreground "gold4"))) |
41 | 43 | "Highlighting for Docstring value." |
42 | 44 | :group 'docstr) |
43 | | -(defvar docstr-value-face 'docstr-value-face) |
| 45 | +(defvar docstr-faces-value-face 'docstr-faces-value-face) |
44 | 46 |
|
45 | | -(defun docstr-apply-faces () |
| 47 | +(defun docstr-faces-apply () |
46 | 48 | "Apply standard document string faces." |
47 | 49 | (dolist (mode (docstr-major-modes)) |
48 | 50 | (font-lock-add-keywords |
49 | 51 | mode |
50 | 52 | '(;; `@param` { typename } val-tag : value tag description.. |
51 | | - ("\\(?:^\\|\\s-\\)\\(@[^ \"'{}()\t\r\n]+\\)" 1 'docstr-tag-face t) |
| 53 | + ("\\(?:^\\|\\s-\\)\\(@[^ \"'{}()\t\r\n]+\\)" 1 'docstr-faces-tag-face t) |
52 | 54 | ;; @param `{ typename }` val-tag : value tag description.. |
53 | | - ("[ \t]+@[^ \t\r\n]+\\(?:^\\|\\s-\\)\\([\\[{][^}]*.\\)" 1 'docstr-type-face t) |
| 55 | + ("[ \t]+@[^ \t\r\n]+\\(?:^\\|\\s-\\)\\([\\[{][^}]*.\\)" 1 'docstr-faces-type-face t) |
54 | 56 | ;; @param { typename } `val-tag` : value tag description.. |
55 | | - ("[ \t]+@[^ \t\r\n].*[\]\|}]\\([^\r\n]*\\)[:-]" 1 'docstr-value-face t) |
| 57 | + ("[ \t]+@[^ \t\r\n].*[\]\|}]\\([^\r\n]*\\)[:-]" 1 'docstr-faces-value-face t) |
56 | 58 | ;; @param `val-tag` : value tag description.. |
57 | | - ("[ \t]+@[^ \t\r\n]*[ \t]*\\([a-zA-Z0-9_.*&]*\\)[ \t\n]*[{:-]" 1 'docstr-value-face t)) |
| 59 | + ("[ \t]+@[^ \t\r\n]*[ \t]*\\([a-zA-Z0-9_.*&]*\\)[ \t\n]*[{:-]" 1 'docstr-faces-value-face t)) |
58 | 60 | 'end))) |
59 | 61 |
|
60 | 62 | (provide 'docstr-faces) |
|
0 commit comments