mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-11-22 07:09:47 +00:00
org-src-font-lock-fontify-block: Do not fold links inside src blocks
* lisp/org-src.el (org-src-font-lock-fontify-block): Overwrite link fontification after regexp-based `org-activate-links' fontifies links disregarding Org parser. Hidden parts of link-looking text are explicitly unfolded now. This commit relies on specific fontification order in `org-font-lock-keywords'. (org-fold-region): Declare function. Reported-by: Tim Loderhose <tim@loderhose.com> Link: https://orgmode.org/list/XdWFnN3XCJ67x3SvoiVo_itGGYfboKmuWp7OxQxRZ_SGA5vgb72oWBoqTmOUUtiqUR890-kIXjI7uhlse-HFYqNVJTyVlc15zAzbP8qHVdo=@loderhose.com
This commit is contained in:
parent
de553d1dc7
commit
41a409f79d
@ -43,6 +43,7 @@
|
||||
(declare-function org--get-expected-indentation "org" (element contentsp))
|
||||
(declare-function org-mode "org" ())
|
||||
(declare-function org--get-expected-indentation "org" (element contentsp))
|
||||
(declare-function org-fold-region "org-fold" (from to flag &optional spec-or-alias))
|
||||
(declare-function org-element-at-point "org-element" (&optional pom cached-only))
|
||||
(declare-function org-element-class "org-element" (datum &optional parent))
|
||||
(declare-function org-element-context "org-element" (&optional element))
|
||||
@ -698,6 +699,8 @@ as `org-src-fontify-natively' is non-nil."
|
||||
(when (or (facep src-face) (listp src-face))
|
||||
(font-lock-append-text-property start end 'face src-face))
|
||||
(font-lock-append-text-property start end 'face 'org-block))
|
||||
;; Clear abbreviated link folding.
|
||||
(org-fold-region start end nil 'org-link)
|
||||
(add-text-properties
|
||||
start end
|
||||
'(font-lock-fontified t fontified t font-lock-multiline t))
|
||||
|
Loading…
Reference in New Issue
Block a user