This commit was generated by cvs2svn to compensate for changes in r6453,
[chise/xemacs-chise.git.1] / info / xemacs-faq.info-5
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: Q5.0.20,  Next: Q5.1.1,  Prev: Q5.0.19,  Up: Miscellaneous
11
12 Q5.0.20: Is there a way to start a new XEmacs if there's no gnuserv running, and otherwise use gnuclient?
13 ---------------------------------------------------------------------------------------------------------
14
15    Jan Vroonhof <vroonhof@math.ethz.ch> writes:
16      Here is one of the solutions, we have this in a script called
17      `etc/editclient.sh'.
18            #!/bin/sh
19            if gnuclient -batch -eval t >/dev/null 2>&1
20            then
21              exec gnuclient ${1+"$@"}
22            else
23              xemacs -unmapped -f gnuserv-start &
24              until gnuclient -batch -eval t >/dev/null 2>&1
25              do
26                 sleep 1
27              done
28              exec gnuclient ${1+"$@"}
29            fi
30
31      Note that there is a known problem when running XEmacs and
32      'gnuclient -nw' on the same TTY.
33
34 \1f
35 File: xemacs-faq.info,  Node: Q5.1.1,  Next: Q5.1.2,  Prev: Q5.0.20,  Up: Miscellaneous
36
37 5.1: Emacs Lisp Programming Techniques
38 ======================================
39
40 Q5.1.1: What is the difference in key sequences between XEmacs and GNU Emacs?
41 -----------------------------------------------------------------------------
42
43    Erik Naggum <clerik@naggum.no> writes;
44
45      Emacs has a legacy of keyboards that produced characters with
46      modifier bits, and therefore map a variety of input systems into
47      this scheme even today.  XEmacs is instead optimized for X events.
48      This causes an incompatibility in the way key sequences are
49      specified, but both Emacs and XEmacs will accept a key sequence as
50      a vector of lists of modifiers that ends with a key, e.g., to bind
51      `M-C-a', you would say `[(meta control a)]' in both Emacsen.
52      XEmacs has an abbreviated form for a single key, just (meta
53      control a).  Emacs has an abbreviated form for the Control and the
54      Meta modifiers to string-characters (the ASCII characters), as in
55      `\M-\C-a'.  XEmacs users need to be aware that the abbreviated
56      form works only for one-character key sequences, while Emacs users
57      need to be aware that the string-character is rather limited.
58      Specifically, the string-character can accommodate only 256
59      different values, 128 of which have the Meta modifier and 128 of
60      which have not.  In each of these blocks, only 32 characters have
61      the Control modifier.  Whereas `[(meta control A)]' differs from
62      `[(meta control a)]' because the case differs, `\M-\C-a' and
63      `\M-\C-A' do not.  Programmers are advised to use the full common
64      form, both because it is more readable and less error-prone, and
65      because it is supported by both Emacsen.
66
67    Another (even safer) way to be sure of the key-sequences is to use
68 the `read-kbd-macro' function, which takes a string like `C-c <up>',
69 and converts it to the internal key representation of the Emacs you
70 use.  The function is available both on XEmacs and GNU Emacs.
71
72 \1f
73 File: xemacs-faq.info,  Node: Q5.1.2,  Next: Q5.1.3,  Prev: Q5.1.1,  Up: Miscellaneous
74
75 Q5.1.2: Can I generate "fake" keyboard events?
76 ----------------------------------------------
77
78    I wonder if there is an interactive function that can generate
79 "fake" keyboard events.  This way, I could simply map them inside
80 XEmacs.
81
82    This seems to work:
83
84      (defun cg--generate-char-event (ch)
85        "Generate an event, as if ch has been typed"
86        (dispatch-event (character-to-event ch)))
87      
88      ;;  Backspace and Delete stuff
89      (global-set-key [backspace]
90        (lambda () (interactive) (cg--generate-char-event 127)))
91      (global-set-key [unknown_keysym_0x4]
92        (lambda () (interactive) (cg--generate-char-event 4)))
93
94 \1f
95 File: xemacs-faq.info,  Node: Q5.1.3,  Next: Q5.1.4,  Prev: Q5.1.2,  Up: Miscellaneous
96
97 Q5.1.3: Could you explain `read-kbd-macro' in more detail?
98 ----------------------------------------------------------
99
100    The `read-kbd-macro' function returns the internal Emacs
101 representation of a human-readable string (which is its argument).
102 Thus:
103
104      (read-kbd-macro "C-c C-a")
105      => [(control ?c) (control ?a)]
106      
107      (read-kbd-macro "C-c C-. <up>")
108      => [(control ?c) (control ?.) up]
109
110    In GNU Emacs the same forms will be evaluated to what GNU Emacs
111 understands internally--the sequences `"\C-x\C-c"' and `[3 67108910
112 up]', respectively.
113
114    The exact "human-readable" syntax is defined in the docstring of
115 `edmacro-mode'.  I'll repeat it here, for completeness.
116
117      Format of keyboard macros during editing:
118
119      Text is divided into "words" separated by whitespace.  Except for
120      the words described below, the characters of each word go directly
121      as characters of the macro.  The whitespace that separates words is
122      ignored.  Whitespace in the macro must be written explicitly, as in
123      `foo <SPC> bar <RET>'.
124
125         * The special words `RET', `SPC', `TAB', `DEL', `LFD', `ESC',
126           and `NUL' represent special control characters.  The words
127           must be written in uppercase.
128
129         * A word in angle brackets, e.g., `<return>', `<down>', or
130           `<f1>', represents a function key.  (Note that in the standard
131           configuration, the function key `<return>' and the control key
132           <RET> are synonymous.)  You can use angle brackets on the
133           words <RET>, <SPC>, etc., but they are not required there.
134
135         * Keys can be written by their ASCII code, using a backslash
136           followed by up to six octal digits.  This is the only way to
137           represent keys with codes above \377.
138
139         * One or more prefixes `M-' (meta), `C-' (control), `S-'
140           (shift), `A-' (alt), `H-' (hyper), and `s-' (super) may
141           precede a character or key notation.  For function keys, the
142           prefixes may go inside or outside of the brackets: `C-<down>'
143           == `<C-down>'.  The prefixes may be written in any order:
144           `M-C-x' == `C-M-x'.
145
146           Prefixes are not allowed on multi-key words, e.g., `C-abc',
147           except that the Meta prefix is allowed on a sequence of
148           digits and optional minus sign: `M--123' == `M-- M-1 M-2 M-3'.
149
150         * The `^' notation for control characters also works: `^M' ==
151           `C-m'.
152
153         * Double angle brackets enclose command names: `<<next-line>>'
154           is shorthand for `M-x next-line <RET>'.
155
156         * Finally, `REM' or `;;' causes the rest of the line to be
157           ignored as a comment.
158
159      Any word may be prefixed by a multiplier in the form of a decimal
160      number and `*': `3*<right>' == `<right> <right> <right>', and
161      `10*foo' == `foofoofoofoofoofoofoofoofoofoo'.
162
163      Multiple text keys can normally be strung together to form a word,
164      but you may need to add whitespace if the word would look like one
165      of the above notations: `; ; ;' is a keyboard macro with three
166      semicolons, but `;;;' is a comment.  Likewise, `\ 1 2 3' is four
167      keys but `\123' is a single key written in octal, and `< right >'
168      is seven keys but `<right>' is a single function key.  When in
169      doubt, use whitespace.
170
171 \1f
172 File: xemacs-faq.info,  Node: Q5.1.4,  Next: Q5.1.5,  Prev: Q5.1.3,  Up: Miscellaneous
173
174 Q5.1.4: What is the performance hit of `let'?
175 ---------------------------------------------
176
177    In most cases, not noticeable.  Besides, there's no avoiding
178 `let'--you have to bind your local variables, after all.  Some pose a
179 question whether to nest `let's, or use one `let' per function.  I
180 think because of clarity and maintenance (and possible future
181 implementation), `let'-s should be used (nested) in a way to provide
182 the clearest code.
183
184 \1f
185 File: xemacs-faq.info,  Node: Q5.1.5,  Next: Q5.1.6,  Prev: Q5.1.4,  Up: Miscellaneous
186
187 Q5.1.5: What is the recommended use of `setq'?
188 ----------------------------------------------
189
190    * Global variables
191
192      You will typically `defvar' your global variable to a default
193      value, and use `setq' to set it later.
194
195      It is never a good practice to `setq' user variables (like
196      `case-fold-search', etc.), as it ignores the user's choice
197      unconditionally.  Note that `defvar' doesn't change the value of a
198      variable if it was bound previously.  If you wish to change a
199      user-variable temporarily, use `let':
200
201           (let ((case-fold-search nil))
202             ...                                 ; code with searches that must be case-sensitive
203             ...)
204
205      You will notice the user-variables by their docstrings beginning
206      with an asterisk (a convention).
207
208    * Local variables
209
210      Bind them with `let', which will unbind them (or restore their
211      previous value, if they were bound) after exiting from the `let'
212      form.  Change the value of local variables with `setq' or whatever
213      you like (e.g. `incf', `setf' and such).  The `let' form can even
214      return one of its local variables.
215
216      Typical usage:
217
218           ;; iterate through the elements of the list returned by
219           ;; `hairy-function-that-returns-list'
220           (let ((l (hairy-function-that-returns-list)))
221             (while l
222               ... do something with (car l) ...
223               (setq l (cdr l))))
224
225      Another typical usage includes building a value simply to work
226      with it.
227
228           ;; Build the mode keymap out of the key-translation-alist
229           (let ((inbox (file-truename (expand-file-name box)))
230                 (i 0))
231             ... code dealing with inbox ...
232             inbox)
233
234      This piece of code uses the local variable `inbox', which becomes
235      unbound (or regains old value) after exiting the form.  The form
236      also returns the value of `inbox', which can be reused, for
237      instance:
238
239           (setq foo-processed-inbox
240                 (let .....))
241
242 \1f
243 File: xemacs-faq.info,  Node: Q5.1.6,  Next: Q5.1.7,  Prev: Q5.1.5,  Up: Miscellaneous
244
245 Q5.1.6: What is the typical misuse of `setq' ?
246 ----------------------------------------------
247
248    A typical misuse is probably `setq'ing a variable that was meant to
249 be local.  Such a variable will remain bound forever, never to be
250 garbage-collected.  For example, the code doing:
251
252      (defun my-function (whatever)
253        (setq a nil)
254        ... build a large list ...
255        ... and exit ...)
256
257    does a bad thing, as `a' will keep consuming memory, never to be
258 unbound.  The correct thing is to do it like this:
259
260      (defun my-function (whatever)
261        (let (a)                         ; default initialization is to nil
262          ... build a large list ...
263          ... and exit, unbinding `a' in the process  ...)
264
265    Not only is this prettier syntactically, but it makes it possible for
266 Emacs to garbage-collect the objects which `a' used to reference.
267
268    Note that even global variables should not be `setq'ed without
269 `defvar'ing them first, because the byte-compiler issues warnings.  The
270 reason for the warning is the following:
271
272      (defun flurgoze nil)                       ; ok, global internal variable
273      ...
274      
275      (setq flurghoze t)                 ; ops!  a typo, but semantically correct.
276                                         ; however, the byte-compiler warns.
277      
278      While compiling toplevel forms:
279      ** assignment to free variable flurghoze
280
281 \1f
282 File: xemacs-faq.info,  Node: Q5.1.7,  Next: Q5.1.8,  Prev: Q5.1.6,  Up: Miscellaneous
283
284 Q5.1.7: I like the the `do' form of cl, does it slow things down?
285 -----------------------------------------------------------------
286
287    It shouldn't.  Here is what Dave Gillespie has to say about cl.el
288 performance:
289
290      Many of the advanced features of this package, such as `defun*',
291      `loop', and `setf', are implemented as Lisp macros.  In
292      byte-compiled code, these complex notations will be expanded into
293      equivalent Lisp code which is simple and efficient.  For example,
294      the forms
295
296           (incf i n)
297           (push x (car p))
298
299      are expanded at compile-time to the Lisp forms
300
301           (setq i (+ i n))
302           (setcar p (cons x (car p)))
303
304      which are the most efficient ways of doing these respective
305      operations in Lisp.  Thus, there is no performance penalty for
306      using the more readable `incf' and `push' forms in your compiled
307      code.
308
309      *Interpreted* code, on the other hand, must expand these macros
310      every time they are executed.  For this reason it is strongly
311      recommended that code making heavy use of macros be compiled.  (The
312      features labelled "Special Form" instead of "Function" in this
313      manual are macros.)  A loop using `incf' a hundred times will
314      execute considerably faster if compiled, and will also
315      garbage-collect less because the macro expansion will not have to
316      be generated, used, and thrown away a hundred times.
317
318      You can find out how a macro expands by using the `cl-prettyexpand'
319      function.
320
321 \1f
322 File: xemacs-faq.info,  Node: Q5.1.8,  Next: Q5.1.9,  Prev: Q5.1.7,  Up: Miscellaneous
323
324 Q5.1.8: I like recursion, does it slow things down?
325 ---------------------------------------------------
326
327    Yes.  Emacs byte-compiler cannot do much to optimize recursion.  But
328 think well whether this is a real concern in Emacs.  Much of the Emacs
329 slowness comes from internal mechanisms such as redisplay, or from the
330 fact that it is an interpreter.
331
332    Please try not to make your code much uglier to gain a very small
333 speed gain.  It's not usually worth it.
334
335 \1f
336 File: xemacs-faq.info,  Node: Q5.1.9,  Next: Q5.1.10,  Prev: Q5.1.8,  Up: Miscellaneous
337
338 Q5.1.9: How do I put a glyph as annotation in a buffer?
339 -------------------------------------------------------
340
341    Here is a solution that will insert the glyph annotation at the
342 beginning of buffer:
343
344      (make-annotation (make-glyph '([FORMAT :file FILE]
345                                     [string :data "fallback-text"]))
346                       (point-min)
347                       'text
348                       (current-buffer))
349
350    Replace `FORMAT' with an unquoted symbol representing the format of
351 the image (e.g. `xpm', `xbm', `gif', `jpeg', etc.)  Instead of `FILE',
352 use the image file name (e.g.
353 `/usr/local/lib/xemacs-20.2/etc/recycle.xpm').
354
355    You can turn this to a function (that optionally prompts you for a
356 file name), and inserts the glyph at `(point)' instead of `(point-min)'.
357
358 \1f
359 File: xemacs-faq.info,  Node: Q5.1.10,  Next: Q5.1.11,  Prev: Q5.1.9,  Up: Miscellaneous
360
361 Q5.1.10: `map-extents' won't traverse all of my extents!
362 --------------------------------------------------------
363
364    I tried to use `map-extents' to do an operation on all the extents
365 in a region.  However, it seems to quit after processing a random number
366 of extents.  Is it buggy?
367
368    No.  The documentation of `map-extents' states that it will iterate
369 across the extents as long as FUNCTION returns `nil'.  Unexperienced
370 programmers often forget to return `nil' explicitly, which results in
371 buggy code.  For instance, the following code is supposed to delete all
372 the extents in a buffer, and issue as many `fubar!' messages.
373
374      (map-extents (lambda (ext ignore)
375                     (delete-extent ext)
376                     (message "fubar!")))
377
378    Instead, it will delete only the first extent, and stop right there -
379 because `message' will return a non-nil value.  The correct code is:
380
381      (map-extents (lambda (ext ignore)
382                     (delete-extent ext)
383                     (message "fubar!")
384                     nil))
385
386 \1f
387 File: xemacs-faq.info,  Node: Q5.1.11,  Next: Q5.2.1,  Prev: Q5.1.10,  Up: Miscellaneous
388
389 Q5.1.11: My elisp program is horribly slow.  Is there
390 -----------------------------------------------------
391
392    an easy way to find out where it spends time?
393
394    zHrvoje Niksic <hniksic@srce.hr> writes:
395      Under XEmacs 20.4 and later  you can use `M-x
396      profile-key-sequence', press a key (say <RET> in the Gnus Group
397      buffer), and get the results using `M-x profile-results'.  It
398      should give you an idea of where the time is being spent.
399
400 \1f
401 File: xemacs-faq.info,  Node: Q5.2.1,  Next: Q5.2.2,  Prev: Q5.1.11,  Up: Miscellaneous
402
403 Q5.2.1: How do I turn off the sound?
404 ------------------------------------
405
406    Add the following line to your `.emacs':
407
408      (setq bell-volume 0)
409      (setq sound-alist nil)
410
411    That will make your XEmacs totally silent - even the default ding
412 sound (TTY beep on TTY-s) will be gone.
413
414    Starting with XEmacs-20.2 you can also change these with Customize.
415 Select from the `Options' menu
416 `Customize->Emacs->Environment->Sound->Sound...' or type `M-x customize
417 <RET> sound <RET>'.
418
419 \1f
420 File: xemacs-faq.info,  Node: Q5.2.2,  Next: Q5.2.3,  Prev: Q5.2.1,  Up: Miscellaneous
421
422 Q5.2.2: How do I get funky sounds instead of a boring beep?
423 -----------------------------------------------------------
424
425    Make sure your XEmacs was compiled with sound support, and then put
426 this in your `.emacs':
427
428      (load-default-sounds)
429
430    The sound support in XEmacs 19.14 was greatly improved over previous
431 versions.
432
433 \1f
434 File: xemacs-faq.info,  Node: Q5.2.3,  Next: Q5.2.4,  Prev: Q5.2.2,  Up: Miscellaneous
435
436 Q5.2.3: What's NAS, how do I get it?
437 ------------------------------------
438
439    *Note Q2.0.3::, for an explanation of the "Network Audio System".
440
441 \1f
442 File: xemacs-faq.info,  Node: Q5.2.4,  Next: Q5.3.1,  Prev: Q5.2.3,  Up: Miscellaneous
443
444 Q5.2.4: Sunsite sounds don't play.
445 ----------------------------------
446
447    I'm having some trouble with sounds I've downloaded from sunsite.
448 They play when I run them through `showaudio' or cat them directly to
449 `/dev/audio', but XEmacs refuses to play them.
450
451    Markus Gutschke <gutschk@uni-muenster.de> writes:
452
453      [Many of] These files have an (erroneous) 24byte header that tells
454      about the format that they have been recorded in. If you cat them
455      to `/dev/audio', the header will be ignored and the default
456      behavior for /dev/audio will be used. This happens to be 8kHz
457      uLaw. It is probably possible to fix the header by piping through
458      `sox' and passing explicit parameters for specifying the sampling
459      format; you then need to perform a 'null' conversion from SunAudio
460      to SunAudio.
461
462 \1f
463 File: xemacs-faq.info,  Node: Q5.3.1,  Next: Q5.3.2,  Prev: Q5.2.4,  Up: Miscellaneous
464
465 5.3: Miscellaneous
466 ==================
467
468 Q5.3.1: How do you make XEmacs indent CL if-clauses correctly?
469 --------------------------------------------------------------
470
471    I'd like XEmacs to indent all the clauses of a Common Lisp `if' the
472 same amount instead of indenting the 3rd clause differently from the
473 first two.
474
475    One way is to add, to `.emacs':
476
477      (put 'if 'lisp-indent-function nil)
478
479    However, note that the package `cl-indent' that comes with XEmacs
480 sets up this kind of indentation by default.  `cl-indent' also knows
481 about many other CL-specific forms.  To use `cl-indent', one can do
482 this:
483
484      (load "cl-indent")
485      (setq lisp-indent-function (function common-lisp-indent-function))
486
487    One can also customize `cl-indent.el' so it mimics the default `if'
488 indentation `then' indented more than the `else'.  Here's how:
489
490      (put 'if 'common-lisp-indent-function '(nil nil &body))
491
492    Also, a new version (1.2) of `cl-indent.el' was posted to
493 comp.emacs.xemacs on 12/9/94.  This version includes more documentation
494 than previous versions.  This may prove useful if you need to customize
495 any indent-functions.
496
497 \1f
498 File: xemacs-faq.info,  Node: Q5.3.2,  Next: Q5.3.3,  Prev: Q5.3.1,  Up: Miscellaneous
499
500 Q5.3.2: Fontifying hang when editing a postscript file.
501 -------------------------------------------------------
502
503    When I try to edit a postscript file it gets stuck saying:
504 `fontifying 'filename' (regexps....)' and it just sits there.  If I
505 press `C-c' in the window where XEmacs was started, it suddenly becomes
506 alive again.
507
508    This was caused by a bug in the Postscript font-lock regular
509 expressions.  It was fixed in 19.13.  For earlier versions of XEmacs,
510 have a look at your `.emacs' file.  You will probably have a line like:
511
512      (add-hook 'postscript-mode-hook    'turn-on-font-lock)
513
514    Take it out, restart XEmacs, and it won't try to fontify your
515 postscript files anymore.
516
517 \1f
518 File: xemacs-faq.info,  Node: Q5.3.3,  Next: Q5.3.4,  Prev: Q5.3.2,  Up: Miscellaneous
519
520 Q5.3.3: How can I print WYSIWYG a font-locked buffer?
521 -----------------------------------------------------
522
523    Font-lock looks nice.  How can I print (WYSIWYG) the highlighted
524 document?
525
526    The package `ps-print', which is now included with XEmacs, provides
527 the ability to do this.  The source code contains complete instructions
528 on its use, in `<xemacs_src_root>/lisp/packages/ps-print.el'.
529
530 \1f
531 File: xemacs-faq.info,  Node: Q5.3.4,  Next: Q5.3.5,  Prev: Q5.3.3,  Up: Miscellaneous
532
533 Q5.3.4: Getting `M-x lpr' to work with postscript printer.
534 ----------------------------------------------------------
535
536    My printer is a Postscript printer and `lpr' only works for
537 Postscript files, so how do I get `M-x lpr-region' and `M-x lpr-buffer'
538 to work?
539
540    Put something like this in your `.emacs':
541
542      (setq lpr-command "a2ps")
543      (setq lpr-switches '("-p" "-1"))
544
545    If you don't use a2ps to convert ASCII to postscript (why not, it's
546 free?), replace with the command you do use.  Note also that some
547 versions of a2ps require a `-Pprinter' to ensure spooling.
548
549 \1f
550 File: xemacs-faq.info,  Node: Q5.3.5,  Next: Q5.3.6,  Prev: Q5.3.4,  Up: Miscellaneous
551
552 Q5.3.5: How do I specify the paths that XEmacs uses for finding files?
553 ----------------------------------------------------------------------
554
555    You can specify what paths to use by using a number of different
556 flags when running configure.  See the section MAKE VARIABLES in the
557 top-level file INSTALL in the XEmacs distribution for a listing of
558 those flags.
559
560    Most of the time, however, the simplest fix is: *do not* specify
561 paths as you might for GNU Emacs.  XEmacs can generally determine the
562 necessary paths dynamically at run time.  The only path that generally
563 needs to be specified is the root directory to install into.  That can
564 be specified by passing the `--prefix' flag to configure.  For a
565 description of the XEmacs install tree, please consult the `NEWS' file.
566
567 \1f
568 File: xemacs-faq.info,  Node: Q5.3.6,  Next: Q5.3.7,  Prev: Q5.3.5,  Up: Miscellaneous
569
570 Q5.3.6: [This question intentionally left blank]
571 ------------------------------------------------
572
573    Obsolete question, left blank to avoid renumbering.
574
575 \1f
576 File: xemacs-faq.info,  Node: Q5.3.7,  Next: Q5.3.8,  Prev: Q5.3.6,  Up: Miscellaneous
577
578 Q5.3.7: Can I have the end of the buffer delimited in some way?
579 ---------------------------------------------------------------
580
581    Say, with: `[END]'?
582
583    Try this:
584
585      (let ((ext (make-extent (point-min) (point-max))))
586        (set-extent-property ext 'start-closed t)
587        (set-extent-property ext 'end-closed t)
588        (set-extent-property ext 'detachable nil)
589        (set-extent-end-glyph ext (make-glyph [string :data "[END]"])))
590
591    Since this is XEmacs, you can specify an icon to be shown on
592 window-system devices.  To do so, change the `make-glyph' call to
593 something like this:
594
595      (make-glyph '([xpm :file "~/something.xpm"]
596                    [string :data "[END]"]))
597
598    You can inline the XPM definition yourself by specifying `:data'
599 instead of `:file'.  Here is such a full-featured version that works on
600 both X and TTY devices:
601
602      (let ((ext (make-extent (point-min) (point-max))))
603        (set-extent-property ext 'start-closed t)
604        (set-extent-property ext 'end-closed t)
605        (set-extent-property ext 'detachable nil)
606        (set-extent-end-glyph ext (make-glyph '([xpm :data "\
607      /* XPM */
608      static char* eye = {
609      \"20 11 7 2\",
610      \"__ c None\"
611      \"_` c #7f7f7f\",
612      \"_a c #fefefe\",
613      \"_b c #7f0000\",
614      \"_c c #fefe00\",
615      \"_d c #fe0000\",
616      \"_e c #bfbfbf\",
617      \"___________`_`_`___b_b_b_b_________`____\",
618      \"_________`_`_`___b_c_c_c_b_b____________\",
619      \"_____`_`_`_e___b_b_c_c_c___b___b_______`\",
620      \"___`_`_e_a___b_b_d___b___b___b___b______\",
621      \"_`_`_e_a_e___b_b_d_b___b___b___b___b____\",
622      \"_`_`_a_e_a___b_b_d___b___b___b___b___b__\",
623      \"_`_`_e_a_e___b_b_d_b___b___b___b___b_b__\",
624      \"___`_`_e_a___b_b_b_d_c___b___b___d_b____\",
625      \"_____`_`_e_e___b_b_b_d_c___b_b_d_b______\",
626      \"_`_____`_`_`_`___b_b_b_d_d_d_d_b________\",
627      \"___`_____`_`_`_`___b_b_b_b_b_b__________\",
628      } ;"]
629                                                [string :data "[END]"]))))
630
631    Note that you might want to make this a function, and put it to a
632 hook.  We leave that as an exercise for the reader.
633
634 \1f
635 File: xemacs-faq.info,  Node: Q5.3.8,  Next: Q5.3.9,  Prev: Q5.3.7,  Up: Miscellaneous
636
637 Q5.3.8: How do I insert today's date into a buffer?
638 ---------------------------------------------------
639
640    Like this:
641
642      (insert (current-time-string))
643
644 \1f
645 File: xemacs-faq.info,  Node: Q5.3.9,  Next: Q5.3.10,  Prev: Q5.3.8,  Up: Miscellaneous
646
647 Q5.3.9: Are only certain syntactic character classes available for abbrevs?
648 ---------------------------------------------------------------------------
649
650    Markus Gutschke <gutschk@uni-muenster.de> writes:
651
652      Yes, abbrevs only expands word-syntax strings. While XEmacs does
653      not prevent you from defining (e.g. with `C-x a g' or `C-x a l')
654      abbrevs that contain special characters, it will refuse to expand
655      them. So you need to ensure, that the abbreviation contains
656      letters and digits only. This means that `xd', `d5', and `5d' are
657      valid abbrevs, but `&d', and `x d' are not.
658
659      If this sounds confusing to you, (re-)read the online
660      documentation for abbrevs (`C-h i m XEmacs <RET> m Abbrevs
661      <RET>'), and then come back and read this question/answer again.
662
663    Starting with XEmacs 20.3 this restriction has been lifted.
664
665 \1f
666 File: xemacs-faq.info,  Node: Q5.3.10,  Next: Q5.3.11,  Prev: Q5.3.9,  Up: Miscellaneous
667
668 Q5.3.10: How can I get those oh-so-neat X-Face lines?
669 -----------------------------------------------------
670
671    Firstly there is an ftp site which describes X-faces and has the
672 associated tools mentioned below, at
673 `ftp://ftp.cs.indiana.edu:/pub/faces/'.
674
675    Then the steps are
676
677   1. Create 48x48x1 bitmap with your favorite tool
678
679   2. Convert to "icon" format using one of xbm2ikon, pbmtoicon, etc.,
680      and then compile the face.
681
682   3.      cat file.xbm | xbm2ikon |compface > file.face
683
684   4. Then be sure to quote things that are necessary for emacs strings:
685
686           cat ./file.face | sed 's/\\/\\\\/g'
687           | sed 's/\"/\\\"/g' > ./file.face.quoted
688
689   5. Then set up emacs to include the file as a mail header - there
690      were a couple of suggestions here--either something like:
691
692           (setq  mail-default-headers
693                  "X-Face:  <Ugly looking text string here>")
694
695      Or, alternatively, as:
696
697           (defun mail-insert-x-face ()
698             (save-excursion
699               (goto-char (point-min))
700               (search-forward mail-header-separator)
701               (beginning-of-line)
702               (insert "X-Face:")
703               (insert-file-contents "~/.face")))
704           
705           (add-hook 'mail-setup-hook 'mail-insert-x-face)
706
707    However, 2 things might be wrong:
708
709    Some versions of pbmtoicon produces some header lines that is not
710 expected by the version of compface that I grabbed. So I found I had to
711 include a `tail +3' in the pipeline like this:
712
713      cat file.xbm | xbm2ikon | tail +3 |compface > file.face
714
715    Some people have also found that if one uses the `(insert-file)'
716 method, one should NOT quote the face string using the sed script .
717
718    It might also be helpful to use Stig's <stig@hackvan.com> script
719 (included in the compface distribution at XEmacs.org) to do the
720 conversion.  For convenience xbm2xface is available for anonymous FTP at
721 `ftp://ftp.miranova.com/pub/xemacs/xbm2xface.pl'.
722
723    Contributors for this item:
724
725    Paul Emsley, Ricardo Marek, Amir J. Katz, Glen McCort, Heinz Uphoff,
726 Peter Arius, Paul Harrison, and Vegard Vesterheim
727
728 \1f
729 File: xemacs-faq.info,  Node: Q5.3.11,  Next: Q5.3.12,  Prev: Q5.3.10,  Up: Miscellaneous
730
731 Q5.3.11: How do I add new Info directories?
732 -------------------------------------------
733
734    You use something like:
735
736      (setq Info-directory-list (cons
737                            (expand-file-name "~/info")
738                            Info-default-directory-list))
739
740    David Masterson <davidm@prism.kla.com> writes:
741
742      Emacs Info and XEmacs Info do many things differently.  If you're
743      trying to support a number of versions of Emacs, here are some
744      notes to remember:
745
746        1. Emacs Info scans `Info-directory-list' from right-to-left
747           while XEmacs Info reads it from left-to-right, so append to
748           the *correct* end of the list.
749
750        2. Use `Info-default-directory-list' to initialize
751           `Info-directory-list' *if* it is available at startup, but not
752           all Emacsen define it.
753
754        3. Emacs Info looks for a standard `dir' file in each of the
755           directories scanned from #1 and magically concatenates them
756           together.
757
758        4. XEmacs Info looks for a `localdir' file (which consists of
759           just the menu entries from a `dir' file) in each of the
760           directories scanned from #1 (except the first), does a simple
761           concatenation of them, and magically attaches the resulting
762           list to the end of the menu in the `dir' file in the first
763           directory.
764
765      Another alternative is to convert the documentation to HTML with
766      texi2html and read it from a web browser like Lynx or W3.
767
768 \1f
769 File: xemacs-faq.info,  Node: Q5.3.12,  Prev: Q5.3.11,  Up: Miscellaneous
770
771 Q5.3.12: What do I need to change to make printing work?
772 --------------------------------------------------------
773
774    For regular printing there are two variables that can be customized.
775
776 `lpr-command'
777      This should be set to a command that takes standard input and sends
778      it to a printer.  Something like:
779
780           (setq lpr-command "lp")
781
782 `lpr-switches'
783      This should be set to a list that contains whatever the print
784      command requires to do its job.  Something like:
785
786           (setq lpr-switches '("-depson"))
787
788    For postscript printing there are three analogous variables to
789 customize.
790
791 `ps-lpr-command'
792      This should be set to a command that takes postscript on standard
793      input and directs it to a postscript printer.
794
795 `ps-lpr-switches'
796      This should be set to a list of switches required for
797      `ps-lpr-command' to do its job.
798
799 `ps-print-color-p'
800      This boolean variable should be set `t' if printing will be done in
801      color, otherwise it should be set to `nil'.
802
803    NOTE: It is an undocumented limitation in XEmacs that postscript
804 printing (the `Pretty Print Buffer' menu item) *requires* a window
805 system environment.  It cannot be used outside of X11.
806
807 \1f
808 File: xemacs-faq.info,  Node: Current Events,  Prev: Miscellaneous,  Up: Top
809
810 6 What the Future Holds
811 ***********************
812
813    This is part 6 of the XEmacs Frequently Asked Questions list.  This
814 section will change monthly, and contains any interesting items that
815 have transpired over the previous month.  If you are reading this from
816 the XEmacs distribution, please see the version on the Web or archived
817 at the various FAQ FTP sites, as this file is surely out of date.
818
819 * Menu:
820
821 * Q6.0.1::      What is new in 20.2?
822 * Q6.0.2::      What is new in 20.3?
823 * Q6.0.3::      What is new in 20.4?
824 * Q6.0.4::      Procedural changes in XEmacs development.
825
826 \1f
827 File: xemacs-faq.info,  Node: Q6.0.1,  Next: Q6.0.2,  Prev: Current Events,  Up: Current Events
828
829 6.0: Changes
830 ============
831
832 Q6.0.1: What is new in 20.2?
833 ----------------------------
834
835    The biggest changes in 20.2 include integration of EFS (the next
836 generation of ange-ftp) and AUC Tex (the Emacs subsystem that includes a
837 major mode for editing Tex and LaTeX, and a lot of other stuff).  Many
838 bugs from 20.0 have been fixed for this release.  20.2 also contains a
839 new system for customizing XEmacs options, invoked via `M-x customize'.
840
841    XEmacs 20.2 is the development release (20.0 was beta), and is no
842 longer considered unstable.
843
844 \1f
845 File: xemacs-faq.info,  Node: Q6.0.2,  Next: Q6.0.3,  Prev: Q6.0.1,  Up: Current Events
846
847 Q6.0.2: What is new in 20.3?
848 ----------------------------
849
850    XEmacs 20.3 was released in November 1997. It contains many bugfixes,
851 and a number of new features, including Autoconf 2 based configuration,
852 additional support for Mule (Multi-language extensions to Emacs), many
853 more customizations, multiple frames on TTY-s, support for multiple info
854 directories, an enhanced gnuclient, improvements to regexp matching,
855 increased MIME support, and many, many synches with GNU Emacs 20.
856
857    The XEmacs/Mule support has been only seriously tested in a Japanese
858 locale, and no doubt many problems still remain.  The support for
859 ISO-Latin-1 and Japanese is fairly strong.  MULE support comes at a
860 price - about a 30% slowdown from 19.16.  We're making progress on
861 improving performance and XEmacs 20.3 compiled without Mule (which is
862 the default) is definitely faster than XEmacs 19.16.
863
864    XEmacs 20.3 is the first non-beta v20 release, and will be the basis
865 for all further development.
866
867 \1f
868 File: xemacs-faq.info,  Node: Q6.0.3,  Next: Q6.0.4,  Prev: Q6.0.2,  Up: Current Events
869
870 Q6.0.3: What's new in XEmacs 20.4?
871 ----------------------------------
872
873    XEmacs 20.4 is a bugfix release with no user-visible changes.
874
875 \1f
876 File: xemacs-faq.info,  Node: Q6.0.4,  Prev: Q6.0.3,  Up: Current Events
877
878 Q6.0.4: Procedural changes in XEmacs development.
879 -------------------------------------------------
880
881   1. Discussion about the development of XEmacs occurs on the
882      xemacs-beta mailing list.  Subscriptions to this list will now be
883      fully automated instead of being handled by hand.  Send a mail
884      message to <xemacs-beta-request@xemacs.org> with `subscribe' as the
885      BODY of the message to join the list.  Please note this is a
886      developers mailing list for people who have an active interest in
887      the development process.
888
889      The discussion of NT XEmacs development is taking place on a
890      separate mailing list.  Send mail to
891      <xemacs-nt-request@xemacs.org> to subscribe.
892
893   2. Due to the long development cycle in between releases, it has been
894      decided that intermediate versions will be made available in
895      source only form for the truly interested.
896
897      XEmacs 19.16 was the last 19 release, basically consisting of
898      19.15 plus the collected bugfixes.
899
900   3. As of December 1996, Steve Baur <steve@altair.xemacs.org> has
901      become the lead maintainer of XEmacs.
902
903