forked from mirrors/org-mode
org-e-html: Small refactoring
* contrib/lisp/org-e-html.el (org-e-html-fontify-code): Activating major mode before inserting contents avoid problem of initial visibility for an Org buffer.
This commit is contained in:
parent
2c39a4ae85
commit
627d5733be
|
@ -1484,12 +1484,9 @@ is the language used for CODE, as a string, or nil."
|
|||
(t
|
||||
;; htmlize
|
||||
(setq code (with-temp-buffer
|
||||
(insert code)
|
||||
;; Switch to language-specific mode.
|
||||
(funcall lang-mode)
|
||||
;; "Org" as language. Be sure to disclose
|
||||
;; everything when activating the major mode.
|
||||
(when (eq lang-mode 'org-mode) (org-cycle '(64)))
|
||||
(insert code)
|
||||
;; Fontify buffer.
|
||||
(font-lock-fontify-buffer)
|
||||
;; Remove formatting on newline characters.
|
||||
|
|
Loading…
Reference in a new issue