(font-lock-remove-keywords nil hi-lock-file-patterns)
(setq hi-lock-file-patterns nil))
(remove-overlays nil nil 'hi-lock-overlay t)
- (when font-lock-fontified (font-lock-fontify-buffer)))
+ (font-lock-flush))
(define-key-after menu-bar-edit-menu [hi-lock] nil)
(remove-hook 'font-lock-mode-hook 'hi-lock-font-lock-hook t)))
(delq keyword hi-lock-interactive-patterns))
(remove-overlays
nil nil 'hi-lock-overlay-regexp (hi-lock--hashcons (car keyword)))
- (when font-lock-fontified (font-lock-fontify-buffer)))))
+ (font-lock-flush))))
;;;###autoload
(defun hi-lock-write-interactive-patterns ()
(if (and font-lock-mode (font-lock-specified-p major-mode))
(progn
(font-lock-add-keywords nil (list pattern) t)
- (font-lock-fontify-buffer))
+ (font-lock-flush))
(let* ((range-min (- (point) (/ hi-lock-highlight-range 2)))
(range-max (+ (point) (/ hi-lock-highlight-range 2)))
(search-start
(font-lock-remove-keywords nil hi-lock-file-patterns)
(setq hi-lock-file-patterns patterns)
(font-lock-add-keywords nil hi-lock-file-patterns t)
- (font-lock-fontify-buffer)))
+ (font-lock-flush)))
(defun hi-lock-find-patterns ()
"Find patterns in current buffer for hi-lock."