Emacs ispell error while accepting words for local file dictionary

In each .tex file, when I type A (shift a) to accept a new word, I get the error message Wrong type argument: sequencep, 1 in the minibuffer or in the message buffer:

 ispell-add-per-file-word-list: Wrong type argument: sequencep, 1 

If I add a line at the bottom of the file similar to the following:

 % LocalWords: hello 

I get (A) a limited number of words, mostly up to 50 characters of new words, i.e. to the end of the line. Then again I get the same error. If I add another line, as the previous one, then:

 % LocalWords: hello <words added by ispell ...> % LocalWords: again 

I can continue to the end of the line. After that, the error is displayed again.

As for my init file, I have these apparently innocent lines:

 (setenv "DICPATH" (concat exec-directory "../hunspell/dict")) (setq-default ispell-program-name (concat exec-directory "../hunspell/hunspell.exe")) (setq ispell-extra-args '("-t")) (setq ispell-local-dictionary-alist '( (nil "[A-Za-z]" "[^A-Za-z]" "[']" nil ("-d" "en_US") nil utf-8) ("english" "[A-Za-z]" "[^A-Za-z]" "['.]" nil ("-d" "en_GB") nil utf-8) ("italian" "[AZ\300\301\310\311\314\315\322\323\331\332a-z\340\341\350\351\354\355\363\371\372]" "[^AZ\300\301\310\311\314\315\322\323\331\332a-z\340\341\350\351\354\355\363\371\372]" "[-.]" nil ("-d" "it_IT") nil iso-8859-1) )) 

In general, whenever it is time to start a new line of the local file dictionary, ispell-add-per-file-word-list gets into problems.

+4
source share
1 answer

This proposed solution fixes the problem for me. Extracting it here for posterity, a workaround is to add the following Emacs startup code:

 (add-hook 'TeX-mode-hook #'(lambda () (setq-local comment-padding " "))) 

The root cause is an Emacs error, which was subsequently fixed. Therefore, this problem should completely disappear in Emacs 24.4 and later.

+3
source

Source: https://habr.com/ru/post/1485205/


All Articles