428
|
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
|
442
|
16 line in your init file:
|
428
|
17 @example
|
|
18 (setq term-setup-hook 'evi)
|
|
19 @end example
|
|
20 @xref{evi Mode} for a brief discussion.
|
442
|
21 @xref{Init File}.
|
428
|
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
|
442
|
28 this line in your init file:
|
428
|
29 @example
|
|
30 (viper-mode)
|
|
31 @end example
|
442
|
32 @xref{Init File}.
|
428
|
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
|
2537
|
238 (cond ((string-match "XEmacs" emacs-version)
|
|
239 ;;
|
|
240 ;; Code for any version of XEmacs goes here.
|
|
241 ;;
|
|
242 ))
|
|
243
|
|
244 (cond ((not (string-match "XEmacs" emacs-version)))
|
428
|
245 ;;
|
2537
|
246 ;; Code for any version of GNU Emacs goes here.
|
|
247 ;;
|
|
248 ))
|
|
249
|
|
250 (cond ((and (string-match "XEmacs" emacs-version)
|
|
251 (emacs-version>= 21 4))
|
|
252 ;;
|
|
253 ;; Code which requires XEmacs version 21.4 or newer goes here
|
428
|
254 ;;
|
|
255 ))
|
|
256
|
|
257 (cond ((and (string-match "XEmacs" emacs-version)
|
2537
|
258 (emacs-version>= 21 4 12)
|
|
259 (not (emacs-version>= 21 4 15)))
|
428
|
260 ;;
|
2537
|
261 ;; Code which requires exactly XEmacs version 21.4.12 through
|
|
262 ;; 21.4.14, inclusive, goes here. (e.g. A bug was introduced in
|
|
263 ;; 21.4.12 and fixed in 21.4.15 but many of the versions of
|
|
264 ;; XEmacs around in the computer laboratory run those versions,
|
|
265 ;; so I need to introduce a workaround. In such a case, you
|
|
266 ;; should ideally try to conditionalize on something else,
|
|
267 ;; e.g. a feature symbol or a simple test that can be run to
|
|
268 ;; smoke out the bug.)
|
428
|
269 ;;
|
|
270 ))
|
|
271
|
2537
|
272 (cond ((and (not (string-match "XEmacs" emacs-version)
|
|
273 (emacs-version>= 20 2))
|
428
|
274 ;;
|
2537
|
275 ;; Code which requires GNU Emacs version 20.2 or newer, but not XEmacs,
|
|
276 ;; goes here
|
428
|
277 ;;
|
|
278 ))
|
|
279
|
2537
|
280 @end example
|
|
281
|
|
282 @emph{NOTE}: @strong{DO} use @code{(emacs-version>= ...)}. @strong{DO NOT}
|
|
283 try to do this yourself using @code{emacs-major-version} and
|
|
284 @code{emacs-minor-version}. You will, with high probability, get it
|
|
285 wrong. Typical attempts to replace @code{(emacs-version>= 21 4)} use
|
|
286
|
|
287 @example
|
|
288 (and (>= emacs-major-version 21)
|
|
289 (>= emacs-minor-version 4))
|
|
290 @end example
|
428
|
291
|
2537
|
292 which correctly excludes 21.3 and all previous versions,
|
|
293 but also excludes 22.0 through 22.3, 23.0 through 23.3, etc.
|
|
294
|
|
295 A "more clever" version, as advocated in earlier versions
|
|
296 of this very manual, was like this:
|
|
297
|
|
298 @example
|
|
299 (or (> emacs-major-version 21)
|
|
300 (>= emacs-minor-version 4))
|
428
|
301 @end example
|
|
302
|
2537
|
303 which correctly includes 21.4 and all following versions,
|
|
304 but also includes 20.4 through 20.99999, 19.4 through
|
|
305 19.99999, etc.
|
|
306
|
442
|
307 Alternatively, use @file{.xemacs/init.el} for an init file. @xref{Init File}.
|
|
308
|
|
309 Of particular interest for use in files are:
|
428
|
310
|
|
311 @itemize @bullet
|
|
312 @findex add-menu
|
|
313 @findex add-menu-item
|
|
314 @findex delete-menu-item
|
|
315 @findex disable-menu-item
|
|
316 @findex enable-menu-item
|
|
317 @findex relabel-menu-item
|
|
318 @item
|
|
319 @code{add-menu} lets you add a new menu to the menubar or a submenu to a
|
|
320 pull-down menu. @code{add-menu-item}, @code{disable-menu-item},
|
|
321 @code{delete-menu-item}, @code{enable-menu-item}, and
|
|
322 @code{relabel-menu-item} allow you to customize the XEmacs
|
|
323 pull-down menus.
|
|
324
|
|
325 @findex make-frame
|
|
326 @item
|
|
327 @code{make-frame} creates a new Emacs frame (X window).
|
|
328
|
|
329 @end itemize
|
|
330
|
|
331 These new variables are only present in XEmacs:
|
|
332
|
|
333 @itemize @bullet
|
|
334
|
|
335 @vindex minibuffer-confirm-incomplete
|
|
336 @item
|
|
337 @code{minibuffer-confirm-incomplete} prompts for confirmation in
|
|
338 contexts where @code{completing-read} allows answers that are not valid
|
|
339 completions.
|
|
340
|
|
341 @vindex x-mode-pointer-shape
|
|
342 @vindex x-nontext-pointer-shape
|
|
343 @vindex x-pointer-background-color
|
|
344 @vindex x-pointer-foreground-color
|
|
345 @vindex x-pointer-shape
|
|
346 @item
|
|
347 Several variables have been added that allow you to customize the color
|
|
348 and shape of the mouse pointer: @code{x-pointer-background-color},
|
|
349 @code{x-pointer-foreground-color}, @code{x-mode-pointer-shape},
|
|
350 @code{x-pointer-shape}, and @* @code{x-nontext-pointer-shape}.
|
|
351
|
|
352 @vindex zmacs-regions
|
|
353 @item
|
|
354 @code{zmacs-regions} determines whether LISPM-style active regions
|
|
355 should be used.
|
|
356 @end itemize
|
|
357
|
|
358 @unnumberedsec Changes in Key Bindings
|
|
359
|
|
360 XEmacs has the following new default function keybindings:
|
|
361
|
|
362 @table @kbd
|
440
|
363 @item @key{HELP}
|
428
|
364 Same as @kbd{C-h}.
|
|
365
|
440
|
366 @item @key{UNDO}
|
428
|
367 Same as @kbd{M-x undo}.
|
|
368
|
440
|
369 @item @key{CUT}
|
428
|
370 Same as the Cut menu item; that is, it copies the selected text to
|
|
371 the X Clipboard selection.
|
|
372
|
440
|
373 @item @key{COPY}
|
428
|
374 Same as the Copy menu item.
|
|
375
|
440
|
376 @item @key{PASTE}
|
428
|
377 Same as the Paste menu item.
|
|
378
|
|
379 @item @key{PGUP}
|
|
380 Same as @kbd{M-v}.
|
|
381
|
|
382 @item @key{PGDN}
|
|
383 Same as @kbd{C-v}.
|
|
384
|
|
385 @item @key{HOME}
|
|
386 Same as @kbd{M-<}.
|
|
387
|
|
388 @item @key{END}
|
|
389 Same as @kbd{M->}.
|
|
390
|
|
391 @item @key{LEFT-ARROW}
|
|
392 Same as the function @code{backward-char}.
|
|
393
|
440
|
394 @item @key{RIGHT-ARROW}
|
428
|
395 Same as the function @code{forward-char}.
|
|
396
|
|
397 @item @key{UP-ARROW}
|
|
398 Same as the function @code{previous-line}.
|
|
399
|
|
400 @item @key{DOWN-ARROW}
|
|
401 Same as the function @code{next-line}.
|
|
402
|
|
403 @end table
|
|
404
|
|
405
|
|
406 @end iftex
|