* Re: [Emacs-diffs] master ed29d9f: Add edebug specs for inline.el [not found] ` <20190713160724.DE848207EF@vcs0.savannah.gnu.org> @ 2019-07-13 22:30 ` Stefan Monnier 2019-07-14 11:55 ` Lars Ingebrigtsen 0 siblings, 1 reply; 4+ messages in thread From: Stefan Monnier @ 2019-07-13 22:30 UTC (permalink / raw) To: Lars Ingebrigtsen; +Cc: emacs-devel > Add edebug specs for inline.el > > * lisp/emacs-lisp/inline.el (inline-quote) > (inline-letevals): Add edebug specs (bug#31051). I don't understand. Those macros already have edebug specs (in their `declare` form). (defmacro inline-quote (_exp) "Similar to backquote, but quotes code and only accepts , and not ,@." (declare (debug t)) (error "inline-quote can only be used within define-inline")) (defmacro inline--leteval (_var-exp &rest _body) (declare (indent 1) (debug (sexp &rest body))) ;; BEWARE: if we're here it's presumably via macro-expansion of ;; inline-letevals, so signal the error in terms of the user's code. (error "inline-letevals can only be used within define-inline")) I can't imagine how adding def-edebug-spec before will make any difference. Stefan ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Emacs-diffs] master ed29d9f: Add edebug specs for inline.el 2019-07-13 22:30 ` [Emacs-diffs] master ed29d9f: Add edebug specs for inline.el Stefan Monnier @ 2019-07-14 11:55 ` Lars Ingebrigtsen 2019-07-15 14:41 ` Stefan Monnier 0 siblings, 1 reply; 4+ messages in thread From: Lars Ingebrigtsen @ 2019-07-14 11:55 UTC (permalink / raw) To: Stefan Monnier; +Cc: emacs-devel Stefan Monnier <monnier@iro.umontreal.ca> writes: > I don't understand. Those macros already have edebug specs (in their > `declare` form). > > (defmacro inline-quote (_exp) > "Similar to backquote, but quotes code and only accepts , and not ,@." > (declare (debug t)) Oh, is `debug' for edebug, too? I assumed it was... something else... > I can't imagine how adding def-edebug-spec before will make any difference. Then me neither, but without the specs the test case fails and with it, it doesn't fail. Hm... Any ideas? Here's the "emacs -Q" test case: To reproduce, enter the following code into *scratch*: ;;; -*- lexical-binding: t -*- (defvar my-count 0) (defun my-number () (setq my-count (1+ my-count)) (message "my-count is %s" my-count) my-count) (define-inline my-divisible-p (n) (inline-letevals (n) (inline-quote (or (eq 0 (% ,n 2)) (eq 0 (% ,n 3)))))) (defun my-func () (message "the result is %s" (my-divisible-p (my-number)))) (my-func) Then: M-x edebug-all-defs RET M-x eval-buffer RET g g Result: Args out of range: [20 48 59 70 71 72], 7 -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Emacs-diffs] master ed29d9f: Add edebug specs for inline.el 2019-07-14 11:55 ` Lars Ingebrigtsen @ 2019-07-15 14:41 ` Stefan Monnier 2019-07-15 14:47 ` Lars Ingebrigtsen 0 siblings, 1 reply; 4+ messages in thread From: Stefan Monnier @ 2019-07-15 14:41 UTC (permalink / raw) To: Lars Ingebrigtsen; +Cc: emacs-devel > Oh, is `debug' for edebug, Yes. > too? No: AFAIK it's only used by Edebug so far. >> I can't imagine how adding def-edebug-spec before will make any difference. > > Then me neither, but without the specs the test case fails and with it, > it doesn't fail. Hm... Any ideas? Here's the "emacs -Q" test case: > > To reproduce, enter the following code into *scratch*: I still get the error with the code in the trunk. Stefan ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Emacs-diffs] master ed29d9f: Add edebug specs for inline.el 2019-07-15 14:41 ` Stefan Monnier @ 2019-07-15 14:47 ` Lars Ingebrigtsen 0 siblings, 0 replies; 4+ messages in thread From: Lars Ingebrigtsen @ 2019-07-15 14:47 UTC (permalink / raw) To: Stefan Monnier; +Cc: emacs-devel Stefan Monnier <monnier@iro.umontreal.ca> writes: >> Then me neither, but without the specs the test case fails and with it, >> it doesn't fail. Hm... Any ideas? Here's the "emacs -Q" test case: >> >> To reproduce, enter the following code into *scratch*: > > I still get the error with the code in the trunk. Hm, sounds like ... evaluation order or something is playing a role here? I'll revert the patch and reopen the bug. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-07-15 14:47 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <20190713160723.15224.93024@vcs0.savannah.gnu.org> [not found] ` <20190713160724.DE848207EF@vcs0.savannah.gnu.org> 2019-07-13 22:30 ` [Emacs-diffs] master ed29d9f: Add edebug specs for inline.el Stefan Monnier 2019-07-14 11:55 ` Lars Ingebrigtsen 2019-07-15 14:41 ` Stefan Monnier 2019-07-15 14:47 ` Lars Ingebrigtsen
Code repositories for project(s) associated with this external index https://git.savannah.gnu.org/cgit/emacs.git https://git.savannah.gnu.org/cgit/emacs/org-mode.git This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.