* ObjC mode fontification and formatting
@ 2003-04-15 18:12 Raffael Herzog
2003-04-16 9:29 ` Miles Bader
0 siblings, 1 reply; 2+ messages in thread
From: Raffael Herzog @ 2003-04-15 18:12 UTC (permalink / raw)
Hi,
Playing around with GNUstep I also started Objective-C pro-
gramming. Now, there are some issues with cc-mode there:
,----
| -(void) doSomething: (NSString*) str1
| with: (NSString*) str2
| {
| [anObject doSomething: str1
| with: str2]; // 'with' is fontified as
| // function definition, 'str2'
| // as variable
| }
`----
But I'd like Emacs to do the following:
,----
| -(void) doSomething: (NSString*) str
| with: (NSString*) str2
| {
| [anObject doSomething: str1 // fontify 'anObject' as
| // variable? (not sure yet)
| with: str2]; // don't fontify 'with'
| // nor 'str2'
| // note the alignment ^
| }
`----
How can this be done?
TIA,
Raffi
--
=> Neu im Usenet? Fragen? http://www.use-net.ch/usenet_intro_de.html <=
The difference between theory and practice is that in theory, there is
no difference, but in practice, there is.
Raffael Herzog - herzog@raffael.ch - http://www.raffael.ch - ICQ #67961355
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: ObjC mode fontification and formatting
2003-04-15 18:12 ObjC mode fontification and formatting Raffael Herzog
@ 2003-04-16 9:29 ` Miles Bader
0 siblings, 0 replies; 2+ messages in thread
From: Miles Bader @ 2003-04-16 9:29 UTC (permalink / raw)
Cc: help-gnu-emacs
Raffael Herzog <devnull@raffael.ch> writes:
> But I'd like Emacs to do the following:
>
> | [anObject doSomething: str1 // fontify 'anObject' as
> | // variable? (not sure yet)
> | with: str2]; // don't fontify 'with'
> | // nor 'str2'
>
> How can this be done?
I don't really understand what's going on, but with a bit of
experimentation I got the following, which seems to work:
(c-set-offset 'objc-method-call-cont
(lambda (x) (- (c-lineup-ObjC-method-args-2 x) 2)))
There's probably something less kludgey than subtracting 2, but I don't
know what it is...
[c-set-offset is `C-c C-o' in objc-mode]
-Miles
--
Somebody has to do something, and it's just incredibly pathetic that it
has to be us. -- Jerry Garcia
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-04-16 9:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-04-15 18:12 ObjC mode fontification and formatting Raffael Herzog
2003-04-16 9:29 ` Miles Bader
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).