0

Given the following function using cl-block:

(defun wh/with-block (x)
  (cl-block 'foo
    (+ x 1)))

I can evaluate it, but C-u M-x edebug-eval-defun gives an error: edebug-syntax-error: Invalid read syntax: symbolp, "failed".

Why is this? Is this an Emacs bug, or am I using edebug incorrectly?

  • 2
    Edebug is right: The tag is not evaluated and needs to be a symbol, not (quote foo). – politza Mar 27 '17 at 22:01
  • @politza aha, you're right! Would you like to add an answer? – Wilfred Hughes Mar 28 '17 at 8:35
  • 1
    @politza: well "right" is debatable: I agree that the code is incorrect but Invalid read syntax: symbolp, "failed" does not seem like the right characterization of the problem. – Stefan Mar 29 '17 at 2:12
1

Edebug is arguably right: The tag is not evaluated and needs to be a symbol, not (quote foo).

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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