[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/dash 3b08355 113/316: Use version from dash.el file whe
From: |
ELPA Syncer |
Subject: |
[elpa] externals/dash 3b08355 113/316: Use version from dash.el file when generating readme. |
Date: |
Mon, 15 Feb 2021 15:57:38 -0500 (EST) |
branch: externals/dash
commit 3b08355b94949a8e3a39d5949cf993922a447ac2
Author: Matus Goljer <matus.goljer@gmail.com>
Commit: Matus Goljer <matus.goljer@gmail.com>
Use version from dash.el file when generating readme.
---
dev/examples-to-docs.el | 13 +++++++++++++
readme-template.md | 4 ++--
2 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/dev/examples-to-docs.el b/dev/examples-to-docs.el
index e5ab510..bc1f65f 100644
--- a/dev/examples-to-docs.el
+++ b/dev/examples-to-docs.el
@@ -24,11 +24,17 @@
(require 'dash)
(require 'dash-functional)
(require 'help-fns)
+(require 'package)
(setq text-quoting-style 'grave)
(defvar functions '())
+(defun dash-get-package-version ()
+ "Get version of dash package."
+ (with-current-buffer (find-file-noselect "dash.el")
+ (mapconcat 'number-to-string (package-desc-version (package-buffer-info))
version-separator)))
+
(defun example-to-string (example)
(-let* (((actual sym expected) example)
(comment
@@ -164,6 +170,11 @@ FUNCTION may reference an elisp function, alias, macro or
a subr."
(search-forward s)
(delete-char (- (length s))))
+(defun goto-and-replace-all (s replacement)
+ (while (progn (goto-char (point-min)) (search-forward s nil t))
+ (delete-char (- (length s)))
+ (insert replacement)))
+
(defun create-docs-file ()
(let ((functions (nreverse functions)))
(with-temp-file "./README.md"
@@ -175,6 +186,8 @@ FUNCTION may reference an elisp function, alias, macro or a
subr."
(goto-and-remove "[[ function-docs ]]")
(insert (mapconcat 'function-to-md functions "\n"))
+ (goto-and-replace-all "[[ version ]]" (dash-get-package-version))
+
(simplify-quotes))))
;;; examples-to-docs.el ends here
diff --git a/readme-template.md b/readme-template.md
index 333b5c2..9643a46 100644
--- a/readme-template.md
+++ b/readme-template.md
@@ -19,11 +19,11 @@ If you want the function combinators, then also:
Add this to the big comment block at the top:
- ;; Package-Requires: ((dash "2.14.1"))
+ ;; Package-Requires: ((dash "[[ version ]]"))
To get function combinators:
- ;; Package-Requires: ((dash "2.14.1") (dash-functional "1.2.0") (emacs
"24"))
+ ;; Package-Requires: ((dash "[[ version ]]") (dash-functional "1.2.0")
(emacs "24"))
## Upcoming breaking change!
- [elpa] externals/dash 72b8d39 096/316: Add -common-prefix, (continued)
- [elpa] externals/dash 72b8d39 096/316: Add -common-prefix, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 91d8cb0 091/316: Move inits and tails under reductions in the examples, ELPA Syncer, 2021/02/15
- [elpa] externals/dash e9c792f 094/316: Merge pull request #257 from Wilfred/update_docs, ELPA Syncer, 2021/02/15
- [elpa] externals/dash c1991d4 099/316: Merge pull request #262 from basil-conto/blc/common-prefix, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 48a5015 101/316: Merge pull request #265 from Wilfred/missing-keywords, ELPA Syncer, 2021/02/15
- [elpa] externals/dash beea1a3 098/316: Simplify --common-prefix implementation, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 87d5fea 103/316: Merge pull request #266 from phillord/feature/travis-update, ELPA Syncer, 2021/02/15
- [elpa] externals/dash a74f4cf 105/316: Bump version in package declaration, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 8c4e27f 108/316: Implement -setq, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 578428a 117/316: Add some implementation commentary to '-each-r'., ELPA Syncer, 2021/02/15
- [elpa] externals/dash 3b08355 113/316: Use version from dash.el file when generating readme.,
ELPA Syncer <=
- [elpa] externals/dash a87df31 111/316: Merge pull request #269 from magnars/feature/smart-kv-destructuring, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 406f6f3 112/316: Fix whitespace, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 8f90dd7 121/316: Handle empty list in -reductions[-r], ELPA Syncer, 2021/02/15
- [elpa] externals/dash 453c775 115/316: Fix -setq docstring fn reference, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 85e8f62 119/316: Merge pull request #274 from magnars/doublep-each-r, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 1e22ef6 125/316: Merge pull request #263 from basil-conto/blc/common-suffix, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 78fee36 190/316: * .dir-locals.el (sh-mode): Enforce indentation., ELPA Syncer, 2021/02/15
- [elpa] externals/dash 1d897cc 199/316: Simplify examples-to-docs a bit, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 3d38fa2 213/316: Use actual dash-functional.el version in manual, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 92393c7 220/316: Clean up core definitions, ELPA Syncer, 2021/02/15