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 init file:
18 (setq term-setup-hook 'evi)
20 @xref{evi Mode} for a brief discussion.
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:
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.
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.
50 Input and display of all ISO-8859-1 characters is supported.
53 Multiple fonts, including variable-width fonts, and fonts of differing
54 heights, are supported.
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
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
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
76 Emacs now supports floating-point numbers.
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
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.
90 Any existing subdirectories of the Emacs Lisp directory are now added to the
91 @code{load-path} by default.
94 On some machines, you can change the audible bell using the
95 @code{sound-alist} variable. @xref{Audible Bell} for more information.
98 You can use multiple X windows to display multiple Emacs frames.
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.
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
112 XEmacs has a menu bar for mouse-controlled operations in addition to
113 keystrokes. @xref{Pull-down Menus}.
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
122 @unnumberedsec New Commands and Variables
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:
129 @findex byte-compile-and-load-file
130 @findex byte-compile-buffer
132 @code{byte-compile-and-load-file} and @code{byte-compile-buffer}
133 byte-compile the contents of a file or buffer.
136 The new @code{conx} function lets you generate random sentences for your
139 @findex compile-defun
141 @code{compile-defun} compiles and evaluates the current top-level
144 @findex find-this-file
145 @findex find-this-file-other-window
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
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
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}.
172 @findex load-default-sounds
173 @findex load-sound-file
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
182 @findex locate-library
184 @code{locate-library} finds the file that the function
185 @code{load-library} loads, and it displays the file's full pathname.
187 @findex make-directory
188 @findex remove-directory
190 @code{make-directory} creates a directory, while @code{remove-directory}
193 @findex mark-beginning-of-buffer
194 @findex mark-end-of-buffer
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.
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
206 @findex mouse-select-and-split
207 @findex mouse-set-mark
208 @findex mouse-set-point
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}.
226 @findex compare-windows
228 @code{compare-windows} takes an argument @var{ignore-whitespace}.
229 The argument means ignore changes in whitespace.
233 You can conditionalize your @file{.emacs} file as follows so that XEmacs
234 commands are invoked only when you are in XEmacs:
236 @cindex version number
238 (cond ((string-match "Lucid" emacs-version)
240 ;; Code for any version of Lucid Emacs or XEmacs goes here
244 (cond ((and (string-match "XEmacs" emacs-version)
245 (or (> emacs-major-version 19)
246 (>= emacs-minor-version 12)))
248 ;; Code which requires XEmacs version 19.12 or newer goes here
252 (cond ((>= emacs-major-version 19)
254 ;; Code for any vintage-19 emacs goes here
258 (cond ((and (not (string-match "Lucid" emacs-version))
259 (= emacs-major-version 19))
261 ;; Code specific to FSF Emacs 19 (not XEmacs) goes here
265 (cond ((< emacs-major-version 19)
267 ;; Code specific to emacs 18 goes here
272 Alternatively, use @file{.xemacs/init.el} for an init file. @xref{Init File}.
274 Of particular interest for use in files are:
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
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
292 @code{make-frame} creates a new Emacs frame (X window).
296 These new variables are only present in XEmacs:
300 @vindex minibuffer-confirm-incomplete
302 @code{minibuffer-confirm-incomplete} prompts for confirmation in
303 contexts where @code{completing-read} allows answers that are not valid
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
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}.
317 @vindex zmacs-regions
319 @code{zmacs-regions} determines whether LISPM-style active regions
323 @unnumberedsec Changes in Key Bindings
325 XEmacs has the following new default function keybindings:
332 Same as @kbd{M-x undo}.
335 Same as the Cut menu item; that is, it copies the selected text to
336 the X Clipboard selection.
339 Same as the Copy menu item.
342 Same as the Paste menu item.
356 @item @key{LEFT-ARROW}
357 Same as the function @code{backward-char}.
359 @item @key{RIGHT-ARROW}
360 Same as the function @code{forward-char}.
363 Same as the function @code{previous-line}.
365 @item @key{DOWN-ARROW}
366 Same as the function @code{next-line}.