Hitori Otegaru Wiki Modoki
Revision | 77fce4bc2cd757b0d904e8c71ed9f17cf9ea14de (tree) |
---|---|
Time | 2021-02-17 20:25:38 |
Author | Hiraoka <khi@user...> |
Commiter | Hiraoka |
fix incomplete font-lock after save
@@ -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 | + | |
1 | 6 | 2020-12-31 HIRAOKA Kazuyuki <khi@users.osdn.me> |
2 | 7 | |
3 | 8 | * configure.ac: version 1.4.8-snapshot1 |
@@ -92,7 +92,9 @@ | ||
92 | 92 | ;; Without the next line, global value is changed to t. [2003-12-30] |
93 | 93 | ;; (emacs-20.7.2 on Vine Linux 2.6) |
94 | 94 | (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 | |
96 | 98 | (bname (buffer-name)) |
97 | 99 | (need-rename (eq (aref (buffer-name) 0) ?\ ))) |
98 | 100 | ;; Rename invisible buffer in order to force font-lock-mode. |
@@ -105,8 +107,8 @@ | ||
105 | 107 | (font-lock-set-defaults)) |
106 | 108 | |
107 | 109 | (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)) | |
110 | 112 | (with-no-warnings |
111 | 113 | (font-lock-fontify-buffer)))) |
112 | 114 |