>>>>> "Brad" == Brad Giaccio <[EMAIL PROTECTED]> writes:
Brad> On Thu, Apr 27, 2000 at 01:07:03AM +0000, Paul Kinnucan wrote:
>> At 02:43 PM 4/26/00 +0100, you wrote:
>>
>> >Hi,
>> >
>> >Is it by any chance possible to turn off or override the use of
>> >abbreviations when adding text in comments? I find that having
>> words >in comments extended more often than not is just annoying.
>>
>>
>> M-x abbrev-mode toggles use of abbreviations. You could bind this
>> to a key.
Brad> This was emailed quite a while ago by Phillip Lord but works
Brad> great for me just stick it in your load path and add (require
Brad> 'jde-auto-abbrev) after you load jde in your .emacs . He said
Brad> it works great using NTEmacs and I can confirm that it works
Brad> under Xemacs for solaris. I can't remember if I modified his
Brad> version so here is the copy I use.
Im glad someone mentioned this (although actually I would
rather people didnt use it! See later for why.) Normally I would have
done this myself but I have been out of mail contact for the last few
days. All of my emacs packages are available from my website. Sadly
before I left my last job I foolish forgot to set up web forwarding
from my old web site so now the URL in the comments of jde-auto-abbrev
now has old versions.
The new URL is
http://www.bioinf.man.ac.uk/~lord/home.html
Brad> By the way I noticed that it works much faster if you byte
Brad> compile it.
This I did not know, but Im not surprised. It uses the
post-command-hook, which is called a lot (every keypress and then
some!). Actually JDE itself uses post-command-hook for something or
other I forget what, so it might cause problems for slower machines.
Mattias> That was just what I was looking for - having to turn it
Mattias> off and on manually is not really good enough. I'm almost
Mattias> a bit surprised this isn't a feature of Emacs or JDE... So
Mattias> far it has worked great with NTEmacs 2.6.1 and JDE beta 23.
<advertisment>
The problem with jde-auto-abbrev is that its not very
generic. Many people will want to turn abbrev's on in comments if they
have text based abbrevs and off in comment code for instance. It's for
this reason that I have decided to scrap jde-auto-abbrev and write
something I call `tmmofl'. This stands for
"toggle-minor-mode-on-font-lock", which is what jde-auto-abbrev
does. Actually it can call an arbitrary function, and not just toggle
minor modes, it can do if for any font-lock face, and it can do it in
a mode specific fashion, in a easily configurable fashion.
tmmofl was written about four months ago but recently had a
major re-write after Stefan Monnier (pcl-cvs maintainer including
other things, and overall lisp guru) told me (very politely and
helpfully) that the old implementation was, well, in a nutshell,
crap. He was very convincing hence the re-write. I've been using it
for the last few weeks and it seems very stable to me. This version
has been developed on linux emacs rather than NTEmacs but there should
be no problems. Id be particularly pleased to hear from xemacs users,
because I haven't tried it there yet.
</advertisment>
It would be quite nice if this got into core emacs, but
I have to say that although the codes a lot better, its still
emotionally a bit of a hack. It would make a lot more sense to use
proper syntactic information of the contents of the buffer based on
parsing rather than working backwards in this way. What can I say
other than all hail Eric Ludlums bovinator. This is something that we
really need for emacs.
Phil