Sync up with r21-2-27.
[chise/xemacs-chise.git] / info / xemacs-faq.info-3
1 This is Info file ../info/xemacs-faq.info, produced by Makeinfo version
2 1.68 from the input file xemacs-faq.texi.
3
4 INFO-DIR-SECTION XEmacs Editor
5 START-INFO-DIR-ENTRY
6 * FAQ: (xemacs-faq).            XEmacs FAQ.
7 END-INFO-DIR-ENTRY
8
9 \1f
10 File: xemacs-faq.info,  Node: Q3.0.5,  Next: Q3.0.6,  Prev: Q3.0.4,  Up: Customization
11
12 Q3.0.5: How to check if a lisp function is defined?
13 ---------------------------------------------------
14
15    Use the following elisp:
16
17      (fboundp 'foo)
18
19    It's almost always a mistake to test `emacs-version' or any similar
20 variables.
21
22    Instead, use feature-tests, such as `featurep', `boundp', `fboundp',
23 or even simple behavioral tests, eg.:
24
25      (defvar foo-old-losing-code-p
26        (condition-case nil (progn (losing-code t) nil)
27          (wrong-number-of-arguments t)))
28
29    There is an incredible amount of broken code out there which could
30 work much better more often in more places if it did the above instead
31 of trying to divine its environment from the value of one variable.
32
33 \1f
34 File: xemacs-faq.info,  Node: Q3.0.6,  Next: Q3.0.7,  Prev: Q3.0.5,  Up: Customization
35
36 Q3.0.6: Can I force the output of `(face-list)' to a buffer?
37 ------------------------------------------------------------
38
39    It would be good having it in a buffer, as the output of
40 `(face-list)' is too wide to fit to a minibuffer.
41
42    Evaluate the expression in the `*scratch*' buffer with point after
43 the rightmost paren and typing `C-j'.
44
45    If the minibuffer smallness is the only problem you encounter, you
46 can simply press `C-h l' to get the former minibuffer contents in a
47 buffer.
48
49 \1f
50 File: xemacs-faq.info,  Node: Q3.0.7,  Next: Q3.0.8,  Prev: Q3.0.6,  Up: Customization
51
52 Q3.0.7: Font selections in don't get saved after `Save Options'.
53 ----------------------------------------------------------------
54
55    For XEmacs 19.14 and previous:
56
57    John Mann <mannj@ll.mit.edu> writes:
58
59      You have to go to Options->Frame Appearance and unselect
60      `Frame-Local Font Menu'.  If this option is selected, font changes
61      are only applied to the *current* frame and do *not* get saved
62      when you save options.
63
64    For XEmacs 19.15 and later:
65
66    Implement the above as well as set the following in your `.emacs'
67
68      (setq options-save-faces t)
69
70 \1f
71 File: xemacs-faq.info,  Node: Q3.0.8,  Next: Q3.0.9,  Prev: Q3.0.7,  Up: Customization
72
73 Q3.0.8: How do I get a single minibuffer frame?
74 -----------------------------------------------
75
76    Vin Shelton <acs@acm.org> writes:
77
78      (setq initial-frame-plist '(minibuffer nil))
79      (setq default-frame-plist '(minibuffer nil))
80      (setq default-minibuffer-frame
81            (make-frame
82             '(minibuffer only
83                     width 86
84                     height 1
85                     menubar-visible-p nil
86                     default-toolbar-visible-p nil
87                     name "minibuffer"
88                     top -2
89                     left -2
90                     has-modeline-p nil)))
91      (frame-notice-user-settings)
92
93    *Please note:* The single minibuffer frame may not be to everyone's
94 taste, and there any number of other XEmacs options settings that may
95 make it difficult or inconvenient to use.
96
97 \1f
98 File: xemacs-faq.info,  Node: Q3.0.9,  Next: Q3.1.1,  Prev: Q3.0.8,  Up: Customization
99
100 Q3.0.9: What is `Customize'?
101 ----------------------------
102
103    Starting with XEmacs 20.2 there is new system 'Customize' for
104 customizing XEmacs options.
105
106    You can access `Customize' from the `Options' menu or invoking one
107 of customize commands by typing eg.  `M-x customize', `M-x
108 customize-face', `M-x customize-variable' or `M-x customize-apropos'.
109
110    Starting with XEmacs 20.3 there is also new `browser' mode for
111 Customize.  Try it out with `M-x customize-browse'
112
113 \1f
114 File: xemacs-faq.info,  Node: Q3.1.1,  Next: Q3.1.2,  Prev: Q3.0.9,  Up: Customization
115
116 3.1: X Window System & Resources
117 ================================
118
119 Q3.1.1: Where is a list of X resources?
120 ---------------------------------------
121
122    Search through the `NEWS' file for `X Resources'.  A fairly
123 comprehensive list is given after it.
124
125    In addition, an `app-defaults' file is supplied, `etc/Emacs.ad'
126 listing the defaults.  The file `etc/sample.Xdefaults' gives a set of
127 defaults that you might consider.  It is essentially the same as
128 `etc/Emacs.ad' but some entries are slightly altered.  Be careful about
129 installing the contents of this file into your `.Xdefaults' or
130 `.Xresources' file if you use GNU Emacs under X11 as well.
131
132 \1f
133 File: xemacs-faq.info,  Node: Q3.1.2,  Next: Q3.1.3,  Prev: Q3.1.1,  Up: Customization
134
135 Q3.1.2: How can I detect a color display?
136 -----------------------------------------
137
138    You can test the return value of the function `(device-class)', as
139 in:
140
141      (when (eq (device-class) 'color)
142        (set-face-foreground  'font-lock-comment-face "Grey")
143        (set-face-foreground  'font-lock-string-face  "Red")
144        ....
145        )
146
147 \1f
148 File: xemacs-faq.info,  Node: Q3.1.3,  Next: Q3.1.4,  Prev: Q3.1.2,  Up: Customization
149
150 Q3.1.3: [This question intentionally left blank]
151 ------------------------------------------------
152
153 \1f
154 File: xemacs-faq.info,  Node: Q3.1.4,  Next: Q3.1.5,  Prev: Q3.1.3,  Up: Customization
155
156 Q3.1.4: [This question intentionally left blank]
157 ------------------------------------------------
158
159 \1f
160 File: xemacs-faq.info,  Node: Q3.1.5,  Next: Q3.1.6,  Prev: Q3.1.4,  Up: Customization
161
162 Q3.1.5: How can I get the icon to just say `XEmacs'?
163 ----------------------------------------------------
164
165    I'd like the icon to just say `XEmacs', and not include the name of
166 the current file in it.
167
168    Add the following line to your `.emacs':
169
170      (setq frame-icon-title-format "XEmacs")
171
172 \1f
173 File: xemacs-faq.info,  Node: Q3.1.6,  Next: Q3.1.7,  Prev: Q3.1.5,  Up: Customization
174
175 Q3.1.6: How can I have the window title area display the full path?
176 -------------------------------------------------------------------
177
178    I'd like to have the window title area display the full
179 directory/name of the current buffer file and not just the name.
180
181    Add the following line to your `.emacs':
182
183      (setq frame-title-format "%S: %f")
184
185    A more sophisticated title might be:
186
187      (setq frame-title-format
188            '("%S: " (buffer-file-name "%f"
189                                  (dired-directory dired-directory "%b"))))
190
191    That is, use the file name, or the dired-directory, or the buffer
192 name.
193
194 \1f
195 File: xemacs-faq.info,  Node: Q3.1.7,  Next: Q3.1.8,  Prev: Q3.1.6,  Up: Customization
196
197 Q3.1.7: `xemacs -name junk' doesn't work?
198 -----------------------------------------
199
200    When I run `xterm -name junk', I get an xterm whose class name
201 according to xprop, is `junk'.  This is the way it's supposed to work,
202 I think.  When I run `xemacs -name junk' the class name is not set to
203 `junk'.  It's still `emacs'.  What does `xemacs -name' really do?  The
204 reason I ask is that my window manager (fvwm) will make a window sticky
205 and I use XEmacs to read my mail.  I want that XEmacs window to be
206 sticky, without having to use the window manager's function to set the
207 window sticky.  What gives?
208
209    `xemacs -name' sets the application name for the program (that is,
210 the thing which normally comes from `argv[0]').  Using `-name' is the
211 same as making a copy of the executable with that new name.  The
212 `WM_CLASS' property on each frame is set to the frame-name, and the
213 application-class.  So, if you did `xemacs -name FOO' and then created
214 a frame named BAR, you'd get an X window with WM_CLASS = `( "BAR",
215 "Emacs")'.  However, the resource hierarchy for this widget would be:
216
217      Name:    FOO   .shell             .container   .BAR
218      Class:   Emacs .TopLevelEmacsShell.EmacsManager.EmacsFrame
219
220    instead of the default
221
222      Name:    xemacs.shell             .container   .emacs
223      Class:   Emacs .TopLevelEmacsShell.EmacsManager.EmacsFrame
224
225    It is arguable that the first element of WM_CLASS should be set to
226 the application-name instead of the frame-name, but I think that's less
227 flexible, since it does not give you the ability to have multiple frames
228 with different WM_CLASS properties.  Another possibility would be for
229 the default frame name to come from the application name instead of
230 simply being `emacs'.  However, at this point, making that change would
231 be troublesome: it would mean that many users would have to make yet
232 another change to their resource files (since the default frame name
233 would suddenly change from `emacs' to `xemacs', or whatever the
234 executable happened to be named), so we'd rather avoid it.
235
236    To make a frame with a particular name use:
237
238      (make-frame '((name . "the-name")))
239
240 \1f
241 File: xemacs-faq.info,  Node: Q3.1.8,  Next: Q3.2.1,  Prev: Q3.1.7,  Up: Customization
242
243 Q3.1.8: `-iconic' doesn't work.
244 -------------------------------
245
246    When I start up XEmacs using `-iconic' it doesn't work right.  Using
247 `-unmapped' on the command line, and setting the `initiallyUnmapped' X
248 Resource don't seem to help much either...
249
250    Ben Wing <ben@xemacs.org> writes:
251
252      Ugh, this stuff is such an incredible mess that I've about given up
253      getting it to work.  The principal problem is numerous
254      window-manager bugs...
255
256 \1f
257 File: xemacs-faq.info,  Node: Q3.2.1,  Next: Q3.2.2,  Prev: Q3.1.8,  Up: Customization
258
259 3.2: Textual Fonts & Colors
260 ===========================
261
262 Q3.2.1: How can I set color options from `.emacs'?
263 --------------------------------------------------
264
265    How can I set the most commonly used color options from my `.emacs'
266 instead of from my `.Xdefaults'?
267
268    Like this:
269
270      (set-face-background 'default      "bisque") ; frame background
271      (set-face-foreground 'default      "black") ; normal text
272      (set-face-background 'zmacs-region "red") ; When selecting w/
273                                         ; mouse
274      (set-face-foreground 'zmacs-region "yellow")
275      (set-face-font       'default      "*courier-bold-r*120-100-100*")
276      (set-face-background 'highlight    "blue") ; Ie when selecting
277                                         ; buffers
278      (set-face-foreground 'highlight    "yellow")
279      (set-face-background 'modeline     "blue") ; Line at bottom
280                                         ; of buffer
281      (set-face-foreground 'modeline     "white")
282      (set-face-font       'modeline     "*bold-r-normal*140-100-100*")
283      (set-face-background 'isearch      "yellow") ; When highlighting
284                                         ; while searching
285      (set-face-foreground 'isearch      "red")
286      (setq x-pointer-foreground-color   "black") ; Adds to bg color,
287                                         ; so keep black
288      (setq x-pointer-background-color   "blue") ; This is color
289                                         ; you really
290                                         ; want ptr/crsr
291
292 \1f
293 File: xemacs-faq.info,  Node: Q3.2.2,  Next: Q3.2.3,  Prev: Q3.2.1,  Up: Customization
294
295 Q3.2.2: How do I set the text, menu and modeline fonts?
296 -------------------------------------------------------
297
298    Note that you should use `Emacs.' and not `Emacs*' when setting face
299 values.
300
301    In `.Xdefaults':
302
303      Emacs.default.attributeFont:  -*-*-medium-r-*-*-*-120-*-*-m-*-*-*
304      Emacs*menubar*font:           fixed
305      Emacs.modeline.attributeFont: fixed
306
307    This is confusing because modeline is a face, and can be found listed
308 with all faces in the current mode by using `M-x set-face-font (enter)
309 ?'.  It uses the face specification of `attributeFont', while menubar
310 is a normal X thing that uses the specification `font'.  With Motif it
311 may be necessary to use `fontList' instead of `font'.
312
313 \1f
314 File: xemacs-faq.info,  Node: Q3.2.3,  Next: Q3.2.4,  Prev: Q3.2.2,  Up: Customization
315
316 Q3.2.3: How can I set the colors when highlighting a region?
317 ------------------------------------------------------------
318
319    How can I set the background/foreground colors when highlighting a
320 region?
321
322    You can change the face `zmacs-region' either in your `.Xdefaults':
323
324      Emacs.zmacs-region.attributeForeground: firebrick
325      Emacs.zmacs-region.attributeBackground: lightseagreen
326
327    or in your `.emacs':
328
329      (set-face-background 'zmacs-region "red")
330      (set-face-foreground 'zmacs-region "yellow")
331
332 \1f
333 File: xemacs-faq.info,  Node: Q3.2.4,  Next: Q3.2.5,  Prev: Q3.2.3,  Up: Customization
334
335 Q3.2.4: How can I limit color map usage?
336 ----------------------------------------
337
338    I'm using Netscape (or another color grabber like XEmacs); is there
339 anyway to limit the number of available colors in the color map?
340
341    XEmacs 19.13 didn't have such a mechanism (unlike netscape, or other
342 color-hogs).  One solution is to start XEmacs prior to netscape, since
343 this will prevent Netscape from grabbing all colors (but Netscape will
344 complain).  You can use the flags for Netscape, like -mono, -ncols <#>
345 or -install (for mono, limiting to <#> colors, or for using a private
346 color map).  Since Netscape will take the entire colormap and never
347 release it, the only reasonable way to run it is with `-install'.
348
349    If you have the money, another solution would be to use a truecolor
350 or direct color video.
351
352    Starting with XEmacs 19.14, XEmacs uses the closest available color
353 if the colormap is full, so it's O.K. now to start Netscape first.
354
355 \1f
356 File: xemacs-faq.info,  Node: Q3.2.5,  Next: Q3.2.6,  Prev: Q3.2.4,  Up: Customization
357
358 Q3.2.5: My tty supports color, but XEmacs doesn't use them.
359 -----------------------------------------------------------
360
361    XEmacs tries to automatically determine whether your tty supports
362 color, but sometimes guesses wrong.  In that case, you can make XEmacs
363 Do The Right Thing using this Lisp code:
364
365      (if (eq 'tty (device-type))
366          (set-device-class nil 'color))
367
368 \1f
369 File: xemacs-faq.info,  Node: Q3.2.6,  Next: Q3.3.1,  Prev: Q3.2.5,  Up: Customization
370
371 Q3.2.6: Can I have pixmap backgrounds in XEmacs?
372 ------------------------------------------------
373
374    Juan Villacis <jvillaci@wahnsinnig.extreme.indiana.edu> writes:
375
376      There are several ways to do it.  For example, you could specify a
377      default pixmap image to use in your `~/.Xresources', e.g.,
378
379             Emacs*EmacsFrame.default.attributeBackgroundPixmap: /path/to/image.xpm
380
381      and then reload ~/.Xresources and restart XEmacs.  Alternatively,
382      since each face can have its own pixmap background, a better way
383      would be to set a face's pixmap within your XEmacs init file, e.g.,
384
385             (set-face-background-pixmap 'default "/path/to/image.xpm")
386             (set-face-background-pixmap 'bold    "/path/to/another_image.xpm")
387
388      and so on.  You can also do this interactively via `M-x
389      edit-faces'.
390
391
392 3.3: The Modeline
393 =================
394
395 \1f
396 File: xemacs-faq.info,  Node: Q3.3.1,  Next: Q3.3.2,  Prev: Q3.2.6,  Up: Customization
397
398 Q3.3.1: How can I make the modeline go away?
399 --------------------------------------------
400
401      (set-specifier has-modeline-p nil)
402
403    Starting with XEmacs 19.14 the modeline responds to mouse clicks, so
404 if you haven't liked or used the modeline in the past, you might want to
405 try the new version out.
406
407 \1f
408 File: xemacs-faq.info,  Node: Q3.3.2,  Next: Q3.3.3,  Prev: Q3.3.1,  Up: Customization
409
410 Q3.3.2: How do you have XEmacs display the line number in the modeline?
411 -----------------------------------------------------------------------
412
413    Add the following line to your `.emacs' file to display the line
414 number:
415
416      (line-number-mode 1)
417
418    Use the following to display the column number:
419
420      (column-number-mode 1)
421
422    Or select from the `Options' menu
423 `Customize->Emacs->Editing->Basics->Line Number Mode' and/or
424 `Customize->Emacs->Editing->Basics->Column Number Mode'
425
426    Or type `M-x customize <RET> editing-basics <RET>'.
427
428 \1f
429 File: xemacs-faq.info,  Node: Q3.3.3,  Next: Q3.3.4,  Prev: Q3.3.2,  Up: Customization
430
431 Q3.3.3: How do I get XEmacs to put the time of day on the modeline?
432 -------------------------------------------------------------------
433
434    Add the following line to your `.emacs' file to display the time:
435
436      (display-time)
437
438    See `Customize' from the `Options' menu for customization.
439
440 \1f
441 File: xemacs-faq.info,  Node: Q3.3.4,  Next: Q3.3.5,  Prev: Q3.3.3,  Up: Customization
442
443 Q3.3.4: How do I turn off current chapter from AUC TeX modeline?
444 ----------------------------------------------------------------
445
446    With AUC TeX, fast typing is hard because the current chapter,
447 section etc. are given in the modeline.  How can I turn this off?
448
449    It's not AUC TeX, it comes from `func-menu' in `func-menu.el'.  Add
450 this code to your `.emacs' to turn it off:
451
452      (setq fume-display-in-modeline-p nil)
453
454    Or just add a hook to `TeX-mode-hook' to turn it off only for TeX
455 mode:
456
457      (add-hook 'TeX-mode-hook
458           '(lambda () (setq fume-display-in-modeline-p nil)))
459
460    David Hughes <dhughes@origin-at.co.uk> writes:
461
462      If you have 19.14 or later, try this instead; you'll still get the
463      function name displayed in the modeline, but it won't attempt to
464      keep track when you modify the file. To refresh when it gets out
465      of synch, you simply need click on the `Rescan Buffer' option in
466      the function-menu.
467
468           (setq-default fume-auto-rescan-buffer-p nil)
469
470 \1f
471 File: xemacs-faq.info,  Node: Q3.3.5,  Next: Q3.4.1,  Prev: Q3.3.4,  Up: Customization
472
473 Q3.3.5: How can one change the modeline color based on the mode used?
474 ---------------------------------------------------------------------
475
476    You can use something like the following:
477
478      (add-hook 'lisp-mode-hook
479                (lambda ()
480                  (set-face-background 'modeline "red" (current-buffer))))
481
482    Then, when editing a Lisp file (i.e. when in Lisp mode), the modeline
483 colors change from the default set in your `.emacs'.  The change will
484 only be made in the buffer you just entered (which contains the Lisp
485 file you are editing) and will not affect the modeline colors anywhere
486 else.
487
488    Notes:
489
490    * The hook is the mode name plus `-hook'.  eg. c-mode-hook,
491      c++-mode-hook, emacs-lisp-mode-hook (used for your `.emacs' or a
492      `xx.el' file), lisp-interaction-mode-hook (the `*scratch*'
493      buffer), text-mode-hook, etc.
494
495    * Be sure to use `add-hook', not `(setq c-mode-hook xxxx)',
496      otherwise you will erase anything that anybody has already put on
497      the hook.
498
499    * You can also do `(set-face-font 'modeline FONT)', eg.
500      `(set-face-font 'modeline "*bold-r-normal*140-100-100*"
501      (current-buffer))' if you wish the modeline font to vary based on
502      the current mode.
503
504    This works in 19.15 as well, but there are additional modeline faces,
505 `modeline-buffer-id', `modeline-mousable', and
506 `modeline-mousable-minor-mode', which you may want to customize.
507
508 \1f
509 File: xemacs-faq.info,  Node: Q3.4.1,  Next: Q3.4.2,  Prev: Q3.3.5,  Up: Customization
510
511 3.4: Multiple Device Support
512 ============================
513
514 Q3.4.1: How do I open a frame on another screen of my multi-headed display?
515 ---------------------------------------------------------------------------
516
517    The support for this was revamped for 19.14.  Use the command `M-x
518 make-frame-on-display'.  This command is also on the File menu in the
519 menubar.
520
521    XEmacs 19.14 and later also have the command `make-frame-on-tty'
522 which will establish a connection to any tty-like device.  Opening the
523 TTY devices should be left to `gnuclient', though.
524
525 \1f
526 File: xemacs-faq.info,  Node: Q3.4.2,  Next: Q3.5.1,  Prev: Q3.4.1,  Up: Customization
527
528 Q3.4.2: Can I really connect to a running XEmacs after calling up over a modem?  How?
529 -------------------------------------------------------------------------------------
530
531    If you're not running at least XEmacs 19.14, you can't.  Otherwise
532 check out the `gnuattach' program supplied with XEmacs.  Starting with
533 XEmacs 20.3, `gnuattach' and `gnudoit' functionality is provided by
534 `gnuclient'.
535
536    Also *Note Q5.0.12::.
537
538 \1f
539 File: xemacs-faq.info,  Node: Q3.5.1,  Next: Q3.5.2,  Prev: Q3.4.2,  Up: Customization
540
541 3.5: The Keyboard
542 =================
543
544 Q3.5.1: How can I bind complex functions (or macros) to keys?
545 -------------------------------------------------------------
546
547    As an example, say you want the `paste' key on a Sun keyboard to
548 insert the current Primary X selection at point. You can accomplish this
549 with:
550
551      (define-key global-map [f18] 'x-insert-selection)
552
553    However, this only works if there is a current X selection (the
554 selection will be highlighted).  The functionality I like is for the
555 `paste' key to insert the current X selection if there is one,
556 otherwise insert the contents of the clipboard.  To do this you need to
557 pass arguments to `x-insert-selection'.  This is done by wrapping the
558 call in a 'lambda form:
559
560      (global-set-key [f18]
561        (lambda () (interactive) (x-insert-selection t nil)))
562
563    This binds the f18 key to a "generic" functional object.  The
564 interactive spec is required because only interactive functions can be
565 bound to keys.
566
567    For the FAQ example you could use:
568
569      (global-set-key [(control ?.)]
570        (lambda () (interactive) (scroll-up 1)))
571      (global-set-key [(control ?                ;)]
572                           (lambda () (interactive) (scroll-up -1)))
573
574    This is fine if you only need a few functions within the lambda body.
575 If you're doing more it's cleaner to define a separate function as in
576 question 3.5.3 (*note Q3.5.3::.).
577
578 \1f
579 File: xemacs-faq.info,  Node: Q3.5.2,  Next: Q3.5.3,  Prev: Q3.5.1,  Up: Customization
580
581 Q3.5.2: How can I stop down-arrow from adding empty lines to the bottom of my buffers?
582 --------------------------------------------------------------------------------------
583
584    Add the following line to your `.emacs' file:
585
586      (setq next-line-add-newlines nil)
587
588    This has been the default setting in XEmacs for some time.
589
590 \1f
591 File: xemacs-faq.info,  Node: Q3.5.3,  Next: Q3.5.4,  Prev: Q3.5.2,  Up: Customization
592
593 Q3.5.3: How do I bind C-. and C-; to scroll one line up and down?
594 -----------------------------------------------------------------
595
596    Add the following (Thanks to Richard Mlynarik <mly@adoc.xerox.com>
597 and Wayne Newberry <wayne@zen.cac.stratus.com>) to `.emacs':
598
599      (defun scroll-up-one-line ()
600        (interactive)
601        (scroll-up 1))
602      
603      (defun scroll-down-one-line ()
604        (interactive)
605        (scroll-down 1))
606      
607      (global-set-key [(control ?.)] 'scroll-up-one-line) ; C-.
608      (global-set-key [(control ?                ;)] 'scroll-down-one-line) ; C-;
609
610    The key point is that you can only bind simple functions to keys; you
611 can not bind a key to a function that you're also passing arguments to.
612 (*note Q3.5.1::. for a better answer).
613
614 \1f
615 File: xemacs-faq.info,  Node: Q3.5.4,  Next: Q3.5.5,  Prev: Q3.5.3,  Up: Customization
616
617 Q3.5.4: Globally binding `Delete'?
618 ----------------------------------
619
620    I cannot manage to globally bind my `Delete' key to something other
621 than the default.  How does one do this?
622
623      (defun foo ()
624        (interactive)
625        (message "You hit DELETE"))
626      
627      (global-set-key 'delete 'foo)
628
629    However, some modes explicitly bind `Delete', so you would need to
630 add a hook that does `local-set-key' for them.  If what you want to do
631 is make the Backspace and Delete keys work more PC/Motif-like, then
632 take a look at the `delbs.el' package.
633
634    New in XEmacs 19.14 is a variable called `key-translation-map' which
635 makes it easier to bind `Delete'.  `delbs.el' is a good example of how
636 to do this correctly.
637
638    Also *Note Q3.5.10::.
639
640 \1f
641 File: xemacs-faq.info,  Node: Q3.5.5,  Next: Q3.5.6,  Prev: Q3.5.4,  Up: Customization
642
643 Q3.5.5: Scrolling one line at a time.
644 -------------------------------------
645
646    Can the cursor keys scroll the screen a line at a time, rather than
647 the default half page jump?  I tend it to find it disorienting.
648
649    Try this:
650
651      (defun scroll-one-line-up (&optional arg)
652        "Scroll the selected window up (forward in the text) one line (or N lines)."
653        (interactive "p")
654        (scroll-up (or arg 1)))
655      
656      (defun scroll-one-line-down (&optional arg)
657        "Scroll the selected window down (backward in the text) one line (or N)."
658        (interactive "p")
659        (scroll-down (or arg 1)))
660      
661      (global-set-key [up]   'scroll-one-line-up)
662      (global-set-key [down] 'scroll-one-line-down)
663
664    The following will also work but will affect more than just the
665 cursor keys (i.e. `C-n' and `C-p'):
666
667      (setq scroll-step 1)
668
669    Starting with XEmacs-20.3 you can also change this with Customize.
670 Select from the `Options' menu
671 `Customize->Emacs->Environment->Windows->Scroll Step...' or type `M-x
672 customize <RET> windows <RET>'.
673
674 \1f
675 File: xemacs-faq.info,  Node: Q3.5.6,  Next: Q3.5.7,  Prev: Q3.5.5,  Up: Customization
676
677 Q3.5.6: How to map `Help' key alone on Sun type4 keyboard?
678 ----------------------------------------------------------
679
680    The following works in GNU Emacs 19:
681
682      (global-set-key [help] 'help-command);; Help
683
684    The following works in XEmacs 19.15 with the addition of shift:
685
686      (global-set-key [(shift help)] 'help-command);; Help
687
688    But it doesn't work alone.  This is in the file `PROBLEMS' which
689 should have come with your XEmacs installation: *Emacs ignores the
690 `help' key when running OLWM*.
691
692    OLWM grabs the `help' key, and retransmits it to the appropriate
693 client using `XSendEvent'.  Allowing Emacs to react to synthetic events
694 is a security hole, so this is turned off by default.  You can enable
695 it by setting the variable `x-allow-sendevents' to t.  You can also
696 cause fix this by telling OLWM to not grab the help key, with the null
697 binding `OpenWindows.KeyboardCommand.Help:'.
698
699 \1f
700 File: xemacs-faq.info,  Node: Q3.5.7,  Next: Q3.5.8,  Prev: Q3.5.6,  Up: Customization
701
702 Q3.5.7: How can you type in special characters in XEmacs?
703 ---------------------------------------------------------
704
705    One way is to use the package `x-compose'.  Then you can use
706 sequences like `Compose " a' to get Ã¤, etc.
707
708    Another way is to use the `iso-insert' package, provided in XEmacs
709 19.15 and later. Then you can use sequences like `C-x 8 " a' to get Ã¤,
710 etc.
711
712    Glynn Clements <glynn@sensei.co.uk> writes:
713
714      It depends upon your X server.
715
716      Generally, the simplest way is to define a key as Multi_key with
717      xmodmap, e.g.
718                 xmodmap -e 'keycode 0xff20 = Multi_key'
719
720      You will need to pick an appropriate keycode. Use xev to find out
721      the keycodes for each key.
722
723      [NB: On a `Windows' keyboard, recent versions of XFree86
724      automatically define the right `Windows' key as Multi_key'.]
725
726      Once you have Multi_key defined, you can use e.g.
727                 Multi a '       => Ã¡
728                 Multi e "       => Ã«
729                 Multi c ,       => Ã§
730
731      etc.
732
733      Also, recent versions of XFree86 define various AltGr-<key>
734      combinations as dead keys, i.e.
735                 AltGr [         => dead_diaeresis
736                 AltGr ]         => dead_tilde
737                 AltGr ;         => dead_acute
738      etc.
739
740      Running `xmodmap -pk' will list all of the defined keysyms.
741
742 \1f
743 File: xemacs-faq.info,  Node: Q3.5.8,  Next: Q3.5.9,  Prev: Q3.5.7,  Up: Customization
744
745 Q3.5.8: Why does `(global-set-key [delete-forward] 'delete-char)' complain?
746 ---------------------------------------------------------------------------
747
748    Why does `(define-key global-map [ delete-forward ] 'delete-char)'
749 complain of not being able to bind an unknown key?
750
751    Try this instead:
752
753      (define-key global-map [delete_forward] 'delete-char)
754
755    and it will work.
756
757    What you are seeing above is a bug due to code that is trying to
758 check for GNU Emacs syntax like:
759
760    (define-key global-map [C-M-a] 'delete-char)
761
762    which otherwise would cause no errors but would not result in the
763 expected behavior.
764
765    This bug has been fixed in 19.14.
766
767 \1f
768 File: xemacs-faq.info,  Node: Q3.5.9,  Next: Q3.5.10,  Prev: Q3.5.8,  Up: Customization
769
770 Q3.5.9: How do I make the Delete key delete forward?
771 ----------------------------------------------------
772
773    With XEmacs-20.2 use the `delbs' package:
774
775      (require 'delbs)
776
777    This will give you the functions `delbs-enable-delete-forward' to
778 set things up, and `delbs-disable-delete-forward' to revert to "normal"
779 behavior.  Note that `delbackspace' package is obsolete.
780
781    Starting with XEmacs-20.3 better solution is to set variable
782 `delete-key-deletes-forward' to t.  You can also change this with
783 Customize. Select from the `Options' menu
784 `Customize->Emacs->Editing->Basics->Delete Key Deletes Forward' or type
785 `M-x customize <RET> editing-basics <RET>'.
786
787    Also *Note Q3.5.4::.
788
789 \1f
790 File: xemacs-faq.info,  Node: Q3.5.10,  Next: Q3.5.11,  Prev: Q3.5.9,  Up: Customization
791
792 Q3.5.10: Can I turn on "sticky" modifier keys?
793 ----------------------------------------------
794
795    Yes, with `(setq modifier-keys-are-sticky t)'.  This will give the
796 effect of being able to press and release Shift and have the next
797 character typed come out in upper case.  This will affect all the other
798 modifier keys like Control and Meta as well.
799
800    Ben Wing <ben@xemacs.org> writes:
801
802      One thing about the sticky modifiers is that if you move the mouse
803      out of the frame and back in, it cancels all currently "stuck"
804      modifiers.
805
806 \1f
807 File: xemacs-faq.info,  Node: Q3.5.11,  Next: Q3.6.1,  Prev: Q3.5.10,  Up: Customization
808
809 Q3.5.11: How do I map the arrow keys?
810 -------------------------------------
811
812    Say you want to map `C-<right>' to forward-word:
813
814    Sam Steingold <sds@usa.net> writes:
815
816           ; both XEmacs and Emacs
817           (define-key global-map [(control right)] 'forward-word)
818      or
819           ; Emacs only
820           (define-key global-map [C-right] 'forward-word)
821      or
822           ; ver > 20, both
823           (define-key global-map (kbd "C-<right>") 'forward-word)
824
825 \1f
826 File: xemacs-faq.info,  Node: Q3.6.1,  Next: Q3.6.2,  Prev: Q3.5.11,  Up: Customization
827
828 3.6: The Cursor
829 ===============
830
831 Q3.6.1: Is there a way to make the bar cursor thicker?
832 ------------------------------------------------------
833
834    I'd like to have the bar cursor a little thicker, as I tend to
835 "lose" it often.
836
837    For a 1 pixel bar cursor, use:
838
839      (setq bar-cursor t)
840
841    For a 2 pixel bar cursor, use:
842
843      (setq bar-cursor 'anything-else)
844
845    Starting with XEmacs-20.3 you can also change these with Customize.
846 Select from the `Options' menu
847 `Customize->Emacs->Environment->Display->Bar Cursor...' or type `M-x
848 customize <RET> display <RET>'.
849
850    You can use a color to make it stand out better:
851
852      Emacs*cursorColor: Red
853
854 \1f
855 File: xemacs-faq.info,  Node: Q3.6.2,  Next: Q3.6.3,  Prev: Q3.6.1,  Up: Customization
856
857 Q3.6.2: Is there a way to get back the block cursor?
858 ----------------------------------------------------
859
860      (setq bar-cursor nil)
861
862    Starting with XEmacs-20.3 you can also change this with Customize.
863 Select from the `Options' menu
864 `Customize->Emacs->Environment->Display->Bar Cursor...' or type `M-x
865 customize <RET> display <RET>'.
866
867 \1f
868 File: xemacs-faq.info,  Node: Q3.6.3,  Next: Q3.7.1,  Prev: Q3.6.2,  Up: Customization
869
870 Q3.6.3: Can I make the cursor blink?
871 ------------------------------------
872
873    If you are running a version of XEmacs older than 19.14, no.
874 Otherwise you can do the following:
875
876      (blink-cursor-mode)
877
878    This function toggles between a steady cursor and a blinking cursor.
879 You may also set this mode from the menu bar by selecting `Options =>
880 Frame Appearance => Blinking Cursor'.  Remember to save options.
881
882 \1f
883 File: xemacs-faq.info,  Node: Q3.7.1,  Next: Q3.7.2,  Prev: Q3.6.3,  Up: Customization
884
885 3.7: The Mouse and Highlighting
886 ===============================
887
888 Q3.7.1: How can I turn off Mouse pasting?
889 -----------------------------------------
890
891    I keep hitting the middle mouse button by accident and getting stuff
892 pasted into my buffer so how can I turn this off?
893
894    Here is an alternative binding, whereby the middle mouse button
895 selects (but does not cut) the expression under the mouse. Clicking
896 middle on a left or right paren will select to the matching one.  Note
897 that you can use `define-key' or `global-set-key'.
898
899      (defun mouse-set-point-and-select (event)
900        "Sets the point at the mouse location, then marks following form"
901        (interactive "@e")
902        (mouse-set-point event)
903        (mark-sexp 1))
904      (define-key global-map [button2] 'mouse-set-point-and-select)
905
906 \1f
907 File: xemacs-faq.info,  Node: Q3.7.2,  Next: Q3.7.3,  Prev: Q3.7.1,  Up: Customization
908
909 Q3.7.2: How do I set control/meta/etc modifiers on mouse buttons?
910 -----------------------------------------------------------------
911
912    Use, for instance, `[(meta button1)]'. For example, here is a common
913 setting for Common Lisp programmers who use the bundled `ilisp'
914 package, whereby meta-button1 on a function name will find the file
915 where the function name was defined, and put you at that location in
916 the source file.
917
918    [Inside a function that gets called by the lisp-mode-hook and
919 ilisp-mode-hook]
920
921      (local-set-key [(meta button1)] 'edit-definitions-lisp)
922
923 \1f
924 File: xemacs-faq.info,  Node: Q3.7.3,  Next: Q3.7.4,  Prev: Q3.7.2,  Up: Customization
925
926 Q3.7.3: Clicking the left button does not do anything in buffer list.
927 ---------------------------------------------------------------------
928
929    I do `C-x C-b' to get a list of buffers and the entries get
930 highlighted when I move the mouse over them but clicking the left mouse
931 does not do anything.
932
933    Use the middle mouse button.
934
935 \1f
936 File: xemacs-faq.info,  Node: Q3.7.4,  Next: Q3.7.5,  Prev: Q3.7.3,  Up: Customization
937
938 Q3.7.4: How can I get a list of buffers when I hit mouse button 3?
939 ------------------------------------------------------------------
940
941    The following code will replace the default popup on button3:
942
943      (global-set-key [button3] 'popup-buffer-menu)
944
945 \1f
946 File: xemacs-faq.info,  Node: Q3.7.5,  Next: Q3.7.6,  Prev: Q3.7.4,  Up: Customization
947
948 Q3.7.5: Why does cut-and-paste not work between XEmacs and a cmdtool?
949 ---------------------------------------------------------------------
950
951    We don't know.  It's a bug.  There does seem to be a work-around,
952 however.  Try running xclipboard first.  It appears to fix the problem
953 even if you exit it.  (This should be mostly fixed in 19.13, but we
954 haven't yet verified that).
955
956 \1f
957 File: xemacs-faq.info,  Node: Q3.7.6,  Next: Q3.7.7,  Prev: Q3.7.5,  Up: Customization
958
959 Q3.7.6: How I can set XEmacs up so that it pastes where the text cursor is?
960 ---------------------------------------------------------------------------
961
962    By default XEmacs pastes X selections where the mouse pointer is.
963 How do I disable this?
964
965    Examine the function `mouse-yank', by typing `C-h f mouse-yank
966 <RET>'.
967
968    To get XEmacs to paste at the text cursor, add this your `.emacs':
969
970      (setq mouse-yank-at-point t)
971
972    Starting with XEmacs-20.2 you can also change this with Customize.
973 Select from the `Options' menu `Customize->Emacs->Editing->Mouse->Yank
974 At Point...' or type `M-x customize <RET> mouse <RET>'.
975
976 \1f
977 File: xemacs-faq.info,  Node: Q3.7.7,  Next: Q3.7.8,  Prev: Q3.7.6,  Up: Customization
978
979 Q3.7.7: How do I select a rectangular region?
980 ---------------------------------------------
981
982    Just select the region normally, then use the rectangle commands
983 (e.g.  `kill-rectangle' on it.  The region does not highlight as a
984 rectangle, but the commands work just fine.
985
986    To actually sweep out rectangular regions with the mouse you can use
987 `mouse-track-do-rectangle' which is assigned to `M-button1'.  Then use
988 rectangle commands.
989
990    You can also do the following to change default behavior to sweep out
991 rectangular regions:
992
993      (setq mouse-track-rectangle-p t)
994
995    Starting with XEmacs-20.2 you can also change this with Customize.
996 Select from the `Options' menu `Customize->Emacs->Editing->Mouse->Track
997 Rectangle...' or type `M-x customize <RET> mouse <RET>'.
998
999       mouse-track-do-rectangle: (event)
1000         -- an interactive compiled Lisp function.
1001       Like `mouse-track' but selects rectangles instead of regions.
1002
1003 \1f
1004 File: xemacs-faq.info,  Node: Q3.7.8,  Next: Q3.8.1,  Prev: Q3.7.7,  Up: Customization
1005
1006 Q3.7.8: Why does `M-w' take so long?
1007 ------------------------------------
1008
1009    It actually doesn't.  It leaves the region visible for a second so
1010 that you can see what area is being yanked.  If you start working,
1011 though, it will immediately complete its operation.  In other words, it
1012 will only delay for a second if you let it.
1013
1014 \1f
1015 File: xemacs-faq.info,  Node: Q3.8.1,  Next: Q3.8.2,  Prev: Q3.7.8,  Up: Customization
1016
1017 3.8: The Menubar and Toolbar
1018 ============================
1019
1020 Q3.8.1: How do I get rid of the menu (or menubar)?
1021 --------------------------------------------------
1022
1023    If you are running XEmacs 19.13 and earlier, add this command to your
1024 `.emacs'.
1025
1026      (set-menubar nil)
1027
1028    Starting with XEmacs 19.14 the preferred method is:
1029
1030      (set-specifier menubar-visible-p nil)
1031
1032 \1f
1033 File: xemacs-faq.info,  Node: Q3.8.2,  Next: Q3.8.3,  Prev: Q3.8.1,  Up: Customization
1034
1035 Q3.8.2: Can I customize the basic menubar?
1036 ------------------------------------------
1037
1038    For an extensive menubar, add this line to your `.emacs':
1039
1040      (load "big-menubar")
1041
1042    If you'd like to write your own, this file provides as good a set of
1043 examples as any to start from.  The file is located in
1044 `lisp/packages/big-menubar.el' in the XEmacs installation directory.
1045
1046 \1f
1047 File: xemacs-faq.info,  Node: Q3.8.3,  Next: Q3.8.4,  Prev: Q3.8.2,  Up: Customization
1048
1049 Q3.8.3: How do I control how many buffers are listed in the menu `Buffers List'?
1050 --------------------------------------------------------------------------------
1051
1052    Add the following to your `.emacs' (suit to fit):
1053
1054      (setq buffers-menu-max-size 20)
1055
1056    For no limit, use an argument of `nil'.
1057
1058    Starting with XEmacs-20.3 you can also change this with Customize.
1059 Select from the `Options' menu
1060 `Customize->Emacs->Environment->Menu->Buffers Menu->Max Size...' or
1061 type `M-x customize <RET> buffers-menu <RET>'.
1062
1063 \1f
1064 File: xemacs-faq.info,  Node: Q3.8.4,  Next: Q3.8.5,  Prev: Q3.8.3,  Up: Customization
1065
1066 Q3.8.4: Resources like `Emacs*menubar*font' are not working?
1067 ------------------------------------------------------------
1068
1069    I am trying to use a resource like `Emacs*menubar*font' to set the
1070 font of the menubar but it's not working.
1071
1072    If you are using the real Motif menubar, this resource is not
1073 recognized; you have to say:
1074
1075      Emacs*menubar*fontList: FONT
1076
1077    If you are using the Lucid menubar, the former resource will be
1078 recognized only if the latter resource is unset.  This means that the
1079 resource
1080
1081      *fontList: FONT
1082
1083    will override
1084
1085      Emacs*menubar*font: FONT
1086
1087    even though the latter is more specific.
1088
1089 \1f
1090 File: xemacs-faq.info,  Node: Q3.8.5,  Next: Q3.9.1,  Prev: Q3.8.4,  Up: Customization
1091
1092 Q3.8.5: How can I bind a key to a function to toggle the toolbar?
1093 -----------------------------------------------------------------
1094
1095    Try something like:
1096
1097      (defun my-toggle-toolbar ()
1098        (interactive)
1099        (set-specifier default-toolbar-visible-p
1100                       (not (specifier-instance default-toolbar-visible-p))))
1101      (global-set-key "\C-xT" 'my-toggle-toolbar)
1102
1103    There are redisplay bugs in 19.14 that may make the preceding result
1104 in a messed-up display, especially for frames with multiple windows.
1105 You may need to resize the frame before XEmacs completely realizes the
1106 toolbar is really gone.
1107
1108    Thanks to Martin Buchholz <martin@xemacs.org> for the correct code.
1109
1110 \1f
1111 File: xemacs-faq.info,  Node: Q3.9.1,  Next: Q3.9.2,  Prev: Q3.8.5,  Up: Customization
1112
1113 3.9: Scrollbars
1114 ===============
1115
1116 Q3.9.1: How can I disable the scrollbar?
1117 ----------------------------------------
1118
1119    To disable them for all frames, add the following line to your
1120 `.Xdefaults':
1121
1122      Emacs.scrollBarWidth:  0
1123
1124    Or select from the `Options' menu `Frame Appearance->Scrollbars'.
1125 Remember to save options.
1126
1127    To turn the scrollbar off on a per-frame basis, use the following
1128 function:
1129
1130      (set-specifier scrollbar-width 0 (selected-frame))
1131
1132    You can actually turn the scrollbars on at any level you want by
1133 substituting for (selected-frame) in the above command.  For example, to
1134 turn the scrollbars off only in a single buffer:
1135
1136      (set-specifier scrollbar-width 0 (current-buffer))
1137
1138    In XEmacs versions prior to 19.14, you had to use the hairier
1139 construct:
1140
1141      (set-specifier scrollbar-width (cons (selected-frame) 0))
1142
1143 \1f
1144 File: xemacs-faq.info,  Node: Q3.9.2,  Next: Q3.9.3,  Prev: Q3.9.1,  Up: Customization
1145
1146 Q3.9.2: How can one use resources to change scrollbar colors?
1147 -------------------------------------------------------------
1148
1149    Here's a recap of how to use resources to change your scrollbar
1150 colors:
1151
1152      ! Motif scrollbars
1153      
1154      Emacs*XmScrollBar.Background: skyblue
1155      Emacs*XmScrollBar.troughColor: lightgray
1156      
1157      ! Athena scrollbars
1158      
1159      Emacs*Scrollbar.Foreground: skyblue
1160      Emacs*Scrollbar.Background: lightgray
1161
1162    Note the capitalization of `Scrollbar' for the Athena widget.
1163
1164 \1f
1165 File: xemacs-faq.info,  Node: Q3.9.3,  Next: Q3.9.4,  Prev: Q3.9.2,  Up: Customization
1166
1167 Q3.9.3: Moving the scrollbar can move the point; can I disable this?
1168 --------------------------------------------------------------------
1169
1170    When I move the scrollbar in an XEmacs window, it moves the point as
1171 well, which should not be the default behavior.  Is this a bug or a
1172 feature?  Can I disable it?
1173
1174    The current behavior is a feature, not a bug.  Point remains at the
1175 same buffer position as long as that position does not scroll off the
1176 screen.  In that event, point will end up in either the upper-left or
1177 lower-left hand corner.
1178
1179    This cannot be changed.
1180
1181 \1f
1182 File: xemacs-faq.info,  Node: Q3.9.4,  Next: Q3.10.1,  Prev: Q3.9.3,  Up: Customization
1183
1184 Q3.9.4: How can I get automatic horizontal scrolling?
1185 -----------------------------------------------------
1186
1187    By the same token, how can I turn it off in specific modes?
1188
1189    To do this, add to your `.emacs' file:
1190
1191      (require 'auto-show)
1192
1193    Then do `(setq truncate-lines t)' in the mode-hooks for any modes in
1194 which you want lines truncated.
1195
1196    More precisely: If `truncate-lines' is nil, horizontal scrollbars
1197 will never appear.  Otherwise, they will appear only if the value of
1198 `scrollbar-height' for that buffer/window/etc. is non-zero.  If you do
1199
1200      (set-specifier scrollbar-height 0)
1201
1202    then horizontal scrollbars will not appear in truncated buffers
1203 unless the package specifically asked for them.
1204
1205    Automatic horizontal scrolling is now standard, starting with 19.14.
1206
1207 \1f
1208 File: xemacs-faq.info,  Node: Q3.10.1,  Next: Q3.10.2,  Prev: Q3.9.4,  Up: Customization
1209
1210 3.10: Text Selections
1211 =====================
1212
1213 Q3.10.1: How can I turn off or change highlighted selections?
1214 -------------------------------------------------------------
1215
1216    The `zmacs' mode allows for what some might call gratuitous
1217 highlighting for selected regions (either by setting mark or by using
1218 the mouse).  This is the default behavior.  To turn off, add the
1219 following line to your `.emacs' file:
1220
1221      (setq zmacs-regions nil)
1222
1223    Starting with XEmacs-20.2 you can also change this with Customize.
1224 Select from the `Options' menu `Customize->Emacs->Editing->Basics->Zmacs
1225 Regions' or type `M-x customize <RET> editing-basics <RET>'.
1226
1227    To change the face for selection, look at `Options->Customize' on
1228 the menubar.
1229
1230 \1f
1231 File: xemacs-faq.info,  Node: Q3.10.2,  Next: Q3.10.3,  Prev: Q3.10.1,  Up: Customization
1232
1233 Q3.10.2: How do I get that typing on an active region removes it?
1234 -----------------------------------------------------------------
1235
1236    I want to change things so that if I select some text and start
1237 typing, the typed text replaces the selected text, similar to Motif.
1238
1239    You want to use something called "pending delete".  Pending delete
1240 is what happens when you select a region (with the mouse or keyboard)
1241 and you press a key to replace the selected region by the key you typed.
1242 Usually backspace kills the selected region.
1243
1244    To get this behavior, add the following lines to your `.emacs':
1245
1246      (cond
1247       ((fboundp 'turn-on-pending-delete)
1248        (turn-on-pending-delete))
1249       ((fboundp 'pending-delete-on)
1250        (pending-delete-on t)))
1251
1252    Note that this will work with both Backspace and Delete.  This code
1253 is a tad more complicated than it has to be for XEmacs in order to make
1254 it more portable.
1255
1256 \1f
1257 File: xemacs-faq.info,  Node: Q3.10.3,  Next: Q3.10.4,  Prev: Q3.10.2,  Up: Customization
1258
1259 Q3.10.3: Can I turn off the highlight during isearch?
1260 -----------------------------------------------------
1261
1262    I do not like my text highlighted while I am doing isearch as I am
1263 not able to see what's underneath.  How do I turn it off?
1264
1265    Put the following in your `.emacs':
1266
1267      (setq isearch-highlight nil)
1268
1269    Starting with XEmacs-20.2 you can also change this with Customize.
1270 Type `M-x customize-variable <RET> isearch-highlight <RET>'.
1271
1272    Note also that isearch-highlight affects query-replace and ispell.
1273 Instead of disabling isearch-highlight you may find that a better
1274 solution consists of customizing the `isearch' face.
1275
1276 \1f
1277 File: xemacs-faq.info,  Node: Q3.10.4,  Next: Q3.10.5,  Prev: Q3.10.3,  Up: Customization
1278
1279 Q3.10.4: How do I turn off highlighting after `C-x C-p' (mark-page)?
1280 --------------------------------------------------------------------
1281
1282    Put this in your `.emacs':
1283
1284      (setq zmacs-regions nil)
1285
1286    *Warning: This command turns off all region highlighting.*
1287
1288    Also *Note Q3.10.1::.
1289
1290 \1f
1291 File: xemacs-faq.info,  Node: Q3.10.5,  Prev: Q3.10.4,  Up: Customization
1292
1293 Q3.10.5: The region disappears when I hit the end of buffer while scrolling.
1294 ----------------------------------------------------------------------------
1295
1296    This has been fixed by default starting with XEmacs-20.3.
1297
1298    With older versions you can turn this feature (if it indeed is a
1299 feature) off like this:
1300
1301      (defadvice scroll-up (around scroll-up freeze)
1302        (interactive "_P")
1303        (let ((zmacs-region-stays t))
1304          (if (interactive-p)
1305         (condition-case nil
1306             ad-do-it
1307           (end-of-buffer (goto-char (point-max))))
1308            ad-do-it)))
1309      
1310      (defadvice scroll-down (around scroll-down freeze)
1311        (interactive "_P")
1312        (let ((zmacs-region-stays t))
1313          (if (interactive-p)
1314         (condition-case nil
1315             ad-do-it
1316           (beginning-of-buffer (goto-char (point-min))))
1317            ad-do-it)))
1318
1319    Thanks to T. V. Raman <raman@adobe.com> for assistance in deriving
1320 this answer.
1321
1322 \1f
1323 File: xemacs-faq.info,  Node: Subsystems,  Next: Miscellaneous,  Prev: Customization,  Up: Top
1324
1325 4 Major Subsystems
1326 ******************
1327
1328    This is part 4 of the XEmacs Frequently Asked Questions list.  This
1329 section is devoted to major XEmacs subsystems.
1330
1331 * Menu:
1332
1333 Reading Mail with VM:
1334 * Q4.0.1::      How do I set up VM to retrieve remote mail using POP?
1335 * Q4.0.2::      How do I get VM to filter mail for me?
1336 * Q4.0.3::      How can I get VM to automatically check for new mail?
1337 * Q4.0.4::      [This question intentionally left blank]
1338 * Q4.0.5::      How do I get my outgoing mail archived?
1339 * Q4.0.6::      I have various addresses at which I receive mail.  How can I tell VM to ignore them when doing a "reply-all"?
1340 * Q4.0.7::      Is there a mailing list or FAQ for VM?
1341 * Q4.0.8::      Remote mail reading with VM.
1342 * Q4.0.9::      rmail or VM gets an error incorporating new mail.
1343 * Q4.0.10::     How do I make VM stay in a single frame?
1344 * Q4.0.11::     How do I make VM or mh-e display graphical smilies?
1345 * Q4.0.12::     Customization of VM not covered in the manual or here.
1346
1347 Web browsing with W3:
1348 * Q4.1.1::      What is W3?
1349 * Q4.1.2::      How do I run W3 from behind a firewall?
1350 * Q4.1.3::      Is it true that W3 supports style sheets and tables?
1351
1352 Reading Netnews and Mail with Gnus:
1353 * Q4.2.1::      GNUS, (ding) Gnus, Gnus 5, September Gnus, Red Gnus,argh!
1354 * Q4.2.2::      [This question intentionally left blank]
1355 * Q4.2.3::      How do I make Gnus stay within a single frame?
1356 * Q4.2.4::      How do I customize the From: line?
1357
1358 Other Mail & News:
1359 * Q4.3.1::      How can I read and/or compose MIME messages?
1360 * Q4.3.2::      What is TM and where do I get it?
1361 * Q4.3.3::      Why isn't this `movemail' program working?
1362 * Q4.3.4::      Movemail is also distributed by Netscape?  Can that cause problems?
1363 * Q4.3.5::      Where do I find pstogif (required by tm)?
1364
1365 Sparcworks, EOS, and WorkShop:
1366 * Q4.4.1::      What is SPARCworks, EOS, and WorkShop
1367 * Q4.4.2::      How do I start the Sun Workshop support in XEmacs 21?
1368
1369 Energize:
1370 * Q4.5.1::      What is/was Energize?
1371
1372 Infodock:
1373 * Q4.6.1::      What is Infodock?
1374
1375 Other Unbundled Packages:
1376 * Q4.7.1::      What is AUC TeX?  Where do you get it?
1377 * Q4.7.2::      Are there any Emacs Lisp Spreadsheets?
1378 * Q4.7.3::      [This question intentionally left blank]
1379 * Q4.7.4::      Problems installing AUC TeX
1380 * Q4.7.5::      Is there a reason for an Emacs package not to be included in XEmacs?
1381 * Q4.7.6::      Is there a MatLab mode?
1382
1383 \1f
1384 File: xemacs-faq.info,  Node: Q4.0.1,  Next: Q4.0.2,  Prev: Subsystems,  Up: Subsystems
1385
1386 4.0: Reading Mail with VM
1387 =========================
1388
1389 Q4.0.1: How do I set up VM to retrieve mail from a remote site using POP?
1390 -------------------------------------------------------------------------
1391
1392    Use `vm-spool-files', like this for example:
1393
1394      (setq vm-spool-files '("/var/spool/mail/wing"
1395                             "netcom23.netcom.com:110:pass:wing:MYPASS"))
1396
1397    Of course substitute your actual password for MYPASS.
1398
1399 \1f
1400 File: xemacs-faq.info,  Node: Q4.0.2,  Next: Q4.0.3,  Prev: Q4.0.1,  Up: Subsystems
1401
1402 Q4.0.2: How do I get VM to filter mail for me?
1403 ----------------------------------------------
1404
1405    One possibility is to use procmail to split your mail before it gets
1406 to VM.  I prefer this personally, since there are many strange and
1407 wonderful things one can do with procmail.  Procmail may be found at
1408 `ftp://ftp.informatik.rwth-aachen.de/pub/packages/procmail/'.
1409
1410    Also see the Mail Filtering FAQ at:
1411 `ftp://rtfm.mit.edu/pub/usenet/news.answers/mail/filtering-faq'.
1412
1413 \1f
1414 File: xemacs-faq.info,  Node: Q4.0.3,  Next: Q4.0.4,  Prev: Q4.0.2,  Up: Subsystems
1415
1416 Q4.0.3: How can I get VM to automatically check for new mail?
1417 -------------------------------------------------------------
1418
1419    John Turner <turner@lanl.gov> writes:
1420
1421      Use the following:
1422
1423           (setq vm-auto-get-new-mail 60)
1424
1425 \1f
1426 File: xemacs-faq.info,  Node: Q4.0.4,  Next: Q4.0.5,  Prev: Q4.0.3,  Up: Subsystems
1427
1428 Q4.0.4: [This question intentionally left blank]
1429 ------------------------------------------------
1430
1431    Obsolete question, left blank to avoid renumbering.
1432
1433 \1f
1434 File: xemacs-faq.info,  Node: Q4.0.5,  Next: Q4.0.6,  Prev: Q4.0.4,  Up: Subsystems
1435
1436 Q4.0.5: How do I get my outgoing mail archived?
1437 -----------------------------------------------
1438
1439      (setq mail-archive-file-name "~/outbox")
1440