Skip to content

Commit 33a147f

Browse files
committed
Merge pull request #1310 from gracjan/pr-silence-font-lock-modes
Silence possible messages from modes
2 parents 704dd8d + aefc32f commit 33a147f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

haskell-font-lock.el

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -431,8 +431,11 @@ like ::, class, instance, data, newtype, type."
431431
(concat " haskell-font-lock-fontify-block:" (symbol-name lang-mode)))
432432
(delete-region (point-min) (point-max))
433433
(insert string " ") ;; so there's a final property change
434-
(unless (eq major-mode lang-mode) (funcall lang-mode))
435-
(font-lock-ensure)
434+
(cl-letf (((symbol-function 'message)
435+
(lambda (fmt &rest args))))
436+
;; silence messages
437+
(unless (eq major-mode lang-mode) (funcall lang-mode))
438+
(font-lock-ensure))
436439
(setq pos (point-min))
437440
(while (setq next (next-single-property-change pos 'face))
438441
(put-text-property

0 commit comments

Comments
 (0)