Browse Source

fix org-check-version undefined error when compiled

Prior to this change compiling org-mode and then running Org-mode
functions from a batch Emacs would throw the following error.

  Symbol's function definition is void: org-check-version

Moving the require of org-compat before the use of this function in
org.el fixes this problem.

* lisp/org.el (org-compat): Require org-compat before we first use one
  of its functions (a macro actually).
Eric Schulte 12 years ago
parent
commit
96d4c5ef0a
1 changed files with 2 additions and 1 deletions
  1. 2 1
      lisp/org.el

+ 2 - 1
lisp/org.el

@@ -202,6 +202,7 @@ identifier."
   :group 'org-id)
 
 ;;; Version
+(require 'org-compat)
 (org-check-version)
 ;;;###autoload
 (defun org-version (&optional here full message)
@@ -4966,7 +4967,7 @@ This variable is set by `org-before-change-function'.
 
 (require 'org-macs)
 (require 'org-entities)
-(require 'org-compat)
+;; (require 'org-compat) moved higher up in the file before it is first used
 (require 'org-faces)
 (require 'org-list)
 (require 'org-pcomplete)