Backport commit bbe88cd82 from Emacs

* lisp/org-table.el (org-table-edit-field):
* lisp/org.el (org-restart-font-lock): Assume font-lock-mode variable
is not void; it is preloaded.

Assume font-lock-mode variable is not void
bbe88cd82e4bbfd76df06223614ab74d1022c119
Stefan Kangas
Fri Feb 5 01:15:02 2021 +0100
This commit is contained in:
Stefan Kangas 2021-02-05 01:14:17 +01:00 committed by Kyle Meyer
parent d8e8a97a14
commit 4aa4ae8cf0
2 changed files with 2 additions and 2 deletions

View file

@ -2008,7 +2008,7 @@ toggle `org-table-follow-field-mode'."
(let ((b (save-excursion (skip-chars-backward "^|") (point)))
(e (save-excursion (skip-chars-forward "^|\r\n") (point))))
(remove-text-properties b e '(invisible t intangible t))
(if (and (boundp 'font-lock-mode) font-lock-mode)
(if font-lock-mode
(font-lock-fontify-block))))
(t
(let ((pos (point-marker))

View file

@ -5520,7 +5520,7 @@ highlighting was done, nil otherwise."
(defun org-restart-font-lock ()
"Restart `font-lock-mode', to force refontification."
(when (and (boundp 'font-lock-mode) font-lock-mode)
(when font-lock-mode
(font-lock-mode -1)
(font-lock-mode 1)))