|
From: Martin S. <ma...@ly...> - 2001-05-05 15:17:45
|
Gerd Moellmann <ge...@gn...> wrote: > Kunihiro Ishiguro <kun...@ze...> writes: > > > This is not a bug. But I believe for almost people, the change to C > > mode is confusing. By 2000-03-21 change, Abbrev mode is now > > automatically turned on in c-mode, c++-mode, java-mode, objc-mode. > > Everytime we type keyword it try to expand abbreviation. /.../ CC Mode doesn't define any expansions. It uses abbrev mode to get a hook called when keywords such as "else" and "catch" are typed completely. It then, under the right circumstances, reindents the line. /.../ > Martin, is there a way to do this without using Abbrev mode? Not that I know. It's of course easy to turn it off in a mode hook. The question then is whether it should be on or off by default. So far I think it's more a benefit than an inconvenience. The only cases I can see that can be annoying is 1) when someone has defined global abbrevs that they avoid using in C/C++/etc mode by simply not turning on abbrev mode, and 2) that it clutters up the mode line with the string "Abbrev". From a design view, I think it's a little unfortunate that abbrev mode is a mode on the user level and not just an inherent feature that is activated when there are things in the abbrev table. I use it in CC Mode as a tool to get a function called in certain situations, nothing more. For that use I shouldn't have to turn on the user level abbrev mode, causing an "Abbrev" string to appear in the modeline etc. Ideally there should be an internal abbrev table that's always active when not empty. The user level abbrev mode interface, like M-x abbrev-mode, should then do nothing more than install/remove user specified abbrev tables on that internal list. |