summaryrefslogtreecommitdiff
path: root/elisp
diff options
context:
space:
mode:
authorAlex Kost <alezost@gmail.com>2015-09-06 21:55:36 +0300
committerJose Antonio Ortega Ruiz <jao@gnu.org>2015-09-07 00:32:03 +0200
commitbb3667a580d5c8dca7d88c0aaca6390c55978974 (patch)
tree2f033722faf5315edce71e27d9ac098523c2096c /elisp
parent067311a33f7044e0af8d042782e8b710317ef3db (diff)
downloadgeiser-bb3667a580d5c8dca7d88c0aaca6390c55978974.tar.gz
geiser-bb3667a580d5c8dca7d88c0aaca6390c55978974.tar.bz2
Add highlighting for geiser-custom--defcustom/defface
Diffstat (limited to 'elisp')
-rw-r--r--elisp/geiser-custom.el12
1 files changed, 12 insertions, 0 deletions
diff --git a/elisp/geiser-custom.el b/elisp/geiser-custom.el
index f1a4adc..bf15bc9 100644
--- a/elisp/geiser-custom.el
+++ b/elisp/geiser-custom.el
@@ -30,6 +30,7 @@
:group 'faces)
(defmacro geiser-custom--defface (face def group doc)
+ (declare (doc-string 4))
(let ((face (intern (format "geiser-font-lock-%s" face))))
`(defface ,face (face-default-spec ,def)
,(format "Face for %s." doc)
@@ -49,6 +50,7 @@
(add-to-list 'geiser-custom--memoized-vars name))
(defmacro geiser-custom--defcustom (name &rest body)
+ (declare (doc-string 3) (debug (name body)))
`(progn
(geiser-custom--memoize ',name)
(defcustom ,name ,@body)))
@@ -63,4 +65,14 @@
(put 'geiser-custom--defcustom 'lisp-indent-function 2)
+(defconst geiser-custom-font-lock-keywords
+ (eval-when-compile
+ `((,(concat "(\\(geiser-custom--\\(?:defcustom\\|defface\\)\\)\\_>"
+ "[ \t'\(]*"
+ "\\(\\(?:\\sw\\|\\s_\\)+\\)?")
+ (1 font-lock-keyword-face)
+ (2 font-lock-variable-name-face nil t)))))
+
+(font-lock-add-keywords 'emacs-lisp-mode geiser-custom-font-lock-keywords)
+
(provide 'geiser-custom)