• R/O
  • HTTP
  • SSH
  • HTTPS

howm: Commit

Hitori Otegaru Wiki Modoki


Commit MetaInfo

Revision77fce4bc2cd757b0d904e8c71ed9f17cf9ea14de (tree)
Time2021-02-17 20:25:38
AuthorHiraoka <khi@user...>
CommiterHiraoka

Log Message

fix incomplete font-lock after save

Change Summary

Incremental Difference

--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
1+2021-02-17 HIRAOKA Kazuyuki <khi@users.osdn.me>
2+
3+ * cheat-font-lock.el (cheat-font-lock-mode, cheat-font-lock-fontify):
4+ fix incomplete font-lock after save
5+
16 2020-12-31 HIRAOKA Kazuyuki <khi@users.osdn.me>
27
38 * configure.ac: version 1.4.8-snapshot1
--- a/cheat-font-lock.el
+++ b/cheat-font-lock.el
@@ -92,7 +92,9 @@
9292 ;; Without the next line, global value is changed to t. [2003-12-30]
9393 ;; (emacs-20.7.2 on Vine Linux 2.6)
9494 (make-local-variable 'font-lock-fontified)
95- (let* ((font-lock-fontified t) ;; adjourn fontify-buffer
95+ (let* (;; Stop cheating font-lock in such a way. [2021-02-15]
96+ ;; This seems troublesome and font-lock is not slow today.
97+ ;; (font-lock-fontified t) ;; adjourn fontify-buffer
9698 (bname (buffer-name))
9799 (need-rename (eq (aref (buffer-name) 0) ?\ )))
98100 ;; Rename invisible buffer in order to force font-lock-mode.
@@ -105,8 +107,8 @@
105107 (font-lock-set-defaults))
106108
107109 (defun cheat-font-lock-fontify (&optional dummy)
108- (if (fboundp 'font-lock-ensure)
109- (font-lock-ensure)
110+ (if (and (fboundp 'font-lock-flush) (fboundp 'font-lock-ensure))
111+ (progn (font-lock-flush) (font-lock-ensure))
110112 (with-no-warnings
111113 (font-lock-fontify-buffer))))
112114
Show on old repository browser