annotate man/new-users-guide/custom2.texi @ 4760:217abcf015c4

sys_subshell() is needed for WIndows native builds
author Vin Shelton <acs@xemacs.org>
date Thu, 19 Nov 2009 18:21:06 -0500
parents f43f9ca6c7d9
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1 @comment node-name, next, previous, up
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2 @node Other Customizations, Select and Move, Files, Top
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
3 @chapter Other Customizations
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
4 @cindex customize
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
5 @cindex hook
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
6 @cindex font-lock-mode
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
7
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
8 You can modify the behavior of Emacs in minor ways permanently by
462
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents: 440
diff changeset
9 putting your changes in your @file{init.el} file. This file contains Lisp
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
10 function call expressions. Each of these expressions will consist of a
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
11 function name followed by arguments, all surrounded by parentheses. For
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
12 example, to turn on the auto-fill-mode (i.e. break lines automatically
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
13 when they become too long) , put the following line in your
462
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents: 440
diff changeset
14 @file{init.el} file:
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
15
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
16 @example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
17 (add-hook 'text-mode-hook
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
18 '(lambda() (auto-fill-mode 1)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
19 @end example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
20
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
21 @noindent
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
22 Emacs has a function named "turn-on-auto-fill" which is defined as
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
23 "(lambda() (auto-fill-mode 1))". Therefore you can also write the above
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
24 as:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
25
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
26 @example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
27 (add-hook 'text-mode-hook 'turn-on-auto-fill)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
28 @end example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
29
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
30 @noindent
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
31 Emacs provides a number of hooks for the sake of customization. The hook
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
32 variables contain list of functions to be called with no arguments. To
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
33 turn on the auto-fill-mode, add the appropriate hook as shown in the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
34 example above.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
35
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
36 Similarly, to enable the "font-lock mode" which displays your program in
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
37 different fonts and colors(@pxref{Modes}), put the following in your
462
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents: 440
diff changeset
38 @file{init.el} file. The comments above the statement explain what the
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
39 statements do.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
40
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
41 @example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
42 ;;; enables the font-lock-mode in Lisp Mode
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
43 (add-hook 'lisp-mode-hook 'turn-on-font-lock)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
44
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
45 ;;; enables the font-lock-mode in Texinfo Mode
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
46 (add-hook 'texinfo-mode-hook 'turn-on-font-lock)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
47
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
48 ;;; enables the font-lock mode in C Mode
440
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 428
diff changeset
49 (add-hook 'c-mode-hook 'turn-on-font-lock)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
50 @end example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
51
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
52 To turn on the font-lock mode in other Major Modes like emacs-lisp, just
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
53 put the name of the mode with "-hook" appended to it as the middle
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
54 parameter in the above examples. You can also select the color that the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
55 functions, comments or other keywords should be displayed in :
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
56
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
57 @example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
58 ;;; the function names will now be displayed in blue color
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
59 (set-face-foreground 'font-lock-function-name-face "blue")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
60
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
61 ;;; the comments will be displayed in forest green
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
62 (set-face-foreground 'font-lock-comment-face "forest green")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
63 @end example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
64
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
65 @noindent
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
66 For other customizations regarding the font-lock face, look at the file
462
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents: 440
diff changeset
67 @file{/usr/local/lib/xemacs-VERSION/etc/sample.init.el}.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
68
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
69
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
70
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
71 @comment node-name, next, previous, up
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
72 @menu
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
73 * Setting Variables:: Customizing Emacs variables
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
74 * Init File:: Some examples of Lisp expressions in
462
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents: 440
diff changeset
75 init.el file
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
76 @end menu
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
77
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
78 @node Setting Variables, Init File, Other Customizations, Other Customizations
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
79 @section Other Customizations
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
80 @cindex setting variables
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
81 @findex describe-variable
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
82
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
83 In XEmacs, @dfn{variables} are used for internal record-keeping and
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
84 customizations. There are some variables called "options" which you can
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
85 use for customizations. To examine a variable use:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
86
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
87 @example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
88 ;;; print the value and documentation of the variable, use either of the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
89 ;;; following commands
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
90 C-h v
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
91 M-x describe variable
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
92 @end example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
93
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
94 After you type any of the above commands, you will be prompted for a
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
95 variable name in the @dfn{echo area}. Type in the name of the variable,
1738
f43f9ca6c7d9 [xemacs-hg @ 2003-10-10 12:39:27 by stephent]
stephent
parents: 1648
diff changeset
96 for example, type @code{case-fold-search} @key{RET}
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
97 Your window will split into two and you will see the following message
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
98 in that window:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
99
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
100 @example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
101 case-fold-search's value is t
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
102 This value is specific to the current buffer.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
103
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
104 Documentation:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
105 *Non-nil if searches should ignore case.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
106 Automatically becomes buffer-local when set in any fashion.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
107
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
108 @end example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
109
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
110 @noindent
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
111 Since this variable's value is 't' searches will ignore case. If you
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
112 want case-sensitive-search (i.e. if you are searching for "Foo" and you do
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
113 not want "foo" to be included in the search, you need to set this
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
114 variable to "nil". In order to do that, use:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
115
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
116 @findex set-variable
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
117 @example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
118 M-x set-variable
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
119 @end example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
120
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
121 @noindent
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
122 Emacs will prompt you for the variable which you wish to set. Type in
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
123 "case-fold-search" and hit @key{RET}. You will see the following
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
124 message:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
125
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
126 @example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
127 Set case-fold-search to value:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
128 @end example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
129
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
130 @noindent
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
131 Type "nil" and hit @key{RET}. Now if you again use @kbd{M-x describe
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
132 variable} , you will see that the new value of case-fold-search will be
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
133 "nil" and your searches will be case-sensitive. This will be effective
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
134 only for that Emacs session. If you want to change the value of a
462
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents: 440
diff changeset
135 variable permanently put the following statement in your @file{init.el}
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
136 file :
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
137
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
138 @example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
139 (setq case-fold-search nil)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
140 @end example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
141
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
142 @noindent
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
143 This statement will make searches case-sensitive only in the current
462
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents: 440
diff changeset
144 buffer which is the @file{init.el} file. This will not be very useful. To
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
145 make searches case-sensitive globally in all buffers, use:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
146
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
147 @example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
148 (setq-default case-fold-search nil)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
149 @end example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
150
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
151 If you want to change the value of any other variable, use :
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
152
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
153 @example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
154 (setq <variable-name> <new value>)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
155 @end example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
156
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
157 @noindent
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
158 "setq" will assign the "new value" to the "variable-name" .
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
159
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
160
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
161 If you want a list of the "options" i.e. the variables available for
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
162 customization type:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
163
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
164 @findex list-options
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
165 @findex edit-options
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
166 @example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
167
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
168 ;;; displays a buffer listing names, values and documentation of options
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
169 M-x list-options
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
170
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
171 ;;; displays options and allows you to edit those list of options
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
172 M-x edit-options
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
173
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
174 @end example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
175
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
176 @noindent
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
177 Try these options. If you are using edit-options to edit a variable,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
178 just point at the variable you wish to edit and use one of the following
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
179 commands:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
180
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
181 @table @b
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
182 @item 1
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
183 Set the value of the variable to t (non-nil).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
184 @item 0
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
185 Set the value of the variable to nil.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
186 @item n
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
187 Move to the next variable.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
188 @item p
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
189 Move to the previous variable.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
190 @end table
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
191
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
192
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
193 There are some other options available to make the value of a variable
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
194 local to a buffer and then to switch to its global value. You can also
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
195 have a @dfn{local variables list} in a file which specifies the values
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
196 to use for certain Emacs variables when you edit that
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
197 file. @xref{Variables,,,xemacs,XEmacs User's Manual}, for information on
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
198 these options.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
199
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
200
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
201 @comment node-name, next, previous, up
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
202 @node Init File, , Setting Variables, Other Customizations
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
203 @section Init File Examples
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
204 @cindex init file examples
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
205
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
206 For customizing Emacs, you need to put Lisp expressions in your
462
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents: 440
diff changeset
207 @file{init.el} file. The following are some useful Lisp expressions. If
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents: 440
diff changeset
208 you find any of them useful, just type them in your @file{init.el} file:
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
209
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
210 @itemize @bullet
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
211 @item
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
212 The following expression will make @key{TAB} in C mode insert a real tab
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
213 character if the cursor or point is in the middle of the line. Now
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
214 hitting the @key{TAB} key will indent a line only if the cursor is at
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
215 the left margin or in the line's indentation:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
216
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
217 @example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
218 (setq c-tab-always-indent nil)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
219 @end example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
220
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
221 @noindent
1738
f43f9ca6c7d9 [xemacs-hg @ 2003-10-10 12:39:27 by stephent]
stephent
parents: 1648
diff changeset
222 The value of the variable @code{c-tab-always-indent} is usually @samp{t}
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
223 for @samp{true}. When this variable is true, then hitting the @key{TAB}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
224 key always indents the current line.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
225
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
226 @item
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
227 This expression will turn on the @var{auto-fill-mode} when you are in
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
228 text mode:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
229
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
230 @example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
231 (setq text-mode-hook 'turn-on-auto-fill)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
232 @end example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
233
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
234 This mode will automatically break lines when you type a space so that
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
235 the lines don't become too long. The length of the lines is controlled
1738
f43f9ca6c7d9 [xemacs-hg @ 2003-10-10 12:39:27 by stephent]
stephent
parents: 1648
diff changeset
236 by the variable @code{fill-column}. You can set this variable to a value
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
237 you wish. Look at the documentation for this variable to see its default
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
238 value. To change the value to 75 for example, use:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
239
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
240 @vindex fill-column
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
241 @example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
242 (setq-default fill-column 75)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
243 @end example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
244
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
245 @noindent
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
246 This will change the value of this variable globally.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
247
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
248 @item
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
249 @findex eval-expression
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
250 The following expression will enable the use of @var{eval-expression}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
251 without confirmation:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
252
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
253 @example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
254 (put 'eval-expression 'disabled nil)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
255 @end example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
256
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
257 @noindent
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
258 Now when you use @var{eval-expression}, it will print the value of the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
259 expression you specify in the @dfn{echo area} without confirming with
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
260 you.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
261
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
262 @item
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
263 This expression will remove the binding of @kbd{C-x C-c}, because its
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
264 easy to hit this key by mistake and you will exit Emacs
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
265 unintentionally. You can use the @b{Exit Emacs} option from the @b{File}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
266 menu to exit Emacs.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
267
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
268 @example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
269 (global-set-key "\C-x\C-c" nil)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
270 @end example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
271
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
272 @noindent
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
273 Now if you type @kbd{C-x C-c}, you won't exit Emacs.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
274
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
275 @item
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
276 The following expression will make the @key{BACKSPACE} and the @key{DEL}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
277 key work in the same manner:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
278
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
279 @example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
280 (global-set-key 'backspace [delete])
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
281 @end example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
282
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
283 @item
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
284 This expression will make searches case sensitive:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
285
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
286 @example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
287 (setq-default case-fold-search nil)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
288 @end example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
289
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
290 @noindent
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
291 If we use "setq" instead of "setq-default" then searches will be
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
292 case-sensitive only in the current buffer's local value. In this case the
462
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents: 440
diff changeset
293 buffer would be the @file{init.el} file. Since this would not be too
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
294 helpful and we want to have case-sensitive searches in all buffers, we
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
295 have to use "setq-default".
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
296
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
297 @item
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
298 This expression will enable the font-lock mode when you are using
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
299 texinfo mode:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
300
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
301 @example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
302 (add-hook 'texinfo-mode-hook 'turn-on-font-lock)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
303 @end example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
304
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
305 @noindent
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
306 @xref{Minor Modes}, for information on font-lock mode.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
307
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
308 @item
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
309 Rebinds the key @kbd{C-x l} to run the function
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
310 @code{make-symbolic-link}:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
311
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
312 @example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
313 (global-set-key "\C-xl" 'make-symbolic-link)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
314 @end example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
315
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
316 @noindent
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
317 We use the single quote before "make-symbolic-link" because its a
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
318 function name. You can also use the following expression which does the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
319 same thing:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
320
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
321 @example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
322 (define-key global-map "C-xl" 'make-symbolic-link)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
323 @end example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
324
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
325 @item
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
326 The following expression will bind @kbd{C-x l} to run the function
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
327 @code{make-symbolic-link} in C mode only:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
328
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
329 @example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
330 (define-key c-mode-map "C-xl" 'make-symbolic-link)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
331 @end example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
332
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
333 @noindent
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
334 Instead of binding @kbd{C-xl} to run @code{make-symbolic-link}, you can
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
335 bind the @key{F1} key to run this function:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
336
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
337 @example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
338 (define-key c-mode-map 'f1 'make-symbolic-link)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
339 @end example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
340
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
341 @noindent
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
342 Here, you have to use lower case for naming function keys like @key{F1}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
343
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
344 @item
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
345 You can bind the function @code{undo} i.e. @kbd{C-x u} to any key, for
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
346 example to @key{F2}:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
347
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
348 @example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
349 (global-set-key 'f2 'undo)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
350 @end example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
351
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
352 @item
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
353 The following statement will display the current time in the modeline of
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
354 the buffer:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
355
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
356 @vindex display-time
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
357 @cindex displaying time
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
358 @example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
359 (display-time)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
360 @end example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
361
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
362 @item
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
363 This displays the current line number on which the cursor is present in
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
364 the modeline:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
365
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
366 @example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
367 (setq line-number-mode t)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
368 @end example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
369
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
370 @item
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
371 If you don't want the text to be highlighted when you use commands for
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
372 marking regions so as to use the @dfn{kill} and @dfn{yank} commands
462
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents: 440
diff changeset
373 later, you can use the following expression in your @file{init.el} file:
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
374
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
375 @vindex zmacs-regions
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
376 @example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
377 (setq zmacs-regions nil)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
378 @end example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
379
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
380 @noindent
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
381 Now if you use a command like @kbd{C-x C-p} (@code{mark-page}), the text
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
382 will not be highlighted.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
383
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
384 @item
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
385 To control the number of buffers listed when you select the @b{Buffers}
1738
f43f9ca6c7d9 [xemacs-hg @ 2003-10-10 12:39:27 by stephent]
stephent
parents: 1648
diff changeset
386 menu, you need to set the variable @code{buffers-menu-max-size} to
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
387 whatever value you wish. For example, if you want 20 buffers to be listed
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
388 when you select @b{Buffers} use:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
389
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
390 @vindex buffers-menu-max-size
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
391 @example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
392 (setq buffers-menu-max-size 20)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
393 @end example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
394
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
395 @item
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
396 If you want the window title area to display the full directory/name of
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
397 the current buffer's file, and not just the name, use:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
398
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
399 @vindex frame-title-format
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
400 @example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
401 (setq frame-title-format "%S: %f")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
402 @end example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
403
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
404 @item
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
405 To get rid of the menu, use :
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
406
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
407 @example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
408 (set-menubar nil)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
409 @end example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
410
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
411 @item
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
412 If you want an extensive menu-bar use the following expression in your
462
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents: 440
diff changeset
413 @file{init.el} file.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
414
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
415 @example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
416 (load "big-menubar")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
417 @end example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
418
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
419 @noindent
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
420 If you want to write your own menus, you can look at some of the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
421 examples in
1648
712931b4b71d [xemacs-hg @ 2003-08-27 18:06:54 by youngs]
youngs
parents: 462
diff changeset
422 @file{/usr/local/lib/xemacs/xemacs-packages/lisp/edit-utils/big-menubar.el} file.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
423
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
424 @end itemize
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
425
462
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents: 440
diff changeset
426 For more information on initializing your @file{init.el} file,
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
427 @xref{Init File,,,xemacs,XEmacs User's Manual}. You should also look at
462
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents: 440
diff changeset
428 @file{/usr/local/lib/xemacs-VERSION/etc/sample.init.el}, which is a sample
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents: 440
diff changeset
429 @file{init.el} file. It contains some of the commonly desired
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
430 customizations in Emacs.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
431
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
432
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
433
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
434
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
435
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
436
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
437
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
438
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
439
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
440
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
441