aboutsummaryrefslogtreecommitdiff
path: root/hcel-source.el
diff options
context:
space:
mode:
authorYuchen Pei <hi@ypei.me>2022-09-29 10:29:11 +1000
committerYuchen Pei <hi@ypei.me>2022-09-29 10:29:11 +1000
commitba93eaa07c02d1fe21c8b267f0e126ff1519a721 (patch)
treef19a5db3343d1f835072ec13a8a656b7a092baea /hcel-source.el
parent5ffcae5617a76622fb02a9f979c5a720a51bff7d (diff)
get rid of clean byte compiling warnings
Diffstat (limited to 'hcel-source.el')
-rw-r--r--hcel-source.el32
1 files changed, 15 insertions, 17 deletions
diff --git a/hcel-source.el b/hcel-source.el
index ef57bcb..dc54e18 100644
--- a/hcel-source.el
+++ b/hcel-source.el
@@ -25,7 +25,21 @@
(require 'xref)
(defcustom hcel-font-lock-use-haskell-mode nil
- "If non-nil, will use haskell mode for haskell syntax highlight.")
+ "If non-nil, will use haskell mode for haskell syntax highlight."
+ :group 'hcel :type '(boolean))
+
+
+(defface hcel-type-face '((t :inherit font-lock-type-face))
+ "Face used to highlight types" :group 'hcel-faces)
+(defface hcel-value-face '((t :inherit font-lock-variable-name-face))
+ "Face used to highlight values" :group 'hcel-faces)
+(defface hcel-comment-face '((t :inherit font-lock-comment-face))
+ "Face used to highlight comments" :group 'hcel-faces)
+(defface hcel-pragma-face '((t :inherit font-lock-preprocessor-face))
+ "Face used to highlight pragmas" :group 'hcel-faces)
+
+(defvar hcel-comment-re "^\\ *--.*$")
+(defvar hcel-pragma-re "^\\ *{-# .*? #-}\\ *$")
(defvar-local hcel-identifiers nil)
(defvar-local hcel-package-id nil)
@@ -349,22 +363,6 @@ the location with pulsing.
(left-char))
(define-key hcel-mode-map "p" #'hcel-source-previous-declaration)
-(defface hcel-type-face '((t :inherit font-lock-type-face))
- "Face used to highlight types" :group 'hcel-faces)
-(defface hcel-value-face '((t :inherit font-lock-variable-name-face))
- "Face used to highlight values" :group 'hcel-faces)
-(defface hcel-comment-face '((t :inherit font-lock-comment-face))
- "Face used to highlight comments" :group 'hcel-faces)
-(defface hcel-pragma-face '((t :inherit font-lock-preprocessor-face))
- "Face used to highlight pragmas" :group 'hcel-faces)
-(defface hcel-builtin-face '((t :inherit font-lock-builtin-face))
- "Face used to highlight builtins" :group 'hcel-faces)
-
-(defvar hcel-comment-re "^\\ *--.*$")
-(defvar hcel-pragma-re "^\\ *{-# .*? #-}\\ *$")
-(defvar hcel-builtin-re "^\\ *\\(module\\|import\\|qualified\\|as\\|if\\|then\\|else\\|in\\|where\\|::\\)\\ *$")
-
-
(defun hcel-write-html-source-to-buffer (lines occs font-lock)
(mapc
(lambda (line)