>>>> "J" == Jari Aalto+mail emacs
<posting-list(a)mailandnews.com> writes:
J> I' trying to select correct variable at compile timeusing the
J> defmacro, but it seems that I don't understand how to use it inside
J> let definitions. Here is the problem:
J> (defmacro my-load-user-init-file ()
J> (cond
J> ((boundp 'load-user-init-file-p)
J> (intern "load-user-init-file-p"))
J> ((boundp 'init-file-user)
J> (intern "init-file-user"))
J> (t
J> (intern "dummy"))))
J> (defun test ()
J> (let* (((my-load-user-init-file) t)
J> )
J> 'ok))
There's no evaluation, and hence no macro expansion, happening in the
place where the let-bound symbol is expected.
let is a _special_ form.
J> Compiling file e:\home\jaalto\tmp\t1.el at Fri Jan 05 22:48:18 2001
J> While compiling test:
J> ** Attempt to let-bind non-symbol (my-load-user-init-file)
J> What magic I need?
(require 'cl)
(defun test ()
(letf (((my-load-user-init-file) t)
)
'ok))
`letf' is merely a macro.