comparison man/xemacs/custom.texi @ 2736:40dc584fce16

[xemacs-hg @ 2005-04-18 03:59:48 by stephent] add Xft LISP docs, minor updates <87mzrw4uft.fsf@tleepslib.sk.tsukuba.ac.jp>
author stephent
date Mon, 18 Apr 2005 04:00:10 +0000
parents f15523a6da7a
children e1bc252950d9
comparison
equal deleted inserted replaced
2735:aca6bc1933a1 2736:40dc584fce16
41 @node Minor Modes 41 @node Minor Modes
42 @section Minor Modes 42 @section Minor Modes
43 @cindex minor modes 43 @cindex minor modes
44 44
45 @cindex mode line 45 @cindex mode line
46 Minor modes are options which you can use or not. For example, Auto 46 Minor modes are common options which may be useful in many major
47 Fill mode is a minor mode in which @key{SPC} breaks lines between words 47 modes, but which may need to be enabled or disabled independently of the
48 as you type. All the minor modes are independent of each other and of 48 major mode. (This may be because user preferences for the feature vary,
49 or because the feature is sometimes more of a hindrance than an aid
50 depending on the specific content of the buffer.) For example, Auto
51 Fill mode is a minor mode in which @key{SPC} automatically breaks lines
52 between words at the right margin
53 as you type. Minor modes are independent of each other and of
49 the selected major mode. Most minor modes inform you in the mode line 54 the selected major mode. Most minor modes inform you in the mode line
50 when they are on; for example, @samp{Fill} in the mode line means that 55 when they are on; for example, @samp{Fill} in the mode line means that
51 Auto Fill mode is on. 56 Auto Fill mode is on.
52 57
53 Append @code{-mode} to the name of a minor mode to get the name of a 58 Append @code{-mode} to the name of a minor mode to get the name of a
54 command function that turns the mode on or off. Thus, the command to 59 command function that turns the mode on or off. Thus, the command to
55 enable or disable Auto Fill mode is called @kbd{M-x auto-fill-mode}. These 60 enable or disable Auto Fill mode is called @kbd{M-x auto-fill-mode}. These
56 commands are usually invoked with @kbd{M-x}, but you can bind keys to them 61 commands are usually invoked with @kbd{M-x}, but you can bind keys to them
57 if you wish. With no argument, the function turns the mode on if it was 62 if you wish. With no argument, the function turns the mode on if it was
58 off and off if it was on. This is known as @dfn{toggling}. A positive 63 off and off if it was on. This is called @dfn{toggling}. A positive
59 argument always turns the mode on, and an explicit zero argument or a 64 argument always turns the mode on, and an explicit zero argument or a
60 negative argument always turns it off. 65 negative argument always turns it off.
66
67 @c #### maybe this list should be extended and moved to its own node?
61 68
62 @cindex Auto Fill mode 69 @cindex Auto Fill mode
63 @findex auto-fill-mode 70 @findex auto-fill-mode
64 Auto Fill mode allows you to enter filled text without breaking lines 71 Auto Fill mode allows you to enter filled text without breaking lines
65 explicitly. Emacs inserts newlines as necessary to prevent lines from 72 explicitly. Emacs inserts newlines as necessary to prevent lines from
66 becoming too long. @xref{Filling}. 73 becoming too long. @xref{Filling}.
74
75 @cindex Filladapt mode
76 @findex filladapt-mode
77 Filladapt mode is an extension of Auto Fill mode which recognizes
78 @dfn{line prefixes} and automatically prepends them when automatically
79 breaking lines. Filladapt mode is smart enough to recognize common
80 idioms for bullets (e.g., leading isolated hyphens) and enumerated
81 paragraphs, and insert appropriate leading whitespace (and omit the
82 bullet!) It also does a good job of recognizing common quotation styles
83 in email. Filladapt mode must be enabled in addition to Auto Fill
84 mode. If Auto Fill mode is disabled, Filladapt mode will be
85 inactivated, but the indicator will remain in the modeline.
67 86
68 @cindex Overwrite mode 87 @cindex Overwrite mode
69 @findex overwrite-mode 88 @findex overwrite-mode
70 Overwrite mode causes ordinary printing characters to replace existing 89 Overwrite mode causes ordinary printing characters to replace existing
71 text instead of moving it to the right. For example, if point is in 90 text instead of moving it to the right. For example, if point is in
72 front of the @samp{B} in @samp{FOOBAR}, and you type a @kbd{G} in Overwrite 91 front of the @samp{B} in @samp{FOOBAR}, and you type a @kbd{G} in Overwrite
73 mode, it changes to @samp{FOOGAR}, instead of @samp{FOOGBAR}.@refill 92 mode, it changes to @samp{FOOGAR}, instead of @samp{FOOGBAR}.@refill
74 93
94 @cindex Pending Delete mode
95 @findex pending-delete-mode
96 Pending Delete mode cause buffer insertions and deletions to replace the
97 active region (with nothing, for deletions). This is the common
98 behavior in most modern programs, but conflicts with the ``lightweight
99 selections'' used in the X Window System.
100
75 @cindex Abbrev mode 101 @cindex Abbrev mode
76 @findex abbrev-mode 102 @findex abbrev-mode
77 Abbrev mode allows you to define abbreviations that automatically expand 103 Abbrev mode allows you to define abbreviations that automatically expand
78 as you type them. For example, @samp{amd} might expand to @samp{abbrev 104 as you type them. For example, @samp{amd} might expand to @samp{abbrev
79 mode}. @xref{Abbrevs}, for full information. 105 mode}. @xref{Abbrevs}, for full information.
81 @c Updated for 21.5.6 2002/03/13 sjt 107 @c Updated for 21.5.6 2002/03/13 sjt
82 @node Behaviors 108 @node Behaviors
83 @section Behaviors 109 @section Behaviors
84 @cindex behavior 110 @cindex behavior
85 111
86 Some functionality requires a fair amount of effort to enable globally 112 @dfn{Behaviors} are an alternative interface to minor modes. The toggle
87 in a session. For example, someone who discovers filladapt and really 113 interface emphasizes the case-specific nature of a minor mode: use it
114 with @emph{this} major mode but not in @emph{those} buffers. However,
115 this is inconvenient for behavior that depends on user preference.
116 For example, someone who discovers filladapt and really
88 likes it must toggle it separately in each buffer. On the other hand, 117 likes it must toggle it separately in each buffer. On the other hand,
89 after trying it for a while she might like to disable it everywhere, 118 after trying it for a while she might like to disable it everywhere,
90 having decided it doesn't work very well for her. Such a functionality 119 having decided it doesn't work very well for her.
91 is called a @dfn{behavior}. 120
92 121 Use of mode hooks will invoke the minor mode automatically in the
93 The package developer will register behaviors with XEmacs. Then the 122 future, but this is inconvenient (you must switch tasks to editing the
94 user invokes the @code{enable-behavior} and @code{disable-behavior} 123 init file) and doesn't help with existing buffers in the session. The
95 functions to enable or disable a given behavior. The behavior registry 124 behavior interface addresses this problem. The command
96 was introduced in XEmacs 21.5.6. 125 @code{enable-behavior} prompts (with completion) for a registered
97 126 behavior (denoted by a symbol), and enables it. Conversely,
98 @defun enable-behavior behavior [force] 127 @code{disable-behavior} prompts for a behavior, and disables it.
99 Called interactively, prompt the user, read a behavior symbol name with 128
100 completion for @var{behavior}, and take @var{force} from the prefix 129 @c #### This belongs in the Lispref in the description of creating
101 argument. Then enable the behavior registered under the symbol 130 @c packages or in customize or both.
102 @var{behavior}. 131
103 132 @c The package developer will register behaviors with XEmacs. Then the
104 The optional argument @var{force} is unimplemented in 21.5.6. 133 @c user invokes the @code{enable-behavior} and @code{disable-behavior}
105 @end defun 134 @c functions to enable or disable a given behavior. The behavior registry
106 135 @c was introduced in XEmacs 21.5.6.
107 @defun disable-behavior behavior [force] 136 @c
108 Called interactively, prompt the user, read a behavior symbol name with 137 @c @defun enable-behavior behavior &optionl force
109 completion for @var{behavior}, and take @var{force} from the prefix 138 @c Called interactively, prompt the user, read a behavior symbol name with
110 argument. Then disable the behavior registered under the symbol 139 @c completion for @var{behavior}, and take @var{force} from the prefix
111 @var{behavior}. 140 @c argument. Then enable the behavior registered under the symbol
112 141 @c @var{behavior}.
113 The optional argument @var{force} is unimplemented in 21.5.6. 142 @c
114 @end defun 143 @c The optional argument @var{force} is unimplemented in 21.5.6.
144 @c @end defun
145 @c
146 @c @defun disable-behavior behavior &optional force
147 @c Called interactively, prompt the user, read a behavior symbol name with
148 @c completion for @var{behavior}, and take @var{force} from the prefix
149 @c argument. Then disable the behavior registered under the symbol
150 @c @var{behavior}.
151 @c
152 @c The optional argument @var{force} is unimplemented in 21.5.6.
153 @c @end defun
115 154
116 155
117 @node Variables 156 @node Variables
118 @section Variables 157 @section Variables
119 @cindex variable 158 @cindex variable
786 file is divided into pages. Otherwise, Emacs will not notice it is 825 file is divided into pages. Otherwise, Emacs will not notice it is
787 there. The purpose is twofold: a stray @samp{Local Variables:}@: not in 826 there. The purpose is twofold: a stray @samp{Local Variables:}@: not in
788 the last page does not confuse Emacs, and Emacs never needs to search a 827 the last page does not confuse Emacs, and Emacs never needs to search a
789 long file that contains no page markers and has no local variables list. 828 long file that contains no page markers and has no local variables list.
790 829
791 You may be tempted to turn on Auto Fill mode with a local variable 830 You may be tempted to turn on minor modes like Auto Fill mode with a
792 list. That is inappropriate. Whether you use Auto Fill mode or not is 831 local variable list. That is inappropriate. Those behaviors that seem
832 appropriate for almost any personal taste, such as setting up the syntax
833 table "symbol constituent" character class, are collected into a major
834 mode. But whether you use Auto Fill mode or not is
793 a matter of personal taste, not a matter of the contents of particular 835 a matter of personal taste, not a matter of the contents of particular
794 files. If you want to use Auto Fill, set up major mode hooks with your 836 files. If you want to use Auto Fill, set up major mode hooks with your
795 init file to turn it on (when appropriate) for you alone 837 init file to turn it on (when appropriate) for you alone
796 (@pxref{Init File}). Don't try to use a local variable list that would 838 (@pxref{Init File}). Don't use a local variable list that would
797 impose your taste on everyone working with the file. 839 impose your taste on everyone working with the file.
798 840
799 XEmacs allows you to specify local variables in the first line 841 XEmacs allows you to specify local variables in the first line
800 of a file, in addition to specifying them in the @code{Local Variables} 842 of a file, in addition to specifying them in the @code{Local Variables}
801 section at the end of a file. 843 section at the end of a file.
1457 is used to specify the syntactic class of opening delimiters. Here is a 1499 is used to specify the syntactic class of opening delimiters. Here is a
1458 table of syntactic classes, with the characters that specify them. 1500 table of syntactic classes, with the characters that specify them.
1459 1501
1460 @table @samp 1502 @table @samp
1461 @item @w{-} 1503 @item @w{-}
1462 The class of whitespace characters. Please don't use the formerly 1504 The class of whitespace characters. Avoid use of the formerly
1463 advertised @w{ }, which is not supported by GNU Emacs. 1505 advertised @w{ }, because it is not supported by GNU Emacs.
1464 @item w 1506 @item w
1465 The class of word-constituent characters. 1507 The class of word-constituent characters.
1466 @item _ 1508 @item _
1467 The class of characters that are part of symbol names but not words. 1509 The class of characters that are part of symbol names but not words.
1468 This class is represented by @samp{_} because the character @samp{_} 1510 This class is represented by @samp{_} because the character @samp{_}
2144 @section X Resources 2186 @section X Resources
2145 @cindex X resources 2187 @cindex X resources
2146 @findex x-create-frame 2188 @findex x-create-frame
2147 2189
2148 Historically, XEmacs used the X resource application class @samp{Emacs} 2190 Historically, XEmacs used the X resource application class @samp{Emacs}
2149 for its resources. Unfortunately, GNU Emacs uses the same application 2191 for its resources. Unfortunately, GNU Emacs's usage of resources has
2150 class, and resources are not compatible between the two Emacsen. This 2192 evolved differently from XEmacs's, and especially in the case of fonts
2151 sharing of the application class often led to trouble if you wanted to 2193 semantics are not compatible between the two Emacsen. Thus, sharing of
2152 run both variants. 2194 the application class can easily lead to trouble.
2153 2195
2154 XEmacs now uses the X resource application class @samp{XEmacs}. 2196 XEmacs now uses the X resource application class @samp{XEmacs}.
2155 Versions since 21.5.21 normally do this without any acrobatics of code, 2197 Versions since 21.5.21 do this unconditionally. To attempt to maintain
2156 but previous versions checked the X resource database for resources 2198 some backward compatibility, previous versions checked the X resource
2157 starting in @samp{XEmacs}, and if none were found, they used 2199 database for resources starting in @samp{XEmacs}, and if none were
2158 @samp{Emacs}, for greater backward compatibility. Currently, we advise 2200 found, @samp{Emacs} was used. This behavior is likely to be obsoleted,
2159 moving your X resources to using the @samp{XEmacs} class, but if, in the 2201 so you should move your X resources to using the @samp{XEmacs} class.
2160 short term, you want to stay with the old behavior, you can start XEmacs 2202 In the short term, to stay with the old behavior, start XEmacs with the
2161 with the environment variable @b{USE_EMACS_AS_DEFAULT_APPLICATION_CLASS} 2203 environment variable @b{USE_EMACS_AS_DEFAULT_APPLICATION_CLASS} set to
2162 set to some value; this will restore the pre-21.5.21 behavior. 2204 some non-empty value; this will restore the pre-21.5.21 behavior.
2205 @c #### is this documented in the Lispref?
2206 Lisp programs can examine the variable @code{x-emacs-application-class}
2207 to determine which is being used in the running application.
2163 2208
2164 The examples in this section assume the application class is 2209 The examples in this section assume the application class is
2165 @samp{XEmacs}. From Lisp, you can examine the 2210 @samp{XEmacs}.
2166 @code{x-emacs-application-class} variable to determine which is being 2211
2167 used in the running application. 2212 Most of XEmacs's resources are set per-frame. Each XEmacs frame can
2168
2169 XEmacs' resources are generally set per-frame. Each XEmacs frame can
2170 have its own name or the same name as another, depending on the name 2213 have its own name or the same name as another, depending on the name
2171 passed to the @code{make-frame} function. Up until 21.5.21, the default 2214 passed to the @code{make-frame} function. Up until 21.5.21, the default
2172 frame name was @samp{emacs}; since then, it has been @samp{XEmacs}, but 2215 frame name was @samp{emacs}; since then, it has been @samp{XEmacs}, but
2173 in the short term the old default can be restored by the 2216 in the short term the old default can be restored by the
2174 @b{USE_EMACS_AS_DEFAULT_APPLICATION_CLASS} environment variable 2217 @b{USE_EMACS_AS_DEFAULT_APPLICATION_CLASS} environment variable
2175 mentioned above. See the docstring for the Lisp variable 2218 mentioned above.
2176 `default-frame-name'. 2219 @c #### Cheesy. Variable should be documented here.
2220 See the docstring for the Lisp variable `default-frame-name'.
2177 2221
2178 You can specify resources for all frames with the syntax: 2222 You can specify resources for all frames with the syntax:
2179 2223
2180 @example 2224 @example
2181 XEmacs*parameter: value 2225 XEmacs*parameter: value
2569 x-emacs-application-class "EmacsShell" "EmacsManager" "EmacsFrame" 2613 x-emacs-application-class "EmacsShell" "EmacsManager" "EmacsFrame"
2570 @end example 2614 @end example
2571 2615
2572 where INVOCATION-NAME is the terminal component of the name of the 2616 where INVOCATION-NAME is the terminal component of the name of the
2573 XEmacs executable (usually @samp{xemacs}), and 2617 XEmacs executable (usually @samp{xemacs}), and
2574 @samp{x-emacs-application-class} is generally @samp{Emacs}. 2618 @samp{x-emacs-application-class} is generally @samp{XEmacs}.
2575 2619
2576 @node Menubar Resources 2620 @node Menubar Resources
2577 @subsection Menubar Resources 2621 @subsection Menubar Resources
2578 2622
2579 As the menubar is implemented as a widget which is not a part of XEmacs 2623 As the menubar is implemented as a widget which is not a part of XEmacs