[PATCH] tracedump: Add tri-state --color option (auto, always, or never)

Carl Worth cworth at cworth.org
Tue Oct 25 17:36:06 PDT 2011


On Tue, 25 Oct 2011 15:36:02 -0400, Zack Rusin <zack at kde.org> wrote:
> If .dir-locals.el can replicate what dirvars does, then lets just insert that 
> into the repo and remove dirvars. 

It's simple enough to add .dir-locals.el. I'll try to include that in an
upcoming patch. Below is some updated content for that file. It's like
before, but without the "linux" style and applying to all modes, not
just C and C++ modes (so hopefully it will even do the right thing with
python source files).

As for replicating dirvars, the .dir-locals.el is intended to serve the
same purpose and is included with emacs by default.

I looked at the existing .emacs-dirvars file. The several other variable
settings there (kdab-*, kde-*, etc.) would be easy to set, but are these
actually necessary for apitrace? These happen to not be on the
dir-locals builtin whitelist of "safe" variables, so the user will be
warned when first opening a file in emacs before these variables are
set. That warning would be annoying if we don't really need these
variables set.

As for the two "evaluate" blocks in your dirvars file, I don't know if
dir-locals supports those or not.

So the right answer might be to just add a simple .dir-locals.el file as
below, and then Zack, you can experiment and see if your dirvars file
can be removed without losing any functionality.
>  
> > What does c-file-style "linux" achieve?
> 
> It's one of the builtins c/c++ styles for emacs, approximating the linux 
> kernel style. In this case it's rather wrong, because as far as emacs 
> definitions go we're closer to what emacs calls bsd style not linux style but 
> you should probably define the style you like and add a short blurb
> about it. 

Right. I just had that cargo culted in my case. I'm not even sure it's
the style I most want. I don't know that I've ever found a style file
that does sane indentation of braces inside switch/case blocks, (or
maybe this "linux" thing has been defeating me for a while, who knows).

Anyway, yeah, if you define what style you actually want, we should be
able to teach emacs how to give that to us. For now, indentation with
spaces only (no tabs) and 4-spaces-for-each-indentation-level is what we
know and are setting here.

-Carl

-- 
carl.d.worth at intel.com

; emacs local configuration settings for apitrace source

((nil
  (indent-tabs-mode . nil)
  (tab-width . 8)
  (c-basic-offset . 4))
)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/apitrace/attachments/20111025/57fe4e0f/attachment.pgp>


More information about the apitrace mailing list