comparison man/custom.texi @ 136:b980b6286996 r20-2b2

Import from CVS: tag r20-2b2
author cvs
date Mon, 13 Aug 2007 09:31:12 +0200
parents 34a5b81f86ba
children 538048ae2ab8
comparison
equal deleted inserted replaced
135:4636a6841cd6 136:b980b6286996
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.89 16 Version: 1.84
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
496 @item :options 495 @item :options
497 @var{value} should be a list of possible members of the specified type. 496 @var{value} should be a list of possible members of the specified type.
498 For hooks, this is a list of function names. 497 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
539 @end table 498 @end table
540 499
541 @xref{Sexp Types,,,widget,The Widget Library}, for information about 500 @xref{Sexp Types,,,widget,The Widget Library}, for information about
542 widgets to use together with the @code{:type} keyword. 501 widgets to use together with the @code{:type} keyword.
543 @end defun 502 @end defun
604 Should be one of @code{light} or @code{dark}. 563 Should be one of @code{light} or @code{dark}.
605 @end table 564 @end table
606 565
607 Internally, custom uses the symbol property @code{factory-face} for the 566 Internally, custom uses the symbol property @code{factory-face} for the
608 program specified default face properties, @code{saved-face} for 567 program specified default face properties, @code{saved-face} for
609 properties saved by the user, and @code{face-documentation} for the 568 properties saved by the user, and @code{face-doc-string} for the
610 documentation string.@refill 569 documentation string.@refill
611 570
612 @end defun 571 @end defun
613 572
614 @node Usage for Package Authors, , Declaring Faces, Declarations 573 @node Usage for Package Authors, , Declaring Faces, Declarations
673 @node Wishlist, , The Init File, Top 632 @node Wishlist, , The Init File, Top
674 @comment node-name, next, previous, up 633 @comment node-name, next, previous, up
675 @section Wishlist 634 @section Wishlist
676 635
677 @itemize @bullet 636 @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
678 @item 642 @item
679 Better support for keyboard operations in the customize buffer. 643 Better support for keyboard operations in the customize buffer.
680 644
681 @item 645 @item
682 Integrate with @file{w3} so you can customization buffers with much 646 Integrate with @file{w3} so you can customization buffers with much
697 661
698 @item 662 @item
699 Make it possible to append to `choice', `radio', and `set' options. 663 Make it possible to append to `choice', `radio', and `set' options.
700 664
701 @item 665 @item
666 Make it possible to customize code, for example to enable or disable a
667 global minor mode.
668
669 @item
702 Ask whether set or modified variables should be saved in 670 Ask whether set or modified variables should be saved in
703 @code{kill-buffer-hook}. 671 @code{kill-buffer-hook}.
704 672
705 Ditto for @code{kill-emacs-query-functions}. 673 Ditto for @code{kill-emacs-query-functions}.
706 674
719 687
720 @item 688 @item
721 Make it possible to include a comment/remark/annotation when saving an 689 Make it possible to include a comment/remark/annotation when saving an
722 option. 690 option.
723 691
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
750 @end itemize 692 @end itemize
751 693
752 @contents 694 @contents
753 @bye 695 @bye