;;; cheat-font-lock.el --- modify font-lock-keywords
-;;; Copyright (C) 2002, 2003, 2004, 2005-2018
+;;; Copyright (C) 2002, 2003, 2004, 2005-2021
;;; HIRAOKA Kazuyuki <khi@users.osdn.me>
;;;
;;; This program is free software; you can redistribute it and/or modify
;; Without the next line, global value is changed to t. [2003-12-30]
;; (emacs-20.7.2 on Vine Linux 2.6)
(make-local-variable 'font-lock-fontified)
- (let* ((font-lock-fontified t) ;; adjourn fontify-buffer
+ (let* (;; Stop cheating font-lock in such a way. [2021-02-15]
+ ;; This seems troublesome and font-lock is not slow today.
+ ;; (font-lock-fontified t) ;; adjourn fontify-buffer
(bname (buffer-name))
(need-rename (eq (aref (buffer-name) 0) ?\ )))
;; Rename invisible buffer in order to force font-lock-mode.
(font-lock-set-defaults))
(defun cheat-font-lock-fontify (&optional dummy)
- (font-lock-fontify-buffer))
+ (if (and (fboundp 'font-lock-flush) (fboundp 'font-lock-ensure))
+ (progn (font-lock-flush) (font-lock-ensure))
+ (with-no-warnings
+ (font-lock-fontify-buffer))))
(provide 'cheat-font-lock)