Every time I press c-x c-c to exit Emacs, it shows "End of file during parsing" in the minibuffer. I cursorily examined my .emacs and did not find any mismatching parenthesis. Any idea what's the best route to fix this?

Edit: I confirmed that .emacs does not have mismatching parentheses with check-parens.

Edit 2: About kill-emacs-hook, I found it is related to keyfreq. After commenting out the following from .emacs, the issue is resolved. But I don't understand why it suddenly stops working:

;; keyfreq
;; https://github.com/dacap/keyfreq

;(require 'keyfreq)
;(keyfreq-mode 1)
;(keyfreq-autosave-mode 1)
  • If you know or suspect which file is at issue (e.g., something you recently edited), then open it up in Emacs and type M-x check-parens. You may find the culprit such as a missing parentheses or a missing double quote. Fix the error, M-x eval-buffer and see if that fixes your issue. It think you are going to love check-parens! – lawlist Aug 3 '15 at 23:27
  • See if emacs-kill-hook is set to something you'd not expect to be there (reference: gnu.org/software/emacs/manual/html_node/elisp/… ). If you just need to exit Emacs, set this variable to nil via M-: (setq emacs-kill-hook nil). – wvxvw Aug 3 '15 at 23:40
  • @lawlist check-parens did not reveal anything wrong to fix in .emacs. I don't recall editing any Emacs configuration. – Meng Lu Aug 4 '15 at 0:10
  • @wvxvw describe variable for emacs-kill-hook says no match? – Meng Lu Aug 4 '15 at 0:12
  • 1
    Try to run M-x toggle-debug-on-error, try again, and paste the resulting backtrace into your question. I presume that keyfreq somehow fails to load its database. – lunaryorn Aug 4 '15 at 9:10

Your Answer

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

Browse other questions tagged or ask your own question.