Skip to content

Commit 0e04612

Browse files
committed
add haskell- prefix to all c2hs-mode symbols
1 parent 86b6ffd commit 0e04612

File tree

2 files changed

+127
-127
lines changed

2 files changed

+127
-127
lines changed

haskell-c2hs.el

+16-16
Original file line numberDiff line numberDiff line change
@@ -22,28 +22,28 @@
2222
;; This mode is mostly intended for highlighting {#...#} hooks.
2323
;;
2424
;; Quick setup:
25-
;; (autoload 'c2hs-mode "c2hs-mode" nil t)
26-
;; (add-to-list 'auto-mode-alist '("\\.chs\\'" . c2hs-mode))
25+
;; (autoload 'haskell-c2hs-mode "haskell-c2hs-mode" nil t)
26+
;; (add-to-list 'auto-mode-alist '("\\.chs\\'" . haskell-c2hs-mode))
2727
;;
2828

2929
(require 'haskell-mode)
3030
(require 'haskell-font-lock)
3131
(require 'haskell-utils)
3232

3333
;;;###autoload
34-
(add-to-list 'auto-mode-alist '("\\.chs\\'" . c2hs-mode))
34+
(add-to-list 'auto-mode-alist '("\\.chs\\'" . haskell-c2hs-mode))
3535

36-
(defface c2hs-hook-pair-face
36+
(defface haskell-c2hs-hook-pair-face
3737
'((t (:inherit 'font-lock-preprocessor-face)))
3838
"Face for highlighting {#...#} pairs."
3939
:group 'haskell)
4040

41-
(defface c2hs-hook-name-face
41+
(defface haskell-c2hs-hook-name-face
4242
'((t (:inherit 'font-lock-keyword-face)))
4343
"Face for highlighting c2hs hook names."
4444
:group 'haskell)
4545

46-
(defvar c2hs-font-lock-keywords
46+
(defvar haskell-c2hs-font-lock-keywords
4747
`((,(haskell--rx-let ((ws (any ?\s ?\t ?\n ?\r))
4848
(anychar (or (not (any ?#))
4949
(seq "#"
@@ -176,25 +176,25 @@
176176
(* anychar)
177177
(group-n 9 "#}"))
178178
;; Override highlighting for pairs in order to always distinguish them.
179-
(1 'c2hs-hook-pair-face t)
180-
(2 'c2hs-hook-name-face)
179+
(1 'haskell-c2hs-hook-pair-face t)
180+
(2 'haskell-c2hs-hook-name-face)
181181
;; Make matches lax, i.e. do not signal error if nothing
182182
;; matched.
183-
(3 'c2hs-hook-name-face nil t)
184-
(4 'c2hs-hook-name-face nil t)
185-
(5 'c2hs-hook-name-face nil t)
186-
(6 'c2hs-hook-name-face nil t)
187-
(7 'c2hs-hook-name-face nil t)
183+
(3 'haskell-c2hs-hook-name-face nil t)
184+
(4 'haskell-c2hs-hook-name-face nil t)
185+
(5 'haskell-c2hs-hook-name-face nil t)
186+
(6 'haskell-c2hs-hook-name-face nil t)
187+
(7 'haskell-c2hs-hook-name-face nil t)
188188
(8 'font-lock-negation-char-face nil t)
189189
;; Override highlighting for pairs in order to always distinguish them.
190-
(9 'c2hs-hook-pair-face t))
190+
(9 'haskell-c2hs-hook-pair-face t))
191191
,@(haskell-font-lock-keywords)))
192192

193193
;;;###autoload
194-
(define-derived-mode c2hs-mode haskell-mode "C2HS"
194+
(define-derived-mode haskell-c2hs-mode haskell-mode "C2HS"
195195
"Mode for editing *.chs files of the c2hs haskell tool."
196196
(setq-local font-lock-defaults
197-
(cons 'c2hs-font-lock-keywords
197+
(cons 'haskell-c2hs-font-lock-keywords
198198
(cdr font-lock-defaults))))
199199

200200

0 commit comments

Comments
 (0)