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:
(defmacro test (symbol)
`(defconst ,symbol nil))
(test sym)
After my init file loads I can navigate to the exact location in the file in which it was defined.
But the design goal of my macro does not work if I define it like so:
(defmacro test (symbol)
`(defconst ,(intern (concat "jd:" (symbol-name symbol))) nil))
(test sym)
The const variable is defined, but I can't navigate to the exact location in the file in which it was defined (I only get so far as the file); instead I'm met with the message:
Unable to find location in file
.
How can I achieve the design goal of my macro in the non-trivial case?