1 |
David Spreen <netzwurm@××××××.org> writes: |
2 |
|
3 |
> Hey there, |
4 |
> I sent a piece of emacs-code to Grant Goodyear to do in emacs |
5 |
> what you suggested for the .vimrc. I sent it to Grant because |
6 |
> I didn't see the note about this address at the end of the |
7 |
> page. |
8 |
> |
9 |
> Okay, to switch to 4-spaces tab mode (even in shellscript-mode) |
10 |
> of emacs add the following lines to your .emacs: |
11 |
> |
12 |
> --BEGIN |
13 |
> ;; gentoo check |
14 |
> (defun gentoo-check () |
15 |
> (if (string-match "gentoo-x86\\|gentoo-src\\|portage" |
16 |
> (file-name-directory (buffer-file-name))) |
17 |
> (progn (set 'tab-width 4) |
18 |
> (set 'indent-tabs-mode 1) |
19 |
> (set (make-local-variable |
20 |
> 'backward-delete-char-untabify-method) nil)))) |
21 |
> |
22 |
> (add-hook 'find-file-hooks 'gentoo-check) |
23 |
> --END |
24 |
|
25 |
I've been sourcing the following from my .emacs. It is basically what |
26 |
you have and makes use of the shell-script mode (for that lovable |
27 |
font-locking goodness). As time permits, I'll add keywords for |
28 |
everything portage related (dobin, dodoc, inherit etc.). May even |
29 |
consider adding it to the emacs/xemacs ebuilds somehow (or at least |
30 |
app-emacs/). |
31 |
|
32 |
,----[ ebuild.el ] |
33 |
| |
34 |
| (defun ebuild-mode () |
35 |
| "Simple ebuild-mode" |
36 |
| (shell-script-mode) |
37 |
| (sh-set-shell "bash") |
38 |
| (set-variable 'tab-width 4)) |
39 |
| (setq auto-mode-alist (cons '("\\.ebuild\\'" . ebuild-mode) auto-mode-alist)) |
40 |
| (setq auto-mode-alist (cons '("\\.eclass\\'" . ebuild-mode) auto-mode-alist)) |
41 |
| |
42 |
`---- |
43 |
|
44 |
|
45 |
-- |
46 |
Matthew Kennedy |
47 |
Gentoo Linux Developer |