From 302ec4e97a462da35feb45bce7f19ba168fa75f1 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 23 Jul 2019 18:33:00 +0200 Subject: [PATCH] lang/org: fix and autoload org-release hack - Lazy load all the things. - Now org-release return a sane version string, which should address packages using it to version check org. --- modules/lang/org/autoload/org.el | 12 ++++++++++++ modules/lang/org/init.el | 9 --------- 2 files changed, 12 insertions(+), 9 deletions(-) delete mode 100644 modules/lang/org/init.el diff --git a/modules/lang/org/autoload/org.el b/modules/lang/org/autoload/org.el index 590866344..2d88a243d 100644 --- a/modules/lang/org/autoload/org.el +++ b/modules/lang/org/autoload/org.el @@ -1,5 +1,17 @@ ;;; org/org/autoload/org.el -*- lexical-binding: t; -*- +;; HACK A necessary hack because org requires a compilation step after being +;; cloned, and during that compilation a org-version.el is generated with these +;; two functions, which return the output of a 'git describe ...' call in the +;; repo's root. Of course, this command won't work in a sparse clone, and more +;; than that, initiating these compilation step is a hassle, so... +;;;###autoload (defun org-release () "9.3") +;;;###autoload (fset 'org-git-version #'ignore) + + +;; +;;; Helpers + (defun +org--get-property (name &optional bound) (save-excursion (let ((re (format "^#\\+%s:[ \t]*\\([^\n]+\\)" (upcase name)))) diff --git a/modules/lang/org/init.el b/modules/lang/org/init.el deleted file mode 100644 index 636d73b64..000000000 --- a/modules/lang/org/init.el +++ /dev/null @@ -1,9 +0,0 @@ -;;; lang/org/init.el -*- lexical-binding: t; -*- - -;; HACK A necessary hack because org requires a compilation step after being -;; cloned, and during that compilation a org-version.el is generated with these -;; two functions, which return the output of a 'git describe ...' call in the -;; repo's root. Of course, this command won't work in a sparse clone, and more -;; than that, initiating these compilation step is a hassle, so... -(fset 'org-release #'ignore) -(fset 'org-git-version #'ignore)