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 been greatly improved. |
14 |
</p> |
17 |
</p> |
15 |
|
18 |
|
16 |
<p> |
19 |
<p> |
Lines 41-46
Link Here
|
41 |
For specifying coding system to use on a per-file basis, the |
44 |
For specifying coding system to use on a per-file basis, the |
42 |
<c>modify-coding-system</c> function can be used. |
45 |
<c>modify-coding-system</c> function can be used. |
43 |
</p> |
46 |
</p> |
|
|
47 |
</section> |
48 |
|
49 |
<section> |
50 |
<title>Configuration tips and tricks</title> |
51 |
<p> |
52 |
Files must end with a newline, in order to let tools like <e>diff</e> |
53 |
operate properly. To avoid accidental deletions, setting <e>(setq require-final-newline 'ask)</e> in your startup file will |
54 |
automatically check for the existence of it and ask you to add one. |
55 |
</p> |
56 |
<p> |
57 |
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>), |
58 |
so you don't clutter CVS directories and confuse repoman with it (by adding unnecessary entries into |
59 |
a Manifest file e.g.). Emacs can even contact the outside world by using the X servers clipboard abilities |
60 |
when yanking, which is activated by <e>(setq x-select-enable-clipboard t)</e>. |
61 |
</p> |
62 |
</section> |
63 |
|
64 |
<section> |
65 |
<title>Gentoo specific additions</title> |
66 |
<p> |
67 |
For easy editing of ebuilds an Emacs mode has been created, which is |
68 |
found in the package <e>app-emacs/gentoo-syntax</e>. |
69 |
It supports ebuilds, eclasses and eselect files, highlights keywords |
70 |
and also provides a hook for your own customisation. |
71 |
</p> |
72 |
</section> |
44 |
|
73 |
|
45 |
<section> |
74 |
<section> |
46 |
<title>Further Reading</title> |
75 |
<title>Further Reading</title> |