* CC-Mode, Skeletons, Abbrevs and correct indentation
@ 2002-08-26 16:00 Gabriel Foster
0 siblings, 0 replies; 2+ messages in thread
From: Gabriel Foster @ 2002-08-26 16:00 UTC (permalink / raw)
Greetings,
I'm trying to get abbrev's for if, while, for, and others to work with
cc-mode and skeletons. I'm having troubles getting the indentation to
work correctly, and was hoping someone could point out the right
direction to go. My definitions go as follows:
(define-skeleton my-skel-c-if-stmt
"Insert an if statement template."
nil
>"if ( " _ " )"?\n
>"{"?\n
?\n
>"}"?\n
)
(define-abbrev c++-mode-abbrev-table "if" "" my-skel-c-if-stmt)o
Given my current cc-mode setup, my if's should look like
main( )
{
if ( )
{
}
// but what I end up with is:
if ( )
{
}
}
I've tried various combinations of >, \n and ?\n, but with no luck so
far. Can anyone see a way to fix this?
Thanks,
Gabriel
gabriel@apple.com
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: CC-Mode, Skeletons, Abbrevs and correct indentation
[not found] <F0F9E5B6-B90C-11D6-97CA-00039375B5CC@mac.com>
@ 2002-08-28 14:59 ` Gabriel Foster
0 siblings, 0 replies; 2+ messages in thread
From: Gabriel Foster @ 2002-08-28 14:59 UTC (permalink / raw)
Hmmm...
No one seems to have a clue about how to solve this issue, or if they
do, they are not responding to this message. I believe something is
broken here, because the skeletons are not working as documented... In
any case, has someone succeeded in doing what I am trying to do using
ANY method?
Thanks,
Gabriel
On Monday, August 26, 2002, at 09:00 AM, Gabriel Foster wrote:
> Greetings,
>
> I'm trying to get abbrev's for if, while, for, and others to work
> with cc-mode and skeletons. I'm having troubles getting the
> indentation to work correctly, and was hoping someone could point out
> the right direction to go. My definitions go as follows:
>
> (define-skeleton my-skel-c-if-stmt
> "Insert an if statement template."
> nil
> >"if ( " _ " )"?\n
> >"{"?\n
> ?\n
> >"}"?\n
> )
> (define-abbrev c++-mode-abbrev-table "if" "" my-skel-c-if-stmt)o
>
> Given my current cc-mode setup, my if's should look like
>
> main( )
> {
> if ( )
> {
>
> }
>
> // but what I end up with is:
> if ( )
> {
>
> }
>
> }
>
> I've tried various combinations of >, \n and ?\n, but with no luck so
> far. Can anyone see a way to fix this?
>
> Thanks,
>
> Gabriel
> gabriel@apple.com
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-08-28 14:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <F0F9E5B6-B90C-11D6-97CA-00039375B5CC@mac.com>
2002-08-28 14:59 ` CC-Mode, Skeletons, Abbrevs and correct indentation Gabriel Foster
2002-08-26 16:00 Gabriel Foster
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.