diff options
| author | Luc Teirlinck | 2004-12-09 01:29:55 +0000 |
|---|---|---|
| committer | Luc Teirlinck | 2004-12-09 01:29:55 +0000 |
| commit | 226675108ffc323c1aaa32cbb81564cbcdd6e7dc (patch) | |
| tree | c3f676cce1a0166e2569ea1049dac3e521250f21 | |
| parent | e2bcbfbba4b97eadc627d3c0bebbd8d31a86fd19 (diff) | |
| download | emacs-226675108ffc323c1aaa32cbb81564cbcdd6e7dc.tar.gz emacs-226675108ffc323c1aaa32cbb81564cbcdd6e7dc.zip | |
(Saving Customizations): Emacs only loads the custom file
automatically after the init file in version 21.4 or later.
Adapt text and examples to this fact.
| -rw-r--r-- | man/custom.texi | 37 |
1 files changed, 26 insertions, 11 deletions
diff --git a/man/custom.texi b/man/custom.texi index 1315886c529..cfea5e5eefd 100644 --- a/man/custom.texi +++ b/man/custom.texi | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | @c This is part of the Emacs manual. | 1 | @c This is part of the Emacs manual. |
| 2 | @c Copyright (C) 1985,86,87,93,94,95,97,2000,2001,2002 | 2 | @c Copyright (C) 1985,86,87,93,94,95,97,2000,2001,2002,2004 |
| 3 | @c Free Software Foundation, Inc. | 3 | @c Free Software Foundation, Inc. |
| 4 | @c See file emacs.texi for copying conditions. | 4 | @c See file emacs.texi for copying conditions. |
| 5 | @node Customization, Quitting, Amusements, Top | 5 | @node Customization, Quitting, Amusements, Top |
| @@ -487,23 +487,38 @@ set, saved or reset. | |||
| 487 | The customization buffer normally saves customizations in | 487 | The customization buffer normally saves customizations in |
| 488 | @file{~/.emacs}. If you wish, you can save customizations in another | 488 | @file{~/.emacs}. If you wish, you can save customizations in another |
| 489 | file instead. To make this work, your @file{~/.emacs} should set | 489 | file instead. To make this work, your @file{~/.emacs} should set |
| 490 | @code{custom-file} to the name of that file. Emacs loads the file | 490 | @code{custom-file} to the name of that file. If you are using Emacs |
| 491 | right after your @file{.emacs} if you did not load it already. For | 491 | version 21.4 or later, Emacs loads the file right after your |
| 492 | example: | 492 | @file{.emacs} if you did not load it already. In earlier versions, |
| 493 | you have to load the file in your @file{~/emacs}. If you customize | ||
| 494 | @code{custom-file} through the @samp{Customize} interface, you still | ||
| 495 | need to load it in your @file{.emacs}, but there is no need to set | ||
| 496 | it. For example: | ||
| 493 | 497 | ||
| 494 | @example | 498 | @example |
| 499 | ;; @r{if not set through the @samp{Customize} interface:} | ||
| 495 | (setq custom-file "~/.emacs-custom") | 500 | (setq custom-file "~/.emacs-custom") |
| 501 | |||
| 502 | ;; @r{in Emacs versions before 21.4 or if set through} | ||
| 503 | ;; @r{the @samp{Customize} interface.} | ||
| 504 | (load "~/.emacs-custom") | ||
| 496 | @end example | 505 | @end example |
| 497 | 506 | ||
| 498 | The variable @code{custom-file} is useful if you want to have | 507 | You can also use @code{custom-file} to specify different |
| 499 | different customizations for different Emacs versions: | 508 | customization files for different Emacs versions, like this: |
| 500 | 509 | ||
| 501 | @example | 510 | @example |
| 502 | (if (< emacs-major-version 21) | 511 | (cond ((< emacs-major-version 21) |
| 503 | ;; @r{Emacs 20 customization.} | 512 | ;; @r{Emacs 20 customization.} |
| 504 | (setq custom-file "~/.custom-20.el") | 513 | (setq custom-file "~/.custom-20.el")) |
| 505 | ;; @r{Emacs 21 customization.} | 514 | ((and (= emacs-major-version 21) (< emacs-minor-version 4)) |
| 506 | (setq custom-file "~/.custom-21.el")) | 515 | ;; @r{Emacs 21 customization, before version 21.4.} |
| 516 | (setq custom-file "~/.custom-21.el")) | ||
| 517 | (t | ||
| 518 | ;; @r{Emacs version 21.4 or later.} | ||
| 519 | (setq custom-file "~/.custom-21.4.el"))) | ||
| 520 | |||
| 521 | (load custom-file) | ||
| 507 | @end example | 522 | @end example |
| 508 | 523 | ||
| 509 | If Emacs was invoked with the @option{-q} or @option{--no-init-file} | 524 | If Emacs was invoked with the @option{-q} or @option{--no-init-file} |