3 @unnumbered XEmacs Features
5 This section describes the difference between Emacs Version 18 and
8 @unnumberedsec General Changes
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:
18 (setq term-setup-hook 'evi)
20 @xref{evi Mode} for a brief discussion.
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:
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.
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.
48 Input and display of all ISO-8859-1 characters is supported.
51 Multiple fonts, including variable-width fonts, and fonts of differing
52 heights, are supported.
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
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
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
74 Emacs now supports floating-point numbers.
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
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.
88 Any existing subdirectories of the Emacs Lisp directory are now added to the
89 @code{load-path} by default.
92 On some machines, you can change the audible bell using the
93 @code{sound-alist} variable. @xref{Audible Bell} for more information.
96 You can use multiple X windows to display multiple Emacs frames.
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.
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
110 XEmacs has a menu bar for mouse-controlled operations in addition to
111 keystrokes. @xref{Pull-down Menus}.
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
120 @unnumberedsec New Commands and Variables
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:
127 @findex byte-compile-and-load-file
128 @findex byte-compile-buffer
130 @code{byte-compile-and-load-file} and @code{byte-compile-buffer}
131 byte-compile the contents of a file or buffer.
134 The new @code{conx} function lets you generate random sentences for your
137 @findex compile-defun
139 @code{compile-defun} compiles and evaluates the current top-level
142 @findex find-this-file
143 @findex find-this-file-other-window
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
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
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}.
170 @findex load-default-sounds
171 @findex load-sound-file
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
180 @findex locate-library
182 @code{locate-library} finds the file that the function
183 @code{load-library} loads, and it displays the file's full pathname.
185 @findex make-directory
186 @findex remove-directory
188 @code{make-directory} creates a directory, while @code{remove-directory}
191 @findex mark-beginning-of-buffer
192 @findex mark-end-of-buffer
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.
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
204 @findex mouse-select-and-split
205 @findex mouse-set-mark
206 @findex mouse-set-point
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}.
224 @findex compare-windows
226 @code{compare-windows} takes an argument @var{ignore-whitespace}.
227 The argument means ignore changes in whitespace.
231 You can conditionalize your @file{.emacs} file as follows so that XEmacs
232 commands are invoked only when you are in XEmacs:
234 @cindex version number
236 (cond ((string-match "Lucid" emacs-version)
238 ;; Code for any version of Lucid Emacs or XEmacs goes here
242 (cond ((and (string-match "XEmacs" emacs-version)
243 (or (> emacs-major-version 19)
244 (>= emacs-minor-version 12)))
246 ;; Code which requires XEmacs version 19.12 or newer goes here
250 (cond ((>= emacs-major-version 19)
252 ;; Code for any vintage-19 emacs goes here
256 (cond ((and (not (string-match "Lucid" emacs-version))
257 (= emacs-major-version 19))
259 ;; Code specific to FSF Emacs 19 (not XEmacs) goes here
263 (cond ((< emacs-major-version 19)
265 ;; Code specific to emacs 18 goes here
270 Of particular interest for use in @file{.emacs} files are:
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
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
288 @code{make-frame} creates a new Emacs frame (X window).
292 These new variables are only present in XEmacs:
296 @vindex minibuffer-confirm-incomplete
298 @code{minibuffer-confirm-incomplete} prompts for confirmation in
299 contexts where @code{completing-read} allows answers that are not valid
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
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}.
313 @vindex zmacs-regions
315 @code{zmacs-regions} determines whether LISPM-style active regions
319 @unnumberedsec Changes in Key Bindings
321 XEmacs has the following new default function keybindings:
328 Same as @kbd{M-x undo}.
331 Same as the Cut menu item; that is, it copies the selected text to
332 the X Clipboard selection.
335 Same as the Copy menu item.
338 Same as the Paste menu item.
352 @item @key{LEFT-ARROW}
353 Same as the function @code{backward-char}.
355 @item @key{RIGHT-ARROW}
356 Same as the function @code{forward-char}.
359 Same as the function @code{previous-line}.
361 @item @key{DOWN-ARROW}
362 Same as the function @code{next-line}.