1
0
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-11-22 07:09:47 +00:00

org-compat: Update font-lock-ensure alias

* lisp/org-compat.el (org-font-lock-ensure): Add new alias that accepts
  the same number of arguments as font-lock-ensure does.  Use an org-
  prefix.
* lisp/org-clock.el (org-clock-get-clocktable):
* lisp/org.el (org-fontify-like-in-org-mode):
* lisp/ox-html.el (org-html-fontify-code):
* lisp/ox-odt.el (org-odt-do-format-code):
* lisp/ox-org.el (org-org-publish-to-org): Use org-font-lock-ensure.

See Emacs's bug#22399.
This commit is contained in:
Kyle Meyer 2016-01-29 00:07:33 -05:00
parent 9ab973d0a6
commit a4edee4069
6 changed files with 9 additions and 7 deletions

View File

@ -2031,7 +2031,7 @@ fontified, and then returned."
(org-mode)
(org-create-dblock props)
(org-update-dblock)
(font-lock-ensure)
(org-font-lock-ensure)
(forward-line 2)
(buffer-substring (point) (progn
(re-search-forward "^[ \t]*#\\+END" nil t)

View File

@ -409,8 +409,10 @@ Pass BUFFER to the XEmacs version of `move-to-column'."
(defalias 'format-message 'format))
;; `font-lock-ensure' is only available from 24.4.50 on
(unless (fboundp 'font-lock-ensure)
(defalias 'font-lock-ensure 'font-lock-fontify-buffer))
(defalias 'org-font-lock-ensure
(if (fboundp 'font-lock-ensure)
#'font-lock-ensure
(lambda (&optional _beg _end) (font-lock-fontify-buffer))))
(defmacro org-no-popups (&rest body)
"Suppress popup windows.

View File

@ -6497,7 +6497,7 @@ needs to be inserted at a specific position in the font-lock sequence.")
(insert s)
(let ((org-odd-levels-only odd-levels))
(org-mode)
(font-lock-ensure)
(org-font-lock-ensure)
(buffer-string))))
(defvar org-m nil)

View File

@ -2047,7 +2047,7 @@ is the language used for CODE, as a string, or nil."
(funcall lang-mode)
(insert code)
;; Fontify buffer.
(font-lock-ensure)
(org-font-lock-ensure)
;; Remove formatting on newline characters.
(save-excursion
(let ((beg (point-min))

View File

@ -3167,7 +3167,7 @@ and prefix with \"OrgSrc\". For example,
(with-temp-buffer
(insert code)
(funcall lang-mode)
(font-lock-ensure)
(org-font-lock-ensure)
(buffer-string))))
(fontifier (if use-htmlfontify-p 'org-odt-htmlfontify-string
'org-odt--encode-plain-text))

View File

@ -297,7 +297,7 @@ Return output file name."
(work-buffer (or visitingp (find-file-noselect filename)))
newbuf)
(with-current-buffer work-buffer
(font-lock-ensure)
(org-font-lock-ensure)
(outline-show-all)
(org-show-block-all)
(setq newbuf (htmlize-buffer)))