diff options
author | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2018-06-28 22:54:59 +0200 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2018-06-28 22:54:59 +0200 |
commit | e801f6446d0a2be42b95031b37a117853af7c7ef (patch) | |
tree | 1595aef01590950196546f3dc9025587cd191759 | |
parent | 6f8fdabf3529e9034e20c8e7d1dc8267c7ced838 (diff) | |
download | org-mode-e801f6446d0a2be42b95031b37a117853af7c7ef.tar.gz |
org-manual: Do not rely on `org-version'
* doc/org-manual.org (Export Setup): "version" macro does not rely on
`org-version' anymore. It checks "Version" keyword in "org.el".
-rw-r--r-- | doc/org-manual.org | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/doc/org-manual.org b/doc/org-manual.org index ee25fc7..6183286 100644 --- a/doc/org-manual.org +++ b/doc/org-manual.org @@ -20799,10 +20799,11 @@ modify this GNU manual." #+macro: cite @@texinfo:@cite{@@$1@@texinfo:}@@ #+macro: var @@texinfo:@var{@@$1@@texinfo:}@@ -# The "version" macro returns major.minor version number. This is -# sufficient since bugfix releases are not expected to add features -# and therefore imply manual modifications. -#+macro: version (eval (mapconcat #'identity (cl-subseq (split-string (org-version) "\\.") 0 -1) ".")) +# The "version" macro extracts "Version" keyword from "org.el". It +# returns major.minor version number. This is sufficient since bugfix +# releases are not expected to add features and therefore imply manual +# modifications. +#+macro: version (eval (with-current-buffer (find-file-noselect "../lisp/org.el") (org-with-point-at 1 (if (re-search-forward "Version: +\\([0-9.]+\\)" nil t) (mapconcat #'identity (cl-subseq (split-string (match-string-no-properties 1) "\\.") 0 2) ".") (error "Missing \"Version\" keyword in \"org.el\""))))) # The "kbd" macro turns KBD into @kbd{KBD}. Additionnally, it # encloses case-sensitive special keys (SPC, RET...) within @key{...}. |