Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!watmsg!pabuhr From: pabuhr@watmsg.UUCP Newsgroups: comp.emacs Subject: LaTeX and spell Message-ID: <14159@watmath.waterloo.edu> Date: Mon, 3-Aug-87 08:39:02 EDT Article-I.D.: watmath.14159 Posted: Mon Aug 3 08:39:02 1987 Date-Received: Tue, 4-Aug-87 01:19:53 EDT Sender: daemon@watmath.waterloo.edu Reply-To: pabuhr@watmsg.UUCP (Peter A. Buhr) Distribution: world Organization: U. of Waterloo, Ontario Lines: 26 I had a problem with spell-region not working very well on LaTex files so I looked through spell.el to see if there was an easy way to pass the -l flag to spell so that it would ignore LaTeX constructions. No such luck. So I hacked out the following modification to spell.el that checks if the major-mode is either LaTeX-mode or TeX-mode, and if so, passes the -l flag to spell. Disclaimer: I am not a Lisper nor do I know much about the insides of emacs; hence, there might be a better way to do this. If there is, please let me know. The following is the diff of my stuff and spell.el. We are running BSD 4.3 and GnuEmacs 18.47. 49,53c49 < (let ((buf (get-buffer-create " *temp*")) < (spell-flags (if (or (string-equal "LaTeX-mode" major-mode) ; set spell-flag to "-l" if buffer mode < (string-equal "TeX-mode" major-mode)) ; is LaTeX or TeX < "-l" ; tell spell to ignore LaTeX constructions, assuming -t is a subset of -l < ""))) --- > (let ((buf (get-buffer-create " *temp*"))) 61c57 < nil buf nil spell-flags) --- > nil buf) 68c64 < t buf nil spell-flags)))) --- > t buf))))