Re-introduce undocumented fontification of example blocks
* lisp/org.el (org-fontify-meta-lines-and-blocks-1): Do not assert that `org-src-fontify-natively' only applies to code blocks. Allow other blocks with language specifier to be fontified, but keep this behavior undocumented. Reported-by: Rudi C <rudiwillalwaysloveyou@gmail.com> Link: https://orgmode.org/list/CAE9z9A3ko27NeN0oYFs_aBWV_cUbNm5YQTLrRux16dHsixsMBA@mail.gmail.com
This commit is contained in:
parent
37e468cf16
commit
9daad41ccf
11
lisp/org.el
11
lisp/org.el
|
@ -5526,7 +5526,16 @@ by a #."
|
||||||
(org-remove-flyspell-overlays-in nl-before-endline end-of-endline)
|
(org-remove-flyspell-overlays-in nl-before-endline end-of-endline)
|
||||||
(cond
|
(cond
|
||||||
((and org-src-fontify-natively
|
((and org-src-fontify-natively
|
||||||
(string= block-type "src"))
|
;; Technically, according to
|
||||||
|
;; `org-src-fontify-natively' docstring, we should
|
||||||
|
;; only fontify src blocks. However, it is common
|
||||||
|
;; to use undocumented fontification of example
|
||||||
|
;; blocks with undocumented language specifier.
|
||||||
|
;; Keep this undocumented feature for user
|
||||||
|
;; convenience.
|
||||||
|
t
|
||||||
|
;; (string= block-type "src")
|
||||||
|
)
|
||||||
(save-match-data
|
(save-match-data
|
||||||
(org-src-font-lock-fontify-block (or lang "") block-start block-end))
|
(org-src-font-lock-fontify-block (or lang "") block-start block-end))
|
||||||
(add-text-properties bol-after-beginline block-end '(src-block t)))
|
(add-text-properties bol-after-beginline block-end '(src-block t)))
|
||||||
|
|
Loading…
Reference in New Issue