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