comparison man/custom.texi @ 134:34a5b81f86ba r20-2b1

Import from CVS: tag r20-2b1
author cvs
date Mon, 13 Aug 2007 09:30:11 +0200
parents 9b50b4588a93
children b980b6286996
comparison
equal deleted inserted replaced
133:b27e67717092 134:34a5b81f86ba
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.89
17 17
18 @menu 18 @menu
19 * Introduction:: 19 * Introduction::
20 * User Commands:: 20 * User Commands::
21 * The Customization Buffer:: 21 * The Customization Buffer::
490 The following additional @var{keyword}'s are defined: 490 The following additional @var{keyword}'s are defined:
491 491
492 @table @code 492 @table @code
493 @item :type 493 @item :type
494 @var{value} should be a widget type. 494 @var{value} should be a widget type.
495
495 @item :options 496 @item :options
496 @var{value} should be a list of possible members of the specified type. 497 @var{value} should be a list of possible members of the specified type.
497 For hooks, this is a list of function names. 498 For hooks, this is a list of function names.
499
500 @item :initialize
501 @var{value} should be a function used to initialize the variable. It
502 takes two arguments, the symbol and value given in the @code{defcustom} call.
503 Some predefined functions are:
504
505 @table @code
506 @item custom-initialize-set
507 Use the @code{:set} method to initialize the variable. Do not
508 initialize it if already bound. This is the default @code{:initialize}
509 method.
510
511 @item custom-initialize-default
512 Always use @code{set-default} to initialize the variable, even if a
513 @code{:set} method has been specified.
514
515 @item custom-initialize-reset
516 If the variable is already bound, reset it by calling the @code{:set}
517 method with the value returned by the @code{:get} method.
518
519 @item custom-initialize-changed
520 Like @code{custom-initialize-reset}, but use @code{set-default} to
521 initialize the variable if it is not bound and has not been set
522 already.
523 @end table
524
525 @item :set
526 @var{value} should be a function to set the value of the symbol. It
527 takes two arguments, the symbol to set and the value to give it. The
528 default is @code{set-default}.
529
530 @item :get
531 @var{value} should be a function to extract the value of symbol. The
532 function takes one argument, a symbol, and should return the current
533 value for that symbol. The default is @code{default-value}.
534
535 @item :require
536 @var{value} should be a feature symbol. Each feature will be required
537 after initialization, of the the user have saved this option.
538
498 @end table 539 @end table
499 540
500 @xref{Sexp Types,,,widget,The Widget Library}, for information about 541 @xref{Sexp Types,,,widget,The Widget Library}, for information about
501 widgets to use together with the @code{:type} keyword. 542 widgets to use together with the @code{:type} keyword.
502 @end defun 543 @end defun
563 Should be one of @code{light} or @code{dark}. 604 Should be one of @code{light} or @code{dark}.
564 @end table 605 @end table
565 606
566 Internally, custom uses the symbol property @code{factory-face} for the 607 Internally, custom uses the symbol property @code{factory-face} for the
567 program specified default face properties, @code{saved-face} for 608 program specified default face properties, @code{saved-face} for
568 properties saved by the user, and @code{face-doc-string} for the 609 properties saved by the user, and @code{face-documentation} for the
569 documentation string.@refill 610 documentation string.@refill
570 611
571 @end defun 612 @end defun
572 613
573 @node Usage for Package Authors, , Declaring Faces, Declarations 614 @node Usage for Package Authors, , Declaring Faces, Declarations
632 @node Wishlist, , The Init File, Top 673 @node Wishlist, , The Init File, Top
633 @comment node-name, next, previous, up 674 @comment node-name, next, previous, up
634 @section Wishlist 675 @section Wishlist
635 676
636 @itemize @bullet 677 @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 678 @item
643 Better support for keyboard operations in the customize buffer. 679 Better support for keyboard operations in the customize buffer.
644 680
645 @item 681 @item
646 Integrate with @file{w3} so you can customization buffers with much 682 Integrate with @file{w3} so you can customization buffers with much
661 697
662 @item 698 @item
663 Make it possible to append to `choice', `radio', and `set' options. 699 Make it possible to append to `choice', `radio', and `set' options.
664 700
665 @item 701 @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 702 Ask whether set or modified variables should be saved in
671 @code{kill-buffer-hook}. 703 @code{kill-buffer-hook}.
672 704
673 Ditto for @code{kill-emacs-query-functions}. 705 Ditto for @code{kill-emacs-query-functions}.
674 706
687 719
688 @item 720 @item
689 Make it possible to include a comment/remark/annotation when saving an 721 Make it possible to include a comment/remark/annotation when saving an
690 option. 722 option.
691 723
724 @item
725 Add some direct support for meta variables, i.e. make it possible to
726 specify that this variable should be reset when that variable is
727 changed.
728
729 @item
730 Add tutorial.
731
732 @item
733 Describe the @code{:type} syntax in this manual.
734
735 @item
736 Find a place is this manual for the following text:
737
738 @strong{Radio vs. Buttons}
739
740 Use a radio if you can't find a good way to describe the item in the
741 choice menu text. I.e. it is better to use a radio if you expect the
742 user would otherwise manually select each item from the choice menu in
743 turn to see what it expands too.
744
745 Avoid radios if some of the items expands to complex structures.
746
747 I mostly use radios when most of the items are of type
748 @code{function-item} or @code{variable-item}.
749
692 @end itemize 750 @end itemize
693 751
694 @contents 752 @contents
695 @bye 753 @bye