Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!pacific.mps.ohio-state.edu!gem.mps.ohio-state.edu!rpi!tale From: tale@pawl.rpi.edu (David C Lawrence) Newsgroups: gnu.emacs Subject: Re: ispell questions -- syntax tables, my words file, et al Message-ID: <1989Oct21.050441.29386@rpi.edu> Date: 21 Oct 89 05:04:41 GMT References: <8910181956.AA04222@asylum.gsfc.nasa.gov> Distribution: gnu Organization: Rensselaer Polytechnic Institute, Troy NY Lines: 77 (Note that the ispell.el package is not in the current GNU Emacs distribution.) In <8910181956.AA04222@asylum.gsfc.nasa.gov> chris@ASYLUM.GSFC.NASA.GOV (Chris Shenton) writes: Chris> The offending word is capitalized in the mode-line prompt. Chris> Given ispell's ability to distinguish case, this seems Chris> counter-productive/intuitive. Yes, it does. "(upcase word)" is done in several places, but always for echo-area messages. Process communication is not using all capitals. I agree that it should echo the word as it appears. Chris> Works fine the first time (except for below), but the second Chris> time through it doesn't seem to know my words. For example, it Chris> doesn't find my name. This is a bug in ispell, not ispell.el. I recall recent discussion about it somewhere on USENET, but I don't remember where or whether mention was made of an existing patch for it. It is very annoying. I will look into modifying ispell.el to accomodate for that. If there is a patch to ispell for it, I would appreciate it if someone could point me to it. Chris> Trying to use apostrophe (') and dash (-) as word chars for Chris> hyphenations, etc. At best, it doesn't seem to acknowledge -- Chris> apostrophies, for example -- as word chars (sees "didn" but not Chris> "didn't"); at worst, it seems to get lost, complaining "Can't Chris> find in orinal text -- Any key to continue" The two lines which do this in ispell.el are commented out. You can just uncomment them and byte-combile ispell.el again to have it enabled. Chris> I autoload ispell in my .emacs file, so when I modify the Chris> syntax table there, is it trashed by the (defvar Chris> ispell-syntax-table) when the autoload is activated? No. defvar does not change extant values for variables. Chris> If not, then do I have to put the entire table initialization Chris> (0, 1, ..., 9, etc) in my .emacs? Yes, unless you just modify ispell.el as mentioned above. Chris> The alternative seems to be ... duplication of effort Chris> in .emacs. And I'd prefer not to modify ispell.el itself... The way it stands now, you need to either just uncomment those two lines or put this in .emacs: (setq ispell-syntax-table (make-syntax-table)) ;; Make certain characters word constituents (modify-syntax-entry ?' "w " ispell-syntax-table) (modify-syntax-entry ?- "w " ispell-syntax-table) ;; Get rid on existing word syntax on certain characters (modify-syntax-entry ?0 ". " ispell-syntax-table) (modify-syntax-entry ?1 ". " ispell-syntax-table) (modify-syntax-entry ?2 ". " ispell-syntax-table) (modify-syntax-entry ?3 ". " ispell-syntax-table) (modify-syntax-entry ?4 ". " ispell-syntax-table) (modify-syntax-entry ?5 ". " ispell-syntax-table) (modify-syntax-entry ?6 ". " ispell-syntax-table) (modify-syntax-entry ?7 ". " ispell-syntax-table) (modify-syntax-entry ?8 ". " ispell-syntax-table) (modify-syntax-entry ?9 ". " ispell-syntax-table) (modify-syntax-entry ?$ ". " ispell-syntax-table) (modify-syntax-entry ?% ". " ispell-syntax-table) You could even condense the removal of word syntax to this: (let ((not-words (?0 ?1 ?2 ?3 ?4 ?5 ?6 ?7 ?8 ?9 ?$ ?%))) (while not-words (modify-syntax-entry (car not-words) "." ispell-syntax-table) (setq not-words (cdr not-words)))) Dave -- (setq mail '("tale@pawl.rpi.edu" "tale@itsgw.rpi.edu" "tale@rpitsmts.bitnet"))