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