Mercurial > hg > xemacs-beta
comparison etc/NEWS @ 124:9b50b4588a93 r20-1b15
Import from CVS: tag r20-1b15
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:26:39 +0200 |
parents | 9f59509498e1 |
children | 1370575f1259 |
comparison
equal
deleted
inserted
replaced
123:c77884c6318d | 124:9b50b4588a93 |
---|---|
82 C-c C-l make body under heading and under its subheadings invisible. | 82 C-c C-l make body under heading and under its subheadings invisible. |
83 The subheadings remain visible. | 83 The subheadings remain visible. |
84 C-c C-k make all subheadings at all levels visible.x1 | 84 C-c C-k make all subheadings at all levels visible.x1 |
85 | 85 |
86 | 86 |
87 * The History of XEmacs | |
88 ======================= | |
89 | |
90 This product is an extension of GNU Emacs, previously known to some as | |
91 "Lucid Emacs" or "ERA". It was initially based on an early version of Emacs | |
92 Version 19 from the Free Software Foundation and has since been kept | |
93 up-to-date with recent versions of that product. It stems from a | |
94 collaboration of Lucid, Inc. with SunSoft DevPro (a division of Sun | |
95 Microsystems, Inc.; formerly called SunPro) and the University of Illinois. | |
96 | |
97 NOTE: Lucid, Inc. is currently out of business but development on XEmacs | |
98 continues strong. Recently, Amdahl Corporation and INS Engineering have | |
99 both contributed significantly to the development of XEmacs. | |
100 | |
101 | |
102 * What's Different? | |
103 =================== | |
104 | |
105 | |
106 ** Differences between XEmacs and GNU Emacs 19 | |
107 ================================================== | |
108 In XEmacs 20, characters are first-class objects. Characters can be | |
109 converted to integers, but are not integers. FSF 19, XEmacs 19, and Mule | |
110 represent them as integers. | |
111 | |
112 In XEmacs, events are first-class objects. FSF 19 represents them as | |
113 integers, which obscures the differences between a key gesture and the | |
114 ancient ASCII code used to represent a particular overlapping subset of them. | |
115 | |
116 In XEmacs, keymaps are first-class opaque objects. FSF 19 represents them as | |
117 complicated combinations of association lists and vectors. If you use the | |
118 advertised functional interface to manipulation of keymaps, the same code | |
119 will work in XEmacs, Emacs 18, and GNU Emacs 19; if your code depends | |
120 on the underlying implementation of keymaps, it will not. | |
121 | |
122 XEmacs uses "extents" to represent all non-textual aspects of buffers; | |
123 FSF 19 uses two distinct objects, "text properties" and "overlays", | |
124 which divide up the functionality between them. Extents are a | |
125 superset of the functionality of the two FSF data types. The full FSF | |
126 19 interface to text properties is supported in XEmacs (with extents | |
127 being the underlying representation). | |
128 | |
129 Extents can be made to be copied into strings, and thus restored by kill | |
130 and yank. Thus, one can specify this behavior on either "extents" or | |
131 "text properties", whereas in FSF 19 text properties always have this | |
132 behavior and overlays never do. | |
133 | |
134 Many more packages are provided standard with XEmacs than with FSF 19. | |
135 | |
136 Pixmaps of arbitrary size can be embedded in a buffer. | |
137 | |
138 Variable width fonts work. | |
139 | |
140 The height of a line is the height of the tallest font on that line, instead | |
141 of all lines having the same height. | |
142 | |
143 XEmacs uses the MIT "Xt" toolkit instead of raw Xlib calls, which | |
144 makes it be a more well-behaved X citizen (and also improves | |
145 portability). A result of this is that it is possible to include | |
146 other Xt "Widgets" in the XEmacs window. Also, XEmacs understands the | |
147 standard Xt command-line arguments. | |
148 | |
149 XEmacs provides support for ToolTalk on systems that have it. | |
150 | |
151 XEmacs can ask questions using popup dialog boxes. Any command executed from | |
152 a menu will ask yes/no questions with dialog boxes, while commands executed | |
153 via the keyboard will use the minibuffer. | |
154 | |
155 XEmacs has a built-in toolbar. Four toolbars can actually be configured: | |
156 top, bottom, left, and right toolbars. | |
157 | |
158 XEmacs has vertical and horizontal scrollbars. Unlike in FSF 19 (which | |
159 provides a primitive form of vertical scrollbar), these are true toolkit | |
160 scrollbars. A look-alike Motif scrollbar is provided for those who | |
161 don't have Motif. (Even for those who do, the look-alike may be preferable | |
162 as it is faster.) | |
163 | |
164 If you're running on a machine with audio hardware, you can specify sound | |
165 files for XEmacs to play instead of the default X beep. See the documentation | |
166 of the function load-sound-file and the variable sound-alist. | |
167 | |
168 An XEmacs frame can be placed within an "external client widget" managed by | |
169 another application. This allows an application to use an XEmacs frame as its | |
170 text pane rather than the standard Text widget that is provided with Motif or | |
171 Athena. XEmacs supports Motif applications, generic Xt (e.g. Athena) | |
172 applications, and raw Xlib applications. | |
173 | |
174 Here are some more specifics about the XEmacs implementation: | |
175 | |
176 *** The Input Model | |
177 ------------------- | |
178 | |
179 The fundamental unit of input is an "event" instead of a character. An | |
180 event is a new data type that contains several pieces of information. | |
181 There are several kinds of event, and corresponding accessor and utility | |
182 functions. We tried to abstract them so that they would apply equally | |
183 well to a number of window systems. | |
184 | |
185 NOTE: All timestamps are measured as milliseconds since Emacs started. | |
186 | |
187 key_press_event | |
188 event_channel A token representing which keyboard generated it. | |
189 For this kind of event, this is a console object. | |
190 timestamp When it happened | |
191 key What keysym this is; a character or a symbol. | |
192 If it is a character, it will be a printing | |
193 ASCII character. | |
194 modifiers Bucky-bits on that key: control, meta, etc. | |
195 For most keys, Shift is not a bit; that is implicit | |
196 in the keyboard layout. | |
197 | |
198 button_press_event | |
199 button_release_event | |
200 event_channel A token representing which mouse generated it. | |
201 For this kind of event, this is a frame object. | |
202 timestamp When it happened | |
203 button What button went down or up. | |
204 modifiers Bucky-bits on that button: shift, control, meta, etc. | |
205 x, y Where it was at the button-state-change (in pixels). | |
206 | |
207 pointer_motion_event | |
208 event_channel A token representing which mouse generated it. | |
209 For this kind of event, this is a frame object. | |
210 timestamp When it happened | |
211 x, y Where it was after it moved (in pixels). | |
212 modifiers Bucky-bits down when the motion was detected. | |
213 (Possibly not all window systems will provide this?) | |
214 | |
215 process_event | |
216 timestamp When it happened | |
217 process the emacs "process" object in question | |
218 | |
219 timeout_event | |
220 timestamp Now (really, when the timeout was signaled) | |
221 interval_id The ID returned when the associated call to | |
222 add_timeout_cb() was made | |
223 ------ the rest of the fields are filled in by Emacs ----- | |
224 id_number The Emacs timeout ID for this timeout (more | |
225 than one timeout event can have the same value | |
226 here, since Emacs timeouts, as opposed to | |
227 add_timeout_cb() timeouts, can resignal | |
228 themselves) | |
229 function An elisp function to call when this timeout is | |
230 processed. | |
231 object The object passed to that function. | |
232 | |
233 eval_event | |
234 timestamp When it happened | |
235 function An elisp function to call with this event object. | |
236 object Anything. | |
237 This kind of event is used internally; sometimes the | |
238 window system interface would like to inform emacs of | |
239 some user action (such as focusing on another frame) | |
240 but needs that to happen synchronously with the other | |
241 user input, like keypresses. This is useful when | |
242 events are reported through callbacks rather | |
243 than in the standard event stream. | |
244 | |
245 misc_user_event | |
246 timestamp When it happened | |
247 function An elisp function to call with this event object. | |
248 object Anything. | |
249 This is similar to an eval_event, except that it is | |
250 generated by user actions: selections in the | |
251 menubar or scrollbar actions. It is a "command" | |
252 event, like key and mouse presses (and unlike mouse | |
253 motion, process output, and enter and leave window | |
254 hooks). In many ways, eval_events are not the same | |
255 as keypresses or misc_user_events. | |
256 | |
257 magic_event | |
258 No user-serviceable parts within. This is for things | |
259 like KeymapNotify and ExposeRegion events and so on | |
260 that emacs itself doesn't care about, but which it | |
261 must do something with for proper interaction with | |
262 the window system. | |
263 | |
264 Magic_events are handled somewhat asynchronously, just | |
265 like subprocess filters. However, occasionally a | |
266 magic_event needs to be handled synchronously; in that | |
267 case, the asynchronous handling of the magic_event will | |
268 push an eval_event back onto the queue, which will be | |
269 handled synchronously later. This is one of the | |
270 reasons why eval_events exist; I'm not entirely happy | |
271 with this aspect of this event model. | |
272 | |
273 | |
274 The function `next-event' blocks and returns one of the above-described | |
275 event objects. The function `dispatch-event' takes an event and processes | |
276 it in the appropriate way. | |
277 | |
278 For a process-event, dispatch-event calls the process's handler; for a | |
279 mouse-motion event, the mouse-motion-handler hook is called, and so on. | |
280 For magic-events, dispatch-event does window-system-dependent things, | |
281 including calling some non-window-system-dependent hooks: map-frame-hook, | |
282 unmap-frame-hook, mouse-enter-frame-hook, and mouse-leave-frame-hook. | |
283 | |
284 The function `next-command-event' calls `next-event' until it gets a key or | |
285 button from the user (that is, not a process, motion, timeout, or magic | |
286 event). If it gets an event that is not a key or button, it calls | |
287 `dispatch-event' on it immediately and reads another one. The | |
288 next-command-event function could be implemented in Emacs Lisp, though it | |
289 isn't. Generally one should call `next-command-event' instead of | |
290 `next-event'. | |
291 | |
292 read-char calls next-command-event; if it doesn't get an event that can be | |
293 converted to an ASCII character, it signals an error. Otherwise it returns | |
294 an integer. | |
295 | |
296 The variable `last-command-char' always contains an integer, or nil (if the | |
297 last read event has no ASCII equivalent, as when it is a mouse-click or a | |
298 non-ASCII character chord.) | |
299 | |
300 The new variable `last-command-event' holds an event object, that could be | |
301 a non-ASCII character, a button click, a menu selection, etc. | |
302 | |
303 The variable `unread-command-char' no longer exists, and has been replaced | |
304 by `unread-command-events'. With the new event model, it is incorrect for | |
305 code to do (setq unread-command-char (read-char)), because all user-input | |
306 can't be represented as ASCII characters. *** This is an incompatible | |
307 change. Code which sets `unread-command-char' must be updated to use the | |
308 combination of `next-command-event' and `unread-command-events' instead. | |
309 | |
310 The functions `this-command-keys' and `recent-keys' return a vector of | |
311 event objects, instead of a string of ASCII characters. *** This also | |
312 is an incompatible change. | |
313 | |
314 Almost nothing happens at interrupt level; the SIGIO handler simply sets a | |
315 flag, and later, the X event queue is scanned for KeyPress events which map | |
316 to ^G. All redisplay happens in the main thread of the process. | |
317 | |
318 | |
319 *** Keymaps | |
320 ----------- | |
321 | |
322 Instead of keymaps being alists or obarrays, they are a new primary data | |
323 type. The only user access to the contents of a keymap is through the | |
324 existing keymap-manipulation functions, and a new function, map-keymap. | |
325 This means that existing code that manipulates keymaps may need to | |
326 be changed. | |
327 | |
328 One of our goals with the new input and keymap code was to make more | |
329 character combinations available for binding, besides just ASCII and | |
330 function keys. We want to be able bind different commands to Control-a | |
331 and Control-Shift-a; we also want it to be possible for the keys Control-h | |
332 and Backspace (and Control-M and Return, and Control-I and Tab, etc) to | |
333 be distinct. | |
334 | |
335 One of the most common complaints that new Emacs users have is that backspace | |
336 is help. The answer is to play around with the keyboard-translate-table, or | |
337 be lucky enough to have a system administrator who has done this for you | |
338 already; but if it were possible to bind backspace and C-h to different | |
339 things, then (under a window manager at least) both backspace and delete | |
340 would delete a character, and ^H would be help. There's no need to deal | |
341 with xmodmap, kbd-translate-table, etc. | |
342 | |
343 Here are some more examples: suppose you want to bind one function to Tab, | |
344 and another to Control-Tab. This can't be done if Tab and Control-I are the | |
345 same thing. What about control keys that have no ASCII equivalent, like | |
346 Control-< ? One might want that to be bound to set-mark-at-point-min. We | |
347 want M-C-Backspace to be kill-backward-sexp. But we want M-Backspace to be | |
348 kill-backward-word. Again, this can't be done if Backspace and C-h are | |
349 indistinguishable. | |
350 | |
351 The user represents keys as a string of ASCII characters (when possible and | |
352 convenient), or as a vector of event objects, or as a vector of "key | |
353 description lists", that looks like (control a), or (control meta delete) | |
354 or (shift f1). The order of the modifier-names is not significant, so | |
355 (meta control x) and (control meta x) are the same. | |
356 | |
357 `define-key' knows how to take any of the above representations and store them | |
358 into a keymap. When Emacs wants to return a key sequence (this-command-keys, | |
359 recent-keys, keyboard-macros, and read-key-sequence, for example) it returns | |
360 a vector of event objects. Keyboard macros can also be represented as ASCII | |
361 strings or as vectors of key description lists. | |
362 | |
363 This is an incompatible change: code which calls `this-command-keys', | |
364 `recent-keys', `read-key-sequence', or manipulates keyboard-macros probably | |
365 needs to be changed so that it no longer assumes that the returned value is a | |
366 string. | |
367 | |
368 Control-Shift-a is specified as (control A), not (control shift a), since A | |
369 is a two-case character. But for keys that don't have an upper case | |
370 version, like F1, Backspace, and Escape, you use the (shift backspace) syntax. | |
371 | |
372 See the doc string for our version of define-key, reproduced below in the | |
373 `Changed Functions' section. Note that when the KEYS argument is a string, | |
374 it has the same semantics as the v18 define-key. | |
375 | |
376 | |
377 *** Xt Integration | |
378 ------------------ | |
379 | |
380 The heart of the event loop is implemented in terms of the Xt event functions | |
381 (specifically XtAppProcessEvent), and uses Xt's concept of timeouts and | |
382 file-descriptor callbacks, eliminating a large amount of system-dependent code | |
383 (Xt does it for you.) | |
384 | |
385 If Emacs is compiled with support for X, it uses the Xt event loop even when | |
386 Emacs is not running on an X display (the Xt event loop supports this). This | |
387 makes it possible to run Emacs on a dumb TTY, and later connect it to one or | |
388 more X servers. It should also be possible to later connect an existing Emacs | |
389 process to additional TTY's, although this code is still experimental. (Our | |
390 intent at this point is not to have an Emacs that is being used by multiple | |
391 people at the same time: it is to make it possible for someone to go home, log | |
392 in on a dialup line, and connect to the same Emacs process that is running | |
393 under X in their office without having to recreate their buffer state and so | |
394 on.) | |
395 | |
396 If Emacs is not compiled with support for X, then it instead uses more general | |
397 code, something like what v18 does; but this way of doing things is a lot more | |
398 modular. | |
399 | |
400 (Linking Emacs with Xt seems to only add about 300k to the executable size, | |
401 compared with an Emacs linked with Xlib only.) | |
402 | |
403 | |
404 *** Region Highlighting | |
405 ----------------------- | |
406 | |
407 If the variable `zmacs-regions' is true, then the region between point and | |
408 mark will be highlighted when "active". Those commands which push a mark | |
409 (such as C-SPC, and C-x C-x) make the region become "active" and thus | |
410 highlighted. Most commands (all non-motion commands, basically) cause it to | |
411 become non-highlighted (non-"active"). Commands that operate on the region | |
412 (such as C-w, C-x C-l, etc.) only work if the region is in the highlighted | |
413 state. | |
414 | |
415 zmacs-activate-region-hook and zmacs-deactivate-region-hook are run at the | |
416 appropriate times; under X, zmacs-activate-region-hook makes the X selection | |
417 be the region between point and mark, thus doing two things at once: making | |
418 the region and the X selection be the same; and making the region highlight | |
419 in the same way as the X selection. | |
420 | |
421 If `zmacs-regions' is true, then the `mark-marker' command returns nil unless | |
422 the region is currently in the active (highlighted) state. With an argument | |
423 of t, this returns the mark (if there is one) regardless of the active-region | |
424 state. You should *generally* not use the mark unless the region is active, | |
425 if the user has expressed a preference for the active-region model. Watch | |
426 out! Moving this marker changes the mark position. If you set the marker not | |
427 to point anywhere, the buffer will have no mark. | |
428 | |
429 In this way, the primary selection is a fairly transitory entity; but | |
430 when something is copied to the kill ring, it is made the Clipboard | |
431 selection. It is also stored into CUT_BUFFER0, for compatibility with | |
432 X applications that don't understand selections (like Emacs18). | |
433 | |
434 Compatibility note: if you have code which uses (mark) or (mark-marker), | |
435 then you need to either: change those calls to (mark t) or (mark-marker t); | |
436 or simply bind `zmacs-regions' to nil around the call to mark or mark-marker. | |
437 This is probably the best solution, since it will work in Emacs 18 as well. | |
438 | |
439 | |
440 *** Menubars and Dialog Boxes | |
441 ----------------------------- | |
442 | |
443 Here is an example of a menubar definition: | |
444 | |
445 (defvar default-menubar | |
446 '(("File" ["Open File..." find-file t] | |
447 ["Save Buffer" save-buffer t] | |
448 ["Save Buffer As..." write-file t] | |
449 ["Revert Buffer" revert-buffer t] | |
450 "-----" | |
451 ["Print Buffer" lpr-buffer t] | |
452 "-----" | |
453 ["Delete Frame" delete-frame t] | |
454 ["Kill Buffer..." kill-buffer t] | |
455 ["Exit Emacs" save-buffers-kill-emacs t] | |
456 ) | |
457 ("Edit" ["Undo" advertised-undo t] | |
458 ["Cut" kill-primary-selection t] | |
459 ["Copy" copy-primary-selection t] | |
460 ["Paste" yank-clipboard-selection t] | |
461 ["Clear" delete-primary-selection t] | |
462 ) | |
463 ...)) | |
464 | |
465 The first element of each menu item is the string to print on the menu. | |
466 | |
467 The second element is the callback function; if it is a symbol, it is | |
468 invoked with `call-interactively.' If it is a list, it is invoked with | |
469 `eval'. | |
470 | |
471 If the second element is a symbol, then the menu also displays the key that | |
472 is bound to that command (if any). | |
473 | |
474 The third element of the menu items determines whether the item is selectable. | |
475 It may be t, nil, or a form to evaluate. Also, a hook is run just before a | |
476 menu is exposed, which can be used to change the value of these slots. | |
477 For example, there is a hook that makes the "undo" menu item be selectable | |
478 only in the cases when `advertised-undo' would not signal an error. | |
479 | |
480 Menus may have other menus nested within them; they will cascade. | |
481 | |
482 There are utility functions for adding items to menus, deleting items, | |
483 disabling them, etc. | |
484 | |
485 The function `popup-menu' takes a menu description and pops it up. | |
486 | |
487 The function `popup-dialog-box' takes a dialog-box description and pops | |
488 it up. Dialog box descriptions look a lot like menu descriptions. | |
489 | |
490 The menubar, menu, and dialog-box code is implemented as a library, | |
491 with an interface which hides the toolkit that implements it. | |
492 | |
493 | |
494 *** Isearch Changes | |
495 ------------------- | |
496 | |
497 Isearch has been reimplemented in a different way, adding some new features, | |
498 and causing a few incompatible changes. | |
499 | |
500 - the old isearch-*-char variables are no longer supported. In the old | |
501 system, one could make ^A mean "repeat the search" by doing something | |
502 like (setq search-repeat-char ?C-a). In the new system, this is | |
503 accomplished with | |
504 | |
505 (define-key isearch-mode-map "\C-a" 'isearch-repeat-forward) | |
506 | |
507 - The advantage of using the normal keymap mechanism for this is that you | |
508 can bind more than one key to an isearch command: for example, both C-a | |
509 and C-s could do the same thing inside isearch mode. You can also bind | |
510 multi-key sequences inside of isearch mode, and bind non-ASCII keys. | |
511 For example, to use the F1 key to terminate a search: | |
512 | |
513 (define-key isearch-mode-map 'f1 'isearch-exit) | |
514 | |
515 or to make ``C-c C-c'' terminate a search: | |
516 | |
517 (define-key isearch-mode-map "\C-c\C-c" 'isearch-exit) | |
518 | |
519 - If isearch is behaving case-insensitively (the default) and you type an | |
520 upper case character, then the search will become case-sensitive. This | |
521 can be disabled by setting `search-caps-disable-folding' to nil. | |
522 | |
523 - There is a history ring of the strings previously searched for; typing | |
524 M-p or M-n while searching will cycle through this ring. Typing M-TAB | |
525 will do completion across the set of items in the history ring. | |
526 | |
527 - The ESC key is no longer used to terminate an incremental search. The | |
528 RET key should be used instead. This change is necessary for it to be | |
529 possible to bind "meta" characters to isearch commands. | |
530 | |
531 | |
532 *** Startup Code Changes | |
533 ------------------------ | |
534 | |
535 The initial X frame is mapped before the user's .emacs file is executed. | |
536 Without this, there is no way for the user to see any error messages | |
537 generated by their .emacs file, any windows created by the .emacs file | |
538 don't show up, and the copyleft notice isn't shown. | |
539 | |
540 The default values for load-path, exec-path, lock-directory, and | |
541 Info-directory-list are not (necessarily) built into Emacs, but are | |
542 computed at startup time. | |
543 | |
544 First, Emacs looks at the directory in which its executable file resides: | |
545 | |
546 o If that directory contains subdirectories named "lisp" and "lib-src", | |
547 then those directories are used as the lisp library and exec directory. | |
548 | |
549 o If the parent of the directory in which the emacs executable is located | |
550 contains "lisp" and "lib-src" subdirectories, then those are used. | |
551 | |
552 o If ../lib/xemacs-<version> (starting from the directory in which the | |
553 emacs executable is located) contains a "lisp" subdirectory and either | |
554 a "lib-src" subdirectory or a <configuration-name> subdirectory, then | |
555 those are used. | |
556 | |
557 o If the emacs executable that was run is a symbolic link, then the link | |
558 is chased, and the resultant directory is checked as above. | |
559 | |
560 (Actually, it doesn't just look for "lisp/", it looks for "lisp/prim/", | |
561 which reduces the chances of a false positive.) | |
562 | |
563 If the lisp directory contains subdirectories, they are added to the default | |
564 load-path as well. If the site-lisp directory exists and contains | |
565 subdirectories, they are then added. Subdirectories whose names begin with | |
566 a dot or a hyphen are not added to the load-path. | |
567 | |
568 These heuristics fail if the Emacs binary was copied from the main Emacs | |
569 tree to some other directory, and links for the lisp directory were not put | |
570 in. This isn't much of a restriction: either make there be subdirectories | |
571 (or symbolic links) of the directory of the emacs executable, or make the | |
572 "installed" emacs executable be a symbolic link to an executable in a more | |
573 appropriate directory structure. For example, this setup works: | |
574 | |
575 /usr/local/xemacs/xemacs* ; The executable. | |
576 /usr/local/xemacs/lisp/ ; The associated directories. | |
577 /usr/local/xemacs/etc/ ; Any of the files in this list | |
578 /usr/local/xemacs/lock/ ; could be symbolic links as well. | |
579 /usr/local/xemacs/info/ | |
580 | |
581 As does this: | |
582 | |
583 /usr/local/bin/xemacs -> ../xemacs/src/xemacs-19.14 ; A link... | |
584 /usr/local/xemacs/src/xemacs-19.14* ; The executable, | |
585 /usr/local/xemacs/lisp/ ; and the rest of | |
586 /usr/local/xemacs/etc/ ; the source tree | |
587 /usr/local/xemacs/lock/ | |
588 /usr/local/xemacs/info/ | |
589 | |
590 This configuration might be used for a multi-architecture installation; assume | |
591 that $LOCAL refers to a directory which contains only files specific to a | |
592 particular architecture (i.e., executables) and $SHARED refers to those files | |
593 which are not machine specific (i.e., lisp code and documentation.) | |
594 | |
595 $LOCAL/bin/xemacs@ -> $LOCAL/xemacs-19.14/xemacs* | |
596 $LOCAL/xemacs-19.14/lisp@ -> $SHARED/xemacs-19.14/lisp/ | |
597 $LOCAL/xemacs-19.14/etc@ -> $SHARED/xemacs-19.14/etc/ | |
598 $LOCAL/xemacs-19.14/info@ -> $SHARED/xemacs-19.14/info/ | |
599 | |
600 The following would also work, but the above is probably more attractive: | |
601 | |
602 $LOCAL/bin/xemacs* | |
603 $LOCAL/bin/lisp@ -> $SHARED/xemacs-19.14/lisp/ | |
604 $LOCAL/bin/etc@ -> $SHARED/xemacs-19.14/etc/ | |
605 $LOCAL/bin/info@ -> $SHARED/xemacs-19.14/info/ | |
606 | |
607 If Emacs can't find the requisite directories, it writes a message like this | |
608 (or some appropriate subset of it) to stderr: | |
609 | |
610 WARNING: | |
611 couldn't find an obvious default for load-path, exec-directory, and | |
612 lock-directory, and there were no defaults specified in paths.h when | |
613 Emacs was built. Perhaps some directories don't exist, or the Emacs | |
614 executable, /cadillac-th/jwz/somewhere/xemacs is in a strange place? | |
615 | |
616 Without both exec-directory and load-path, Emacs will be very broken. | |
617 Consider making a symbolic link from /cadillac-th/jwz/somewhere/etc | |
618 to wherever the appropriate Emacs etc/ directory is, and from | |
619 /cadillac-th/jwz/somewhere/lisp/ to wherever the appropriate Emacs | |
620 lisp library is. | |
621 | |
622 Without lock-directory set, file locking won't work. Consider | |
623 creating /cadillac-th/jwz/somewhere/lock as a directory or symbolic | |
624 link for use as the lock directory. | |
625 | |
626 The default installation tree is the following: | |
627 | |
628 /usr/local/bin/b2m ; | |
629 ctags ; executables that | |
630 emacsclient ; should be in | |
631 etags ; user's path | |
632 xemacs -> xemacs-<version> ; | |
633 xemacs ; | |
634 /usr/local/lib/xemacs/site-lisp | |
635 /usr/local/lib/xemacs/lock | |
636 /usr/local/lib/xemacs-<version>/etc ; architecture ind. files | |
637 /usr/local/lib/xemacs-<version>/info | |
638 /usr/local/lib/xemacs-<version>/lisp | |
639 /usr/local/lib/xemacs-<version>/<configuration> ; binaries emacs may run | |
640 | |
641 | |
642 *** X Resources | |
643 --------------- | |
644 | |
645 (Note: This section is copied verbatim from the XEmacs Reference Manual.) | |
646 | |
647 The Emacs resources are generally set per-frame. Each Emacs frame | |
648 can have its own name or the same name as another, depending on the | |
649 name passed to the `make-frame' function. | |
650 | |
651 You can specify resources for all frames with the syntax: | |
652 | |
653 Emacs*parameter: value | |
654 | |
655 or | |
656 | |
657 Emacs*EmacsFrame.parameter:value | |
658 | |
659 You can specify resources for a particular frame with the syntax: | |
660 | |
661 Emacs*FRAME-NAME.parameter: value | |
662 | |
663 | |
664 **** Geometry Resources | |
665 ----------------------- | |
666 | |
667 To make the default size of all Emacs frames be 80 columns by 55 | |
668 lines, do this: | |
669 | |
670 Emacs*EmacsFrame.geometry: 80x55 | |
671 | |
672 To set the geometry of a particular frame named `fred', do this: | |
673 | |
674 Emacs*fred.geometry: 80x55 | |
675 | |
676 Important! Do not use the following syntax: | |
677 | |
678 Emacs*geometry: 80x55 | |
679 | |
680 You should never use `*geometry' with any X application. It does not | |
681 say "make the geometry of Emacs be 80 columns by 55 lines." It really | |
682 says, "make Emacs and all subwindows thereof be 80x55 in whatever units | |
683 they care to measure in." In particular, that is both telling the | |
684 Emacs text pane to be 80x55 in characters, and telling the menubar pane | |
685 to be 80x55 pixels, which is surely not what you want. | |
686 | |
687 As a special case, this geometry specification also works (and sets | |
688 the default size of all Emacs frames to 80 columns by 55 lines): | |
689 | |
690 Emacs.geometry: 80x55 | |
691 | |
692 since that is the syntax used with most other applications (since most | |
693 other applications have only one top-level window, unlike Emacs). In | |
694 general, however, the top-level shell (the unmapped ApplicationShell | |
695 widget named `Emacs' that is the parent of the shell widgets that | |
696 actually manage the individual frames) does not have any interesting | |
697 resources on it, and you should set the resources on the frames instead. | |
698 | |
699 The `-geometry' command-line argument sets only the geometry of the | |
700 initial frame created by Emacs. | |
701 | |
702 A more complete explanation of geometry-handling is | |
703 | |
704 * The `-geometry' command-line option sets the `Emacs.geometry' | |
705 resource, that is, the geometry of the ApplicationShell. | |
706 | |
707 * For the first frame created, the size of the frame is taken from | |
708 the ApplicationShell if it is specified, otherwise from the | |
709 geometry of the frame. | |
710 | |
711 * For subsequent frames, the order is reversed: First the frame, and | |
712 then the ApplicationShell. | |
713 | |
714 * For the first frame created, the position of the frame is taken | |
715 from the ApplicationShell (`Emacs.geometry') if it is specified, | |
716 otherwise from the geometry of the frame. | |
717 | |
718 * For subsequent frames, the position is taken only from the frame, | |
719 and never from the ApplicationShell. | |
720 | |
721 This is rather complicated, but it does seem to provide the most | |
722 intuitive behavior with respect to the default sizes and positions of | |
723 frames created in various ways. | |
724 | |
725 | |
726 **** Iconic Resources | |
727 --------------------- | |
728 | |
729 Analogous to `-geometry', the `-iconic' command-line option sets the | |
730 iconic flag of the ApplicationShell (`Emacs.iconic') and always applies | |
731 to the first frame created regardless of its name. However, it is | |
732 possible to set the iconic flag on particular frames (by name) by using | |
733 the `Emacs*FRAME-NAME.iconic' resource. | |
734 | |
735 | |
736 **** Resource List | |
737 ------------------ | |
738 | |
739 Emacs frames accept the following resources: | |
740 | |
741 `geometry' (class `Geometry'): string | |
742 Initial geometry for the frame. *Note Geometry Resources:: for a | |
743 complete discussion of how this works. | |
744 | |
745 `iconic' (class `Iconic'): boolean | |
746 Whether this frame should appear in the iconified state. | |
747 | |
748 `internalBorderWidth' (class `InternalBorderWidth'): int | |
749 How many blank pixels to leave between the text and the edge of the | |
750 window. | |
751 | |
752 `interline' (class `Interline'): int | |
753 How many pixels to leave between each line (may not be | |
754 implemented). | |
755 | |
756 `menubar' (class `Menubar'): boolean | |
757 Whether newly-created frames should initially have a menubar. Set | |
758 to true by default. | |
759 | |
760 `initiallyUnmapped' (class `InitiallyUnmapped'): boolean | |
761 Whether XEmacs should leave the initial frame unmapped when it | |
762 starts up. This is useful if you are starting XEmacs as a server | |
763 (e.g. in conjunction with gnuserv or the external client widget). | |
764 You can also control this with the `-unmapped' command-line option. | |
765 | |
766 `barCursor' (class `BarColor'): boolean | |
767 Whether the cursor should be displayed as a bar, or the | |
768 traditional box. | |
769 | |
770 `textPointer' (class `Cursor'): cursor-name | |
771 The cursor to use when the mouse is over text. This resource is | |
772 used to initialize the variable `x-pointer-shape'. | |
773 | |
774 `selectionPointer' (class `Cursor'): cursor-name | |
775 The cursor to use when the mouse is over a selectable text region | |
776 (an extent with the `highlight' property; for example, an Info | |
777 cross-reference). This resource is used to initialize the variable | |
778 `x-selection-pointer-shape'. | |
779 | |
780 `spacePointer' (class `Cursor'): cursor-name | |
781 The cursor to use when the mouse is over a blank space in a buffer | |
782 (that is, after the end of a line or after the end-of-file). This | |
783 resource is used to initialize the variable | |
784 `x-nontext-pointer-shape'. | |
785 | |
786 `modeLinePointer' (class `Cursor'): cursor-name | |
787 The cursor to use when the mouse is over a mode line. This | |
788 resource is used to initialize the variable `x-mode-pointer-shape'. | |
789 | |
790 `gcPointer' (class `Cursor'): cursor-name | |
791 The cursor to display when a garbage-collection is in progress. | |
792 This resource is used to initialize the variable | |
793 `x-gc-pointer-shape'. | |
794 | |
795 `scrollbarPointer' (class `Cursor'): cursor-name | |
796 The cursor to use when the mouse is over the scrollbar. This | |
797 resource is used to initialize the variable | |
798 `x-scrollbar-pointer-shape'. | |
799 | |
800 `pointerColor' (class `Foreground'): color-name | |
801 `pointerBackground' (class `Background'): color-name | |
802 The foreground and background colors of the mouse cursor. These | |
803 resources are used to initialize the variables | |
804 `x-pointer-foreground-color' and `x-pointer-background-color'. | |
805 | |
806 `scrollBarWidth' (class `ScrollBarWidth'): integer | |
807 How wide the vertical scrollbars should be, in pixels; 0 means no | |
808 vertical scrollbars. You can also use a resource specification of | |
809 the form `*scrollbar.width', or the usual toolkit scrollbar | |
810 resources: `*XmScrollBar.width' (Motif), `*XlwScrollBar.width' | |
811 (Lucid), or `*Scrollbar.thickness' (Athena). We don't recommend | |
812 that you use the toolkit resources, though, because they're | |
813 dependent on how exactly your particular build of XEmacs was | |
814 configured. | |
815 | |
816 `scrollBarHeight' (class `ScrollBarHeight'): integer | |
817 How high the horizontal scrollbars should be, in pixels; 0 means no | |
818 horizontal scrollbars. You can also use a resource specification | |
819 of the form `*scrollbar.height', or the usual toolkit scrollbar | |
820 resources: `*XmScrollBar.height' (Motif), `*XlwScrollBar.height' | |
821 (Lucid), or `*Scrollbar.thickness' (Athena). We don't recommend | |
822 that you use the toolkit resources, though, because they're | |
823 dependent on how exactly your particular build of XEmacs was | |
824 configured. | |
825 | |
826 `scrollBarPlacement' (class `ScrollBarPlacement'): string | |
827 Where the horizontal and vertical scrollbars should be positioned. | |
828 This should be one of the four strings `bottom-left', | |
829 `bottom-right', `top-left', and `top-right'. Default is | |
830 `bottom-right' for the Motif and Lucid scrollbars and | |
831 `bottom-left' for the Athena scrollbars. | |
832 | |
833 `topToolBarHeight' (class `TopToolBarHeight'): integer | |
834 `bottomToolBarHeight' (class `BottomToolBarHeight'): integer | |
835 `leftToolBarWidth' (class `LeftToolBarWidth'): integer | |
836 `rightToolBarWidth' (class `RightToolBarWidth'): integer | |
837 Height and width of the four possible toolbars. | |
838 | |
839 `topToolBarShadowColor' (class `TopToolBarShadowColor'): color-name | |
840 `bottomToolBarShadowColor' (class `BottomToolBarShadowColor'): color-name | |
841 Color of the top and bottom shadows for the toolbars. NOTE: These | |
842 resources do *not* have anything to do with the top and bottom | |
843 toolbars (i.e. the toolbars at the top and bottom of the frame)! | |
844 Rather, they affect the top and bottom shadows around the edges of | |
845 all four kinds of toolbars. | |
846 | |
847 `topToolBarShadowPixmap' (class `TopToolBarShadowPixmap'): pixmap-name | |
848 `bottomToolBarShadowPixmap' (class `BottomToolBarShadowPixmap'): pixmap-name | |
849 Pixmap of the top and bottom shadows for the toolbars. If set, | |
850 these resources override the corresponding color resources. NOTE: | |
851 These resources do *not* have anything to do with the top and | |
852 bottom toolbars (i.e. the toolbars at the top and bottom of the | |
853 frame)! Rather, they affect the top and bottom shadows around the | |
854 edges of all four kinds of toolbars. | |
855 | |
856 `toolBarShadowThickness' (class `ToolBarShadowThickness'): integer | |
857 Thickness of the shadows around the toolbars, in pixels. | |
858 | |
859 `visualBell' (class `VisualBell'): boolean | |
860 Whether XEmacs should flash the screen rather than making an | |
861 audible beep. | |
862 | |
863 `bellVolume' (class `BellVolume'): integer | |
864 Volume of the audible beep. | |
865 | |
866 `useBackingStore' (class `UseBackingStore'): boolean | |
867 Whether XEmacs should set the backing-store attribute of the X | |
868 windows it creates. This increases the memory usage of the X | |
869 server but decreases the amount of X traffic necessary to update | |
870 the screen, and is useful when the connection to the X server goes | |
871 over a low-bandwidth line such as a modem connection. | |
872 | |
873 | |
874 **** Face Resources | |
875 ------------------- | |
876 | |
877 The attributes of faces are also per-frame. They can be specified as: | |
878 | |
879 Emacs.FACE_NAME.parameter: value | |
880 | |
881 (*do not* use `Emacs*FACE_NAME...') | |
882 | |
883 or | |
884 | |
885 Emacs*FRAME_NAME.FACE_NAME.parameter: value | |
886 | |
887 Faces accept the following resources: | |
888 | |
889 `attributeFont' (class `AttributeFont'): font-name | |
890 The font of this face. | |
891 | |
892 `attributeForeground' (class `AttributeForeground'): color-name | |
893 `attributeBackground' (class `AttributeBackground'): color-name | |
894 The foreground and background colors of this face. | |
895 | |
896 `attributeBackgroundPixmap' (class `AttributeBackgroundPixmap'): file-name | |
897 The name of an XBM file (or XPM file, if your version of Emacs | |
898 supports XPM), to use as a background stipple. | |
899 | |
900 `attributeUnderline' (class `AttributeUnderline'): boolean | |
901 Whether text in this face should be underlined. | |
902 | |
903 All text is displayed in some face, defaulting to the face named | |
904 `default'. To set the font of normal text, use | |
905 `Emacs*default.attributeFont'. To set it in the frame named `fred', use | |
906 `Emacs*fred.default.attributeFont'. | |
907 | |
908 These are the names of the predefined faces: | |
909 | |
910 `default' | |
911 Everything inherits from this. | |
912 | |
913 `bold' | |
914 If this is not specified in the resource database, Emacs tries to | |
915 find a bold version of the font of the default face. | |
916 | |
917 `italic' | |
918 If this is not specified in the resource database, Emacs tries to | |
919 find an italic version of the font of the default face. | |
920 | |
921 `bold-italic' | |
922 If this is not specified in the resource database, Emacs tries to | |
923 find a bold-italic version of the font of the default face. | |
924 | |
925 `modeline' | |
926 This is the face that the modeline is displayed in. If not | |
927 specified in the resource database, it is determined from the | |
928 default face by reversing the foreground and background colors. | |
929 | |
930 `highlight' | |
931 This is the face that highlighted extents (for example, Info | |
932 cross-references and possible completions, when the mouse passes | |
933 over them) are displayed in. | |
934 | |
935 `left-margin' | |
936 `right-margin' | |
937 These are the faces that the left and right annotation margins are | |
938 displayed in. | |
939 | |
940 `zmacs-region' | |
941 This is the face that mouse selections are displayed in. | |
942 | |
943 `text-cursor' | |
944 This is the face that the cursor is displayed in. | |
945 | |
946 `isearch' | |
947 This is the face that the matched text being searched for is | |
948 displayed in. | |
949 | |
950 `info-node' | |
951 This is the face of info menu items. If unspecified, it is copied | |
952 from `bold-italic'. | |
953 | |
954 `info-xref' | |
955 This is the face of info cross-references. If unspecified, it is | |
956 copied from `bold'. (Note that, when the mouse passes over a | |
957 cross-reference, the cross-reference's face is determined from a | |
958 combination of the `info-xref' and `highlight' faces.) | |
959 | |
960 Other packages might define their own faces; to see a list of all | |
961 faces, use any of the interactive face-manipulation commands such as | |
962 `set-face-font' and type `?' when you are prompted for the name of a | |
963 face. | |
964 | |
965 If the `bold', `italic', and `bold-italic' faces are not specified | |
966 in the resource database, then XEmacs attempts to derive them from the | |
967 font of the default face. It can only succeed at this if you have | |
968 specified the default font using the XLFD (X Logical Font Description) | |
969 format, which looks like | |
970 | |
971 *-courier-medium-r-*-*-*-120-*-*-*-*-*-* | |
972 | |
973 If you use any of the other, less strict font name formats, some of | |
974 which look like | |
975 | |
976 lucidasanstypewriter-12 | |
977 fixed | |
978 9x13 | |
979 | |
980 then XEmacs won't be able to guess the names of the bold and italic | |
981 versions. All X fonts can be referred to via XLFD-style names, so you | |
982 should use those forms. See the man pages for `X(1)', `xlsfonts(1)', | |
983 and `xfontsel(1)'. | |
984 | |
985 | |
986 **** Widgets | |
987 ------------ | |
988 | |
989 There are several structural widgets between the terminal EmacsFrame | |
990 widget and the top level ApplicationShell; the exact names and types of | |
991 these widgets change from release to release (for example, they changed | |
992 in 19.9, 19.10, 19.12, and 19.13) and are subject to further change in | |
993 the future, so you should avoid mentioning them in your resource database. | |
994 The above-mentioned syntaxes should be forward-compatible. As of 19.14, | |
995 the exact widget hierarchy is as follows: | |
996 | |
997 INVOCATION-NAME "shell" "container" FRAME-NAME | |
998 x-emacs-application-class "TopLevelEmacsShell" "EmacsManager" "EmacsFrame" | |
999 | |
1000 (for normal frames) | |
1001 | |
1002 or | |
1003 | |
1004 INVOCATION-NAME "shell" "container" FRAME-NAME | |
1005 x-emacs-application-class "TransientEmacsShell" "EmacsManager" "EmacsFrame" | |
1006 | |
1007 (for popup/dialog-box frames) | |
1008 | |
1009 where INVOCATION-NAME is the terminal component of the name of the | |
1010 XEmacs executable (usually `xemacs'), and `x-emacs-application-class' | |
1011 is generally `Emacs'. | |
1012 | |
1013 | |
1014 **** Menubar Resources | |
1015 ---------------------- | |
1016 | |
1017 As the menubar is implemented as a widget which is not a part of | |
1018 XEmacs proper, it does not use the face mechanism for specifying fonts | |
1019 and colors: It uses whatever resources are appropriate to the type of | |
1020 widget which is used to implement it. | |
1021 | |
1022 If Emacs was compiled to use only the Motif-lookalike menu widgets, | |
1023 then one way to specify the font of the menubar would be | |
1024 | |
1025 Emacs*menubar*font: *-courier-medium-r-*-*-*-120-*-*-*-*-*-* | |
1026 | |
1027 If the Motif library is being used, then one would have to use | |
1028 | |
1029 Emacs*menubar*fontList: *-courier-medium-r-*-*-*-120-*-*-*-*-*-* | |
1030 | |
1031 because the Motif library uses the `fontList' resource name instead | |
1032 of `font', which has subtly different semantics. | |
1033 | |
1034 The same is true of the scrollbars: They accept whichever resources | |
1035 are appropriate for the toolkit in use. | |
1036 | |
1037 | |
1038 *** Source Code Highlighting | |
1039 ---------------------------- | |
1040 | |
1041 It's possible to have your buffers "decorated" with fonts or colors | |
1042 indicating syntactic structures (such as strings, comments, function names, | |
1043 "reserved words", etc.). In XEmacs, the preferred way to do this is with | |
1044 font-lock-mode; activate it by adding the following code to your .emacs file: | |
1045 | |
1046 (add-hook 'emacs-lisp-mode-hook 'turn-on-font-lock) | |
1047 (add-hook 'c-mode-hook 'turn-on-font-lock) | |
1048 (add-hook 'c++-mode-hook 'turn-on-font-lock) | |
1049 (add-hook 'dired-mode-hook 'turn-on-font-lock) | |
1050 ...etc... | |
1051 | |
1052 To customize it, see the descriptions of the function `font-lock-mode' and | |
1053 the variables `font-lock-keywords', `c-font-lock-keywords', etc. | |
1054 | |
1055 There exist several other source code highlighting packages, but font-lock | |
1056 does one thing that most others don't do: highlights as you type new text; | |
1057 and one thing that no others do: bases part of its decoration on the | |
1058 syntax table of the major mode. Font-lock has C-level support to do this | |
1059 efficiently, so it should also be significantly faster than the others. | |
1060 | |
1061 If there's something that another highlighting package does that you can't | |
1062 make font-lock do, let us know. We would prefer to consolidate all of the | |
1063 desired functionality into one package rather than ship several different | |
1064 packages which do essentially the same thing in different ways. | |
1065 | |
1066 | |
1067 ** Differences Between XEmacs and Emacs 18 | |
1068 ========================================== | |
1069 | |
1070 Auto-configure support has been added, so it should be fairly easy to compile | |
1071 XEmacs on different systems. If you have any problems or feedback about | |
1072 compiling on your system, please let us know. | |
1073 | |
1074 We have reimplemented the basic input model in a more general way; instead of | |
1075 X input being a special-case of the normal ASCII input stream, XEmacs has a | |
1076 concept of "input events", and ASCII characters are a subset of that. The | |
1077 events that XEmacs knows about are not X events, but are a generalization of | |
1078 them, so that XEmacs can eventually be ported to different window systems. | |
1079 | |
1080 We have reimplemented keymaps so that sequences of events can be stored into | |
1081 them instead of just ASCII codes; it is possible to, for example, bind | |
1082 different commands to each of the chords Control-h, Control-H, Backspace, | |
1083 Control-Backspace, and Super-Shift-Backspace. Key bindings, function key | |
1084 bindings, and mouse bindings live in the same keymaps. | |
1085 | |
1086 Input and display of all ISO-8859-1 characters is supported. | |
1087 | |
1088 You can have multiple X windows ("frames" in XEmacs terminology). | |
1089 | |
1090 XEmacs has objects called "extents" and "faces", which are roughly | |
1091 analogous to Epoch's "buttons," "zones," and "styles." An extent is a | |
1092 region of text (a start position and an end position) and a face is a | |
1093 collection of textual attributes like fonts and colors. Every extent | |
1094 is displayed in some "face", so changing the properties of a face | |
1095 immediately updates the display of all associated extents. Faces can | |
1096 be frame-local: you can have a region of text which displays with | |
1097 completely different attributes when its buffer is viewed from a | |
1098 different X window. | |
1099 | |
1100 The display attributes of faces may be specified either in lisp or through | |
1101 the X resource manager. | |
1102 | |
1103 Pixmaps of arbitrary size can be embedded in a buffer. | |
1104 | |
1105 Variable width fonts work. | |
1106 | |
1107 The height of a line is the height of the tallest font on that line, instead | |
1108 of all lines having the same height. | |
1109 | |
1110 XEmacs uses the MIT "Xt" toolkit instead of raw Xlib calls, which | |
1111 makes it be a more well-behaved X citizen (and also improves | |
1112 portability). A result of this is that it is possible to include | |
1113 other Xt "Widgets" in the XEmacs window. Also, XEmacs understands the | |
1114 standard Xt command-line arguments. | |
1115 | |
1116 XEmacs understands the X11 "Selection" mechanism; it's possible to define | |
1117 and customize selection converter functions and new selection types from | |
1118 Emacs Lisp, without having to recompile XEmacs. | |
1119 | |
1120 XEmacs provides support for ToolTalk on systems that have it. | |
1121 | |
1122 XEmacs supports the Zmacs/Lispm style of region highlighting, where the | |
1123 region between the point and mark is highlighted when in its "active" state. | |
1124 | |
1125 XEmacs has a menubar, whose contents are customizable from emacs-lisp. | |
1126 This menubar looks Motif-ish, but does not require Motif. If you already | |
1127 own Motif, however, you can configure XEmacs to use a *real* Motif menubar | |
1128 instead. | |
1129 | |
1130 XEmacs can ask questions using popup dialog boxes. Any command executed from | |
1131 a menu will ask yes/no questions with dialog boxes, while commands executed | |
1132 via the keyboard will use the minibuffer. | |
1133 | |
1134 XEmacs has vertical and horizontal scrollbars. | |
1135 | |
1136 The initial load-path is computed at run-time, instead of at compile-time. | |
1137 This means that if you move the XEmacs executable and associated directories | |
1138 to somewhere else, you don't have to recompile anything. | |
1139 | |
1140 You can specify what the title of the XEmacs windows and icons should be | |
1141 with the variables `frame-title-format' and `frame-icon-title-format', | |
1142 which have the same syntax as `mode-line-format'. | |
1143 | |
1144 XEmacs now supports floating-point numbers. | |
1145 | |
1146 XEmacs now knows about timers directly, instead of them being simulated by | |
1147 a subprocess. | |
1148 | |
1149 XEmacs understands truenames, and can be configured to notice when you are | |
1150 visiting two names of the same file. See the variables find-file-use-truenames | |
1151 and find-file-compare-truenames. | |
1152 | |
1153 If you're running on a machine with audio hardware, you can specify sound | |
1154 files for XEmacs to play instead of the default X beep. See the documentation | |
1155 of the function load-sound-file and the variable sound-alist. | |
1156 | |
1157 An XEmacs frame can be placed within an "external client widget" managed by | |
1158 another application. This allows an application to use an XEmacs frame as its | |
1159 text pane rather than the standard Text widget that is provided with Motif or | |
1160 Athena. XEmacs supports Motif applications, generic Xt (e.g. Athena) | |
1161 applications, and raw Xlib applications. | |
1162 | |
1163 Random changes to the emacs-lisp library: (some of this was not written by | |
1164 us, but is included because it's free software and we think it's good stuff) | |
1165 | |
1166 - there is a new optimizing byte-compiler | |
1167 - there is a new abbrev-based mail-alias mechanism | |
1168 - the -*- line can contain local-variable settings | |
1169 - there is a new TAGS package | |
1170 - there is a new VI-emulation mode (viper) | |
1171 - there is a new implementation of Dired | |
1172 - there is a new implementation of Isearch | |
1173 - the VM package for reading mail is provided | |
1174 - the W3 package for browsing the World Wide Web hypertext information | |
1175 system is provided | |
1176 - the Hyperbole package, a programmable information management and | |
1177 hypertext system | |
1178 - the OO-Browser package, a multi-language object-oriented browser | |
1179 | |
1180 There are many more specifics in the "Miscellaneous Changes" section, below. | |
1181 | |
1182 The online Emacs Manual and Emacs-Lisp Manual are now both relatively | |
1183 up-to-date. | |
1184 | |
1185 * XEmacs Release Notes | 87 * XEmacs Release Notes |
1186 ====================== | 88 ====================== |
1187 | 89 |
1188 ** Future Plans for XEmacs | 90 ** Future Plans for XEmacs |
1189 ========================== | 91 ========================== |
1199 | 101 |
1200 -- More user-level documentation on using Mule. | 102 -- More user-level documentation on using Mule. |
1201 | 103 |
1202 ** Major Differences between 20.0 and 20.1 | 104 ** Major Differences between 20.0 and 20.1 |
1203 | 105 |
106 *** User Interface changes. | |
107 | |
108 The keysyms mouse-1, mouse-2, mouse-3 and down-mouse-1, down-mouse-2, | |
109 and down-mouse-3 have been added for Emacs compatibility. | |
110 | |
111 A new user customizable variable `signal-error-on-buffer-boundary' has | |
112 been added. Set this to nil to avoid XEmacs usual lossage of zmacs | |
113 region when moving up against a buffer boundary. | |
114 | |
115 The logo has been changed, and the default background color is now | |
116 shade of gray instead of white. | |
117 | |
1204 Many packages have been add and upgraded. | 118 Many packages have been add and upgraded. |
1205 | 119 |
1206 -- Gnus-5.4.17 Courtesy of Lars Magne Ingebrigtsen | 120 -- Gnus-5.4.43 Courtesy of Lars Magne Ingebrigtsen |
121 | |
122 *** Gnus changes. | |
123 | |
124 **** nntp.el has been totally rewritten in an asynchronous fashion. | |
125 | |
126 **** Article prefetching functionality has been moved up into | |
127 Gnus. | |
128 | |
129 **** Scoring can now be performed with logical operators like | |
130 `and', `or', `not', and parent redirection. | |
131 | |
132 *** Article washing status can be displayed in the | |
133 article mode line. | |
134 | |
135 **** gnus.el has been split into many smaller files. | |
136 | |
137 **** Suppression of duplicate articles based on Message-ID. | |
138 | |
139 (setq gnus-suppress-duplicates t) | |
140 | |
141 **** New variables for specifying what score and adapt files | |
142 are to be considered home score and adapt files. See | |
143 `gnus-home-score-file' and `gnus-home-adapt-files'. | |
144 | |
145 **** Groups can inherit group parameters from parent topics. | |
146 | |
147 **** Article editing has been revamped and is now usable. | |
148 | |
149 **** Signatures can be recognized in more intelligent fashions. | |
150 See `gnus-signature-separator' and `gnus-signature-limit'. | |
151 | |
152 **** Summary pick mode has been made to look more nn-like. | |
153 Line numbers are displayed and the `.' command can be | |
154 used to pick articles. | |
155 | |
156 **** Commands for moving the .newsrc.eld from one server to | |
157 another have been added. | |
158 | |
159 `M-x gnus-change-server' | |
160 | |
161 **** A way to specify that "uninteresting" fields be suppressed when | |
162 generating lines in buffers. | |
163 | |
164 **** Several commands in the group buffer can be undone with | |
165 `M-C-_'. | |
166 | |
167 **** Scoring can be done on words using the new score type `w'. | |
168 | |
169 **** Adaptive scoring can be done on a Subject word-by-word basis: | |
170 | |
171 (setq gnus-use-adaptive-scoring '(word)) | |
172 | |
173 **** Scores can be decayed. | |
174 | |
175 (setq gnus-decay-scores t) | |
176 | |
177 **** Scoring can be performed using a regexp on the Date header. The | |
178 Date is normalized to compact ISO 8601 format first. | |
179 | |
180 **** A new command has been added to remove all data on articles from | |
181 the native server. | |
182 | |
183 `M-x gnus-group-clear-data-on-native-groups' | |
184 | |
185 **** A new command for reading collections of documents | |
186 (nndoc with nnvirtual on top) has been added -- `M-C-d'. | |
187 | |
188 **** Process mark sets can be pushed and popped. | |
189 | |
190 **** A new mail-to-news backend makes it possible to post | |
191 even when the NNTP server doesn't allow posting. | |
192 | |
193 **** A new backend for reading searches from Web search engines | |
194 (DejaNews, Alta Vista, InReference) has been added. | |
195 | |
196 Use the `G w' command in the group buffer to create such | |
197 a group. | |
198 | |
199 **** Groups inside topics can now be sorted using the standard | |
200 sorting functions, and each topic can be sorted independently. | |
201 | |
202 See the commands under the `T S' submap. | |
203 | |
204 **** Subsets of the groups can be sorted independently. | |
205 | |
206 See the commands under the `G P' submap. | |
207 | |
208 **** Cached articles can be pulled into the groups. | |
209 | |
210 Use the `Y c' command. | |
211 | |
212 **** Score files are now applied in a more reliable order. | |
213 | |
214 **** Reports on where mail messages end up can be generated. | |
215 | |
216 `M-x nnmail-split-history' | |
217 | |
218 **** More hooks and functions have been added to remove junk | |
219 from incoming mail before saving the mail. | |
220 | |
221 See `nnmail-prepare-incoming-header-hook'. | |
222 | |
223 **** The nnml mail backend now understands compressed article files. | |
224 | |
225 -- custom-1.82 Courtesy of Per Abrahamsen | |
226 | |
227 The Customize library enables Emacs Lisp programmers to specify types | |
228 of their variables, so that the users can customize them. For | |
229 example, the old declaration | |
230 | |
231 (defvar foo-blurgoze nil | |
232 "*non-nil means that foo will act very blurgozely.") | |
233 | |
234 now becomes: | |
235 | |
236 (defcustom foo-blurgoze nil | |
237 "*non-nil means that foo will act very blurgozely." | |
238 :type 'boolean) | |
239 | |
240 Now the user can type `M-x customize RET foo-blurgoze RET' to | |
241 customize the variable. Other, more complex data structures can be | |
242 represented and customized too, e.g. | |
243 | |
244 (defcustom foo-hairy-alist '((somekey . "somestring") | |
245 (otherkey . (foo-doit)) | |
246 (thirdkey . [1 2 3])) | |
247 "*Alist describing the hairy options of foo package. | |
248 The CAR of each element is a symbol, whereas the CDR can be either a | |
249 string, a form to evaluate, or a vector of integers." | |
250 :type '(repeat (cons (symbol :tag "Key") | |
251 (choice string | |
252 (vector (repeat :inline t integer)) | |
253 sexp)))) | |
254 | |
255 The user will be able to add and remove the entries to the list, as | |
256 well as save the settings to his/her `.emacs'. | |
257 | |
258 The Customize now has its submenu at the top of the Options menu, and | |
259 is the preferred way to change XEmacs settings. Tens of packages have | |
260 been converted to take advantage of the Customize features, including: | |
261 Gnus, Message, Supercite, Psgml, Comint, Calendar, W3, cc-mode (and | |
262 many other programming language modes), ispell.el, ps-print.el, | |
263 id-select.el, most of the programming language modes, and many many | |
264 more. | |
265 | |
266 been converted to use the Customize features. | |
267 | |
1207 -- mic-paren.el-1.3.1 Courtesy of Mikael Sjödin | 268 -- mic-paren.el-1.3.1 Courtesy of Mikael Sjödin |
1208 -- hyperbole-4.022 Courtesy of Bob Weiner | 269 -- hyperbole-4.022 Courtesy of Bob Weiner |
1209 -- W3-3.0.62 Courtesy of William Perry | 270 |
271 -- W3-3.0.80 Courtesy of William Perry | |
272 | |
273 Version 3 of Emacs/W3, the Emacs World Wide Web browser, has been | |
274 included. It is much faster than any of the previous versions, and | |
275 contains numerous other features. | |
276 | |
1210 -- AUCTeX-9.7k Courtesy of Per Abrahamsen | 277 -- AUCTeX-9.7k Courtesy of Per Abrahamsen |
278 | |
279 AUC TeX is a comprehensive customizable integrated environment for | |
280 writing input files for LaTeX using GNU Emacs. | |
281 | |
282 AUC TeX lets you run TeX/LaTeX and other LaTeX-related tools, such | |
283 as a output filters or post processor from inside Emacs. Especially | |
284 `running LaTeX' is interesting, as AUC TeX lets you browse through the | |
285 errors TeX reported, while it moves the cursor directly to the reported | |
286 error, and displays some documentation for that particular error. This | |
287 will even work when the document is spread over several files. | |
288 | |
289 AUC TeX automatically indents your `LaTeX-source', not only as you | |
290 write it -- you can also let it indent and format an entire document. | |
291 It has a special outline feature, which can greatly help you `getting an | |
292 overview' of a document. | |
293 | |
294 Apart from these special features, AUC TeX provides an large range of | |
295 handy Emacs macros, which in several different ways can help you write | |
296 your LaTeX documents fast and painless. | |
297 | |
1211 -- hm--html-menus-5.3 Courtesy of Heiko Muenkel | 298 -- hm--html-menus-5.3 Courtesy of Heiko Muenkel |
1212 -- custom-1.46 Courtesy of Per Abrahamsen | |
1213 -- python-mode.el-2.90 Courtesy of Barry Warsaw | 299 -- python-mode.el-2.90 Courtesy of Barry Warsaw |
1214 -- balloon-help-1.04 Courtesy of Kyle Jones | 300 -- balloon-help-1.04 Courtesy of Kyle Jones |
1215 -- xrdb-mode.el-1.21 Courtesy of Barry Warsaw | 301 -- xrdb-mode.el-1.21 Courtesy of Barry Warsaw |
1216 -- igrep.el-2.56 Courtesy of Kevin Rodgers | 302 -- igrep.el-2.56 Courtesy of Kevin Rodgers |
1217 -- frame-icon.el Courtesy of Michael Lamoureux and Bob Weiner | 303 -- frame-icon.el Courtesy of Michael Lamoureux and Bob Weiner |
1218 -- itimer.el-1.01 Courtesy of Kyle Jones | 304 -- itimer.el-1.01 Courtesy of Kyle Jones |
305 | |
1219 -- redo.el-1.01 Courtesy of Kyle Jones | 306 -- redo.el-1.01 Courtesy of Kyle Jones |
307 | |
308 redo.el is a package that implements true redo mechanism in XEmacs | |
309 buffers. You can bind the `redo' command to a convenient key to use | |
310 it. | |
311 | |
312 Emacs' normal undo system allows you to undo an arbitrary | |
313 number of buffer changes. These undos are recorded as ordinary | |
314 buffer changes themselves. So when you break the chain of | |
315 undos by issuing some other command, you can then undo all | |
316 the undos. The chain of recorded buffer modifications | |
317 therefore grows without bound, truncated only at garbage | |
318 collection time. | |
319 | |
320 The redo/undo system is different in two ways: | |
321 1. The undo/redo command chain is only broken by a buffer | |
322 modification. You can move around the buffer or switch | |
323 buffers and still come back and do more undos or redos. | |
324 2. The `redo' command rescinds the most recent undo without | |
325 recording the change as a _new_ buffer change. It | |
326 completely reverses the effect of the undo, which | |
327 includes making the chain of buffer modification records | |
328 shorter by one, to counteract the effect of the undo | |
329 command making the record list longer by one. | |
330 | |
1220 -- VM-6.15 Courtesy of Kyle Jones | 331 -- VM-6.15 Courtesy of Kyle Jones |
1221 -- OO-Browser-2.10 Courtesy of Bob Weiner | 332 -- OO-Browser-2.10 Courtesy of Bob Weiner |
1222 -- viper-2.93 Courtesy of Michael Kifer | 333 -- viper-2.93 Courtesy of Michael Kifer |
1223 -- ediff-2.64 Courtesy of Michael Kifer | 334 -- ediff-2.64 Courtesy of Michael Kifer |
335 | |
1224 -- edmacro.el-3.05 Courtesy of Dave Gillespie, port to XEmacs by | 336 -- edmacro.el-3.05 Courtesy of Dave Gillespie, port to XEmacs by |
1225 Hrvoje Niksic. | 337 Hrvoje Niksic. |
338 | |
339 Edmacro is a utility that provides easy editing of keyboard macros. | |
340 Press `C-x C-k' to invoke the `edit-kbd-macro' command that lets you | |
341 edit and define new keyboard macros. You can also edit the last 100 | |
342 keystrokes and insert them into a macro to be bound to a key. The | |
343 macros can be conveniently dumped to `.emacs' file. | |
344 | |
345 The `read-kbd-macro' function is now available in XEmacs. The short | |
346 form `kbd' that evaluates at compile-time can be used instead. | |
347 | |
1226 -- detached-minibuf.el Courtesy of Alvin Shelton | 348 -- detached-minibuf.el Courtesy of Alvin Shelton |
1227 -- whitespace-mode.el Courtesy of Heiko Muenkel | 349 -- whitespace-mode.el Courtesy of Heiko Muenkel |
1228 -- winmgr-mode.el Courtesy of David Konerding, Stefan Strobel & Barry Warsaw | 350 -- winmgr-mode.el Courtesy of David Konerding, Stefan Strobel & Barry Warsaw |
1229 -- mine.el-1.17 Courtesy of Jacques Duthen | 351 |
352 -- xmine.el-1.4 Courtesy of Jens Lautenbacher | |
353 | |
354 XEmacs now includes a minesweeper game with a full-featured graphics | |
355 and mouse interface. Invoke with `M-x xmine'. | |
356 | |
1230 -- fast-lock.el-3.11.01 Courtesy of Simon Marshall | 357 -- fast-lock.el-3.11.01 Courtesy of Simon Marshall |
1231 -- lazy-lock.el-1.16 Courtesy of Simon Marshall | 358 -- lazy-lock.el-1.16 Courtesy of Simon Marshall |
1232 -- browse-cltl2.el-1.1 Courtesy of Holger Schauer | 359 -- browse-cltl2.el-1.1 Courtesy of Holger Schauer |
1233 -- eldoc.el-1.8 Courtesy of Noah Friedman | 360 -- eldoc.el-1.8 Courtesy of Noah Friedman |
1234 -- tm-7.105 Courtesy of MORIOKA Tomohiko | 361 -- tm-7.105 Courtesy of MORIOKA Tomohiko |
362 | |
1235 -- efs-1.15 courtesy of Andy Norman and Michael Sperber | 363 -- efs-1.15 courtesy of Andy Norman and Michael Sperber |
364 | |
365 EFS is now integrated with XEmacs, and replaces the old ange-ftp. It | |
366 has many more features, including info documentation, support for many | |
367 different FTP servers, and integration with dired. | |
368 | |
1236 -- verilog-mode.el Courtesy of Michael McNamara & Adrian Aichner | 369 -- verilog-mode.el Courtesy of Michael McNamara & Adrian Aichner |
370 | |
1237 -- overlay.el Courtesy of Joseph Nuspl | 371 -- overlay.el Courtesy of Joseph Nuspl |
1238 | 372 |
1239 *** User Interface changes. | 373 The overlay support in XEmacs is now functional. Overlays are |
1240 | 374 implemented on top of native extents, and can be used as a GNU |
1241 The keysyms mouse-1, mouse-2, mouse-3 and down-mouse-1, down-mouse-2, | 375 Emacs-compatible way of changing display properties. |
1242 and down-mouse-3 have been added for Emacs compatibility. | |
1243 | |
1244 A new user customizable variable `signal-error-on-buffer-boundary' has | |
1245 been added. Set this to nil to avoid XEmacs usual lossage of zmacs | |
1246 region when moving up against a buffer boundary. | |
1247 | |
1248 The logo has been changed, and the default background color is now | |
1249 shade of gray instead of white. | |
1250 | 376 |
1251 *** Other changes | 377 *** Other changes |
1252 | 378 |
1253 First alpha level support of MS Windows NT is available courtesy of | 379 First alpha level support of MS Windows NT is available courtesy of |
1254 David Hobley. | 380 David Hobley. |
3119 font-lock.el: A code-highlighting package, driven off of syntax tables, so | 2245 font-lock.el: A code-highlighting package, driven off of syntax tables, so |
3120 that it understands block comments, strings, etc. The | 2246 that it understands block comments, strings, etc. The |
3121 insertion hook is used to fontify text as you type it in. | 2247 insertion hook is used to fontify text as you type it in. |
3122 | 2248 |
3123 shell-font.el: Displays your shell-buffer prompt in boldface. | 2249 shell-font.el: Displays your shell-buffer prompt in boldface. |
2250 | |
2251 * The History of XEmacs | |
2252 ======================= | |
2253 | |
2254 This product is an extension of GNU Emacs, previously known to some as | |
2255 "Lucid Emacs" or "ERA". It was initially based on an early version of Emacs | |
2256 Version 19 from the Free Software Foundation and has since been kept | |
2257 up-to-date with recent versions of that product. It stems from a | |
2258 collaboration of Lucid, Inc. with SunSoft DevPro (a division of Sun | |
2259 Microsystems, Inc.; formerly called SunPro) and the University of Illinois. | |
2260 | |
2261 NOTE: Lucid, Inc. is currently out of business but development on XEmacs | |
2262 continues strong. Recently, Amdahl Corporation and INS Engineering have | |
2263 both contributed significantly to the development of XEmacs. | |
2264 | |
2265 | |
2266 * What's Different? | |
2267 =================== | |
2268 | |
2269 | |
2270 ** Differences between XEmacs and GNU Emacs 19 | |
2271 ================================================== | |
2272 In XEmacs 20, characters are first-class objects. Characters can be | |
2273 converted to integers, but are not integers. FSF 19, XEmacs 19, and Mule | |
2274 represent them as integers. | |
2275 | |
2276 In XEmacs, events are first-class objects. FSF 19 represents them as | |
2277 integers, which obscures the differences between a key gesture and the | |
2278 ancient ASCII code used to represent a particular overlapping subset of them. | |
2279 | |
2280 In XEmacs, keymaps are first-class opaque objects. FSF 19 represents them as | |
2281 complicated combinations of association lists and vectors. If you use the | |
2282 advertised functional interface to manipulation of keymaps, the same code | |
2283 will work in XEmacs, Emacs 18, and GNU Emacs 19; if your code depends | |
2284 on the underlying implementation of keymaps, it will not. | |
2285 | |
2286 XEmacs uses "extents" to represent all non-textual aspects of buffers; | |
2287 FSF 19 uses two distinct objects, "text properties" and "overlays", | |
2288 which divide up the functionality between them. Extents are a | |
2289 superset of the functionality of the two FSF data types. The full FSF | |
2290 19 interface to text properties is supported in XEmacs (with extents | |
2291 being the underlying representation). | |
2292 | |
2293 Extents can be made to be copied into strings, and thus restored by kill | |
2294 and yank. Thus, one can specify this behavior on either "extents" or | |
2295 "text properties", whereas in FSF 19 text properties always have this | |
2296 behavior and overlays never do. | |
2297 | |
2298 Many more packages are provided standard with XEmacs than with FSF 19. | |
2299 | |
2300 Pixmaps of arbitrary size can be embedded in a buffer. | |
2301 | |
2302 Variable width fonts work. | |
2303 | |
2304 The height of a line is the height of the tallest font on that line, instead | |
2305 of all lines having the same height. | |
2306 | |
2307 XEmacs uses the MIT "Xt" toolkit instead of raw Xlib calls, which | |
2308 makes it be a more well-behaved X citizen (and also improves | |
2309 portability). A result of this is that it is possible to include | |
2310 other Xt "Widgets" in the XEmacs window. Also, XEmacs understands the | |
2311 standard Xt command-line arguments. | |
2312 | |
2313 XEmacs provides support for ToolTalk on systems that have it. | |
2314 | |
2315 XEmacs can ask questions using popup dialog boxes. Any command executed from | |
2316 a menu will ask yes/no questions with dialog boxes, while commands executed | |
2317 via the keyboard will use the minibuffer. | |
2318 | |
2319 XEmacs has a built-in toolbar. Four toolbars can actually be configured: | |
2320 top, bottom, left, and right toolbars. | |
2321 | |
2322 XEmacs has vertical and horizontal scrollbars. Unlike in FSF 19 (which | |
2323 provides a primitive form of vertical scrollbar), these are true toolkit | |
2324 scrollbars. A look-alike Motif scrollbar is provided for those who | |
2325 don't have Motif. (Even for those who do, the look-alike may be preferable | |
2326 as it is faster.) | |
2327 | |
2328 If you're running on a machine with audio hardware, you can specify sound | |
2329 files for XEmacs to play instead of the default X beep. See the documentation | |
2330 of the function load-sound-file and the variable sound-alist. | |
2331 | |
2332 An XEmacs frame can be placed within an "external client widget" managed by | |
2333 another application. This allows an application to use an XEmacs frame as its | |
2334 text pane rather than the standard Text widget that is provided with Motif or | |
2335 Athena. XEmacs supports Motif applications, generic Xt (e.g. Athena) | |
2336 applications, and raw Xlib applications. | |
2337 | |
2338 Here are some more specifics about the XEmacs implementation: | |
2339 | |
2340 *** The Input Model | |
2341 ------------------- | |
2342 | |
2343 The fundamental unit of input is an "event" instead of a character. An | |
2344 event is a new data type that contains several pieces of information. | |
2345 There are several kinds of event, and corresponding accessor and utility | |
2346 functions. We tried to abstract them so that they would apply equally | |
2347 well to a number of window systems. | |
2348 | |
2349 NOTE: All timestamps are measured as milliseconds since Emacs started. | |
2350 | |
2351 key_press_event | |
2352 event_channel A token representing which keyboard generated it. | |
2353 For this kind of event, this is a console object. | |
2354 timestamp When it happened | |
2355 key What keysym this is; a character or a symbol. | |
2356 If it is a character, it will be a printing | |
2357 ASCII character. | |
2358 modifiers Bucky-bits on that key: control, meta, etc. | |
2359 For most keys, Shift is not a bit; that is implicit | |
2360 in the keyboard layout. | |
2361 | |
2362 button_press_event | |
2363 button_release_event | |
2364 event_channel A token representing which mouse generated it. | |
2365 For this kind of event, this is a frame object. | |
2366 timestamp When it happened | |
2367 button What button went down or up. | |
2368 modifiers Bucky-bits on that button: shift, control, meta, etc. | |
2369 x, y Where it was at the button-state-change (in pixels). | |
2370 | |
2371 pointer_motion_event | |
2372 event_channel A token representing which mouse generated it. | |
2373 For this kind of event, this is a frame object. | |
2374 timestamp When it happened | |
2375 x, y Where it was after it moved (in pixels). | |
2376 modifiers Bucky-bits down when the motion was detected. | |
2377 (Possibly not all window systems will provide this?) | |
2378 | |
2379 process_event | |
2380 timestamp When it happened | |
2381 process the emacs "process" object in question | |
2382 | |
2383 timeout_event | |
2384 timestamp Now (really, when the timeout was signaled) | |
2385 interval_id The ID returned when the associated call to | |
2386 add_timeout_cb() was made | |
2387 ------ the rest of the fields are filled in by Emacs ----- | |
2388 id_number The Emacs timeout ID for this timeout (more | |
2389 than one timeout event can have the same value | |
2390 here, since Emacs timeouts, as opposed to | |
2391 add_timeout_cb() timeouts, can resignal | |
2392 themselves) | |
2393 function An elisp function to call when this timeout is | |
2394 processed. | |
2395 object The object passed to that function. | |
2396 | |
2397 eval_event | |
2398 timestamp When it happened | |
2399 function An elisp function to call with this event object. | |
2400 object Anything. | |
2401 This kind of event is used internally; sometimes the | |
2402 window system interface would like to inform emacs of | |
2403 some user action (such as focusing on another frame) | |
2404 but needs that to happen synchronously with the other | |
2405 user input, like keypresses. This is useful when | |
2406 events are reported through callbacks rather | |
2407 than in the standard event stream. | |
2408 | |
2409 misc_user_event | |
2410 timestamp When it happened | |
2411 function An elisp function to call with this event object. | |
2412 object Anything. | |
2413 This is similar to an eval_event, except that it is | |
2414 generated by user actions: selections in the | |
2415 menubar or scrollbar actions. It is a "command" | |
2416 event, like key and mouse presses (and unlike mouse | |
2417 motion, process output, and enter and leave window | |
2418 hooks). In many ways, eval_events are not the same | |
2419 as keypresses or misc_user_events. | |
2420 | |
2421 magic_event | |
2422 No user-serviceable parts within. This is for things | |
2423 like KeymapNotify and ExposeRegion events and so on | |
2424 that emacs itself doesn't care about, but which it | |
2425 must do something with for proper interaction with | |
2426 the window system. | |
2427 | |
2428 Magic_events are handled somewhat asynchronously, just | |
2429 like subprocess filters. However, occasionally a | |
2430 magic_event needs to be handled synchronously; in that | |
2431 case, the asynchronous handling of the magic_event will | |
2432 push an eval_event back onto the queue, which will be | |
2433 handled synchronously later. This is one of the | |
2434 reasons why eval_events exist; I'm not entirely happy | |
2435 with this aspect of this event model. | |
2436 | |
2437 | |
2438 The function `next-event' blocks and returns one of the above-described | |
2439 event objects. The function `dispatch-event' takes an event and processes | |
2440 it in the appropriate way. | |
2441 | |
2442 For a process-event, dispatch-event calls the process's handler; for a | |
2443 mouse-motion event, the mouse-motion-handler hook is called, and so on. | |
2444 For magic-events, dispatch-event does window-system-dependent things, | |
2445 including calling some non-window-system-dependent hooks: map-frame-hook, | |
2446 unmap-frame-hook, mouse-enter-frame-hook, and mouse-leave-frame-hook. | |
2447 | |
2448 The function `next-command-event' calls `next-event' until it gets a key or | |
2449 button from the user (that is, not a process, motion, timeout, or magic | |
2450 event). If it gets an event that is not a key or button, it calls | |
2451 `dispatch-event' on it immediately and reads another one. The | |
2452 next-command-event function could be implemented in Emacs Lisp, though it | |
2453 isn't. Generally one should call `next-command-event' instead of | |
2454 `next-event'. | |
2455 | |
2456 read-char calls next-command-event; if it doesn't get an event that can be | |
2457 converted to an ASCII character, it signals an error. Otherwise it returns | |
2458 an integer. | |
2459 | |
2460 The variable `last-command-char' always contains an integer, or nil (if the | |
2461 last read event has no ASCII equivalent, as when it is a mouse-click or a | |
2462 non-ASCII character chord.) | |
2463 | |
2464 The new variable `last-command-event' holds an event object, that could be | |
2465 a non-ASCII character, a button click, a menu selection, etc. | |
2466 | |
2467 The variable `unread-command-char' no longer exists, and has been replaced | |
2468 by `unread-command-events'. With the new event model, it is incorrect for | |
2469 code to do (setq unread-command-char (read-char)), because all user-input | |
2470 can't be represented as ASCII characters. *** This is an incompatible | |
2471 change. Code which sets `unread-command-char' must be updated to use the | |
2472 combination of `next-command-event' and `unread-command-events' instead. | |
2473 | |
2474 The functions `this-command-keys' and `recent-keys' return a vector of | |
2475 event objects, instead of a string of ASCII characters. *** This also | |
2476 is an incompatible change. | |
2477 | |
2478 Almost nothing happens at interrupt level; the SIGIO handler simply sets a | |
2479 flag, and later, the X event queue is scanned for KeyPress events which map | |
2480 to ^G. All redisplay happens in the main thread of the process. | |
2481 | |
2482 | |
2483 *** Keymaps | |
2484 ----------- | |
2485 | |
2486 Instead of keymaps being alists or obarrays, they are a new primary data | |
2487 type. The only user access to the contents of a keymap is through the | |
2488 existing keymap-manipulation functions, and a new function, map-keymap. | |
2489 This means that existing code that manipulates keymaps may need to | |
2490 be changed. | |
2491 | |
2492 One of our goals with the new input and keymap code was to make more | |
2493 character combinations available for binding, besides just ASCII and | |
2494 function keys. We want to be able bind different commands to Control-a | |
2495 and Control-Shift-a; we also want it to be possible for the keys Control-h | |
2496 and Backspace (and Control-M and Return, and Control-I and Tab, etc) to | |
2497 be distinct. | |
2498 | |
2499 One of the most common complaints that new Emacs users have is that backspace | |
2500 is help. The answer is to play around with the keyboard-translate-table, or | |
2501 be lucky enough to have a system administrator who has done this for you | |
2502 already; but if it were possible to bind backspace and C-h to different | |
2503 things, then (under a window manager at least) both backspace and delete | |
2504 would delete a character, and ^H would be help. There's no need to deal | |
2505 with xmodmap, kbd-translate-table, etc. | |
2506 | |
2507 Here are some more examples: suppose you want to bind one function to Tab, | |
2508 and another to Control-Tab. This can't be done if Tab and Control-I are the | |
2509 same thing. What about control keys that have no ASCII equivalent, like | |
2510 Control-< ? One might want that to be bound to set-mark-at-point-min. We | |
2511 want M-C-Backspace to be kill-backward-sexp. But we want M-Backspace to be | |
2512 kill-backward-word. Again, this can't be done if Backspace and C-h are | |
2513 indistinguishable. | |
2514 | |
2515 The user represents keys as a string of ASCII characters (when possible and | |
2516 convenient), or as a vector of event objects, or as a vector of "key | |
2517 description lists", that looks like (control a), or (control meta delete) | |
2518 or (shift f1). The order of the modifier-names is not significant, so | |
2519 (meta control x) and (control meta x) are the same. | |
2520 | |
2521 `define-key' knows how to take any of the above representations and store them | |
2522 into a keymap. When Emacs wants to return a key sequence (this-command-keys, | |
2523 recent-keys, keyboard-macros, and read-key-sequence, for example) it returns | |
2524 a vector of event objects. Keyboard macros can also be represented as ASCII | |
2525 strings or as vectors of key description lists. | |
2526 | |
2527 This is an incompatible change: code which calls `this-command-keys', | |
2528 `recent-keys', `read-key-sequence', or manipulates keyboard-macros probably | |
2529 needs to be changed so that it no longer assumes that the returned value is a | |
2530 string. | |
2531 | |
2532 Control-Shift-a is specified as (control A), not (control shift a), since A | |
2533 is a two-case character. But for keys that don't have an upper case | |
2534 version, like F1, Backspace, and Escape, you use the (shift backspace) syntax. | |
2535 | |
2536 See the doc string for our version of define-key, reproduced below in the | |
2537 `Changed Functions' section. Note that when the KEYS argument is a string, | |
2538 it has the same semantics as the v18 define-key. | |
2539 | |
2540 | |
2541 *** Xt Integration | |
2542 ------------------ | |
2543 | |
2544 The heart of the event loop is implemented in terms of the Xt event functions | |
2545 (specifically XtAppProcessEvent), and uses Xt's concept of timeouts and | |
2546 file-descriptor callbacks, eliminating a large amount of system-dependent code | |
2547 (Xt does it for you.) | |
2548 | |
2549 If Emacs is compiled with support for X, it uses the Xt event loop even when | |
2550 Emacs is not running on an X display (the Xt event loop supports this). This | |
2551 makes it possible to run Emacs on a dumb TTY, and later connect it to one or | |
2552 more X servers. It should also be possible to later connect an existing Emacs | |
2553 process to additional TTY's, although this code is still experimental. (Our | |
2554 intent at this point is not to have an Emacs that is being used by multiple | |
2555 people at the same time: it is to make it possible for someone to go home, log | |
2556 in on a dialup line, and connect to the same Emacs process that is running | |
2557 under X in their office without having to recreate their buffer state and so | |
2558 on.) | |
2559 | |
2560 If Emacs is not compiled with support for X, then it instead uses more general | |
2561 code, something like what v18 does; but this way of doing things is a lot more | |
2562 modular. | |
2563 | |
2564 (Linking Emacs with Xt seems to only add about 300k to the executable size, | |
2565 compared with an Emacs linked with Xlib only.) | |
2566 | |
2567 | |
2568 *** Region Highlighting | |
2569 ----------------------- | |
2570 | |
2571 If the variable `zmacs-regions' is true, then the region between point and | |
2572 mark will be highlighted when "active". Those commands which push a mark | |
2573 (such as C-SPC, and C-x C-x) make the region become "active" and thus | |
2574 highlighted. Most commands (all non-motion commands, basically) cause it to | |
2575 become non-highlighted (non-"active"). Commands that operate on the region | |
2576 (such as C-w, C-x C-l, etc.) only work if the region is in the highlighted | |
2577 state. | |
2578 | |
2579 zmacs-activate-region-hook and zmacs-deactivate-region-hook are run at the | |
2580 appropriate times; under X, zmacs-activate-region-hook makes the X selection | |
2581 be the region between point and mark, thus doing two things at once: making | |
2582 the region and the X selection be the same; and making the region highlight | |
2583 in the same way as the X selection. | |
2584 | |
2585 If `zmacs-regions' is true, then the `mark-marker' command returns nil unless | |
2586 the region is currently in the active (highlighted) state. With an argument | |
2587 of t, this returns the mark (if there is one) regardless of the active-region | |
2588 state. You should *generally* not use the mark unless the region is active, | |
2589 if the user has expressed a preference for the active-region model. Watch | |
2590 out! Moving this marker changes the mark position. If you set the marker not | |
2591 to point anywhere, the buffer will have no mark. | |
2592 | |
2593 In this way, the primary selection is a fairly transitory entity; but | |
2594 when something is copied to the kill ring, it is made the Clipboard | |
2595 selection. It is also stored into CUT_BUFFER0, for compatibility with | |
2596 X applications that don't understand selections (like Emacs18). | |
2597 | |
2598 Compatibility note: if you have code which uses (mark) or (mark-marker), | |
2599 then you need to either: change those calls to (mark t) or (mark-marker t); | |
2600 or simply bind `zmacs-regions' to nil around the call to mark or mark-marker. | |
2601 This is probably the best solution, since it will work in Emacs 18 as well. | |
2602 | |
2603 | |
2604 *** Menubars and Dialog Boxes | |
2605 ----------------------------- | |
2606 | |
2607 Here is an example of a menubar definition: | |
2608 | |
2609 (defvar default-menubar | |
2610 '(("File" ["Open File..." find-file t] | |
2611 ["Save Buffer" save-buffer t] | |
2612 ["Save Buffer As..." write-file t] | |
2613 ["Revert Buffer" revert-buffer t] | |
2614 "-----" | |
2615 ["Print Buffer" lpr-buffer t] | |
2616 "-----" | |
2617 ["Delete Frame" delete-frame t] | |
2618 ["Kill Buffer..." kill-buffer t] | |
2619 ["Exit Emacs" save-buffers-kill-emacs t] | |
2620 ) | |
2621 ("Edit" ["Undo" advertised-undo t] | |
2622 ["Cut" kill-primary-selection t] | |
2623 ["Copy" copy-primary-selection t] | |
2624 ["Paste" yank-clipboard-selection t] | |
2625 ["Clear" delete-primary-selection t] | |
2626 ) | |
2627 ...)) | |
2628 | |
2629 The first element of each menu item is the string to print on the menu. | |
2630 | |
2631 The second element is the callback function; if it is a symbol, it is | |
2632 invoked with `call-interactively.' If it is a list, it is invoked with | |
2633 `eval'. | |
2634 | |
2635 If the second element is a symbol, then the menu also displays the key that | |
2636 is bound to that command (if any). | |
2637 | |
2638 The third element of the menu items determines whether the item is selectable. | |
2639 It may be t, nil, or a form to evaluate. Also, a hook is run just before a | |
2640 menu is exposed, which can be used to change the value of these slots. | |
2641 For example, there is a hook that makes the "undo" menu item be selectable | |
2642 only in the cases when `advertised-undo' would not signal an error. | |
2643 | |
2644 Menus may have other menus nested within them; they will cascade. | |
2645 | |
2646 There are utility functions for adding items to menus, deleting items, | |
2647 disabling them, etc. | |
2648 | |
2649 The function `popup-menu' takes a menu description and pops it up. | |
2650 | |
2651 The function `popup-dialog-box' takes a dialog-box description and pops | |
2652 it up. Dialog box descriptions look a lot like menu descriptions. | |
2653 | |
2654 The menubar, menu, and dialog-box code is implemented as a library, | |
2655 with an interface which hides the toolkit that implements it. | |
2656 | |
2657 | |
2658 *** Isearch Changes | |
2659 ------------------- | |
2660 | |
2661 Isearch has been reimplemented in a different way, adding some new features, | |
2662 and causing a few incompatible changes. | |
2663 | |
2664 - the old isearch-*-char variables are no longer supported. In the old | |
2665 system, one could make ^A mean "repeat the search" by doing something | |
2666 like (setq search-repeat-char ?C-a). In the new system, this is | |
2667 accomplished with | |
2668 | |
2669 (define-key isearch-mode-map "\C-a" 'isearch-repeat-forward) | |
2670 | |
2671 - The advantage of using the normal keymap mechanism for this is that you | |
2672 can bind more than one key to an isearch command: for example, both C-a | |
2673 and C-s could do the same thing inside isearch mode. You can also bind | |
2674 multi-key sequences inside of isearch mode, and bind non-ASCII keys. | |
2675 For example, to use the F1 key to terminate a search: | |
2676 | |
2677 (define-key isearch-mode-map 'f1 'isearch-exit) | |
2678 | |
2679 or to make ``C-c C-c'' terminate a search: | |
2680 | |
2681 (define-key isearch-mode-map "\C-c\C-c" 'isearch-exit) | |
2682 | |
2683 - If isearch is behaving case-insensitively (the default) and you type an | |
2684 upper case character, then the search will become case-sensitive. This | |
2685 can be disabled by setting `search-caps-disable-folding' to nil. | |
2686 | |
2687 - There is a history ring of the strings previously searched for; typing | |
2688 M-p or M-n while searching will cycle through this ring. Typing M-TAB | |
2689 will do completion across the set of items in the history ring. | |
2690 | |
2691 - The ESC key is no longer used to terminate an incremental search. The | |
2692 RET key should be used instead. This change is necessary for it to be | |
2693 possible to bind "meta" characters to isearch commands. | |
2694 | |
2695 | |
2696 *** Startup Code Changes | |
2697 ------------------------ | |
2698 | |
2699 The initial X frame is mapped before the user's .emacs file is executed. | |
2700 Without this, there is no way for the user to see any error messages | |
2701 generated by their .emacs file, any windows created by the .emacs file | |
2702 don't show up, and the copyleft notice isn't shown. | |
2703 | |
2704 The default values for load-path, exec-path, lock-directory, and | |
2705 Info-directory-list are not (necessarily) built into Emacs, but are | |
2706 computed at startup time. | |
2707 | |
2708 First, Emacs looks at the directory in which its executable file resides: | |
2709 | |
2710 o If that directory contains subdirectories named "lisp" and "lib-src", | |
2711 then those directories are used as the lisp library and exec directory. | |
2712 | |
2713 o If the parent of the directory in which the emacs executable is located | |
2714 contains "lisp" and "lib-src" subdirectories, then those are used. | |
2715 | |
2716 o If ../lib/xemacs-<version> (starting from the directory in which the | |
2717 emacs executable is located) contains a "lisp" subdirectory and either | |
2718 a "lib-src" subdirectory or a <configuration-name> subdirectory, then | |
2719 those are used. | |
2720 | |
2721 o If the emacs executable that was run is a symbolic link, then the link | |
2722 is chased, and the resultant directory is checked as above. | |
2723 | |
2724 (Actually, it doesn't just look for "lisp/", it looks for "lisp/prim/", | |
2725 which reduces the chances of a false positive.) | |
2726 | |
2727 If the lisp directory contains subdirectories, they are added to the default | |
2728 load-path as well. If the site-lisp directory exists and contains | |
2729 subdirectories, they are then added. Subdirectories whose names begin with | |
2730 a dot or a hyphen are not added to the load-path. | |
2731 | |
2732 These heuristics fail if the Emacs binary was copied from the main Emacs | |
2733 tree to some other directory, and links for the lisp directory were not put | |
2734 in. This isn't much of a restriction: either make there be subdirectories | |
2735 (or symbolic links) of the directory of the emacs executable, or make the | |
2736 "installed" emacs executable be a symbolic link to an executable in a more | |
2737 appropriate directory structure. For example, this setup works: | |
2738 | |
2739 /usr/local/xemacs/xemacs* ; The executable. | |
2740 /usr/local/xemacs/lisp/ ; The associated directories. | |
2741 /usr/local/xemacs/etc/ ; Any of the files in this list | |
2742 /usr/local/xemacs/lock/ ; could be symbolic links as well. | |
2743 /usr/local/xemacs/info/ | |
2744 | |
2745 As does this: | |
2746 | |
2747 /usr/local/bin/xemacs -> ../xemacs/src/xemacs-19.14 ; A link... | |
2748 /usr/local/xemacs/src/xemacs-19.14* ; The executable, | |
2749 /usr/local/xemacs/lisp/ ; and the rest of | |
2750 /usr/local/xemacs/etc/ ; the source tree | |
2751 /usr/local/xemacs/lock/ | |
2752 /usr/local/xemacs/info/ | |
2753 | |
2754 This configuration might be used for a multi-architecture installation; assume | |
2755 that $LOCAL refers to a directory which contains only files specific to a | |
2756 particular architecture (i.e., executables) and $SHARED refers to those files | |
2757 which are not machine specific (i.e., lisp code and documentation.) | |
2758 | |
2759 $LOCAL/bin/xemacs@ -> $LOCAL/xemacs-19.14/xemacs* | |
2760 $LOCAL/xemacs-19.14/lisp@ -> $SHARED/xemacs-19.14/lisp/ | |
2761 $LOCAL/xemacs-19.14/etc@ -> $SHARED/xemacs-19.14/etc/ | |
2762 $LOCAL/xemacs-19.14/info@ -> $SHARED/xemacs-19.14/info/ | |
2763 | |
2764 The following would also work, but the above is probably more attractive: | |
2765 | |
2766 $LOCAL/bin/xemacs* | |
2767 $LOCAL/bin/lisp@ -> $SHARED/xemacs-19.14/lisp/ | |
2768 $LOCAL/bin/etc@ -> $SHARED/xemacs-19.14/etc/ | |
2769 $LOCAL/bin/info@ -> $SHARED/xemacs-19.14/info/ | |
2770 | |
2771 If Emacs can't find the requisite directories, it writes a message like this | |
2772 (or some appropriate subset of it) to stderr: | |
2773 | |
2774 WARNING: | |
2775 couldn't find an obvious default for load-path, exec-directory, and | |
2776 lock-directory, and there were no defaults specified in paths.h when | |
2777 Emacs was built. Perhaps some directories don't exist, or the Emacs | |
2778 executable, /cadillac-th/jwz/somewhere/xemacs is in a strange place? | |
2779 | |
2780 Without both exec-directory and load-path, Emacs will be very broken. | |
2781 Consider making a symbolic link from /cadillac-th/jwz/somewhere/etc | |
2782 to wherever the appropriate Emacs etc/ directory is, and from | |
2783 /cadillac-th/jwz/somewhere/lisp/ to wherever the appropriate Emacs | |
2784 lisp library is. | |
2785 | |
2786 Without lock-directory set, file locking won't work. Consider | |
2787 creating /cadillac-th/jwz/somewhere/lock as a directory or symbolic | |
2788 link for use as the lock directory. | |
2789 | |
2790 The default installation tree is the following: | |
2791 | |
2792 /usr/local/bin/b2m ; | |
2793 ctags ; executables that | |
2794 emacsclient ; should be in | |
2795 etags ; user's path | |
2796 xemacs -> xemacs-<version> ; | |
2797 xemacs ; | |
2798 /usr/local/lib/xemacs/site-lisp | |
2799 /usr/local/lib/xemacs/lock | |
2800 /usr/local/lib/xemacs-<version>/etc ; architecture ind. files | |
2801 /usr/local/lib/xemacs-<version>/info | |
2802 /usr/local/lib/xemacs-<version>/lisp | |
2803 /usr/local/lib/xemacs-<version>/<configuration> ; binaries emacs may run | |
2804 | |
2805 | |
2806 *** X Resources | |
2807 --------------- | |
2808 | |
2809 (Note: This section is copied verbatim from the XEmacs Reference Manual.) | |
2810 | |
2811 The Emacs resources are generally set per-frame. Each Emacs frame | |
2812 can have its own name or the same name as another, depending on the | |
2813 name passed to the `make-frame' function. | |
2814 | |
2815 You can specify resources for all frames with the syntax: | |
2816 | |
2817 Emacs*parameter: value | |
2818 | |
2819 or | |
2820 | |
2821 Emacs*EmacsFrame.parameter:value | |
2822 | |
2823 You can specify resources for a particular frame with the syntax: | |
2824 | |
2825 Emacs*FRAME-NAME.parameter: value | |
2826 | |
2827 | |
2828 **** Geometry Resources | |
2829 ----------------------- | |
2830 | |
2831 To make the default size of all Emacs frames be 80 columns by 55 | |
2832 lines, do this: | |
2833 | |
2834 Emacs*EmacsFrame.geometry: 80x55 | |
2835 | |
2836 To set the geometry of a particular frame named `fred', do this: | |
2837 | |
2838 Emacs*fred.geometry: 80x55 | |
2839 | |
2840 Important! Do not use the following syntax: | |
2841 | |
2842 Emacs*geometry: 80x55 | |
2843 | |
2844 You should never use `*geometry' with any X application. It does not | |
2845 say "make the geometry of Emacs be 80 columns by 55 lines." It really | |
2846 says, "make Emacs and all subwindows thereof be 80x55 in whatever units | |
2847 they care to measure in." In particular, that is both telling the | |
2848 Emacs text pane to be 80x55 in characters, and telling the menubar pane | |
2849 to be 80x55 pixels, which is surely not what you want. | |
2850 | |
2851 As a special case, this geometry specification also works (and sets | |
2852 the default size of all Emacs frames to 80 columns by 55 lines): | |
2853 | |
2854 Emacs.geometry: 80x55 | |
2855 | |
2856 since that is the syntax used with most other applications (since most | |
2857 other applications have only one top-level window, unlike Emacs). In | |
2858 general, however, the top-level shell (the unmapped ApplicationShell | |
2859 widget named `Emacs' that is the parent of the shell widgets that | |
2860 actually manage the individual frames) does not have any interesting | |
2861 resources on it, and you should set the resources on the frames instead. | |
2862 | |
2863 The `-geometry' command-line argument sets only the geometry of the | |
2864 initial frame created by Emacs. | |
2865 | |
2866 A more complete explanation of geometry-handling is | |
2867 | |
2868 * The `-geometry' command-line option sets the `Emacs.geometry' | |
2869 resource, that is, the geometry of the ApplicationShell. | |
2870 | |
2871 * For the first frame created, the size of the frame is taken from | |
2872 the ApplicationShell if it is specified, otherwise from the | |
2873 geometry of the frame. | |
2874 | |
2875 * For subsequent frames, the order is reversed: First the frame, and | |
2876 then the ApplicationShell. | |
2877 | |
2878 * For the first frame created, the position of the frame is taken | |
2879 from the ApplicationShell (`Emacs.geometry') if it is specified, | |
2880 otherwise from the geometry of the frame. | |
2881 | |
2882 * For subsequent frames, the position is taken only from the frame, | |
2883 and never from the ApplicationShell. | |
2884 | |
2885 This is rather complicated, but it does seem to provide the most | |
2886 intuitive behavior with respect to the default sizes and positions of | |
2887 frames created in various ways. | |
2888 | |
2889 | |
2890 **** Iconic Resources | |
2891 --------------------- | |
2892 | |
2893 Analogous to `-geometry', the `-iconic' command-line option sets the | |
2894 iconic flag of the ApplicationShell (`Emacs.iconic') and always applies | |
2895 to the first frame created regardless of its name. However, it is | |
2896 possible to set the iconic flag on particular frames (by name) by using | |
2897 the `Emacs*FRAME-NAME.iconic' resource. | |
2898 | |
2899 | |
2900 **** Resource List | |
2901 ------------------ | |
2902 | |
2903 Emacs frames accept the following resources: | |
2904 | |
2905 `geometry' (class `Geometry'): string | |
2906 Initial geometry for the frame. *Note Geometry Resources:: for a | |
2907 complete discussion of how this works. | |
2908 | |
2909 `iconic' (class `Iconic'): boolean | |
2910 Whether this frame should appear in the iconified state. | |
2911 | |
2912 `internalBorderWidth' (class `InternalBorderWidth'): int | |
2913 How many blank pixels to leave between the text and the edge of the | |
2914 window. | |
2915 | |
2916 `interline' (class `Interline'): int | |
2917 How many pixels to leave between each line (may not be | |
2918 implemented). | |
2919 | |
2920 `menubar' (class `Menubar'): boolean | |
2921 Whether newly-created frames should initially have a menubar. Set | |
2922 to true by default. | |
2923 | |
2924 `initiallyUnmapped' (class `InitiallyUnmapped'): boolean | |
2925 Whether XEmacs should leave the initial frame unmapped when it | |
2926 starts up. This is useful if you are starting XEmacs as a server | |
2927 (e.g. in conjunction with gnuserv or the external client widget). | |
2928 You can also control this with the `-unmapped' command-line option. | |
2929 | |
2930 `barCursor' (class `BarColor'): boolean | |
2931 Whether the cursor should be displayed as a bar, or the | |
2932 traditional box. | |
2933 | |
2934 `textPointer' (class `Cursor'): cursor-name | |
2935 The cursor to use when the mouse is over text. This resource is | |
2936 used to initialize the variable `x-pointer-shape'. | |
2937 | |
2938 `selectionPointer' (class `Cursor'): cursor-name | |
2939 The cursor to use when the mouse is over a selectable text region | |
2940 (an extent with the `highlight' property; for example, an Info | |
2941 cross-reference). This resource is used to initialize the variable | |
2942 `x-selection-pointer-shape'. | |
2943 | |
2944 `spacePointer' (class `Cursor'): cursor-name | |
2945 The cursor to use when the mouse is over a blank space in a buffer | |
2946 (that is, after the end of a line or after the end-of-file). This | |
2947 resource is used to initialize the variable | |
2948 `x-nontext-pointer-shape'. | |
2949 | |
2950 `modeLinePointer' (class `Cursor'): cursor-name | |
2951 The cursor to use when the mouse is over a mode line. This | |
2952 resource is used to initialize the variable `x-mode-pointer-shape'. | |
2953 | |
2954 `gcPointer' (class `Cursor'): cursor-name | |
2955 The cursor to display when a garbage-collection is in progress. | |
2956 This resource is used to initialize the variable | |
2957 `x-gc-pointer-shape'. | |
2958 | |
2959 `scrollbarPointer' (class `Cursor'): cursor-name | |
2960 The cursor to use when the mouse is over the scrollbar. This | |
2961 resource is used to initialize the variable | |
2962 `x-scrollbar-pointer-shape'. | |
2963 | |
2964 `pointerColor' (class `Foreground'): color-name | |
2965 `pointerBackground' (class `Background'): color-name | |
2966 The foreground and background colors of the mouse cursor. These | |
2967 resources are used to initialize the variables | |
2968 `x-pointer-foreground-color' and `x-pointer-background-color'. | |
2969 | |
2970 `scrollBarWidth' (class `ScrollBarWidth'): integer | |
2971 How wide the vertical scrollbars should be, in pixels; 0 means no | |
2972 vertical scrollbars. You can also use a resource specification of | |
2973 the form `*scrollbar.width', or the usual toolkit scrollbar | |
2974 resources: `*XmScrollBar.width' (Motif), `*XlwScrollBar.width' | |
2975 (Lucid), or `*Scrollbar.thickness' (Athena). We don't recommend | |
2976 that you use the toolkit resources, though, because they're | |
2977 dependent on how exactly your particular build of XEmacs was | |
2978 configured. | |
2979 | |
2980 `scrollBarHeight' (class `ScrollBarHeight'): integer | |
2981 How high the horizontal scrollbars should be, in pixels; 0 means no | |
2982 horizontal scrollbars. You can also use a resource specification | |
2983 of the form `*scrollbar.height', or the usual toolkit scrollbar | |
2984 resources: `*XmScrollBar.height' (Motif), `*XlwScrollBar.height' | |
2985 (Lucid), or `*Scrollbar.thickness' (Athena). We don't recommend | |
2986 that you use the toolkit resources, though, because they're | |
2987 dependent on how exactly your particular build of XEmacs was | |
2988 configured. | |
2989 | |
2990 `scrollBarPlacement' (class `ScrollBarPlacement'): string | |
2991 Where the horizontal and vertical scrollbars should be positioned. | |
2992 This should be one of the four strings `bottom-left', | |
2993 `bottom-right', `top-left', and `top-right'. Default is | |
2994 `bottom-right' for the Motif and Lucid scrollbars and | |
2995 `bottom-left' for the Athena scrollbars. | |
2996 | |
2997 `topToolBarHeight' (class `TopToolBarHeight'): integer | |
2998 `bottomToolBarHeight' (class `BottomToolBarHeight'): integer | |
2999 `leftToolBarWidth' (class `LeftToolBarWidth'): integer | |
3000 `rightToolBarWidth' (class `RightToolBarWidth'): integer | |
3001 Height and width of the four possible toolbars. | |
3002 | |
3003 `topToolBarShadowColor' (class `TopToolBarShadowColor'): color-name | |
3004 `bottomToolBarShadowColor' (class `BottomToolBarShadowColor'): color-name | |
3005 Color of the top and bottom shadows for the toolbars. NOTE: These | |
3006 resources do *not* have anything to do with the top and bottom | |
3007 toolbars (i.e. the toolbars at the top and bottom of the frame)! | |
3008 Rather, they affect the top and bottom shadows around the edges of | |
3009 all four kinds of toolbars. | |
3010 | |
3011 `topToolBarShadowPixmap' (class `TopToolBarShadowPixmap'): pixmap-name | |
3012 `bottomToolBarShadowPixmap' (class `BottomToolBarShadowPixmap'): pixmap-name | |
3013 Pixmap of the top and bottom shadows for the toolbars. If set, | |
3014 these resources override the corresponding color resources. NOTE: | |
3015 These resources do *not* have anything to do with the top and | |
3016 bottom toolbars (i.e. the toolbars at the top and bottom of the | |
3017 frame)! Rather, they affect the top and bottom shadows around the | |
3018 edges of all four kinds of toolbars. | |
3019 | |
3020 `toolBarShadowThickness' (class `ToolBarShadowThickness'): integer | |
3021 Thickness of the shadows around the toolbars, in pixels. | |
3022 | |
3023 `visualBell' (class `VisualBell'): boolean | |
3024 Whether XEmacs should flash the screen rather than making an | |
3025 audible beep. | |
3026 | |
3027 `bellVolume' (class `BellVolume'): integer | |
3028 Volume of the audible beep. | |
3029 | |
3030 `useBackingStore' (class `UseBackingStore'): boolean | |
3031 Whether XEmacs should set the backing-store attribute of the X | |
3032 windows it creates. This increases the memory usage of the X | |
3033 server but decreases the amount of X traffic necessary to update | |
3034 the screen, and is useful when the connection to the X server goes | |
3035 over a low-bandwidth line such as a modem connection. | |
3036 | |
3037 | |
3038 **** Face Resources | |
3039 ------------------- | |
3040 | |
3041 The attributes of faces are also per-frame. They can be specified as: | |
3042 | |
3043 Emacs.FACE_NAME.parameter: value | |
3044 | |
3045 (*do not* use `Emacs*FACE_NAME...') | |
3046 | |
3047 or | |
3048 | |
3049 Emacs*FRAME_NAME.FACE_NAME.parameter: value | |
3050 | |
3051 Faces accept the following resources: | |
3052 | |
3053 `attributeFont' (class `AttributeFont'): font-name | |
3054 The font of this face. | |
3055 | |
3056 `attributeForeground' (class `AttributeForeground'): color-name | |
3057 `attributeBackground' (class `AttributeBackground'): color-name | |
3058 The foreground and background colors of this face. | |
3059 | |
3060 `attributeBackgroundPixmap' (class `AttributeBackgroundPixmap'): file-name | |
3061 The name of an XBM file (or XPM file, if your version of Emacs | |
3062 supports XPM), to use as a background stipple. | |
3063 | |
3064 `attributeUnderline' (class `AttributeUnderline'): boolean | |
3065 Whether text in this face should be underlined. | |
3066 | |
3067 All text is displayed in some face, defaulting to the face named | |
3068 `default'. To set the font of normal text, use | |
3069 `Emacs*default.attributeFont'. To set it in the frame named `fred', use | |
3070 `Emacs*fred.default.attributeFont'. | |
3071 | |
3072 These are the names of the predefined faces: | |
3073 | |
3074 `default' | |
3075 Everything inherits from this. | |
3076 | |
3077 `bold' | |
3078 If this is not specified in the resource database, Emacs tries to | |
3079 find a bold version of the font of the default face. | |
3080 | |
3081 `italic' | |
3082 If this is not specified in the resource database, Emacs tries to | |
3083 find an italic version of the font of the default face. | |
3084 | |
3085 `bold-italic' | |
3086 If this is not specified in the resource database, Emacs tries to | |
3087 find a bold-italic version of the font of the default face. | |
3088 | |
3089 `modeline' | |
3090 This is the face that the modeline is displayed in. If not | |
3091 specified in the resource database, it is determined from the | |
3092 default face by reversing the foreground and background colors. | |
3093 | |
3094 `highlight' | |
3095 This is the face that highlighted extents (for example, Info | |
3096 cross-references and possible completions, when the mouse passes | |
3097 over them) are displayed in. | |
3098 | |
3099 `left-margin' | |
3100 `right-margin' | |
3101 These are the faces that the left and right annotation margins are | |
3102 displayed in. | |
3103 | |
3104 `zmacs-region' | |
3105 This is the face that mouse selections are displayed in. | |
3106 | |
3107 `text-cursor' | |
3108 This is the face that the cursor is displayed in. | |
3109 | |
3110 `isearch' | |
3111 This is the face that the matched text being searched for is | |
3112 displayed in. | |
3113 | |
3114 `info-node' | |
3115 This is the face of info menu items. If unspecified, it is copied | |
3116 from `bold-italic'. | |
3117 | |
3118 `info-xref' | |
3119 This is the face of info cross-references. If unspecified, it is | |
3120 copied from `bold'. (Note that, when the mouse passes over a | |
3121 cross-reference, the cross-reference's face is determined from a | |
3122 combination of the `info-xref' and `highlight' faces.) | |
3123 | |
3124 Other packages might define their own faces; to see a list of all | |
3125 faces, use any of the interactive face-manipulation commands such as | |
3126 `set-face-font' and type `?' when you are prompted for the name of a | |
3127 face. | |
3128 | |
3129 If the `bold', `italic', and `bold-italic' faces are not specified | |
3130 in the resource database, then XEmacs attempts to derive them from the | |
3131 font of the default face. It can only succeed at this if you have | |
3132 specified the default font using the XLFD (X Logical Font Description) | |
3133 format, which looks like | |
3134 | |
3135 *-courier-medium-r-*-*-*-120-*-*-*-*-*-* | |
3136 | |
3137 If you use any of the other, less strict font name formats, some of | |
3138 which look like | |
3139 | |
3140 lucidasanstypewriter-12 | |
3141 fixed | |
3142 9x13 | |
3143 | |
3144 then XEmacs won't be able to guess the names of the bold and italic | |
3145 versions. All X fonts can be referred to via XLFD-style names, so you | |
3146 should use those forms. See the man pages for `X(1)', `xlsfonts(1)', | |
3147 and `xfontsel(1)'. | |
3148 | |
3149 | |
3150 **** Widgets | |
3151 ------------ | |
3152 | |
3153 There are several structural widgets between the terminal EmacsFrame | |
3154 widget and the top level ApplicationShell; the exact names and types of | |
3155 these widgets change from release to release (for example, they changed | |
3156 in 19.9, 19.10, 19.12, and 19.13) and are subject to further change in | |
3157 the future, so you should avoid mentioning them in your resource database. | |
3158 The above-mentioned syntaxes should be forward-compatible. As of 19.14, | |
3159 the exact widget hierarchy is as follows: | |
3160 | |
3161 INVOCATION-NAME "shell" "container" FRAME-NAME | |
3162 x-emacs-application-class "TopLevelEmacsShell" "EmacsManager" "EmacsFrame" | |
3163 | |
3164 (for normal frames) | |
3165 | |
3166 or | |
3167 | |
3168 INVOCATION-NAME "shell" "container" FRAME-NAME | |
3169 x-emacs-application-class "TransientEmacsShell" "EmacsManager" "EmacsFrame" | |
3170 | |
3171 (for popup/dialog-box frames) | |
3172 | |
3173 where INVOCATION-NAME is the terminal component of the name of the | |
3174 XEmacs executable (usually `xemacs'), and `x-emacs-application-class' | |
3175 is generally `Emacs'. | |
3176 | |
3177 | |
3178 **** Menubar Resources | |
3179 ---------------------- | |
3180 | |
3181 As the menubar is implemented as a widget which is not a part of | |
3182 XEmacs proper, it does not use the face mechanism for specifying fonts | |
3183 and colors: It uses whatever resources are appropriate to the type of | |
3184 widget which is used to implement it. | |
3185 | |
3186 If Emacs was compiled to use only the Motif-lookalike menu widgets, | |
3187 then one way to specify the font of the menubar would be | |
3188 | |
3189 Emacs*menubar*font: *-courier-medium-r-*-*-*-120-*-*-*-*-*-* | |
3190 | |
3191 If the Motif library is being used, then one would have to use | |
3192 | |
3193 Emacs*menubar*fontList: *-courier-medium-r-*-*-*-120-*-*-*-*-*-* | |
3194 | |
3195 because the Motif library uses the `fontList' resource name instead | |
3196 of `font', which has subtly different semantics. | |
3197 | |
3198 The same is true of the scrollbars: They accept whichever resources | |
3199 are appropriate for the toolkit in use. | |
3200 | |
3201 | |
3202 *** Source Code Highlighting | |
3203 ---------------------------- | |
3204 | |
3205 It's possible to have your buffers "decorated" with fonts or colors | |
3206 indicating syntactic structures (such as strings, comments, function names, | |
3207 "reserved words", etc.). In XEmacs, the preferred way to do this is with | |
3208 font-lock-mode; activate it by adding the following code to your .emacs file: | |
3209 | |
3210 (add-hook 'emacs-lisp-mode-hook 'turn-on-font-lock) | |
3211 (add-hook 'c-mode-hook 'turn-on-font-lock) | |
3212 (add-hook 'c++-mode-hook 'turn-on-font-lock) | |
3213 (add-hook 'dired-mode-hook 'turn-on-font-lock) | |
3214 ...etc... | |
3215 | |
3216 To customize it, see the descriptions of the function `font-lock-mode' and | |
3217 the variables `font-lock-keywords', `c-font-lock-keywords', etc. | |
3218 | |
3219 There exist several other source code highlighting packages, but font-lock | |
3220 does one thing that most others don't do: highlights as you type new text; | |
3221 and one thing that no others do: bases part of its decoration on the | |
3222 syntax table of the major mode. Font-lock has C-level support to do this | |
3223 efficiently, so it should also be significantly faster than the others. | |
3224 | |
3225 If there's something that another highlighting package does that you can't | |
3226 make font-lock do, let us know. We would prefer to consolidate all of the | |
3227 desired functionality into one package rather than ship several different | |
3228 packages which do essentially the same thing in different ways. | |
3229 | |
3230 | |
3231 ** Differences Between XEmacs and Emacs 18 | |
3232 ========================================== | |
3233 | |
3234 Auto-configure support has been added, so it should be fairly easy to compile | |
3235 XEmacs on different systems. If you have any problems or feedback about | |
3236 compiling on your system, please let us know. | |
3237 | |
3238 We have reimplemented the basic input model in a more general way; instead of | |
3239 X input being a special-case of the normal ASCII input stream, XEmacs has a | |
3240 concept of "input events", and ASCII characters are a subset of that. The | |
3241 events that XEmacs knows about are not X events, but are a generalization of | |
3242 them, so that XEmacs can eventually be ported to different window systems. | |
3243 | |
3244 We have reimplemented keymaps so that sequences of events can be stored into | |
3245 them instead of just ASCII codes; it is possible to, for example, bind | |
3246 different commands to each of the chords Control-h, Control-H, Backspace, | |
3247 Control-Backspace, and Super-Shift-Backspace. Key bindings, function key | |
3248 bindings, and mouse bindings live in the same keymaps. | |
3249 | |
3250 Input and display of all ISO-8859-1 characters is supported. | |
3251 | |
3252 You can have multiple X windows ("frames" in XEmacs terminology). | |
3253 | |
3254 XEmacs has objects called "extents" and "faces", which are roughly | |
3255 analogous to Epoch's "buttons," "zones," and "styles." An extent is a | |
3256 region of text (a start position and an end position) and a face is a | |
3257 collection of textual attributes like fonts and colors. Every extent | |
3258 is displayed in some "face", so changing the properties of a face | |
3259 immediately updates the display of all associated extents. Faces can | |
3260 be frame-local: you can have a region of text which displays with | |
3261 completely different attributes when its buffer is viewed from a | |
3262 different X window. | |
3263 | |
3264 The display attributes of faces may be specified either in lisp or through | |
3265 the X resource manager. | |
3266 | |
3267 Pixmaps of arbitrary size can be embedded in a buffer. | |
3268 | |
3269 Variable width fonts work. | |
3270 | |
3271 The height of a line is the height of the tallest font on that line, instead | |
3272 of all lines having the same height. | |
3273 | |
3274 XEmacs uses the MIT "Xt" toolkit instead of raw Xlib calls, which | |
3275 makes it be a more well-behaved X citizen (and also improves | |
3276 portability). A result of this is that it is possible to include | |
3277 other Xt "Widgets" in the XEmacs window. Also, XEmacs understands the | |
3278 standard Xt command-line arguments. | |
3279 | |
3280 XEmacs understands the X11 "Selection" mechanism; it's possible to define | |
3281 and customize selection converter functions and new selection types from | |
3282 Emacs Lisp, without having to recompile XEmacs. | |
3283 | |
3284 XEmacs provides support for ToolTalk on systems that have it. | |
3285 | |
3286 XEmacs supports the Zmacs/Lispm style of region highlighting, where the | |
3287 region between the point and mark is highlighted when in its "active" state. | |
3288 | |
3289 XEmacs has a menubar, whose contents are customizable from emacs-lisp. | |
3290 This menubar looks Motif-ish, but does not require Motif. If you already | |
3291 own Motif, however, you can configure XEmacs to use a *real* Motif menubar | |
3292 instead. | |
3293 | |
3294 XEmacs can ask questions using popup dialog boxes. Any command executed from | |
3295 a menu will ask yes/no questions with dialog boxes, while commands executed | |
3296 via the keyboard will use the minibuffer. | |
3297 | |
3298 XEmacs has vertical and horizontal scrollbars. | |
3299 | |
3300 The initial load-path is computed at run-time, instead of at compile-time. | |
3301 This means that if you move the XEmacs executable and associated directories | |
3302 to somewhere else, you don't have to recompile anything. | |
3303 | |
3304 You can specify what the title of the XEmacs windows and icons should be | |
3305 with the variables `frame-title-format' and `frame-icon-title-format', | |
3306 which have the same syntax as `mode-line-format'. | |
3307 | |
3308 XEmacs now supports floating-point numbers. | |
3309 | |
3310 XEmacs now knows about timers directly, instead of them being simulated by | |
3311 a subprocess. | |
3312 | |
3313 XEmacs understands truenames, and can be configured to notice when you are | |
3314 visiting two names of the same file. See the variables find-file-use-truenames | |
3315 and find-file-compare-truenames. | |
3316 | |
3317 If you're running on a machine with audio hardware, you can specify sound | |
3318 files for XEmacs to play instead of the default X beep. See the documentation | |
3319 of the function load-sound-file and the variable sound-alist. | |
3320 | |
3321 An XEmacs frame can be placed within an "external client widget" managed by | |
3322 another application. This allows an application to use an XEmacs frame as its | |
3323 text pane rather than the standard Text widget that is provided with Motif or | |
3324 Athena. XEmacs supports Motif applications, generic Xt (e.g. Athena) | |
3325 applications, and raw Xlib applications. | |
3326 | |
3327 Random changes to the emacs-lisp library: (some of this was not written by | |
3328 us, but is included because it's free software and we think it's good stuff) | |
3329 | |
3330 - there is a new optimizing byte-compiler | |
3331 - there is a new abbrev-based mail-alias mechanism | |
3332 - the -*- line can contain local-variable settings | |
3333 - there is a new TAGS package | |
3334 - there is a new VI-emulation mode (viper) | |
3335 - there is a new implementation of Dired | |
3336 - there is a new implementation of Isearch | |
3337 - the VM package for reading mail is provided | |
3338 - the W3 package for browsing the World Wide Web hypertext information | |
3339 system is provided | |
3340 - the Hyperbole package, a programmable information management and | |
3341 hypertext system | |
3342 - the OO-Browser package, a multi-language object-oriented browser | |
3343 | |
3344 There are many more specifics in the "Miscellaneous Changes" section, below. | |
3345 | |
3346 The online Emacs Manual and Emacs-Lisp Manual are now both relatively | |
3347 up-to-date. |