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

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

[elpa] externals/dash 2028805 302/316: Don't quote error messages in Tex


From: ELPA Syncer
Subject: [elpa] externals/dash 2028805 302/316: Don't quote error messages in Texinfo examples
Date: Mon, 15 Feb 2021 15:58:21 -0500 (EST)

branch: externals/dash
commit 2028805287e5466a8d6bfedda050338f5e1d0ede
Author: Basil L. Contovounesios <contovob@tcd.ie>
Commit: Basil L. Contovounesios <contovob@tcd.ie>

    Don't quote error messages in Texinfo examples
    
    * dev/examples-to-info.el (example-to-string): Strip quotes from
    error message in expected result.
    * dash.texi: Regenerate.
---
 dash.texi               | 6 +++---
 dev/examples-to-info.el | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/dash.texi b/dash.texi
index a61e2d9..2ac5760 100644
--- a/dash.texi
+++ b/dash.texi
@@ -1445,7 +1445,7 @@ Return a list with running sums of items in @var{list}.
 @end group
 @group
 (-running-sum '())
-    @error{} "Wrong type argument: consp, nil"
+    @error{} Wrong type argument: consp, nil
 @end group
 @end example
 @end defun
@@ -1486,7 +1486,7 @@ Return a list with running products of items in 
@var{list}.
 @end group
 @group
 (-running-product '())
-    @error{} "Wrong type argument: consp, nil"
+    @error{} Wrong type argument: consp, nil
 @end group
 @end example
 @end defun
@@ -2741,7 +2741,7 @@ the @var{apl} language.
 @end group
 @group
 (-iota -1)
-    @error{} "Wrong type argument: natnump, -1"
+    @error{} Wrong type argument: natnump, -1
 @end group
 @end example
 @end defun
diff --git a/dev/examples-to-info.el b/dev/examples-to-info.el
index c1b05b7..6306c28 100644
--- a/dev/examples-to-info.el
+++ b/dev/examples-to-info.el
@@ -46,14 +46,14 @@
 (defun example-to-string (example)
   (pcase-let* ((`(,actual ,err ,expected) example)
                (err (eq err '!!>)))
-    (and err (consp expected)
-         (setq expected (error-message-string expected)))
+    (when err
+      (setq expected (error-message-string (-list expected))))
     (with-output-to-string
       (with-current-buffer standard-output
         (insert "@group\n")
         (dash--print-lisp-as-texi actual)
         (insert "\n    " (if err "@error{}" "@result{}") ?\s)
-        (dash--print-lisp-as-texi expected)
+        (funcall (if err #'princ #'dash--print-lisp-as-texi) expected)
         (insert "\n@end group")))))
 
 (defun dash--describe (fn)



reply via email to

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