Benjamin> It seems to me that if jde can be taught to recognize what
  Benjamin> method it's in and that the font-lock package can
  Benjamin> understand the context at point (i.e., string, comment,
  Benjamin> etc.) it would not be that hard to disable abbrev-mode in
  Benjamin> that context. For me, funny things like if() and for()
  Benjamin> statement expansion are happening in the comment blocks. I
  Benjamin> think it's the same thing described here.

  Benjamin> So what about it, wizards? Can we make it go?


            If I may be allowed a plug here I wrote the code to 
do this a while back. My "tmmofl" mode was designed to toggle minor
modes based on the fontification, and hence the syntactic context at
point. The practical upshot of this is that it switches abbrev mode
off in comments (and auto-fill mode on in my case). You can configure
it to work with any minor mode, or indeed run arbitrary functions. 

            The thing that I was always unhappy about was using what
is essentially a display feature (font lock overlays) to get syntactic
info. I believe that semantic marks up text with overlays though, and
tmmofl will work with any overlay, which perhaps solves this slight
worry.



            Anyway feel free to have a go...


http://www.bioinf.man.ac.uk/~lord/applications/emacs/emacs-packages.html



          Phil


Reply via email to