27 |
you can control their functioning. |
you can control their functioning. |
28 |
* Keyboard Macros:: A keyboard macro records a sequence of |
* Keyboard Macros:: A keyboard macro records a sequence of |
29 |
keystrokes to be replayed with a single |
keystrokes to be replayed with a single |
30 |
command. |
command. |
31 |
* Key Bindings:: The keymaps say what command each key runs. |
* Key Bindings:: The keymaps say what command each key runs. |
32 |
By changing them, you can "redefine keys". |
By changing them, you can "redefine keys". |
33 |
* Keyboard Translations:: |
* Keyboard Translations:: |
34 |
If your keyboard passes an undesired code |
If your keyboard passes an undesired code |
35 |
for a key, you can tell Emacs to |
for a key, you can tell Emacs to |
36 |
substitute another code. |
substitute another code. |
37 |
* Syntax:: The syntax table controls how words and |
* Syntax:: The syntax table controls how words and |
38 |
expressions are parsed. |
expressions are parsed. |
39 |
* Init File:: How to write common customizations in the |
* Init File:: How to write common customizations in the |
40 |
@file{.emacs} file. |
@file{.emacs} file. |
41 |
@end menu |
@end menu |
42 |
|
|
43 |
@node Minor Modes |
@node Minor Modes |
300 |
* Groups: Customization Groups. |
* Groups: Customization Groups. |
301 |
How options are classified in a structure. |
How options are classified in a structure. |
302 |
* Changing an Option:: How to edit a value and set an option. |
* Changing an Option:: How to edit a value and set an option. |
303 |
|
* Saving Customizations:: Details of saving customizations. |
304 |
* Face Customization:: How to edit the attributes of a face. |
* Face Customization:: How to edit the attributes of a face. |
305 |
* Specific Customization:: Making a customization buffer for specific |
* Specific Customization:: Making a customization buffer for specific |
306 |
options, faces, or groups. |
options, faces, or groups. |
328 |
[State]: this option is unchanged from its standard setting. |
[State]: this option is unchanged from its standard setting. |
329 |
How to ask for confirmation when leaving Emacs. [More] |
How to ask for confirmation when leaving Emacs. [More] |
330 |
|
|
331 |
Editing group: [Go to Group] |
Editing group: [Go to Group] |
332 |
Basic text editing facilities. |
Basic text editing facilities. |
333 |
|
|
334 |
External group: [Go to Group] |
External group: [Go to Group] |
335 |
Interfacing to external utilities. |
Interfacing to external utilities. |
336 |
|
|
337 |
@var{more second-level groups} |
@var{more second-level groups} |
518 |
@cindex saving option value |
@cindex saving option value |
519 |
@cindex customized options, saving |
@cindex customized options, saving |
520 |
Setting the option changes its value in the current Emacs session; |
Setting the option changes its value in the current Emacs session; |
521 |
@dfn{saving} the value changes it for future sessions as well. This |
@dfn{saving} the value changes it for future sessions as well. To |
522 |
works by writing code into your @file{~/.emacs} file so as to set the |
save the option, invoke @samp{[State]} and select the @samp{Save for |
523 |
option variable again each time you start Emacs. To save the option, |
Future Sessions} operation. This works by writing code so as to set |
524 |
invoke @samp{[State]} and select the @samp{Save for Future Sessions} |
the option variable again each time you start Emacs (@pxref{Saving |
525 |
operation. |
Customizations}). |
|
|
|
|
If Emacs was invoked with the @option{-q} or @option{--no-init-file} |
|
|
options (@pxref{Initial Options}), it will not let you save your |
|
|
customizations in your @file{~/.emacs} init file. This is because |
|
|
saving customizations from such a session would wipe out all the other |
|
|
customizations you might have on your init file. |
|
526 |
|
|
527 |
You can also restore the option to its standard value by invoking |
You can also restore the option to its standard value by invoking |
528 |
@samp{[State]} and selecting the @samp{Erase Customization} |
@samp{[State]} and selecting the @samp{Erase Customization} operation. |
529 |
operation. There are actually three reset operations: |
There are actually three reset operations: |
530 |
|
|
531 |
@table @samp |
@table @samp |
532 |
@item Reset |
@item Reset |
542 |
This sets the option to its standard value, and updates the text |
This sets the option to its standard value, and updates the text |
543 |
accordingly. This also eliminates any saved value for the option, |
accordingly. This also eliminates any saved value for the option, |
544 |
so that you will get the standard value in future Emacs sessions. |
so that you will get the standard value in future Emacs sessions. |
545 |
|
|
546 |
|
@item Use Backup Value |
547 |
|
This sets the option to a previous value that was set in the |
548 |
|
customization buffer in this session. If you customize a variable |
549 |
|
and then reset the variable, which discards the customized value, |
550 |
|
you can get the customized value back again with this operation. |
551 |
@end table |
@end table |
552 |
|
|
553 |
@cindex comments on customized options |
@cindex comments on customized options |
580 |
reset---on each of the items in the buffer that could meaningfully be |
reset---on each of the items in the buffer that could meaningfully be |
581 |
set, saved or reset. |
set, saved or reset. |
582 |
|
|
583 |
|
@node Saving Customizations |
584 |
|
@subsubsection Saving Customizations |
585 |
|
|
586 |
|
@vindex custom-file |
587 |
|
The customization buffer normally saves customizations in |
588 |
|
@file{~/.emacs}. If you wish, you can save customizations in another |
589 |
|
file instead. To make this work, your @file{~/.emacs} should set |
590 |
|
@code{custom-file} to the name of that file. Emacs loads the file |
591 |
|
right after your @file{.emacs} if you did not load it already. For |
592 |
|
example: |
593 |
|
|
594 |
|
@example |
595 |
|
(setq custom-file "~/.emacs-custom") |
596 |
|
@end example |
597 |
|
|
598 |
|
The variable @code{custom-file} is useful if you want to have |
599 |
|
different customizations for different Emacs versions: |
600 |
|
|
601 |
|
@example |
602 |
|
(if (< emacs-major-version 21) |
603 |
|
;; @r{Emacs 20 customization.} |
604 |
|
(setq custom-file "~/.custom-20.el") |
605 |
|
;; @r{Emacs 21 customization.} |
606 |
|
(setq custom-file "~/.custom-21.el")) |
607 |
|
@end example |
608 |
|
|
609 |
|
If Emacs was invoked with the @option{-q} or @option{--no-init-file} |
610 |
|
options (@pxref{Initial Options}), it will not let you save your |
611 |
|
customizations in your @file{~/.emacs} init file. This is because |
612 |
|
saving customizations from such a session would wipe out all the other |
613 |
|
customizations you might have on your init file. |
614 |
|
|
615 |
@node Face Customization |
@node Face Customization |
616 |
@subsubsection Customizing Faces |
@subsubsection Customizing Faces |
617 |
@cindex customizing faces |
@cindex customizing faces |
693 |
@item M-x customize-changed-options @key{RET} @var{version} @key{RET} |
@item M-x customize-changed-options @key{RET} @var{version} @key{RET} |
694 |
Set up a customization buffer with all the options, faces and groups |
Set up a customization buffer with all the options, faces and groups |
695 |
whose meaning has changed since Emacs version @var{version}. |
whose meaning has changed since Emacs version @var{version}. |
696 |
@item M-x customize-saved |
@item M-x customize-saved |
697 |
Set up a customization buffer containing all options and faces that you |
Set up a customization buffer containing all options and faces that you |
698 |
have saved with customization buffers. |
have saved with customization buffers. |
699 |
@item M-x customize-customized |
@item M-x customize-customized |
711 |
|
|
712 |
@findex customize-face |
@findex customize-face |
713 |
Likewise, you can modify a specific face, chosen by name, using |
Likewise, you can modify a specific face, chosen by name, using |
714 |
@kbd{M-x customize-face}. |
@kbd{M-x customize-face}. By default it operates on the face used |
715 |
|
on the character after point. |
716 |
|
|
717 |
@findex customize-group |
@findex customize-group |
718 |
You can also set up the customization buffer with a specific group, |
You can also set up the customization buffer with a specific group, |
778 |
makes these hooks abnormal is that there is something peculiar about the |
makes these hooks abnormal is that there is something peculiar about the |
779 |
way its functions are called---perhaps they are given arguments, or |
way its functions are called---perhaps they are given arguments, or |
780 |
perhaps the values they return are used in some way. For example, |
perhaps the values they return are used in some way. For example, |
781 |
@code{find-file-not-found-hooks} (@pxref{Visiting}) is abnormal because |
@code{find-file-not-found-functions} (@pxref{Visiting}) is abnormal because |
782 |
as soon as one hook function returns a non-@code{nil} value, the rest |
as soon as one hook function returns a non-@code{nil} value, the rest |
783 |
are not called at all. The documentation of each abnormal hook variable |
are not called at all. The documentation of each abnormal hook variable |
784 |
explains in detail what is peculiar about it. |
explains in detail what is peculiar about it. |
1575 |
you are binding the key you want: |
you are binding the key you want: |
1576 |
|
|
1577 |
@example |
@example |
1578 |
Set key C-z to command: |
Set key C-z to command: |
1579 |
@end example |
@end example |
1580 |
|
|
1581 |
You can redefine function keys and mouse events in the same way; just |
You can redefine function keys and mouse events in the same way; just |