dev builds
themes manual
device status forums
mailing lists
IRC bugs
dev guide

Rockbox mail archive

Subject: Plan for rockbox-mode.el

Plan for rockbox-mode.el

From: Mats Lidell <>
Date: Wed, 15 Jan 2003 14:16:56 +0100


The Emacs support for editing with "rockbox-style" is currently
supported by the file firmware/rockbox-mode.el. That file is further
sometimes used in the local variables section in the C files in order
to set the right style for the editing.

The problem is that this doesn't work 100%. Unaware Emacs users will
not get the right style at all since the GNU-style is default. Emacs
users that already have their cc-mode configured to taste will also
not get the right settings. The use of the local variables are for
some users annoying since they are being prompted whether the section
should be evaluated. Only a few files use the local variables section
to load the rockbox-mode.el file anyway.

There is unfortunately no silver bullet solution here that will fit
everyone that I know of. We can only try to improve the

IMHO it is to define the editing style as cc-mode, the mode in Emacs
that supports editing C code, wants it to be defined. This allows
users who knows Emacs to set up cc-mode in a proper way for editing
rockbox. We should also document one suitable way of doing this so
that new users, that might only want to edit rockbox, easilly can
setup their Emacs in the same way.

The plan I have is the following:

1. Move rockbox-mode.el from the firmware folder to the tools
   folder. Possibly rename it to rockbox-style.el since it isn't
   defining an Emacs mode.

2. Remove all local variables sections from the files. IMO the local
   variables section is best used when there is something different in
   a particular file. Not to enforce a common look among many files.

3. Change the contents of rockbox-mode (style) so that it defines the
   cc-mode style "rockbox" and provides suitable hooks or functions to
   activate this so that the user can choose this style in his .emacs
   (or whatever)

4. Describe in some documentation, sample.emacs, how this can be setup
   in a way so that a new user simply can drop this into his own
   .emacs. Experienced users will have to use the new style depending
   on what other styles they are using but then again they are
   experienced and should be able to managed this by themselves.


%% Mats
Received on 2003-01-15

Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy