Consider the following small example:
(setq teckau22/mylist '((:field1 "f1A" :field2 "f2A")
(:field1 "f1B" :field2 "f2B")
(:field1 "f1C" :field2 "f2C")))
(defun teckau22/myfunction (f1 f2list)
(if t
`(,f1 ,f2list)
'("default_f1" ("default_f2list"))))
(mapcan (lambda (arg)
(teckau22/myfunction (plist-get arg :field1) `(,(plist-get arg :field2))))
teckau22/mylist)
Evaluating `mapcan` results in `("f1A" ("f2A") "f1B" ("f2B") "f1C" ("f2C"))`, as expected. But replacing `if t` with `if nil` in `teckau22/myfunction`, I would expect the output to be `("default_f1" ("default_f2list") "default_f1" ("default_f2list") "default_f1" ("default_f2list"))`. However I get a circular list error. I have two questions:
1. Both outputs of `teckau22/myfunction` are of the form (string (string)), so why do I get an error when the default values are chosen (i.e., when I have `if nil` instead of `if t`)?
2. How can I get the desired output for the default values? (`("default_f1" ("default_f2list") "default_f1" ("default_f2list") "default_f1" ("default_f2list"))`)