瀏覽代碼

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.
Nicolas Goaziou 12 年之前
父節點
當前提交
627d5733be
共有 1 個文件被更改,包括 1 次插入4 次删除
  1. 1 4
      contrib/lisp/org-e-html.el

+ 1 - 4
contrib/lisp/org-e-html.el

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