-2

I am defining a macro that accepts any number of arguments that actually do nothing. From a previous discussion, it was pointed out to me that a macro does not evaluate its arguments, which is beneficial to me because I could pass anything, with Emacs Lisp not trying to evaluate things that are ignored anyway.

This is the first time I delve into macros. Can one loop through the arguments with dolist when using &rest args ?

(defmacro ndkat (&rest _args)
  "No matter how many arguments are passed, no actions will be
performed.  Returns 'nil'."

  nil)
Dilna
  • 1,173
  • 3
  • 10
  • Yes, the macro code can loop through the unevaluated elements in the list bound to your `&rest` argument, `_args`. – Drew Aug 05 '23 at 21:10

1 Answers1

0

What about

(defmacro ndkat (&rest _args))

Then in scratch buffer (ndkat (message "hello" "world") 123) with C-x C-e after the last ) does nothing.

Maxim Kim
  • 1,516
  • 9
  • 17