2 @unnumbered XEmacs Features
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.
8 This section describes the difference between Emacs Version 18 and
11 @unnumberedsec General Changes
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:
21 (setq term-setup-hook 'evi)
23 @xref{evi Mode} for a brief discussion.
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:
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.
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.
53 Input and display of all ISO-8859-1 characters is supported.
56 Multiple fonts, including variable-width fonts, and fonts of differing
57 heights, are supported.
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
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
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
79 Emacs now supports floating-point numbers.
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
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.
93 Any existing subdirectories of the Emacs Lisp directory are now added to the
94 @code{load-path} by default.
97 On some machines, you can change the audible bell using the
98 @code{sound-alist} variable. @xref{Audible Bell} for more information.
101 You can use multiple X windows to display multiple Emacs frames.
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.
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
115 XEmacs has a menu bar for mouse-controlled operations in addition to
116 keystrokes. @xref{Pull-down Menus}.
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
125 @b{New Commands and Variables}
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:
132 @findex byte-compile-and-load-file
133 @findex byte-compile-buffer
135 @code{byte-compile-and-load-file} and @code{byte-compile-buffer}
136 byte-compile the contents of a file or buffer.
139 The new @code{conx} function lets you generate random sentences for your
142 @findex compile-defun
144 @code{compile-defun} compiles and evaluates the current top-level
147 @findex find-this-file
148 @findex find-this-file-other-window
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
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
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}.
175 @findex load-default-sounds
176 @findex load-sound-file
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
185 @findex locate-library
187 @code{locate-library} finds the file that the function
188 @code{load-library} loads, and it displays the file's full pathname.
190 @findex make-directory
191 @findex remove-directory
193 @code{make-directory} creates a directory, while @code{remove-directory}
196 @findex mark-beginning-of-buffer
197 @findex mark-end-of-buffer
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.
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
209 @findex mouse-select-and-split
210 @findex mouse-set-mark
211 @findex mouse-set-point
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}.
229 @findex compare-windows
231 @code{compare-windows} takes an argument @var{ignore-whitespace}.
232 The argument means ignore changes in whitespace.
236 You can conditionalize your @file{.emacs} file as follows so that XEmacs
237 commands are invoked only when you are in XEmacs:
239 @cindex version number
241 (cond ((string-match "Lucid" emacs-version)
243 ;; Code for any version of Lucid Emacs or XEmacs goes here
247 (cond ((and (string-match "XEmacs" emacs-version)
248 (or (> emacs-major-version 19)
249 (>= emacs-minor-version 12)))
251 ;; Code which requires XEmacs version 19.12 or newer goes here
255 (cond ((>= emacs-major-version 19)
257 ;; Code for any vintage-19 emacs goes here
261 (cond ((and (not (string-match "Lucid" emacs-version))
262 (= emacs-major-version 19))
264 ;; Code specific to FSF Emacs 19 (not XEmacs) goes here
268 (cond ((< emacs-major-version 19)
270 ;; Code specific to emacs 18 goes here
275 Alternatively, use @file{.xemacs/init.el} for an init file. @xref{Init File}.
277 Of particular interest for use in files are:
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
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
295 @code{make-frame} creates a new Emacs frame (X window).
299 These new variables are only present in XEmacs:
303 @vindex minibuffer-confirm-incomplete
305 @code{minibuffer-confirm-incomplete} prompts for confirmation in
306 contexts where @code{completing-read} allows answers that are not valid
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
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}.
320 @vindex zmacs-regions
322 @code{zmacs-regions} determines whether LISPM-style active regions
326 @unnumberedsec Changes in Key Bindings
328 XEmacs has the following new default function keybindings:
335 Same as @kbd{M-x undo}.
338 Same as the Cut menu item; that is, it copies the selected text to
339 the X Clipboard selection.
342 Same as the Copy menu item.
345 Same as the Paste menu item.
359 @item @key{LEFT-ARROW}
360 Same as the function @code{backward-char}.
362 @item @key{RIGHT-ARROW}
363 Same as the function @code{forward-char}.
366 Same as the function @code{previous-line}.
368 @item @key{DOWN-ARROW}
369 Same as the function @code{next-line}.