comparison lisp/cus-edit.el @ 90072:cb67264d6096

Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-2 Merge from emacs--cvs-trunk--0 Patches applied: * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-83 - miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-84 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-3 - miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-4 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-5 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-6 - miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-11 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-12 Remove "-face" suffix from lazy-highlight face name * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-13 - miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-16 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-17 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-18 - miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-21 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-22 <no summary provided> * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-23 - miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-39 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-40 Fix regressions from latest reftex update * miles@gnu.org--gnu-2005/gnus--rel--5.10--base-0 tag of miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-82 * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-1 Merge from emacs--cvs-trunk--0 * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-2 Merge from miles@gnu.org--gnu-2004 * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-3 Merge from emacs--cvs-trunk--0
author Miles Bader <miles@gnu.org>
date Sun, 16 Jan 2005 03:40:12 +0000
parents fb79180b618d 7e2ecc9fa098
children f8a7a9ba3d08
comparison
equal deleted inserted replaced
90071:f6b4d0ebf147 90072:cb67264d6096
241 "Code local to your site." 241 "Code local to your site."
242 :group 'emacs) 242 :group 'emacs)
243 243
244 (defgroup customize '((widgets custom-group)) 244 (defgroup customize '((widgets custom-group))
245 "Customization of the Customization support." 245 "Customization of the Customization support."
246 :link '(custom-manual "(elisp)Customization")
247 :prefix "custom-" 246 :prefix "custom-"
248 :group 'help) 247 :group 'help)
249 248
250 (defgroup custom-faces nil 249 (defgroup custom-faces nil
251 "Faces used by customize." 250 "Faces used by customize."
3697 "File used for storing customization information. 3696 "File used for storing customization information.
3698 The default is nil, which means to use your init file 3697 The default is nil, which means to use your init file
3699 as specified by `user-init-file'. If the value is not nil, 3698 as specified by `user-init-file'. If the value is not nil,
3700 it should be an absolute file name. 3699 it should be an absolute file name.
3701 3700
3702 To make this feature work, you'll need to put something in your 3701 You can set this option through Custom, if you carefully read the
3703 init file to specify the value of `custom-file'. Just 3702 last paragraph below. However, usually it is simpler to write
3704 customizing the variable won't suffice, because Emacs won't know 3703 something like the following in your init file:
3705 which file to load unless the init file sets `custom-file'. 3704
3706 3705 \(setq custom-file \"~/.emacs-custom.el\")
3707 When you change this variable, look in the previous custom file 3706 \(load custom-file)
3708 \(usually your init file) for the forms `(custom-set-variables ...)' 3707
3709 and `(custom-set-faces ...)', and copy them (whichever ones you find) 3708 Note that both lines are necessary: the first line tells Custom to
3710 to the new custom file. This will preserve your existing customizations." 3709 save all customizations in this file, but does not load it.
3711 :type '(choice (const :tag "Your Emacs init file" nil) file) 3710
3711 When you change this variable outside Custom, look in the
3712 previous custom file \(usually your init file) for the
3713 forms `(custom-set-variables ...)' and `(custom-set-faces ...)',
3714 and copy them (whichever ones you find) to the new custom file.
3715 This will preserve your existing customizations.
3716
3717 If you save this option using Custom, Custom will write all
3718 currently saved customizations, including the new one for this
3719 option itself, into the file you specify, overwriting any
3720 `custom-set-variables' and `custom-set-faces' forms already
3721 present in that file. It will not delete any customizations from
3722 the old custom file. You should do that manually if that is what you
3723 want. You also have to put something like `\(load \"CUSTOM-FILE\")
3724 in your init file, where CUSTOM-FILE is the actual name of the
3725 file. Otherwise, Emacs will not load the file when it starts up,
3726 and hence will not set `custom-file' to that file either."
3727 :type '(choice (const :tag "Your Emacs init file" nil)
3728 (file :format "%t:%v%d"
3729 :doc
3730 "Please read entire docstring below before setting \
3731 this through Custom.
3732 Click om \"More\" \(or position point there and press RETURN)
3733 if only the first line of the docstring is shown."))
3712 :group 'customize) 3734 :group 'customize)
3713 3735
3714 (defun custom-file () 3736 (defun custom-file ()
3715 "Return the file name for saving customizations." 3737 "Return the file name for saving customizations."
3716 (setq custom-file 3738 (or custom-file
3717 (or custom-file 3739 (let ((user-init-file user-init-file)
3718 (let ((user-init-file user-init-file) 3740 (default-init-file
3719 (default-init-file 3741 (if (eq system-type 'ms-dos) "~/_emacs" "~/.emacs")))
3720 (if (eq system-type 'ms-dos) "~/_emacs" "~/.emacs"))) 3742 (when (null user-init-file)
3721 (when (null user-init-file) 3743 (if (or (file-exists-p default-init-file)
3722 (if (or (file-exists-p default-init-file) 3744 (and (eq system-type 'windows-nt)
3723 (and (eq system-type 'windows-nt) 3745 (file-exists-p "~/_emacs")))
3724 (file-exists-p "~/_emacs"))) 3746 ;; Started with -q, i.e. the file containing
3725 ;; Started with -q, i.e. the file containing 3747 ;; Custom settings hasn't been read. Saving
3726 ;; Custom settings hasn't been read. Saving 3748 ;; settings there would overwrite other settings.
3727 ;; settings there would overwrite other settings. 3749 (error "Saving settings from \"emacs -q\" would overwrite existing customizations"))
3728 (error "Saving settings from \"emacs -q\" would overwrite existing customizations")) 3750 (setq user-init-file default-init-file))
3729 (setq user-init-file default-init-file)) 3751 user-init-file)))
3730 user-init-file))))
3731 3752
3732 (defun custom-save-delete (symbol) 3753 (defun custom-save-delete (symbol)
3733 "Visit `custom-file' and delete all calls to SYMBOL from it. 3754 "Visit `custom-file' and delete all calls to SYMBOL from it.
3734 Leave point at the old location of the first such call, 3755 Leave point at the old location of the first such call,
3735 or (if there were none) at the end of the buffer." 3756 or (if there were none) at the end of the buffer."