diff options
| author | Richard M. Stallman | 2002-09-18 16:11:02 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2002-09-18 16:11:02 +0000 |
| commit | 88ca5bbf8d411904c92fe9c4172bac352da04d48 (patch) | |
| tree | 60bdd3ec8bd2c88b8c3ae75165325a2dc952ef4d | |
| parent | e2bd460ac235ae5b7511d0d6cc30b580351883a6 (diff) | |
| download | emacs-88ca5bbf8d411904c92fe9c4172bac352da04d48.tar.gz emacs-88ca5bbf8d411904c92fe9c4172bac352da04d48.zip | |
(Saving Customizations): New node has the info on custom-file.
(Changing an Option): Document Use Backup Value.
| -rw-r--r-- | man/custom.texi | 70 |
1 files changed, 46 insertions, 24 deletions
diff --git a/man/custom.texi b/man/custom.texi index 20f48a576e4..50221628faf 100644 --- a/man/custom.texi +++ b/man/custom.texi | |||
| @@ -300,6 +300,7 @@ active fields and other features. | |||
| 300 | * Groups: Customization Groups. | 300 | * Groups: Customization Groups. |
| 301 | How options are classified in a structure. | 301 | How options are classified in a structure. |
| 302 | * Changing an Option:: How to edit a value and set an option. | 302 | * Changing an Option:: How to edit a value and set an option. |
| 303 | * Saving Customizations:: Details of saving customizations. | ||
| 303 | * Face Customization:: How to edit the attributes of a face. | 304 | * Face Customization:: How to edit the attributes of a face. |
| 304 | * Specific Customization:: Making a customization buffer for specific | 305 | * Specific Customization:: Making a customization buffer for specific |
| 305 | options, faces, or groups. | 306 | options, faces, or groups. |
| @@ -517,32 +518,15 @@ editable field, use @kbd{C-o} or @kbd{C-q C-j}. | |||
| 517 | @cindex saving option value | 518 | @cindex saving option value |
| 518 | @cindex customized options, saving | 519 | @cindex customized options, saving |
| 519 | Setting the option changes its value in the current Emacs session; | 520 | Setting the option changes its value in the current Emacs session; |
| 520 | @dfn{saving} the value changes it for future sessions as well. This | 521 | @dfn{saving} the value changes it for future sessions as well. To |
| 521 | works by writing code into your @file{~/.emacs} file so as to set the | 522 | save the option, invoke @samp{[State]} and select the @samp{Save for |
| 522 | option variable again each time you start Emacs. To save the option, | 523 | Future Sessions} operation. This works by writing code so as to set |
| 523 | invoke @samp{[State]} and select the @samp{Save for Future Sessions} | 524 | the option variable again each time you start Emacs (@pxref{Saving |
| 524 | operation. | 525 | Customizations}). |
| 525 | |||
| 526 | @vindex custom-file | ||
| 527 | The customization buffer normally saves customizations in | ||
| 528 | @file{~/.emacs}. If you wish, you can save customizations in another | ||
| 529 | file instead. To make this work, your @file{~/.emacs} should set | ||
| 530 | @code{custom-file} to the name of that file. Emacs will then load | ||
| 531 | the file right after your @file{.emacs}. For example: | ||
| 532 | |||
| 533 | @example | ||
| 534 | (setq custom-file "~/.emacs-custom") | ||
| 535 | @end example | ||
| 536 | |||
| 537 | If Emacs was invoked with the @option{-q} or @option{--no-init-file} | ||
| 538 | options (@pxref{Initial Options}), it will not let you save your | ||
| 539 | customizations in your @file{~/.emacs} init file. This is because | ||
| 540 | saving customizations from such a session would wipe out all the other | ||
| 541 | customizations you might have on your init file. | ||
| 542 | 526 | ||
| 543 | You can also restore the option to its standard value by invoking | 527 | You can also restore the option to its standard value by invoking |
| 544 | @samp{[State]} and selecting the @samp{Erase Customization} | 528 | @samp{[State]} and selecting the @samp{Erase Customization} operation. |
| 545 | operation. There are actually three reset operations: | 529 | There are actually three reset operations: |
| 546 | 530 | ||
| 547 | @table @samp | 531 | @table @samp |
| 548 | @item Reset | 532 | @item Reset |
| @@ -558,6 +542,12 @@ and updates the text accordingly. | |||
| 558 | This sets the option to its standard value, and updates the text | 542 | This sets the option to its standard value, and updates the text |
| 559 | accordingly. This also eliminates any saved value for the option, | 543 | accordingly. This also eliminates any saved value for the option, |
| 560 | so that you will get the standard value in future Emacs sessions. | 544 | 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. | ||
| 561 | @end table | 551 | @end table |
| 562 | 552 | ||
| 563 | @cindex comments on customized options | 553 | @cindex comments on customized options |
| @@ -590,6 +580,38 @@ Each of the other fields performs an operation---set, save or | |||
| 590 | reset---on each of the items in the buffer that could meaningfully be | 580 | reset---on each of the items in the buffer that could meaningfully be |
| 591 | set, saved or reset. | 581 | set, saved or reset. |
| 592 | 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 | |||
| 593 | @node Face Customization | 615 | @node Face Customization |
| 594 | @subsubsection Customizing Faces | 616 | @subsubsection Customizing Faces |
| 595 | @cindex customizing faces | 617 | @cindex customizing faces |