I am using aquamacs and latex mode, 'Symbol’s value as variable is void: last-command-char when trying to insert bracket' occurs when I am trying to insert a bracket.

How could I do?

  • 1
    Do you use AUCTeX? In any case, you should provide more information on how to reproduce the problem. Do you have custom settings in your init file? If so, you should not load it in order to see if the problem persists also in that case. I don't know how to do it with aquamacs, though.
    – giordano
    Commented Oct 19, 2016 at 6:59

1 Answer 1


last-command-char was a variable made obsolete in Emacs-19.34 when it was replaced by last-command-event (because in older Emacsen, events were only characters). It was finally removed in Emacs-24.

So some Elisp code you're using still refers to that variable and needs to be updated. Just grep for that name in your files to see which thing needs to be updated.

  • Thank you for your advice. I changed it and compile the new file, and the problem is solved.
    – Raymond
    Commented Oct 20, 2016 at 6:36

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.