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

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

[elpa] externals/dash b7ba212 036/316: Edebug support for threading macr


From: ELPA Syncer
Subject: [elpa] externals/dash b7ba212 036/316: Edebug support for threading macros (#188)
Date: Mon, 15 Feb 2021 15:57:20 -0500 (EST)

branch: externals/dash
commit b7ba21202ec876775768fca08163e2cbfd130799
Author: Wilfred Hughes <me@wilfred.me.uk>
Commit: Matus Goljer <dota.keys@gmail.com>

    Edebug support for threading macros (#188)
    
    Given an elisp expression of the form:
    
        (->> (+ 1 1)
             (+ 2)
             (* 3)
             (format "%s"))
    
    Edebug now knows that the first argument is an expression, so users can
    step through it. This is an improvement over the current situation,
    where users cannot step through any part of a threaded form.
    
    Note that this debugging behaviour matches thread-first in Emacs 25:
    
http://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/emacs-lisp/subr-x.el?id=emacs-25.0.95#n49
---
 dash.el | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/dash.el b/dash.el
index 413992d..9f104c1 100644
--- a/dash.el
+++ b/dash.el
@@ -1260,6 +1260,7 @@ See also: `-select-columns', `-select-by-indices'"
 in the first form, making a list of it if it is not a list
 already. If there are more forms, insert the first form as the
 second item in second form, etc."
+  (declare (debug (form &rest [&or symbolp (sexp &rest form)])))
   (cond
    ((null form) x)
    ((null more) (if (listp form)
@@ -1272,6 +1273,7 @@ second item in second form, etc."
 in the first form, making a list of it if it is not a list
 already. If there are more forms, insert the first form as the
 last item in second form, etc."
+  (declare (debug ->))
   (cond
    ((null form) x)
    ((null more) (if (listp form)
@@ -1284,6 +1286,7 @@ last item in second form, etc."
 signified by the token `it' in the first form. If there are more
 forms, insert the first form at the position signified by `it' in
 in second form, etc."
+  (declare (debug ->))
   (if (null more)
       (if (listp form)
           (--map-when (eq it 'it) x form)
@@ -1293,6 +1296,7 @@ in second form, etc."
 (defmacro -some-> (x &optional form &rest more)
   "When expr is non-nil, thread it through the first form (via `->'),
 and when that result is non-nil, through the next form, etc."
+  (declare (debug ->))
   (if (null form) x
     (let ((result (make-symbol "result")))
       `(-some-> (-when-let (,result ,x)
@@ -1302,6 +1306,7 @@ and when that result is non-nil, through the next form, 
etc."
 (defmacro -some->> (x &optional form &rest more)
   "When expr is non-nil, thread it through the first form (via `->>'),
 and when that result is non-nil, through the next form, etc."
+  (declare (debug ->))
   (if (null form) x
     (let ((result (make-symbol "result")))
       `(-some->> (-when-let (,result ,x)
@@ -1311,6 +1316,7 @@ and when that result is non-nil, through the next form, 
etc."
 (defmacro -some--> (x &optional form &rest more)
   "When expr in non-nil, thread it through the first form (via `-->'),
 and when that result is non-nil, through the next form, etc."
+  (declare (debug ->))
   (if (null form) x
     (let ((result (make-symbol "result")))
       `(-some--> (-when-let (,result ,x)



reply via email to

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