You only need to use funcall
to call a function that is stored in a variable. If you already know the name of the function, you can just call it:
(frameset-to-register …)
Edit:
The “weird message” is simply the data that frameset-to-register
stores in the register. The convention in Lisp is that any function which sets a variable to a value also returns the value. Here it is setting a register, which is not really a variable, but the same convention is used. This convention allows the caller to both set the variable and use the value again in a concise way.
And of course the scratch buffer prints out the values of any code that you evaluate, since you might be evaluating the code in order to see the value. For example, if you evaluate (+ 2 2)
, it will print out the resulting 4
. You just happened to get a rather complex value this time.