all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Achim Gratz <Stromeko@nexgo.de>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 14422@debbugs.gnu.org
Subject: bug#14422: 24.3; Eager Macro Expansion
Date: Thu, 30 May 2013 19:59:41 +0200	[thread overview]
Message-ID: <87mwrcjqlu.fsf@Rainer.invalid> (raw)
In-Reply-To: <jwvzjvpm6cq.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Mon, 20 May 2013 22:11:15 -0400")

[-- Attachment #1: Type: text/plain, Size: 260 bytes --]

Stefan Monnier writes:
> So the code has a problem, since byte-compiling it doesn't work
> (emacs24 is 24.1, here).  No wonder eager macro-expansion also leads
> to problems.

Here's the revised test case that compiles cleanly and still has the
same problem:


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: eme.el --]
[-- Type: text/x-emacs-lisp, Size: 180 bytes --]

(defvar eme-ll nil)

(defmacro one (p)
  `(progn (push ',p eme-ll)))

(defmacro two (p)
  (let (pp)
    (setq pp (append eme-ll p))
  `(progn (push ',pp eme-ll))))

(provide 'eme)

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: eme-test.el --]
[-- Type: text/x-emacs-lisp, Size: 207 bytes --]

(require 'eme)
(require 'ert)

 
(ert-deftest surprise ()
    (should
     (equal '((one . two) one)
	    (progn
	      (one one)
	      (two two)
	      eme-ll))))

(ert-run-tests-batch-and-exit 'surprise)

[-- Attachment #4: Type: text/plain, Size: 2034 bytes --]


--8<---------------cut here---------------start------------->8---
eme> emacs-24.3.50 -batch -Q -L . --eval '(byte-compile-file "eme.el")'
Wrote /home/eme/eme.elc
eme> emacs-24.3.50 -batch -Q -L . --eval '(byte-compile-file "eme-test.el")'
Wrote /home/eme/eme-test.elc
eme> emacs-24.3.50 -batch -Q -L . -l eme-test
Running 1 tests (2013-05-30 19:37:09+0200)
Test surprise backtrace:
  #[nil "\305\306\30B\31B\211D▒\311312\313\216\314\n    \"\211
  #[0 "\306\307!r\211q\210\310\311\312\313\314\315!\316\"\317\320%DC
  funcall(#[0 "\306\307!r\211q\210\310\311\312\313\314\315!\316\"\31
  ert--run-test-internal([cl-struct-ert--test-execution-info [cl-struc
  #[0 "r\304\305!q\210\306 )\307\310\311\312\313\314!\315\"\316\317%
  funcall(#[0 "r\304\305!q\210\306 )\307\310\311\312\313\314!\315\"\
  ert-run-test([cl-struct-ert-test surprise nil #[nil "\305\306\30B
  ert-run-or-rerun-test([cl-struct-ert--stats surprise [[cl-struct-ert
  ert-run-tests(surprise #[385 "\306\307\"\203D\211\211G\310U\203\
  ert-run-tests-batch(surprise)
  ert-run-tests-batch-and-exit(surprise)
  byte-code("\301\302!\210\301\303!\210\304\305\306\307\305\310\311\31
  load("eme-test" nil t)
  command-line-1(("-L" "." "-l" "eme-test"))
  command-line()
  normal-top-level()
Test surprise condition:
    (ert-test-failed
     ((should
       (equal '...
        (progn ... ... eme-ll)))
      :form
      (equal
       ((one . two)
        one)
       (two one))
      :value nil :explanation
      (list-elt 0
                (different-types
                 (one . two)
                 two))))
   FAILED  1/1  surprise

Ran 1 tests, 0 results as expected, 1 unexpected (2013-05-30 19:37:09+0200)

1 unexpected results:
   FAILED  surprise
--8<---------------cut here---------------end--------------->8---


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Wavetables for the Waldorf Blofeld:
http://Synth.Stromeko.net/Downloads.html#BlofeldUserWavetables

  parent reply	other threads:[~2013-05-30 17:59 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-19 14:26 bug#14422: 24.3; Eager Macro Expansion Achim Gratz
2013-05-21  2:11 ` Stefan Monnier
2013-05-26 15:34   ` Achim Gratz
2013-05-26 19:29     ` Stefan Monnier
2013-05-26 19:57       ` Achim Gratz
2013-05-30 17:59   ` Achim Gratz [this message]
2013-05-30 19:00     ` Stefan Monnier
2013-05-30 19:38       ` Achim Gratz
2013-05-30 21:14         ` Stefan Monnier
2013-06-03 15:29           ` Stefan Monnier
2020-08-25 11:05             ` Lars Ingebrigtsen
2020-10-13  1: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=87mwrcjqlu.fsf@Rainer.invalid \
    --to=stromeko@nexgo.de \
    --cc=14422@debbugs.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.