Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

alectryon.el should assign a default value to flyspell-prog-text-faces #88

Closed
dunnl opened this issue Sep 23, 2022 · 3 comments
Closed

Comments

@dunnl
Copy link

dunnl commented Sep 23, 2022

I think (defvar flyspell-prog-text-faces) here should be changed to (defvar flyspell-prog-text-faces nil) or something to give the variable a default value. Because if flyspell isn't loaded, the former version leaves the variable void which causes alectryon-mode to fail with the following message when opening any Vernacular file, since it tries to manipulate a void variable.

Debugger entered--Lisp error: (void-variable flyspell-prog-text-faces)
  alectryon-mode()
  run-hooks(change-major-mode-after-body-hook prog-mode-hook proof-mode-hook coq-mode-hook)
  apply(run-hooks (change-major-mode-after-body-hook prog-mode-hook proof-mode-hook coq-mode-hook))
  run-mode-hooks(coq-mode-hook)
  coq-mode()
...snip...
  funcall-interactively(find-file "~/FermatsLastTheorem.v" t)
  call-interactively(find-file nil nil)
  command-execute(find-file)

Or should flyspell be loaded, but it looks like the intention here is to avoid needlessly loading it. I tested this on a fresh Emacs 28.1 with only Alectryon and Proof General installed from MELPA, and (setq debug-on-error t).

@cpitclaudel
Copy link
Owner

Thanks for the great report. I just pushed a tentative fix, could you give it a try?

@dunnl
Copy link
Author

dunnl commented Sep 27, 2022

It works. Thanks.

@cpitclaudel
Copy link
Owner

Beautiful, thanks again for the report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants