Browse Source

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
Stefan Kangas 4 năm trước cách đây
mục cha
commit
4aa4ae8cf0
2 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 1 1
      lisp/org-table.el
  2. 1 1
      lisp/org.el

+ 1 - 1
lisp/org-table.el

@@ -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))

+ 1 - 1
lisp/org.el

@@ -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)))