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.
This commit is contained in:
Henrik Lissner 2019-07-23 18:33:00 +02:00
parent fec53f7b1d
commit 302ec4e97a
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
2 changed files with 12 additions and 9 deletions

View file

@ -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))))

View file

@ -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)