From: na frederic <f_frederic_f_52@yahoo.fr>
Subject: Re: howw does work c-special-indent-hook, from cc-engine?
Date: Thu, 19 May 2005 14:32:31 +0200 (CEST) [thread overview]
Message-ID: <20050519123231.33209.qmail@web26103.mail.ukl.yahoo.com> (raw)
In-Reply-To: 6667
I'm actually trying to setup indentation of a language
which have C-like syntax but with some specific blocks
delimiters
Here is a sample of what I want:
-------------
action my_action
{`
if (a)
{
....
}
else
{
....
}
`};
-------------
when I try to indent this code with native
c-indent-line I have this result:
(this result is due to {` and `}; braces)
-------------
action my_action
{`
if (a)
{
....
}
else
{
....
}
`};
---------------
So I think I've to add a c-special-indent-hook to take
account of this braces and indent correctly this code.
An other particularity of this language is that I've
to set some properties in code with [].
for example:
-------
[
singleton,
createaccess = granted,
deleteaccess = granted,
extentaccess = granted
]
interface my_interface
{
boolean start();
boolean stop();
boolean "refresh"();
};
------
but when I ty to indent this line with native
c-indent-line I 've this result:
[
singleton,
createaccess = granted,
deleteaccess = granted,
extentaccess = granted
]
interface my_interface
{
boolean start();
boolean stop();
boolean "refresh"();
};
----------------
I dont't know very well lisp and cc-engine so if
someon could help me to solve this problem....
--- Alan Mackenzie <acm@muc.de> a écrit:
> na frederic <f_frederic_f_52@yahoo.fr> wrote on Tue,
> 17 May 2005 13:49:20
> +0200 (CEST):
> > is anyone have a sample of code using
> c-special-indent-hook to
> > customize indentation of a derived C-mode.
>
> CC Mode itself does. In "gnu" style, the function
> on
> c-special-indent-hook (that's c-gnu-impose-minimum)
> checks that certain
> lines of code are indented _at least_ one space.
> c-gnu-impose-minimum is
> in cc-align.el, and the setting of the hook is in
> cc-styles.el.
>
> Is there anything in particular which is causing
> problems?
>
> --
> Alan Mackenzie (Munich, Germany)
> Email: aacm@muuc.dee; to decode, wherever there is a
> repeated letter
> (like "aa"), remove half of them (leaving, say,
> "a").
>
> _______________________________________________
> Help-gnu-emacs mailing list
> Help-gnu-emacs@gnu.org
> http://lists.gnu.org/mailman/listinfo/help-gnu-emacs
>
_____________________________________________________________________________
Découvrez le nouveau Yahoo! Mail : 1 Go d'espace de stockage pour vos mails, photos et vidéos !
Créez votre Yahoo! Mail sur http://fr.mail.yahoo.com
next reply other threads:[~2005-05-19 12:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-19 12:32 na frederic [this message]
[not found] <mailman.20.1116348802.5177.help-gnu-emacs@gnu.org>
2005-05-18 15:08 ` howw does work c-special-indent-hook, from cc-engine? Alan Mackenzie
-- strict thread matches above, loose matches on Subject: below --
2005-05-17 11:49 na frederic
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050519123231.33209.qmail@web26103.mail.ukl.yahoo.com \
--to=f_frederic_f_52@yahoo.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).