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

[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.")



reply via email to

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