Xref: utzoo comp.emacs:10047 comp.text.tex:5284 gnu.emacs.help:1127 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!decwrl!ogicse!usenet!scion.cs.orst.edu!palmerp From: palmerp@galois.math.orst.edu (Paul A. Palmer) Newsgroups: comp.emacs,comp.text.tex,gnu.emacs.help Subject: Re: Ispelling in emacs, Summary Message-ID: Date: 9 Feb 91 03:45:40 GMT References: <9504@dog.ee.lbl.gov> <9607@dog.ee.lbl.gov> <9670@dog.ee.lbl.gov> Sender: @lynx.CS.ORST.EDU Reply-To: palmerp@math.orst.edu Organization: Dept. of Mathematics, Oregon State Univ. Lines: 49 In-Reply-To: rdong@boole.msri.org's message of 7 Feb 91 22:03:52 GMT Nntp-Posting-Host: galois.math.orst.edu In article <9670@dog.ee.lbl.gov> rdong@boole.msri.org (Rui-Tao Dong) writes: Thanks for the numerous replies to my question. I have finally settled on the following. It works fine for me. I added the following to my .emacs without touching ispell.el. (setq LaTeX-mode-hook '(lambda () (setq ispell-filter-hook "detex") (setq ispell-filter-hook-args '("-lw")))) (setq TeX-mode-hook '(lambda () (setq ispell-filter-hook "detex") (setq ispell-filter-hook-args '("-w")))) First, thank you for posting the solution. I've been following your posts, but have been too busy this week to try to find a solution myself. You mentioned in an earlier post that detex will die on an unmatched $ sign. To fix this problem I now have, in my .emacs file, the following: (setq LaTeX-mode-hook '(lambda () (setq ispell-filter-hook "detex") (setq ispell-filter-hook-args '("-lw")))) (setq TeX-mode-hook '(lambda () (setq ispell-filter-hook "detex") (setq ispell-filter-hook-args '("-w")))) (setq text-mode-hook '(lambda () (setq ispell-filter-hook "tr") (setq ispell-filter-hook-args '("-cs" "A-Za-z" "\012")))) This works fine, except for one problem. If, for instance, I load & spell a text buffer, then load & spell a TeX buffer, then switch back to the text buffer, the hook will now be set to 'detex' not 'tr'. Since this will hopefully happen very seldom, I'm going to leave good enough alone. But I'm curious: is there a way to run mode hooks when I _switch_ to a buffer, as well as _create_ a buffer? Does anyone know? -- Paul Palmer Department of Mathematics E-mail: palmerp@math.orst.edu Kidder Hall 368 Oregon State University, Corvallis, Oregon 97331-4605 "It's moving so fast, it's standing still." - William Gibson