Questions tagged [macroexpansion]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer

How to use the same variable name with let when calling defmacro?

This is only an example, I understand this can easily be achieved with a function. Don't Work This is what I've come up with based on the elisp manual and a couple of answers/articles that I have ...
Rick's user avatar
  • 25
3 votes
2 answers

Why does pp-macroexpand return nonsense for cl-loop?

Consider the following cl-loop: (cl-loop for x across "abc" for y across "123" concat (string x y)) This evaluates to "a1b2c3", i.e. it zips both ...
Zeta's user avatar
  • 1,065
1 vote
1 answer

Why are `defvars` in my macro ignored?

I want to use a macro to define variables. However, evaluating the macro does not define these vars. I seem to be missing something, but I can't find it. Here's the code: (defmacro delve--build-cmp (...
Public Image Ltd.'s user avatar
1 vote
0 answers

Navigating to a `defconst` variable defined by a Lisp macro

My goal is to define a const variable within a non-trivial macro that can be navigated to after calling describe-variable. The design goal of my macro works just fine if I define it like so: (...
John DeBord's user avatar
1 vote
1 answer

org-mode text expansion macro in src block

Is it possible to use an org-mode #+MACRO: in an org-babel block? I'm getting this in the #+RESULTS: block when I evaluate the src block with C-c C-c: #+MACRO: COMPILE_FLAGS -std=c99 -Wall -Werror ...
Alex Shroyer's user avatar
0 votes
1 answer

The call stack result of profile-report doesn't match the real function codes

I'm trying to figure out why my emacs was slow tonight and found: - command-execute 82796 87% - call-interactively ...
Chen Li's user avatar
  • 137
3 votes
1 answer

Why does `make-symbol` work in macro expansion, just as `gensym` works?

In the dash library I noticed the use of make-symbol to avoid symbol conflicts during macro expansion. (defmacro --filter (form list) "Anaphoric form of `-filter'. See also: `--remove'." (declare ...
Aquaactress's user avatar
  • 1,393