emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/parsec 8755c60 06/13: Merge pull request #4 from cute-j


From: Stefan Monnier
Subject: [elpa] externals/parsec 8755c60 06/13: Merge pull request #4 from cute-jumper/fix-progn
Date: Fri, 26 Mar 2021 22:45:55 -0400 (EDT)

branch: externals/parsec
commit 8755c60826efaa8603b0d4300bfba9abaa072584
Merge: 4504686 3cdbdd2
Author: Junpeng Qiu <qjpchmail@gmail.com>
Commit: GitHub <noreply@github.com>

    Merge pull request #4 from cute-jumper/fix-progn
    
    Fix progn/prog1 byte-compiling problems
---
 parsec.el | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/parsec.el b/parsec.el
index 3ed3856..514ab97 100644
--- a/parsec.el
+++ b/parsec.el
@@ -677,13 +677,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.")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]