Emacs fails to start with error "Symbol's value as variable is void Error: Debugger entered--Lisp error: (void-variable ispell-dictionary-alist) (member '("hunspell" "[[:alpha:]]" "[^[:alpha]]" "[']" t ("-d" "en_CA") nil nil) ispell-dictionar$ (if (member '("hunspell" "[[:alpha:]]" "[^[:alpha]]" "[']" t ("-d" "en_CA") nil nil) ispell-dicti$ eval-buffer(#<buffer *load*-755858> nil "/usr/home/ian/.emacs.d/spell.el" nil t) ; Reading at b$ load-with-code-conversion("/usr/home/ian/.emacs.d/spell.el" "/usr/home/ian/.emacs.d/spell.el" nil$ load("/usr/home/ian/.emacs.d/spell.el") eval-buffer(#<buffer *load*> nil "/home/ian/.emacs" nil t) ; Reading at buffer position 92 load-with-code-conversion("/home/ian/.emacs" "/home/ian/.emacs" t t) load("~/.emacs" noerror nomessage) startup--load-user-init-file(#f(compiled-function () #<bytecode 0x20089743d>) #f(compiled-functio$ command-line() normal-top-level() As per: https://github.com/syl20bnr/spacemacs/issues/11585
Hi, Could you share the contents of ".emacs", and ".emacs.d/spell.el", so we can try to reproduce it ? Thanks!
Sure Ashish, Thank you for looking into this! Clean install - Emacs is always first. $HOME/.emacs: (add-to-list 'load-path "/usr/home/ian/.emacs.d/") (load "/usr/home/ian/.emacs.d/spell.el") $HOME/.emacs.d/spell.el: (setq ispell-program-name "hunspell" ispell-dictionary "en_CA") (add-to-list 'ispell-dictionary-alist '("english-hunspell" "[[:alpha:]]" "[^[:alpha]]" "[']" t ("-d" "en_CA") nil iso-8859-1)) (set-default 'ispell-dictionary "english-hunspell")
(In reply to icjohnson from comment #2) Hi, I believe what you're seeing is the expected behaviour with `add-to-list' function: (add-to-list LIST-VAR ELEMENT &optional APPEND COMPARE-FN) This is because `add-to-list' function expects LIST-VAR binding to exist (or already defined) which in your case is not, as it's defined in "ispell" which you're not load-ing (or require-ing). You can resolve it in two ways: 1. Add an entry to `after-load-list' using `eval-after-load' function which will defer the execution of `add-to-list' form until after "ispell" is loaded, which is when `ispell-dictionary-alist' will be defined: (eval-after-load "ispell" '(add-to-list 'ispell-dictionary-alist '("english-hunspell" "[[:alpha:]]" "[^[:alpha]]" "[']" t ("-d" "en_CA") nil))) 2. Use `setq' to define it like you're doing for other variables, that way you'll create a binding yourself: (setq ispell-dictionary-alist (list '("english-hunspell" "[[:alpha:]]" "[^[:alpha]]" "[']" t ("-d" "en_CA") nil))) HTH
Apologies - of course you are correct - thx.