Trac is being migrated to new services! Issues can be found in our new
YouTrack instance and WIKI pages can be found on our
website.
- Timestamp:
-
Jun 12, 2013, 11:41:44 PM (11 years ago)
- Author:
-
immerrr
- Comment:
-
extend emacs section: add "tab-width 8" style variable and describe ".dir-locals.el"
Legend:
- Unmodified
- Added
- Removed
- Modified
-
v3
|
v4
|
|
6 | 6 | |
7 | 7 | {{{ |
8 | | (c-add-style "pidgin" '((c-tab-always-indent . t) |
| 8 | (c-add-style "pidgin" '((tab-width . 8) |
| 9 | (c-tab-always-indent . t) |
9 | 10 | (c-basic-offset . 8) |
10 | 11 | (indent-tabs-mode . t))) |
… |
… |
|
19 | 20 | |
20 | 21 | Make sure this hook runs after your normal setup hook, if your normal hook sets a style. The or is included just to show how to match multiple paths. You may perform the selection however you like, path snippets just happen to be useful given my filesystem organization. -- [wiki:elb] |
| 22 | |
| 23 | >If you're using Emacs23+, there's an arguably cleaner way to set up project-specific configuration via [http://www.gnu.org/software/emacs/manual/html_node/emacs/Directory-Variables.html directory variables]. All you need to do is to add the customization to `.dir-locals.el` file to the root dir of your pidgin clone and it will be applied to all files below that dir. For example, given the `pidgin` style definition above, my setup is as follows (additional `c++-mode` config is necessary if you associate `*.h` files with it, like I do): |
| 24 | >{{{ |
| 25 | >((c-mode . ((c-file-style . "pidgin"))) |
| 26 | > (c++-mode . ((c-file-style . "pidgin") |
| 27 | > (mode . c)))) |
| 28 | >}}} |
| 29 | > |
| 30 | >-- immerrr |
21 | 31 | |
22 | 32 | == VIM == |
All information, including names and email addresses, entered onto this website or sent to mailing lists affiliated with this website will be public. Do not post confidential information, especially passwords!