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