Lines 1-16
Link Here
|
1 |
<?xml version="1.0"?> |
1 |
<?xml version="1.0"?> |
2 |
<guide self="appendices/editor-configuration/emacs/"> |
2 |
<guide self="appendices/editor-configuration/emacs/"> |
3 |
<chapter> |
3 |
<chapter> |
4 |
<title>Configuring <c>GNU Emacs</c></title> |
4 |
<title>Configuring GNU Emacs</title> |
5 |
<body> |
5 |
<body> |
6 |
|
6 |
|
|
|
7 |
<section> |
8 |
<title>UTF-8 support</title> |
7 |
<p> |
9 |
<p> |
8 |
Emacs 21 has built-in Unicode support, and (fortunately) it supports |
10 |
Emacs 21 has built-in Unicode support, and (fortunately) it supports |
9 |
UTF-8 far better than UTF-16 and other variants. Some extensions to this |
11 |
UTF-8 far better than UTF-16 and other variants. Some extensions to this |
10 |
functionality are available in the package <c>app-emacs/mule-ucs</c>, although |
12 |
functionality are available in the package <c>app-emacs/mule-ucs</c>, although |
11 |
this is not necessary (and I would not recommend it unless absolutely |
13 |
this is not necessary (and I would not recommend it unless absolutely |
12 |
necessary, as the potential for unexpected bugs or quirky behaviour is |
14 |
necessary, as the potential for unexpected bugs or quirky behaviour is |
13 |
increased). |
15 |
increased). The best solution is using Emacs 22 or higher as encoding |
|
|
16 |
support has ben greatly improved |
17 |
has been greatly improved |
14 |
</p> |
18 |
</p> |
15 |
|
19 |
|
16 |
<p> |
20 |
<p> |
Lines 41-46
Link Here
|
41 |
For specifying coding system to use on a per-file basis, the |
45 |
For specifying coding system to use on a per-file basis, the |
42 |
<c>modify-coding-system</c> function can be used. |
46 |
<c>modify-coding-system</c> function can be used. |
43 |
</p> |
47 |
</p> |
|
|
48 |
</section> |
49 |
|
50 |
<section> |
51 |
<title>Configuration tips and tricks</title> |
52 |
<p> |
53 |
Files must end with a newline, in order to let tools like <e>diff</e> |
54 |
operate properly. To avoid accidental deletions, setting <e>(setq require-final-newline 'ask)</e> in your startup file will |
55 |
automatically check for the existence of it and ask you to add one. |
56 |
</p> |
57 |
<p> |
58 |
Other useful settings can be disabled backup files (by <e>(setq make-backup-files nil)</e>and <e>(setq vc-cvs-stay-local nil)</e>), |
59 |
so you don't clutter CVS directories and confuse repoman with it (by adding unnecessary entries into |
60 |
a Manifest file e.g.). Emacs can even contact the outside world by using the X servers clipboard abilities |
61 |
when yanking, which is activated by <e>(setq x-select-enable-clipboard t)</e>. |
62 |
</p> |
63 |
</section> |
64 |
|
65 |
<section> |
66 |
<title>Gentoo specific additions</title> |
67 |
<p> |
68 |
For easy editing of ebuilds a Emacs mode has been created, which is |
69 |
found in the package <e>app-emacs/ebuild-mode</e> (what surprise). |
70 |
It supports ebuilds, eclasses and eselect files, highlights keywords |
71 |
and also provides a hook for your own customisation. |
72 |
</p> |
73 |
</section> |
44 |
|
74 |
|
45 |
<section> |
75 |
<section> |
46 |
<title>Further Reading</title> |
76 |
<title>Further Reading</title> |