0

I tried to evaluate the following, but a strange message appears (*) and the register ends up being empty: does anyone know why?

(funcall #'frameset-to-register "r")

(*) #s(frameset-register [frameset 1 (@@ @@ @@ @@) register nil nil nil ((... ... hc ... ... ... ... ... ... ... ... ...))] "@@-@@-@@-@@" #<marker at 1 in BUFFERFROMWHICHIEVALUATED>)

where @@ are alphanumeric characters

3

1 Answer 1

0

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.

4
  • If I execute your code and then jump to "r", I receive the message "register doesn't contain a buffer position or configuration"
    – user43824
    Commented Apr 20 at 16:50
  • Stick to one question at a time.
    – db48x
    Commented Apr 20 at 16:52
  • ok asked new question on emacs.stackexchange.com/questions/81080/…
    – user43824
    Commented Apr 20 at 17:47
  • Any clues about the weird message?
    – user43824
    Commented Apr 20 at 18:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.