Skip to content

Commit 5cbc362

Browse files
committed
Propertize haskell-show with 'font-lock-face, not 'face
1 parent 41bf024 commit 5cbc362

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

haskell-show.el

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@
105105
(let ((link-start (point)))
106106
(insert (car record))
107107
(let ((button (make-text-button link-start (point) :type 'haskell-show-toggle-button)))
108-
(put-text-property link-start (point) 'face 'font-lock-type-face)
108+
(put-text-property link-start (point) 'font-lock-face 'font-lock-type-face)
109109
(button-put button 'overlay overlay)))
110110
(insert " {\n")
111111
(let ((curly-start (1- (point)))
@@ -116,7 +116,7 @@
116116
(if (and (> i 0) (< show-len 80)) 0 column)
117117
(car field)))
118118
(insert " = ")
119-
(put-text-property (- (point) 3) (point) 'face
119+
(put-text-property (- (point) 3) (point) 'font-lock-face
120120
'font-lock-constant-face)
121121
(haskell-show-insert-pretty
122122
(if (< show-len 80)
@@ -135,31 +135,31 @@
135135
(insert (if parens ")" "")))))
136136
('num (let ((num-start (point)))
137137
(insert (format "%d" (cdr tree)))
138-
(put-text-property num-start (point) 'face 'font-lock-constant-face)))
138+
(put-text-property num-start (point) 'font-lock-face 'font-lock-constant-face)))
139139
('string (let ((str-start (point)))
140140
(insert "\"")
141141
(if (< (+ column (length (cdr tree))) 60)
142142
(progn
143143
(insert (format "%s" (cdr tree)))
144-
(put-text-property (+ 1 str-start) (point) 'face 'font-lock-string-face))
144+
(put-text-property (+ 1 str-start) (point) 'font-lock-face 'font-lock-string-face))
145145
(progn
146146
(insert "")
147147
(insert (format "%s" (cdr tree)))
148148
(let ((overlay (make-overlay (+ 2 str-start) (point) nil t)))
149149
(overlay-put overlay 'invisible t)
150-
(put-text-property (+ 2 str-start) (point) 'face 'font-lock-string-face)
150+
(put-text-property (+ 2 str-start) (point) 'font-lock-face 'font-lock-string-face)
151151
(let ((button (make-text-button (+ 1 str-start) (+ 2 str-start)
152152
:type 'haskell-show-toggle-button)))
153153
(put-text-property (+ 1 str-start) (+ 2 str-start)
154-
'face 'font-lock-keyword-face)
154+
'font-lock-face 'font-lock-keyword-face)
155155
(button-put button 'overlay (list overlay))
156156
(button-put button 'hide-on-click t)))))
157157
(insert "\"")))
158158
('data (let ((data (cdr tree)))
159159
(insert (if parens "(" ""))
160160
(let ((cons-start (point)))
161161
(insert (car data))
162-
(put-text-property cons-start (point) 'face 'font-lock-type-face))
162+
(put-text-property cons-start (point) 'font-lock-face 'font-lock-type-face))
163163
(unless (null (cdr data))
164164
(progn (insert " ")
165165
(haskell-show-mapcar/i
@@ -171,11 +171,11 @@
171171
(insert (if parens ")" ""))))
172172
('char (progn (insert "'")
173173
(insert (char-to-string (cdr tree)))
174-
(put-text-property (- (point) 1) (point) 'face 'font-lock-string-face)
174+
(put-text-property (- (point) 1) (point) 'font-lock-face 'font-lock-string-face)
175175
(insert "'")))
176176
('arbitrary (let ((start (point)))
177177
(insert (cdr tree))
178-
(put-text-property start (point) 'face 'font-lock-comment-face)))
178+
(put-text-property start (point) 'font-lock-face 'font-lock-comment-face)))
179179
(otherwise (error "Unsupported node type: %S" tree))))
180180

181181
(define-button-type 'haskell-show-toggle-button

0 commit comments

Comments
 (0)