jed-users mailing list

[2003 Date Index] [2003 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

RE: [jed-users] setting programming style


[ Note that you wrote to the yahoo mailing list: now the "official" jed
mailing list is at jed-users@xxxxxxxxxxx, I'm replying to the correct
mailing list]

> -----Original Message-----
> From: Abraham van der Merwe [mailto:abz@xxxxxxxxxxxx]
> Sent: mercoledì 15 gennaio 2003 11.21
> Subject: [jed-users] setting programming style
> 
> 
> Hi!
> 
> Is there a way to set the preferred programming style (similar to -*-
> modename -*- at top of file)?

You can use:
/* -*- eval: c_set_style("linux") -*- */

See the comments on lib/modehook.sl

> 
> E.g. if I edit foo.c it should default to linux and if I edit 
> any other
> file, it should default to bar.c, etc.

If you don't want to change the files (i.e. I doubt you will change all the
files in a linux source tree) you may try my project.sl at
http://www.paneura.com/~dino/project.html: it allows to execute a slang
script placed in the current directory or one of the upper directories. For
example, for linux kernel I have a simple .project.sl file:
c_set_style("linux");
and everytime I run jed in that directory or any directory below, the style
is set to "linux".

> 
> Also, is there any shortcut key to switch modes? (currently I 
> find myself
> typing Ctrl-X-ESC c_set_style(...) quite a lot :P)

I' don't think we can do this easily, as the list of styles is hardcoded,
and the user may add some own styles using a hook. Adding a hardcoded
submenu to the C mode menu should be fairly easy.

Later,
							Dino

-- 
In theory, there is no difference between theory and practice.
In practice, there is.

--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.


[2003 date index] [2003 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]