all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: [Emacs-diffs] master ed29d9f: Add edebug specs for inline.el
Date: Sun, 14 Jul 2019 13:55:50 +0200	[thread overview]
Message-ID: <m3lfx06da1.fsf@gnus.org> (raw)
In-Reply-To: <jwvtvbpr2mi.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Sat, 13 Jul 2019 18:30:18 -0400")

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



  reply	other threads:[~2019-07-14 11:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [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 [this message]
2019-07-15 14:41       ` Stefan Monnier
2019-07-15 14:47         ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3lfx06da1.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.