emacs-devel
[Top][All Lists]
Advanced

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

Re: [Emacs-diffs] master ed29d9f: Add edebug specs for inline.el


From: Lars Ingebrigtsen
Subject: Re: [Emacs-diffs] master ed29d9f: Add edebug specs for inline.el
Date: Sun, 14 Jul 2019 13:55:50 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Stefan Monnier <address@hidden> 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 via email to

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