emacs ispell打破乳胶引号

时间:2013-12-16 12:38:52

标签: emacs latex auctex hunspell ispell

我的emacs“ispell”命令运行hunspell,当它命中我的emacs乳胶缓冲区(我使用的是AucTEX)中的引用部分时会中断。使用我以前的emacs / Linux发行版,它没有这个问题。例如:

as you like to say, vbfs ``You won't know what to do with yourself.''

正确运行M-x ispell标记vbfs。但是,

as you like to say, ``You won't know what to do with yourself.'' vbfs

不记录任何错误。此外,一旦它被命中部分文本,似乎跳过文档的其余部分。什么可能导致这个?作为参考,这是我的ispell-tex-skip-alists var:

((("\\\\addcontentsline" ispell-tex-arg-end 2)
  ("\\\\add\\(tocontents\\|vspace\\)" ispell-tex-arg-end)
  ("\\\\\\([aA]lph\\|arabic\\)" ispell-tex-arg-end)
  ("\\\\bibliographystyle" ispell-tex-arg-end)
  ("\\\\makebox" ispell-tex-arg-end 0)
  ("\\\\e?psfig" ispell-tex-arg-end)
  ("\\\\document\\(class\\|style\\)" . "\\\\begin[  \n]*{[  \n]*document[   \n]*}"))
 (("\\(figure\\|table\\)\\*?" ispell-tex-arg-end 0)
  ("list" ispell-tex-arg-end 2)
  ("program" . "\\\\end[    \n]*{[  \n]*program[    \n]*}")
  ("verbatim\\*?" . "\\\\end[   \n]*{[  \n]*verbatim\\*?[   \n]*}")))

在buildvm-15.phx2.fedoraproject.org上运行2013-08-14的GNU Emacs 24.3.1(x86_64-redhat-linux-gnu,GTK +版本3.8.2)

1 个答案:

答案 0 :(得分:1)

Ispell将这对引号传给了hunspell,而这个引号并没有应付它。 我们可以通过以下建议来避免这种情况:

(defadvice ispell-send-string (before kill-quotes activate)
  (setq string (replace-regexp-in-string "''" "  " string)))

它用空格替换这对引号。需要空格以避免错位对齐。