branch: externals/dash
commit 80051536a6aff9c240165b34b152757eb7c41f39
Author: Matus Goljer <[email protected]>
Commit: Matus Goljer <[email protected]>

    Add customize option to turn on font-lock for dash
---
 dash.el |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/dash.el b/dash.el
index 46f392d..6f15a88 100644
--- a/dash.el
+++ b/dash.el
@@ -27,6 +27,23 @@
 
 ;;; Code:
 
+(defgroup dash ()
+  "Customize group for dash.el"
+  :group 'lisp
+  :prefix "dash-")
+
+(defun dash--enable-fontlock (symbol value)
+  (when value
+    (dash-enable-font-lock))
+  (set-default symbol value))
+
+(defcustom dash-enable-fontlock nil
+  "If non-nil, enable fontification of dash functions, macros and
+special values."
+  :type 'boolean
+  :set 'dash--enable-fontlock
+  :group 'dash)
+
 (defmacro !cons (car cdr)
   "Destructive: Sets CDR to the cons of CAR and CDR."
   `(setq ,cdr (cons ,car ,cdr)))

Reply via email to