瀏覽代碼

Avoid using the variable `default-major-mode'.

Carsten Dominik 15 年之前
父節點
當前提交
dcd1255762
共有 4 個文件被更改,包括 13 次插入3 次删除
  1. 8 0
      lisp/ChangeLog
  2. 1 1
      lisp/org-docbook.el
  3. 2 1
      lisp/org-html.el
  4. 2 1
      lisp/org.el

+ 8 - 0
lisp/ChangeLog

@@ -1,5 +1,13 @@
 2009-09-02  Carsten Dominik  <carsten.dominik@gmail.com>
 
+	* org.el:  Avoid using `default-major-mode'.
+
+	* org-html.el (org-export-as-html):  Avoid using
+	`default-major-mode'.
+
+	* org-docbook.el (org-export-as-docbook): Avoid using
+	`default-major-mode'.
+
 	* org-plot.el (require): Require CL only at compile time.
 
 	* org-exp.el (require): Require CL only at compile time.

+ 1 - 1
lisp/org-docbook.el

@@ -1101,7 +1101,7 @@ publishing directory."
 
       (unless (plist-get opt-plist :buffer-will-be-killed)
 	(normal-mode)
-	(if (eq major-mode default-major-mode)
+	(if (eq major-mode (default-value 'major-mode))
 	    (nxml-mode)))
 
       ;; Remove empty paragraphs and lists.  Replace them with a

+ 2 - 1
lisp/org-html.el

@@ -1420,7 +1420,8 @@ lang=\"%s\" xml:lang=\"%s\">
 
       (unless (plist-get opt-plist :buffer-will-be-killed)
 	(normal-mode)
-	(if (eq major-mode default-major-mode) (html-mode)))
+	(if (eq major-mode (default-value 'major-mode))
+	    (html-mode)))
 
       ;; insert the table of contents
       (goto-char (point-min))

+ 2 - 1
lisp/org.el

@@ -13690,7 +13690,8 @@ the buffer and restores the previous window configuration."
 	(while (setq b (find-buffer-visiting f)) (kill-buffer b))
 	(with-temp-file f
 	  (insert (mapconcat 'identity list "\n") "\n")))
-    (let ((org-mode-hook nil) (default-major-mode 'fundamental-mode))
+    (let ((org-mode-hook nil) (org-inhibit-startup t)
+	  (org-insert-mode-line-in-empty-file nil))
       (setq org-agenda-files list)
       (customize-save-variable 'org-agenda-files org-agenda-files))))