[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/parsec 3cdbdd2 05/13: Fix progn/prog1 byte-compiling pr
From: |
Stefan Monnier |
Subject: |
[elpa] externals/parsec 3cdbdd2 05/13: Fix progn/prog1 byte-compiling problems |
Date: |
Fri, 26 Mar 2021 22:45:55 -0400 (EDT) |
branch: externals/parsec
commit 3cdbdd27d699675b6ab129c10a73ae2be7a6b1b0
Author: Junpeng Qiu <qjpchmail@gmail.com>
Commit: Junpeng Qiu <qjpchmail@gmail.com>
Fix progn/prog1 byte-compiling problems
Fixes: #3
---
parsec.el | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/parsec.el b/parsec.el
index 3432e3d..67e8c57 100644
--- a/parsec.el
+++ b/parsec.el
@@ -678,13 +678,16 @@ fails after consuming some input or there is no more
parsers."
(concat "None of the parsers succeeds:\n"
(mapconcat #'identity ,error-str-list-sym "\n"))))))))
-(defalias 'parsec-and 'progn
+(defmacro parsec-and (&rest body)
"Eval BODY sequentially and return the result of the last parser.
-This combinator fails if one of the parsers fails.")
+This combinator fails if one of the parsers fails."
+ `(progn ,@body))
-(defalias 'parsec-return 'prog1
+(defmacro parsec-return (first &rest body)
"Eval FIRST and BODY sequentially and return the results of the first parser.
-This combinator fails if one of the parsers fails.")
+This combinator fails if one of the parsers fails."
+ (declare (indent 1))
+ `(prog1 ,first ,@body))
(defalias 'parsec-collect 'list
"Collect the results of all the parsers OBJECTS into a list.")
- [elpa] externals/parsec updated (21f5a11 -> 2cbbbc2), Stefan Monnier, 2021/03/26
- [elpa] externals/parsec faf5592 07/13: Fix parsec-count, Stefan Monnier, 2021/03/26
- [elpa] externals/parsec 3cdbdd2 05/13: Fix progn/prog1 byte-compiling problems,
Stefan Monnier <=
- [elpa] externals/parsec 6c05bb3 09/13: Update README.org, Stefan Monnier, 2021/03/26
- [elpa] externals/parsec 212f848 08/13: Merge pull request #5 from xuchunyang/master, Stefan Monnier, 2021/03/26
- [elpa] externals/parsec 2cbbbc2 13/13: Merge pull request #7 from ljos/patch-1, Stefan Monnier, 2021/03/26
- [elpa] externals/parsec 72c1897 11/13: Merge pull request #6 from franburstall/franburstall-patch-1, Stefan Monnier, 2021/03/26
- [elpa] externals/parsec aaf1c3e 03/13: Revert "Made char-equal comparison case-sensitive in parsec-ch function", Stefan Monnier, 2021/03/26
- [elpa] externals/parsec 4504686 04/13: Merge pull request #2 from jtimmons/master, Stefan Monnier, 2021/03/26
- [elpa] externals/parsec b12a9c8 01/13: Made char-equal comparison case-sensitive in parsec-ch function, Stefan Monnier, 2021/03/26
- [elpa] externals/parsec 9053adb 02/13: Redefined 'parsec-one-of' in terms of 'parsec-or' and 'parsec-ch' for consistency in handling character parsing, Stefan Monnier, 2021/03/26
- [elpa] externals/parsec 4c47bec 12/13: Only load cl-lib when needed, Stefan Monnier, 2021/03/26
- [elpa] externals/parsec 8755c60 06/13: Merge pull request #4 from cute-jumper/fix-progn, Stefan Monnier, 2021/03/26