ソースを参照

org-export: Put HTML buffers in either nxhtml-mode or nxml-mode

* contrib/lisp/org-export.el (org-export-dispatch): Put
temporary buffer that holds exported HTML source in either
`nxhtml-mode' or `nxml-mode'.

`nxhtml-mode' is *not* part of stock Emacs while `nxml-mode' is.
Jambunathan K 13 年 前
コミット
f1e5dfdbe9
1 ファイル変更3 行追加1 行削除
  1. 3 1
      contrib/lisp/org-export.el

+ 3 - 1
contrib/lisp/org-export.el

@@ -3218,7 +3218,9 @@ Return an error if key pressed has no associated command."
 	      (org-export-to-buffer
 	       'e-html "*Org E-HTML Export*"
 	       (memq 'subtree optns) (memq 'visible optns) (memq 'body optns))))
-	 (with-current-buffer outbuf (nxhtml-mode))
+	 ;; set major mode
+	 (with-current-buffer outbuf
+	   (if (featurep 'nxhtml-mode) (nxhtml-mode) (nxml-mode)))
 	 (when org-export-show-temporary-export-buffer
 	   (switch-to-buffer-other-window outbuf))))
       (?h (org-e-html-export-to-html