From 0305f1a067540c030533bdb4573e9f57726a632b Mon Sep 17 00:00:00 2001 From: Jacopo De Simoi Date: Tue, 14 Nov 2017 11:12:31 -0500 Subject: [PATCH] Improve spell-checking Avoid spell-checking the arguments of - eqref - cite - author - address --- init/init-latex.el | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/init/init-latex.el b/init/init-latex.el index a29eb15..04169d1 100644 --- a/init/init-latex.el +++ b/init/init-latex.el @@ -17,8 +17,18 @@ (add-hook 'LaTeX-mode-hook 'my-LaTeX-mode-dollars) (add-hook 'LaTeX-mode-hook 'turn-on-reftex) - - +;; * Do not spell-check inside these commands +;; (I should find the reference I used for this snippet) +(setq ispell-tex-skip-alists + (list + (append + (car ispell-tex-skip-alists) ;tell ispell to ignore content of this: + '(("\\\\eqref" ispell-tex-arg-end) + ("\\\\cite" ispell-tex-arg-end) + ("\\\\author" ispell-tex-arg-end) + ("\\\\address" ispell-tex-arg-end) +)) +(cadr ispell-tex-skip-alists))) (defun dabbrev-expand-helper () (interactive)