all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* abbrev-mode doesn't work correctly in c-mode
@ 2008-03-02 13:14 sunway
  2008-03-02 16:52 ` Andreas Röhler
  0 siblings, 1 reply; 7+ messages in thread
From: sunway @ 2008-03-02 13:14 UTC (permalink / raw)
  To: help-gnu-emacs

I set "inc" be the abbreviation of "#include",when I input "inc" and
press space, it will be expanded to "#includeinc", instead of
"#include".

when I define the same abbreviation in other mode, it works fine.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: abbrev-mode doesn't work correctly in c-mode
  2008-03-02 13:14 abbrev-mode doesn't work correctly in c-mode sunway
@ 2008-03-02 16:52 ` Andreas Röhler
  2008-03-02 16:59   ` sunway
  0 siblings, 1 reply; 7+ messages in thread
From: Andreas Röhler @ 2008-03-02 16:52 UTC (permalink / raw)
  To: help-gnu-emacs

Am Sonntag, 2. März 2008 14:14 schrieb sunway:
> I set "inc" be the abbreviation of "#include",when I input "inc" and
> press space, it will be expanded to "#includeinc", instead of
> "#include".
>
> when I define the same abbreviation in other mode, it works fine.


M-x edit-abbrevs

Goto 

(c-mode-abbrev-table)

or wherever your mode-abbrevs are stored

and see, how "inc" will be expanded.

Probably you'll see the wrong entry there. So correct
it.


Andreas Röhler




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: abbrev-mode doesn't work correctly in c-mode
  2008-03-02 16:52 ` Andreas Röhler
@ 2008-03-02 16:59   ` sunway
  2008-03-02 17:20     ` Nikolaj Schumacher
  2008-03-02 18:13     ` Andreas Röhler
  0 siblings, 2 replies; 7+ messages in thread
From: sunway @ 2008-03-02 16:59 UTC (permalink / raw)
  To: help-gnu-emacs

nothing wrong
if i install "inc" as a global abbreviation of "#include", it works fine when i
input "inc" in other mode than c-mode, but if i input "inc" in c-mode, it works
wrong.

maybe  the error occurs only in c-mode because "#" character is special in c-mode?

On Sun, Mar 02, 2008 at 05:52:43PM +0100, Andreas R鰄ler wrote:
>Am Sonntag, 2. M鋜z 2008 14:14 schrieb sunway:
>
>
>M-x edit-abbrevs
>
>Goto 
>
>(c-mode-abbrev-table)
>
>or wherever your mode-abbrevs are stored
>
>and see, how "inc" will be expanded.
>
>Probably you'll see the wrong entry there. So correct
>it.
>
>
>Andreas R鰄ler
>

-- 
sunway




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: abbrev-mode doesn't work correctly in c-mode
  2008-03-02 16:59   ` sunway
@ 2008-03-02 17:20     ` Nikolaj Schumacher
  2008-03-02 17:47       ` sunway
  2008-03-02 18:13     ` Andreas Röhler
  1 sibling, 1 reply; 7+ messages in thread
From: Nikolaj Schumacher @ 2008-03-02 17:20 UTC (permalink / raw)
  To: help-gnu-emacs

sunway <sunwayforever@gmail.com> wrote:

> nothing wrong if i install "inc" as a global abbreviation of
> "#include", it works fine when i input "inc" in other mode than
> c-mode, but if i input "inc" in c-mode, it works wrong.

What version of Emacs are you using?
Does it happen when you start emacs with -q?
(It works for me on 22.1.91.2)


regards,
Nikolaj Schumacher




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: abbrev-mode doesn't work correctly in c-mode
  2008-03-02 17:20     ` Nikolaj Schumacher
@ 2008-03-02 17:47       ` sunway
  2008-03-03 12:19         ` Nikolaj Schumacher
  0 siblings, 1 reply; 7+ messages in thread
From: sunway @ 2008-03-02 17:47 UTC (permalink / raw)
  To: help-gnu-emacs

GNU Emacs 23.0.60.2 (i686-pc-linux-gnu, GTK+ Version 2.8.20) of 2008-03-01

i also tried emacs -q, it didn't help.

what exactly i do is as follows: start emacs with emacs -q, then in the #scratch
buffer, i enable abbrev-mode, then input "inc" and space, it is expanded to
"#include" correctly, then i open a file "1.c", again input "inc", it is
expanded to "#includeinc", then i delete the expanded "#includeinc" and input
"inc" again, while this time it is correctly expanded to "#include"....so weird.

On Sun, Mar 02, 2008 at 06:20:17PM +0100, Nikolaj Schumacher wrote:
>sunway <sunwayforever@gmail.com> wrote:
>
>
>What version of Emacs are you using?
>Does it happen when you start emacs with -q?
>(It works for me on 22.1.91.2)
>
>
>regards,
>Nikolaj Schumacher
>

-- 
sunway




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: abbrev-mode doesn't work correctly in c-mode
  2008-03-02 16:59   ` sunway
  2008-03-02 17:20     ` Nikolaj Schumacher
@ 2008-03-02 18:13     ` Andreas Röhler
  1 sibling, 0 replies; 7+ messages in thread
From: Andreas Röhler @ 2008-03-02 18:13 UTC (permalink / raw)
  To: help-gnu-emacs

Am Sonntag, 2. März 2008 17:59 schrieb sunway:
> nothing wrong
> if i install "inc" as a global abbreviation of "#include", it works fine
> when i input "inc" in other mode than c-mode, but if i input "inc" in
> c-mode, it works wrong.
>
> maybe  the error occurs only in c-mode because "#" character is special in
> c-mode?

Expanding abbrevs AFAIK has nothing to do with the mode in place.

So I still suspect your entry is wrong, maybe you didn't look at the right 
place.

What happens, if you define it again?





>
> On Sun, Mar 02, 2008 at 05:52:43PM +0100, Andreas R鰄ler wrote:
> >Am Sonntag, 2. M鋜z 2008 14:14 schrieb sunway:
> >
> >
> >M-x edit-abbrevs
> >
> >Goto
> >
> >(c-mode-abbrev-table)
> >
> >or wherever your mode-abbrevs are stored
> >
> >and see, how "inc" will be expanded.
> >
> >Probably you'll see the wrong entry there. So correct
> >it.
> >
> >
> >Andreas R鰄ler




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: abbrev-mode doesn't work correctly in c-mode
  2008-03-02 17:47       ` sunway
@ 2008-03-03 12:19         ` Nikolaj Schumacher
  0 siblings, 0 replies; 7+ messages in thread
From: Nikolaj Schumacher @ 2008-03-03 12:19 UTC (permalink / raw)
  To: help-gnu-emacs

sunway <sunwayforever@gmail.com> wrote:

> GNU Emacs 23.0.60.2 (i686-pc-linux-gnu, GTK+ Version 2.8.20) of 2008-03-01
>
> i also tried emacs -q, it didn't help.

Then you should consider reporting it as a bug.


regards,
Nikolaj Schumacher




^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2008-03-03 12:19 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-02 13:14 abbrev-mode doesn't work correctly in c-mode sunway
2008-03-02 16:52 ` Andreas Röhler
2008-03-02 16:59   ` sunway
2008-03-02 17:20     ` Nikolaj Schumacher
2008-03-02 17:47       ` sunway
2008-03-03 12:19         ` Nikolaj Schumacher
2008-03-02 18:13     ` Andreas Röhler

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.