Browse Source

Make org-version more robust

* lisp/org.el (org-version): Make org-version more robust, e.g. when
  byte-compiling single files with 'make compile-dirty'.
Achim Gratz 9 years ago
parent
commit
7be6352932
1 changed files with 4 additions and 0 deletions
  1. 4 0
      lisp/org.el

+ 4 - 0
lisp/org.el

@@ -222,6 +222,10 @@ With prefix arg HERE, insert it at point."
   (interactive "P")
   (let* ((org-dir         (ignore-errors (org-find-library-dir "org")))
 	 (org-install-dir (ignore-errors (org-find-library-dir "org-install.el")))
+	 (org-trash       (or
+			   (and (fboundp 'org-release) (fboundp 'org-git-version))
+			   (load (concat org-dir "org-version.el")
+				 'noerror 'nomessage 'nosuffix)))
 	 (org-version (org-release))
 	 (git-version (org-git-version))
 	 (version (format "Org-mode version %s (%s @ %s)"