help-gnu-emacs
[Top][All Lists]
Advanced

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

RE: [External] : Why I cannot use this variable in macro call from funct


From: Drew Adams
Subject: RE: [External] : Why I cannot use this variable in macro call from function?
Date: Tue, 8 Jun 2021 13:41:44 +0000

> (defmacro rcd-db-completing-table-history (table)
>   (let ((variable
>           (intern
>            (concat "rcd-db-completing-table-history-"
>                    table))))

> (defun my-fun-123 ()
>   (let ((var "new"))
>     (rcd-db-completing-table-history var)))
> 
> (my-fun-123)
> 
> Debugger entered--Lisp error: (wrong-type-argument sequencep var)
>   concat("rcd-db-completing-table-history-" var)

You are passing the symbol `var' as the arg
to your macro.  Macros don't automatically
evaluate their args.  What you are expecting
is presumably to pass the _value_ of symbol
`var', i.e., treat the symbol as a variable
and pass its value.

reply via email to

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