Typo fix, 'max_align_t' -> 'sxe_max_align_t'
[sxemacs] / info / sxemacs / new.texi
1 @iftex
2 @unnumbered XEmacs Features
3
4 SXEmacs Note:  This section of the manual @emph{has not} been updated to
5 SXEmacs conditions.  In the future it will describe the differences
6 between XEmacs and SXEmacs.
7
8 This section describes the difference between Emacs Version 18 and
9 XEmacs.
10
11 @unnumberedsec General Changes
12
13 @itemize @bullet
14 @ignore
15 @item
16 XEmacs has a new vi emulation mode called evi mode.  To
17 start evi mode in Emacs, type the command @kbd{M-x evi}.  If you want
18 Emacs to automatically put you in evi-mode all the time, include this
19 line in your init file:
20 @example
21 (setq term-setup-hook 'evi)
22 @end example
23 @xref{evi Mode} for a brief discussion.
24 @xref{Init File}.
25 @end ignore
26
27 @item
28 XEmacs has a new vi emulation mode called ``viper'' mode.  To start
29 viper mode in XEmacs, type the command @kbd{M-x viper-mode}.  If you
30 want XEmacs to automatically put you in viper-mode all the time, include
31 this line in your init file:
32 @example
33 (viper-mode)
34 @end example
35 @xref{Init File}.
36
37 @item
38 Earlier versions of Emacs only allowed keybindings to ASCII character
39 sequences.  XEmacs has greatly expanded this by allowing you to
40 use a vector of key sequences which are in turn composed of a modifier
41 and a keysym. @xref{Keystrokes} for more information.
42
43 @item
44 The keymap data structure has been reimplemented to allow the use of a
45 character set larger than ASCII. Keymaps are no longer alists and/or
46 vectors; they are a new primary data type.  Consequently, code which
47 manipulated keymaps with list or array manipulation functions will no
48 longer work.  It must use the functions @code{define-key} or
49 @code{map-keymap} and @code{set-keymap-parent} (the new keymap
50 functions).  @xref{Key Bindings} for more information.
51
52 @item
53 Input and display of all ISO-8859-1 characters is supported.
54
55 @item
56 Multiple fonts, including variable-width fonts, and fonts of differing
57 heights, are supported.
58
59 @item
60 There is a new @file{tags} package and a new UNIX manual browsing
61 package. They are similar to earlier versions; for more information look
62 at the source code.
63
64 @item
65 There is a new implementation of Dired, with many new features. The
66 online info for Dired, @i{not} the Dired node of Emacs info, provides
67 more detail.
68
69 @item
70 GNUS (a network news reader), VM (an alternative mail reader), ILISP (a
71 package for interacting with inferior Lisp processes), ANGE-FTP (a package
72 for making FTP-accessible files appear just like files on the local disk,
73 even to Dired), Calendar (an Emacs-based calendar and appointment-
74 management tool), and W3 (an interface to the World Wide Web) are a part
75 of the XEmacs Lisp library.  See the related documentation in the
76 online info browser.
77
78 @item
79 Emacs now supports floating-point numbers.
80
81 @item
82 When you send mail, mail aliases are now expanded in the buffer. In
83 earlier versions, they were expanded after the mail-sending command was
84 executed.
85
86 @item
87 The initial value of @code{load-path} is computed when Emacs starts up,
88 instead of being hardcoded in when Emacs is compiled. As a result, you
89 can now move the Emacs executable and Lisp library to a
90 different location in the file system without having to recompile.
91
92 @item
93 Any existing subdirectories of the Emacs Lisp directory are now added to the
94 @code{load-path} by default.
95
96 @item
97 On some machines, you can change the audible bell using the
98 @code{sound-alist} variable. @xref{Audible Bell} for more information.
99
100 @item
101 You can use multiple X windows to display multiple Emacs frames.
102
103 @item
104 You can use the X selection mechanism to copy material from other
105 applications and into other applications.  You can also use all Emacs
106 region commands on a region selected with the mouse. @xref{Mouse
107 Selection} for more information.
108
109 @item
110 By default, the variable @code{zmacs-regions} is set to highlight the region
111 between point and the mark.  This unifies X selection and Emacs selection
112 behavior.
113
114 @item
115 XEmacs has a menu bar for mouse-controlled operations in addition to
116 keystrokes.  @xref{Pull-down Menus}.
117
118 @item
119 You can look in the file @file{/usr/local/lib/xemacs-19.11/etc/Emacs.ad} for
120 a list of Emacs X resources.  You can set these resources in your X
121 environment to set your preferences for color, fonts, location, and the size
122 of XEmacs frames.  Refer to your X documentation for more information
123 about resources.
124
125 @b{New Commands and Variables}
126
127 There are many new functions in XEmacs, and many existing functions
128 whose semantics have been expanded.  Most of these are only of interest
129 to the Emacs-Lisp programmer; see the NEWS file @kbd{C-h n} for a complete
130 list.  What follows is a partial list of the new interactive commands:
131
132 @findex byte-compile-and-load-file
133 @findex byte-compile-buffer
134 @item
135 @code{byte-compile-and-load-file} and @code{byte-compile-buffer}
136 byte-compile the contents of a file or buffer.
137
138 @findex conx
139 The new @code{conx} function lets you generate random sentences for your
140 amusement.
141
142 @findex compile-defun
143 @item
144 @code{compile-defun} compiles and evaluates the current top-level
145 form.
146
147 @findex find-this-file
148 @findex find-this-file-other-window
149 @item
150 @code{find-this-file} and @code{find-this-file-other-window} can be used
151 interactively with a prefix argument to switch to the filename at point
152 in the buffer.  @code{find-this-file-other-window} displays the file in
153 another window.
154
155 @findex invert-face
156 @findex make-face-bold
157 @findex make-face-bold-italic
158 @findex make-face-italic
159 @findex make-face-unbold
160 @findex make-face-unitalic
161 @findex set-face-background
162 @findex set-face-background-pixmap
163 @findex set-face-font
164 @findex set-face-foreground
165 @findex set-face-underline-p
166 @item
167 Several new functions have been added that allow you to customize the
168 color and font attributes of a region of text: @code{invert-face},
169 @code{make-face-bold}, @code{make-face-bold-italic},
170 @code{make-face-italic}, @code{make-face-unbold},
171 @code{make-face-unitalic}, @code{set-face-background},
172 @code{set-face-background-pixmap}, @code{set-face-font},
173 @code{set-face-foreground}, and @code{set-face-underline-p}.
174
175 @findex load-default-sounds
176 @findex load-sound-file
177 @findex play-sound
178 @item
179 @code{load-default-sounds} and @code{load-sound-file} allow you to
180 customize the audible bell sound.  @code{load-default-sounds} loads and
181 installs sound files.  @code{load-sound-file} reads in audio files and
182 adds them to the sound alist. @code{play-sound} plays the specified
183 sound type.
184
185 @findex locate-library
186 @item
187 @code{locate-library} finds the file that the function
188 @code{load-library} loads, and it displays the file's full pathname.
189
190 @findex make-directory
191 @findex remove-directory
192 @item
193 @code{make-directory} creates a directory, while @code{remove-directory}
194 removes a directory.
195
196 @findex mark-beginning-of-buffer
197 @findex mark-end-of-buffer
198 @item
199 @code{mark-beginning-of-buffer} and @code{mark-end-of-buffer} push the
200 mark to the beginning or end of a buffer, respectively.
201
202 @findex mouse-del-char
203 @findex mouse-delete-window
204 @findex mouse-keep-one-window
205 @findex mouse-kill-line
206 @findex mouse-line-length
207 @findex mouse-scroll
208 @findex mouse-select
209 @findex mouse-select-and-split
210 @findex mouse-set-mark
211 @findex mouse-set-point
212 @findex mouse-track
213 @findex mouse-track-adjust
214 @findex mouse-track-and-copy-to-cutbuffer
215 @findex mouse-track-delete-and-insert
216 @findex mouse-track-insert
217 @findex mouse-window-to-region
218 Several functions have been added that allow you to perform various
219 editing, region, and window operations using the mouse:
220 @code{mouse-del-char}, @code{mouse-delete-window},
221 @code{mouse-keep-one-window}, @code{mouse-kill-line},
222 @code{mouse-line-length}, @code{mouse-scroll}, @code{mouse-select},
223 @code{mouse-select-and-split}, @code{mouse-set-mark},
224 @code{mouse-set-point}, @code{mouse-track}, @code{mouse-track-adjust},
225 @code{mouse-track-and-copy-to-cutbuffer},
226 @code{mouse-track-delete-and-insert}, @code{mouse-track-insert}, and
227 @code{mouse-window-to-region}.
228
229 @findex compare-windows
230 @item
231 @code{compare-windows} takes an argument @var{ignore-whitespace}.
232 The argument means ignore changes in whitespace.
233
234 @end itemize
235
236 You can conditionalize your @file{.emacs} file as follows so that XEmacs
237 commands are invoked only when you are in XEmacs:
238
239 @cindex version number
240 @example
241 (cond ((string-match "Lucid" emacs-version)
242        ;;
243        ;; Code for any version of Lucid Emacs or XEmacs goes here
244        ;;
245        ))
246
247 (cond ((and (string-match "XEmacs" emacs-version)
248             (or (> emacs-major-version 19)
249                 (>= emacs-minor-version 12)))
250        ;;
251        ;; Code which requires XEmacs version 19.12 or newer goes here
252        ;;
253        ))
254
255 (cond ((>= emacs-major-version 19)
256        ;;
257        ;; Code for any vintage-19 emacs goes here
258        ;;
259        ))
260
261 (cond ((and (not (string-match "Lucid" emacs-version))
262             (= emacs-major-version 19))
263        ;;
264        ;; Code specific to FSF Emacs 19 (not XEmacs) goes here
265        ;;
266        ))
267
268 (cond ((< emacs-major-version 19)
269        ;;
270        ;; Code specific to emacs 18 goes here
271        ;;
272        ))
273 @end example
274
275 Alternatively, use @file{.xemacs/init.el} for an init file.  @xref{Init File}.
276
277 Of particular interest for use in  files are:
278
279 @itemize @bullet
280 @findex add-menu
281 @findex add-menu-item
282 @findex delete-menu-item
283 @findex disable-menu-item
284 @findex enable-menu-item
285 @findex relabel-menu-item
286 @item
287 @code{add-menu} lets you add a new menu to the menubar or a submenu to a
288 pull-down menu.  @code{add-menu-item}, @code{disable-menu-item},
289 @code{delete-menu-item}, @code{enable-menu-item}, and
290 @code{relabel-menu-item} allow you to customize the XEmacs
291 pull-down menus.
292
293 @findex make-frame
294 @item
295 @code{make-frame} creates a new Emacs frame (X window).
296
297 @end itemize
298
299 These new variables are only present in XEmacs:
300
301 @itemize @bullet
302
303 @vindex minibuffer-confirm-incomplete
304 @item
305 @code{minibuffer-confirm-incomplete} prompts for confirmation in
306 contexts where @code{completing-read} allows answers that are not valid
307 completions.
308
309 @vindex x-mode-pointer-shape
310 @vindex x-nontext-pointer-shape
311 @vindex x-pointer-background-color
312 @vindex x-pointer-foreground-color
313 @vindex x-pointer-shape
314 @item
315 Several variables have been added that allow you to customize the color
316 and shape of the mouse pointer: @code{x-pointer-background-color},
317 @code{x-pointer-foreground-color}, @code{x-mode-pointer-shape},
318 @code{x-pointer-shape}, and @* @code{x-nontext-pointer-shape}.
319
320 @vindex zmacs-regions
321 @item
322 @code{zmacs-regions} determines whether LISPM-style active regions
323 should be used.
324 @end itemize
325
326 @unnumberedsec Changes in Key Bindings
327
328 XEmacs has the following new default function keybindings:
329
330 @table @kbd
331 @item @key{HELP}
332 Same as @kbd{C-h}.
333
334 @item @key{UNDO}
335 Same as @kbd{M-x undo}.
336
337 @item @key{CUT}
338 Same as the Cut menu item; that is, it copies the selected text to
339 the X Clipboard selection.
340
341 @item @key{COPY}
342 Same as the Copy menu item.
343
344 @item @key{PASTE}
345 Same as the Paste menu item.
346
347 @item @key{PGUP}
348 Same as @kbd{M-v}.
349
350 @item @key{PGDN}
351 Same as @kbd{C-v}.
352
353 @item @key{HOME}
354 Same as @kbd{M-<}.
355
356 @item @key{END}
357 Same as @kbd{M->}.
358
359 @item @key{LEFT-ARROW}
360 Same as the function @code{backward-char}.
361
362 @item @key{RIGHT-ARROW}
363 Same as the function @code{forward-char}.
364
365 @item @key{UP-ARROW}
366 Same as the function @code{previous-line}.
367
368 @item @key{DOWN-ARROW}
369 Same as the function @code{next-line}.
370
371 @end table
372
373
374 @end iftex