mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 18:40:39 -08:00
* lisp/font-lock.el (font-lock-flush, font-lock-ensure): New functions.
(font-lock-fontify-buffer): Mark interactive-only. (font-lock-multiline, font-lock-fontified, font-lock-set-defaults): Make buffer-local. (font-lock-specified-p): Remove redundant boundp check. (font-lock-flush-function, font-lock-ensure-function): New vars. (font-lock-turn-on-thing-lock): Set them. (font-lock-default-fontify-buffer): Obey font-lock-dont-widen. (font-lock-after-change-function): Make `old-len' optional. (font-lock-set-defaults): Remove redundant `set' of font-lock-defaults. Call font-lock-flush, just in case. * lisp/progmodes/verilog-mode.el (verilog-preprocess): Disable workaround in recent Emacsen. * lisp/progmodes/vera-mode.el (vera-fontify-buffer): Declare obsolete. (vera-mode-map, vera-mode-menu): Remove bindings to it. * lisp/progmodes/idlw-help.el (idlwave-help-fontify): Use font-lock-ensure and with-syntax-table. * lisp/textmodes/conf-mode.el (conf-quote-normal): * lisp/progmodes/sh-script.el (sh-set-shell): * lisp/progmodes/prog-mode.el (prettify-symbols-mode): * lisp/progmodes/f90.el (f90-font-lock-n): * lisp/progmodes/cwarn.el (cwarn-mode): * lisp/nxml/nxml-mode.el (nxml-toggle-char-ref-extra-display): * lisp/progmodes/compile.el (compilation-setup, compilation--unsetup): * lisp/hi-lock.el (hi-lock-mode, hi-lock-unface-buffer) (hi-lock-set-pattern, hi-lock-set-file-patterns): Use font-lock-flush. * lisp/mail/rmail.el (rmail-variables): Set font-lock-dont-widen instead of font-lock-fontify-buffer-function and font-lock-unfontify-buffer-function. (rmail-unfontify-buffer-function, rmail-fontify-message): Use with-silent-modifications. * lisp/htmlfontify.el (hfy-force-fontification): Use jit-lock-fontify-now and font-lock-ensure. * lisp/bs.el (bs-show-in-buffer): Use font-lock-ensure. * lisp/gnus/mm-view.el (mm-display-inline-fontify): Use font-lock-ensure. * lisp/gnus/gnus-cite.el (gnus-message-citation-mode): Use font-lock-flush. * lisp/org/org-compat.el (org-font-lock-ensure): New function. * lisp/org/ox-odt.el (org-odt-do-format-code): * lisp/org/ox-html.el (org-html-fontify-code): * lisp/org/org.el (org-fontify-like-in-org-mode): * lisp/org/org-src.el (org-src-font-lock-fontify-block): * lisp/org/org-clock.el (org-clock-get-clocktable): Use it. * lisp/org/ox-org.el (org-org-publish-to-org): Use it. Avoid using find-file from Elisp. * test/automated/ruby-mode-tests.el (ruby-assert-face): Use font-lock-ensure. (ruby-interpolation-keeps-non-quote-syntax): Use syntax-propertize.
This commit is contained in:
parent
2662ca5cd9
commit
6711a21f11
33 changed files with 564 additions and 461 deletions
|
|
@ -391,7 +391,7 @@ versions before 22 use the following in your init file:
|
|||
(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)))
|
||||
|
||||
|
|
@ -601,7 +601,7 @@ then remove all hi-lock highlighting."
|
|||
(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 ()
|
||||
|
|
@ -695,7 +695,7 @@ with completion and history."
|
|||
(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
|
||||
|
|
@ -719,7 +719,7 @@ with completion and history."
|
|||
(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."
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue