ソースを参照

Fix "File mode specification error"

This reverts "org-element: Do not require 'org", which does not seem
trivial at the moment.

Reported-by: Amin Bandali <bandali@gnu.org>
<http://lists.gnu.org/r/emacs-orgmode/2019-03/msg00117.html>
Nicolas Goaziou 6 年 前
コミット
7e58160367
3 ファイル変更7 行追加4 行削除
  1. 5 2
      lisp/org-element.el
  2. 0 1
      lisp/org-lint.el
  3. 2 1
      lisp/org-macro.el

+ 5 - 2
lisp/org-element.el

@@ -60,18 +60,21 @@
 
 (require 'avl-tree)
 (require 'cl-lib)
-(require 'org-macs)
 (require 'ol)
+(require 'org)
+(require 'org-compat)
 (require 'org-entities)
 (require 'org-footnote)
 (require 'org-list)
-(require 'org-macro)
+(require 'org-macs)
 (require 'org-table)
 
 (declare-function org-at-heading-p "org" (&optional _))
 (declare-function org-end-of-subtree "org" (&optional invisible-ok to-heading))
 (declare-function org-escape-code-in-string "org-src" (s))
 (declare-function org-find-visible "org" ())
+(declare-function org-macro-escape-arguments "org-macro" (&rest args))
+(declare-function org-macro-extract-arguments "org-macro" (s))
 (declare-function org-reduced-level "org" (l))
 (declare-function org-unescape-code-in-string "org-src" (s))
 (declare-function outline-next-heading "outline" ())

+ 0 - 1
lisp/org-lint.el

@@ -108,7 +108,6 @@
 (require 'cl-lib)
 (require 'ob)
 (require 'ol)
-(require 'org-element)
 (require 'org-macro)
 (require 'ox)
 

+ 2 - 1
lisp/org-macro.el

@@ -62,7 +62,7 @@
 (declare-function org-file-contents "org" (file &optional noerror nocache))
 (declare-function org-file-url-p "org" (file))
 (declare-function org-in-commented-heading-p "org" (&optional no-inheritance))
-(declare-function org-link-search "org" (s &optional avoid-pos stealth))
+(declare-function org-link-search "ol" (s &optional avoid-pos stealth))
 (declare-function org-mode "org" ())
 (declare-function vc-backend "vc-hooks" (f))
 (declare-function vc-call "vc-hooks" (fun file &rest args) t)
@@ -139,6 +139,7 @@ In addition to buffer-defined macros, the function installs the
 following ones: \"n\", \"author\", \"email\", \"keyword\",
 \"time\", \"property\", and, if the buffer is associated to
 a file, \"input-file\" and \"modification-time\"."
+  (require 'org-element)
   (org-macro--counter-initialize)	;for "n" macro
   (setq org-macro-templates
 	(nconc