comparison man/custom.texi @ 149:538048ae2ab8 r20-3b1

Import from CVS: tag r20-3b1
author cvs
date Mon, 13 Aug 2007 09:36:16 +0200
parents b980b6286996
children 25f70ba0133c
comparison
equal deleted inserted replaced
148:f659db2a1f73 149:538048ae2ab8
11 11
12 @node Top, Introduction, (dir), (dir) 12 @node Top, Introduction, (dir), (dir)
13 @comment node-name, next, previous, up 13 @comment node-name, next, previous, up
14 @top The Customization Library 14 @top The Customization Library
15 15
16 Version: 1.84 16 Version: 1.97
17 17
18 @menu 18 @menu
19 * Introduction:: 19 * Introduction::
20 * User Commands:: 20 * User Commands::
21 * The Customization Buffer:: 21 * The Customization Buffer::
74 Create a customization buffer containing a single face. 74 Create a customization buffer containing a single face.
75 75
76 @item customize-apropos 76 @item customize-apropos
77 Create a customization buffer containing all variables, faces, and 77 Create a customization buffer containing all variables, faces, and
78 groups that match a user specified regular expression. 78 groups that match a user specified regular expression.
79 @end table 79
80 @item customize-saved
81 Create a customization buffer containing all variables and faces that
82 have been saved with customize.
83
84 @item customize-customized
85 Create a customization buffer containing all variables and faces that
86 have been customized but not saved.
87 @end table
88
89 You can also set variables without creating a customization buffer.
90
91 @deffn Command customize-set-variable var val
92 Set the default for @var{variable} to @var{value}.
93 @var{value} is a Lisp object.
94
95 If @var{variable} has a @code{custom-set} property, that is used for setting
96 @var{variable}, otherwise @code{set-default} is used.
97
98 The @code{customized-value} property of the @var{variable} will be set
99 to a list with a quoted @var{value} as its sole list member.
100
101 If @var{variable} has a @code{variable-interactive} property, that is
102 used as if it were the arg to `interactive' (which see) to interactively
103 read the value.
104
105 If @var{variable} has a @code{custom-type} property, it must be a widget
106 and the @code{:prompt-value} property of that widget will be used for
107 reading the value.
108 @end deffn
109
110 All variables that have been set either from a customization buffer or
111 with @code{customize-set-variable} can be saved with the command
112 @code{custom-save-customized}.
113
114 @deffn Command custom-save-customized
115 Save all variables that have been set with customize in this session.
116 @end deffn
117
80 118
81 @node The Customization Buffer, Declarations, User Commands, Top 119 @node The Customization Buffer, Declarations, User Commands, Top
82 @comment node-name, next, previous, up 120 @comment node-name, next, previous, up
83 @section The Customization Buffer. 121 @section The Customization Buffer.
84 122
490 The following additional @var{keyword}'s are defined: 528 The following additional @var{keyword}'s are defined:
491 529
492 @table @code 530 @table @code
493 @item :type 531 @item :type
494 @var{value} should be a widget type. 532 @var{value} should be a widget type.
533
495 @item :options 534 @item :options
496 @var{value} should be a list of possible members of the specified type. 535 @var{value} should be a list of possible members of the specified type.
497 For hooks, this is a list of function names. 536 For hooks, this is a list of function names.
537
538 @item :initialize
539 @var{value} should be a function used to initialize the variable. It
540 takes two arguments, the symbol and value given in the @code{defcustom} call.
541 Some predefined functions are:
542
543 @table @code
544 @item custom-initialize-set
545 Use the @code{:set} method to initialize the variable. Do not
546 initialize it if already bound. This is the default @code{:initialize}
547 method.
548
549 @item custom-initialize-default
550 Always use @code{set-default} to initialize the variable, even if a
551 @code{:set} method has been specified.
552
553 @item custom-initialize-reset
554 If the variable is already bound, reset it by calling the @code{:set}
555 method with the value returned by the @code{:get} method.
556
557 @item custom-initialize-changed
558 Like @code{custom-initialize-reset}, but use @code{set-default} to
559 initialize the variable if it is not bound and has not been set
560 already.
561 @end table
562
563 @item :set
564 @var{value} should be a function to set the value of the symbol. It
565 takes two arguments, the symbol to set and the value to give it. The
566 default is @code{set-default}.
567
568 @item :get
569 @var{value} should be a function to extract the value of symbol. The
570 function takes one argument, a symbol, and should return the current
571 value for that symbol. The default is @code{default-value}.
572
573 @item :require
574 @var{value} should be a feature symbol. Each feature will be required
575 after initialization, of the the user have saved this option.
576
498 @end table 577 @end table
499 578
500 @xref{Sexp Types,,,widget,The Widget Library}, for information about 579 @xref{Sexp Types,,,widget,The Widget Library}, for information about
501 widgets to use together with the @code{:type} keyword. 580 widgets to use together with the @code{:type} keyword.
502 @end defun 581 @end defun
561 @item background 640 @item background
562 (what color is used for the background text)@* 641 (what color is used for the background text)@*
563 Should be one of @code{light} or @code{dark}. 642 Should be one of @code{light} or @code{dark}.
564 @end table 643 @end table
565 644
566 Internally, custom uses the symbol property @code{factory-face} for the 645 Internally, custom uses the symbol property @code{face-defface-spec} for
567 program specified default face properties, @code{saved-face} for 646 the program specified default face properties, @code{saved-face} for
568 properties saved by the user, and @code{face-doc-string} for the 647 properties saved by the user, and @code{face-documentation} for the
569 documentation string.@refill 648 documentation string.@refill
570 649
571 @end defun 650 @end defun
572 651
573 @node Usage for Package Authors, , Declaring Faces, Declarations 652 @node Usage for Package Authors, , Declaring Faces, Declarations
632 @node Wishlist, , The Init File, Top 711 @node Wishlist, , The Init File, Top
633 @comment node-name, next, previous, up 712 @comment node-name, next, previous, up
634 @section Wishlist 713 @section Wishlist
635 714
636 @itemize @bullet 715 @itemize @bullet
637 @item
638 The menu items should be grayed out when the information is
639 missing. I.e. if a variable doesn't have a factory setting, the user
640 should not be allowed to select the @samp{Factory} menu item.
641
642 @item 716 @item
643 Better support for keyboard operations in the customize buffer. 717 Better support for keyboard operations in the customize buffer.
644 718
645 @item 719 @item
646 Integrate with @file{w3} so you can customization buffers with much 720 Integrate with @file{w3} so you can customization buffers with much
661 735
662 @item 736 @item
663 Make it possible to append to `choice', `radio', and `set' options. 737 Make it possible to append to `choice', `radio', and `set' options.
664 738
665 @item 739 @item
666 Make it possible to customize code, for example to enable or disable a
667 global minor mode.
668
669 @item
670 Ask whether set or modified variables should be saved in 740 Ask whether set or modified variables should be saved in
671 @code{kill-buffer-hook}. 741 @code{kill-buffer-hook}.
672 742
673 Ditto for @code{kill-emacs-query-functions}. 743 Ditto for @code{kill-emacs-query-functions}.
674 744
687 757
688 @item 758 @item
689 Make it possible to include a comment/remark/annotation when saving an 759 Make it possible to include a comment/remark/annotation when saving an
690 option. 760 option.
691 761
762 @item
763 Add some direct support for meta variables, i.e. make it possible to
764 specify that this variable should be reset when that variable is
765 changed.
766
767 @item
768 Add tutorial.
769
770 @item
771 Describe the @code{:type} syntax in this manual.
772
773 @item
774 Find a place is this manual for the following text:
775
776 @strong{Radio vs. Buttons}
777
778 Use a radio if you can't find a good way to describe the item in the
779 choice menu text. I.e. it is better to use a radio if you expect the
780 user would otherwise manually select each item from the choice menu in
781 turn to see what it expands too.
782
783 Avoid radios if some of the items expands to complex structures.
784
785 I mostly use radios when most of the items are of type
786 @code{function-item} or @code{variable-item}.
787
788 @item
789 Update customize buffers when @code{custom-set-variable} or
790 @code{custom-save-customized} is called.
791
792 @item
793 Better handling of saved but uninitialized items.
794
692 @end itemize 795 @end itemize
693 796
694 @contents 797 @contents
695 @bye 798 @bye