comparison man/custom.texi @ 90066:fb79180b618d

Revision: miles@gnu.org--gnu-2004/emacs--unicode--0--patch-78 Merge from emacs--cvs-trunk--0 Patches applied: * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-719 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-732 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-733 Update from CVS: man/calc.texi: Fix some TeX definitions. * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-734 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-75 Merge from emacs--cvs-trunk--0 * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-76 - miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-77 Update from CVS
author Miles Bader <miles@gnu.org>
date Tue, 14 Dec 2004 07:34:55 +0000
parents f2ebccfa87d4 2e075e3c65a4
children 95879cc1ed20
comparison
equal deleted inserted replaced
90065:c26eb15cd14a 90066:fb79180b618d
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
6 @chapter Customization 6 @chapter Customization
7 @cindex customization 7 @cindex customization
485 485
486 @vindex custom-file 486 @vindex custom-file
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 493 you have to load the file in your @file{~/emacs}. If you customize
494 @example 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:
497
498 @example
499 ;; @r{if not set through the @samp{Customize} interface:}
495 (setq custom-file "~/.emacs-custom") 500 (setq custom-file "~/.emacs-custom")
496 @end example 501
497 502 ;; @r{in Emacs versions before 21.4 or if set through}
498 The variable @code{custom-file} is useful if you want to have 503 ;; @r{the @samp{Customize} interface.}
499 different customizations for different Emacs versions: 504 (load "~/.emacs-custom")
500 505 @end example
501 @example 506
502 (if (< emacs-major-version 21) 507 You can also use @code{custom-file} to specify different
503 ;; @r{Emacs 20 customization.} 508 customization files for different Emacs versions, like this:
504 (setq custom-file "~/.custom-20.el") 509
505 ;; @r{Emacs 21 customization.} 510 @example
506 (setq custom-file "~/.custom-21.el")) 511 (cond ((< emacs-major-version 21)
512 ;; @r{Emacs 20 customization.}
513 (setq custom-file "~/.custom-20.el"))
514 ((and (= emacs-major-version 21) (< emacs-minor-version 4))
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}
510 options (@pxref{Initial Options}), it will not let you save your 525 options (@pxref{Initial Options}), it will not let you save your
511 customizations in your @file{~/.emacs} init file. This is because 526 customizations in your @file{~/.emacs} init file. This is because