Spelling fixes.
[bpt/emacs.git] / doc / emacs / msdog.texi
CommitLineData
ca2565b0 1@c This is part of the Emacs manual.
73b0cd50 2@c Copyright (C) 1985-1987, 1993-1995, 1997, 2000-2011
8838673e 3@c Free Software Foundation, Inc.
ca2565b0 4@c See file emacs.texi for copying conditions.
e93bc142 5@node Microsoft Windows, Manifesto, Mac OS / GNUstep, Top
5798efc8 6@appendix Emacs and Microsoft Windows/MS-DOS
c6b30bd2 7@cindex Microsoft Windows
270c6692 8@cindex MS-Windows, Emacs peculiarities
ca2565b0 9
e691d082 10 This section describes peculiarities of using Emacs on Microsoft
270c6692
EZ
11Windows. Some of these peculiarities are also relevant to Microsoft's
12older MS-DOS ``operating system'' (also known as ``MS-DOG'').
13However, Emacs features that are relevant @emph{only} to MS-DOS are
5798efc8
EZ
14described in a separate
15@iftex
9dc999d3 16manual (@pxref{MS-DOS,,, emacs-xtra, Specialized Emacs Features}).
5798efc8
EZ
17@end iftex
18@ifnottex
19section (@pxref{MS-DOS}).
20@end ifnottex
21
ca2565b0 22
270c6692
EZ
23 The behavior of Emacs on MS-Windows is reasonably similar to what is
24documented in the rest of the manual, including support for long file
25names, multiple frames, scroll bars, mouse menus, and subprocesses.
26However, a few special considerations apply, and they are described
27here.
ca2565b0
AI
28
29@menu
62d72a4a 30* Windows Startup:: How to start Emacs on Windows.
5798efc8
EZ
31* Text and Binary:: Text files use CRLF to terminate lines.
32* Windows Files:: File-name conventions on Windows.
9974630f 33* ls in Lisp:: Emulation of @code{ls} for Dired.
a16b2d46
EZ
34* Windows HOME:: Where Emacs looks for your @file{.emacs} and
35 where it starts up.
5a3e3201 36* Windows Keyboard:: Windows-specific keyboard features.
37a75312 37* Windows Mouse:: Windows-specific mouse features.
5798efc8
EZ
38* Windows Processes:: Running subprocesses on Windows.
39* Windows Printing:: How to specify the printer on MS-Windows.
03bebefc 40* Windows Fonts:: Specifying fonts on MS-Windows.
37a75312 41* Windows Misc:: Miscellaneous Windows features.
5798efc8
EZ
42@ifnottex
43* MS-DOS:: Using Emacs on MS-DOS (otherwise known as @dfn{MS-DOG}).
44@end ifnottex
ca2565b0
AI
45@end menu
46
62d72a4a
EZ
47@node Windows Startup
48@section How to Start Emacs on MS-Windows
49@cindex starting Emacs on MS-Windows
50
51 There are several ways of starting Emacs on MS-Windows:
52
53@enumerate
54@item
55@pindex runemacs.exe
56@cindex desktop shortcut, MS-Windows
57@cindex start directory, MS-Windows
58@cindex directory where Emacs starts on MS-Windows
59From the desktop shortcut icon: either double-click the left mouse
60button on the icon, or click once, then press @key{RET}. The desktop
61shortcut should specify as its ``Target'' (in the ``Properties'' of
62the shortcut) the full absolute file name of @file{runemacs.exe},
63@emph{not} of @file{emacs.exe}. This is because @file{runemacs.exe}
64hides the console window that would have been created if the target of
65the shortcut were @file{emacs.exe} (which is a console program, as far
66as Windows is concerned). If you use this method, Emacs starts in the
67directory specified by the shortcut. To control where that is,
68right-click on the shortcut, select ``Properties'', and in the
69``Shortcut'' tab modify the ``Start in'' field to your liking.
70
71@item
72From the Command Prompt window, by typing @kbd{emacs @key{RET}} at the
73prompt. The Command Prompt window where you did that will not be
74available for invoking other commands until Emacs exits. In this
75case, Emacs will start in the current directory of the Windows shell.
76
77@item
78From the Command Prompt window, by typing @kbd{runemacs @key{RET}} at
79the prompt. The Command Prompt window where you did that will be
80immediately available for invoking other commands. In this case,
81Emacs will start in the current directory of the Windows shell.
82
83@item
84@cindex invoking Emacs from Windows Explorer
85@pindex emacsclient.exe
86@pindex emacsclientw.exe
ae742cb5
CY
87Via @file{emacsclient.exe} or @file{emacsclientw.exe}, which allow you
88to invoke Emacs from other programs, and to reuse a running Emacs
89process for serving editing jobs required by other programs.
90@xref{Emacs Server}. The difference between @file{emacsclient.exe}
91and @file{emacsclientw.exe} is that the former is a console program,
92while the latter is a Windows GUI program. Both programs wait for
93Emacs to signal that the editing job is finished, before they exit and
94return control to the program that invoked them. Which one of them to
95use in each case depends on the expectations of the program that needs
96editing services. If that program is itself a console (text-mode)
97program, you should use @file{emacsclient.exe}, so that any of its
98messages and prompts appear in the same command window as those of the
99invoking program. By contrast, if the invoking program is a GUI
100program, you will be better off using @file{emacsclientw.exe}, because
101@file{emacsclient.exe} will pop up a command window if it is invoked
102from a GUI program. A notable situation where you would want
103@file{emacsclientw.exe} is when you right-click on a file in the
104Windows Explorer and select ``Open With'' from the pop-up menu. Use
105the @samp{--alternate-editor=} or @samp{-a} options if Emacs might not
106be running (or not running as a server) when @command{emacsclient} is
107invoked---that will always give you an editor. When invoked via
108@command{emacsclient}, Emacs will start in the current directory of
109the program that invoked @command{emacsclient}.
62d72a4a
EZ
110@end enumerate
111
ca2565b0
AI
112@node Text and Binary
113@section Text Files and Binary Files
114@cindex text and binary files on MS-DOS/MS-Windows
115
116 GNU Emacs uses newline characters to separate text lines. This is the
270c6692 117convention used on GNU, Unix, and other Posix-compliant systems.
ca2565b0
AI
118
119@cindex end-of-line conversion on MS-DOS/MS-Windows
270c6692
EZ
120 By contrast, MS-DOS and MS-Windows normally use carriage-return linefeed,
121a two-character sequence, to separate text lines. (Linefeed is the same
ca2565b0
AI
122character as newline.) Therefore, convenient editing of typical files
123with Emacs requires conversion of these end-of-line (EOL) sequences.
124And that is what Emacs normally does: it converts carriage-return
125linefeed into newline when reading files, and converts newline into
126carriage-return linefeed when writing files. The same mechanism that
127handles conversion of international character codes does this conversion
128also (@pxref{Coding Systems}).
129
1ca54e68
EZ
130@cindex cursor location, on MS-DOS
131@cindex point location, on MS-DOS
ca2565b0
AI
132 One consequence of this special format-conversion of most files is
133that character positions as reported by Emacs (@pxref{Position Info}) do
134not agree with the file size information known to the operating system.
135
ca2565b0
AI
136 In addition, if Emacs recognizes from a file's contents that it uses
137newline rather than carriage-return linefeed as its line separator, it
8e375db2
RS
138does not perform EOL conversion when reading or writing that file.
139Thus, you can read and edit files from GNU and Unix systems on MS-DOS
140with no special effort, and they will retain their Unix-style
141end-of-line convention after you edit them.
ca2565b0 142
ca2565b0 143 The mode line indicates whether end-of-line translation was used for
1ca54e68 144the current buffer. If MS-DOS end-of-line translation is in use for the
270c6692
EZ
145buffer, the MS-Windows build of Emacs displays a backslash @samp{\} after
146the coding system mnemonic near the beginning of the mode line
147(@pxref{Mode Line}). If no EOL translation was performed, the string
148@samp{(Unix)} is displayed instead of the backslash, to alert you that the
149file's EOL format is not the usual carriage-return linefeed.
1ca54e68
EZ
150
151@cindex DOS-to-Unix conversion of files
8e375db2 152 To visit a file and specify whether it uses DOS-style or Unix-style
fef4d6a6 153end-of-line, specify a coding system (@pxref{Text Coding}). For
8e375db2
RS
154example, @kbd{C-x @key{RET} c unix @key{RET} C-x C-f foobar.txt}
155visits the file @file{foobar.txt} without converting the EOLs; if some
156line ends with a carriage-return linefeed pair, Emacs will display
157@samp{^M} at the end of that line. Similarly, you can direct Emacs to
158save a buffer in a specified EOL format with the @kbd{C-x @key{RET} f}
159command. For example, to save a buffer with Unix EOL format, type
160@kbd{C-x @key{RET} f unix @key{RET} C-x C-s}. If you visit a file
161with DOS EOL conversion, then save it with Unix EOL format, that
162effectively converts the file to Unix EOL style, like @code{dos2unix}.
ca2565b0
AI
163
164@cindex untranslated file system
165@findex add-untranslated-filesystem
270c6692
EZ
166 When you use NFS, Samba, or some other similar method to access file
167systems that reside on computers using GNU or Unix systems, Emacs
168should not perform end-of-line translation on any files in these file
169systems---not even when you create a new file. To request this,
170designate these file systems as @dfn{untranslated} file systems by
171calling the function @code{add-untranslated-filesystem}. It takes one
172argument: the file system name, including a drive letter and
173optionally a directory. For example,
ca2565b0
AI
174
175@example
176(add-untranslated-filesystem "Z:")
177@end example
178
179@noindent
180designates drive Z as an untranslated file system, and
181
182@example
183(add-untranslated-filesystem "Z:\\foo")
184@end example
185
186@noindent
187designates directory @file{\foo} on drive Z as an untranslated file
188system.
189
190 Most often you would use @code{add-untranslated-filesystem} in your
270c6692 191@file{.emacs} file, or in @file{site-start.el} so that all the users at
ca2565b0
AI
192your site get the benefit of it.
193
194@findex remove-untranslated-filesystem
195 To countermand the effect of @code{add-untranslated-filesystem}, use
196the function @code{remove-untranslated-filesystem}. This function takes
197one argument, which should be a string just like the one that was used
198previously with @code{add-untranslated-filesystem}.
199
8e375db2
RS
200 Designating a file system as untranslated does not affect character
201set conversion, only end-of-line conversion. Essentially, it directs
202Emacs to create new files with the Unix-style convention of using
203newline at the end of a line. @xref{Coding Systems}.
1ca54e68
EZ
204
205@vindex file-name-buffer-file-type-alist
206@cindex binary files, on MS-DOS/MS-Windows
207 Some kinds of files should not be converted at all, because their
270c6692 208contents are not really text. Therefore, Emacs on MS-Windows distinguishes
1ca54e68 209certain files as @dfn{binary files}. (This distinction is not part of
270c6692 210MS-Windows; it is made by Emacs only.) Binary files include executable
1ca54e68
EZ
211programs, compressed archives, etc. Emacs uses the file name to decide
212whether to treat a file as binary: the variable
213@code{file-name-buffer-file-type-alist} defines the file-name patterns
214that indicate binary files. If a file name matches one of the patterns
215for binary files (those whose associations are of the type
216@code{(@var{pattern} . t)}, Emacs reads and writes that file using the
217@code{no-conversion} coding system (@pxref{Coding Systems}) which turns
218off @emph{all} coding-system conversions, not only the EOL conversion.
219@code{file-name-buffer-file-type-alist} also includes file-name patterns
270c6692 220for files which are known to be Windows-style text files with
1ca54e68 221carriage-return linefeed EOL format, such as @file{CONFIG.SYS}; Emacs
270c6692 222always writes those files with Windows-style EOLs.
1ca54e68
EZ
223
224 If a file which belongs to an untranslated file system matches one of
225the file-name patterns in @code{file-name-buffer-file-type-alist}, the
226EOL conversion is determined by @code{file-name-buffer-file-type-alist}.
227
270c6692
EZ
228@node Windows Files
229@section File Names on MS-Windows
230@cindex file names on MS-Windows
231
232 MS-Windows and MS-DOS normally use a backslash, @samp{\}, to
233separate name units within a file name, instead of the slash used on
234other systems. Emacs on MS-DOS/MS-Windows permits use of either slash or
235backslash, and also knows about drive letters in file names.
236
237@cindex file-name completion, on MS-Windows
238 On MS-DOS/MS-Windows, file names are case-insensitive, so Emacs by
239default ignores letter-case in file names during completion.
240
37a75312 241@vindex w32-get-true-file-attributes
6af511e3
EZ
242 The variable @code{w32-get-true-file-attributes} controls whether
243Emacs should issue additional system calls to determine more
244accurately file attributes in primitives like @code{file-attributes}
245and @code{directory-files-and-attributes}. These additional calls are
246needed to report correct file ownership, link counts and file types
247for special files such as pipes. Without these system calls, file
248ownership will be attributed to the current user, link counts will be
249always reported as 1, and special files will be reported as regular
250files.
251
252 If the value of this variable is @code{local} (the default), Emacs
253will issue these additional system calls only for files on local fixed
254drives. Any other non-@code{nil} value means do this even for
255removable and remote volumes, where this could potentially slow down
256Dired and other related features. The value of @code{nil} means never
b1c8242b
EZ
257issue those system calls. Non-@code{nil} values are more useful on
258NTFS volumes, which support hard links and file security, than on FAT,
259FAT32, and XFAT volumes.
37a75312 260
9974630f
EZ
261@node ls in Lisp
262@section Emulation of @code{ls} on MS-Windows
263@cindex Dired, and MS-Windows/MS-DOS
264@cindex @code{ls} emulation
265
266 Dired normally uses the external program @code{ls} (or its close
267work-alike) to produce the directory listing displayed in Dired
268buffers (@pxref{Dired}). However, MS-Windows and MS-DOS systems don't
269come with such a program, although several ports of @sc{gnu} @code{ls}
270are available. Therefore, Emacs on those systems @emph{emulates}
271@code{ls} in Lisp, by using the @file{ls-lisp.el} package. While
272@file{ls-lisp.el} provides a reasonably full emulation of @code{ls},
7d0a2d30
EZ
273there are some options and features peculiar to that emulation;
274@iftex
275for more details, see the documentation of the variables whose names
276begin with @code{ls-lisp}.
277@end iftex
278@ifnottex
279they are described in this section.
9974630f
EZ
280
281 The @code{ls} emulation supports many of the @code{ls} switches, but
282it doesn't support all of them. Here's the list of the switches it
283does support: @option{-A}, @option{-a}, @option{-B}, @option{-C},
284@option{-c}, @option{-i}, @option{-G}, @option{-g}, @option{-R},
285@option{-r}, @option{-S}, @option{-s}, @option{-t}, @option{-U},
286@option{-u}, and @option{-X}. The @option{-F} switch is partially
287supported (it appends the character that classifies the file, but does
288not prevent symlink following).
289
290@vindex ls-lisp-use-insert-directory-program
291 On MS-Windows and MS-DOS, @file{ls-lisp.el} is preloaded when Emacs
292is built, so the Lisp emulation of @code{ls} is always used on those
293platforms. If you have a ported @code{ls}, setting
294@code{ls-lisp-use-insert-directory-program} to a non-@code{nil} value
295will revert to using an external program named by the variable
296@code{insert-directory-program}.
297
298@vindex ls-lisp-ignore-case
299 By default, @file{ls-lisp.el} uses a case-sensitive sort order for
300the directory listing it produces; this is so the listing looks the
301same as on other platforms. If you wish that the files be sorted in
302case-insensitive order, set the variable @code{ls-lisp-ignore-case} to
303a non-@code{nil} value.
304
305@vindex ls-lisp-dirs-first
306 By default, files and subdirectories are sorted together, to emulate
307the behavior of @code{ls}. However, native MS-Windows/MS-DOS file
308managers list the directories before the files; if you want that
309behavior, customize the option @code{ls-lisp-dirs-first} to a
310non-@code{nil} value.
311
312@vindex ls-lisp-verbosity
313 The variable @code{ls-lisp-verbosity} controls the file attributes
314that @file{ls-lisp.el} displays. The value should be a list that
315contains one or more of the symbols @code{links}, @code{uid}, and
316@code{gid}. @code{links} means display the count of different file
317names that are associated with (a.k.a.@: @dfn{links to}) the file's
75099884
EZ
318data; this is only useful on NTFS volumes. @code{uid} means display
319the numerical identifier of the user who owns the file. @code{gid}
320means display the numerical identifier of the file owner's group. The
321default value is @code{(links uid gid)} i.e.@: all the 3 optional
322attributes are displayed.
9974630f
EZ
323
324@vindex ls-lisp-emulation
c5e87d10 325 The variable @code{ls-lisp-emulation} controls the flavor of the
9974630f
EZ
326@code{ls} emulation by setting the defaults for the 3 options
327described above: @code{ls-lisp-ignore-case},
328@code{ls-lisp-dirs-first}, and @code{ls-lisp-verbosity}. The value of
329this option can be one of the following symbols:
330
331@table @code
332@item GNU
333@itemx nil
334Emulate @sc{gnu} systems; this is the default. This sets
335@code{ls-lisp-ignore-case} and @code{ls-lisp-dirs-first} to
336@code{nil}, and @code{ls-lisp-verbosity} to @code{(links uid gid)}.
337@item UNIX
338Emulate Unix systems. Like @code{GNU}, but sets
339@code{ls-lisp-verbosity} to @code{(links uid)}.
340@item MacOS
341Emulate MacOS. Sets @code{ls-lisp-ignore-case} to @code{t}, and
342@code{ls-lisp-dirs-first} and @code{ls-lisp-verbosity} to @code{nil}.
343@item MS-Windows
344Emulate MS-Windows. Sets @code{ls-lisp-ignore-case} and
345@code{ls-lisp-dirs-first} to @code{t}, and @code{ls-lisp-verbosity} to
346@code{(links)} on Windows NT/2K/XP/2K3 and to @code{nil} on Windows 9X.
347Note that the default emulation is @emph{not} @code{MS-Windows}, even
348on Windows, since many users of Emacs on those platforms prefer the
349@sc{gnu} defaults.
350@end table
351
352@noindent
90639cea
GM
353Any other value of @code{ls-lisp-emulation} means the same as @code{GNU}.
354Customizing this option calls the function @code{ls-lisp-set-options} to
355update the 3 dependent options as needed. If you change the value of
356this variable without using customize after @file{ls-lisp.el} is loaded
357(note that it is preloaded on MS-Windows and MS-DOS), you can call that
358function manually for the same result.
9974630f
EZ
359
360@vindex ls-lisp-support-shell-wildcards
361 The variable @code{ls-lisp-support-shell-wildcards} controls how
362file-name patterns are supported: if it is non-@code{nil} (the
363default), they are treated as shell-style wildcards; otherwise they
364are treated as Emacs regular expressions.
de320775
EZ
365
366@vindex ls-lisp-format-time-list
367 The variable @code{ls-lisp-format-time-list} defines how to format
368the date and time of files. @emph{The value of this variable is
369ignored}, unless Emacs cannot determine the current locale. (However,
370if the value of @code{ls-lisp-use-localized-time-format} is
371non-@code{nil}, Emacs obeys @code{ls-lisp-format-time-list} even if
372the current locale is available; see below.)
373
374The value of @code{ls-lisp-format-time-list} is a list of 2 strings.
375The first string is used if the file was modified within the current
376year, while the second string is used for older files. In each of
377these two strings you can use @samp{%}-sequences to substitute parts
378of the time. For example:
379@lisp
380("%b %e %H:%M" "%b %e %Y")
381@end lisp
382
383@noindent
384Note that the strings substituted for these @samp{%}-sequences depend
385on the current locale. @xref{Time Parsing,,, elisp, The Emacs Lisp
386Reference Manual}, for more about format time specs.
387
388@vindex ls-lisp-use-localized-time-format
389 Normally, Emacs formats the file time stamps in either traditional
390or ISO-style time format. However, if the value of the variable
391@code{ls-lisp-use-localized-time-format} is non-@code{nil}, Emacs
392formats file time stamps according to what
393@code{ls-lisp-format-time-list} specifies. The @samp{%}-sequences in
394@code{ls-lisp-format-time-list} produce locale-dependent month and day
395names, which might cause misalignment of columns in Dired display.
7d0a2d30 396@end ifnottex
9974630f 397
270c6692 398@node Windows HOME
a16b2d46 399@section HOME and Startup Directories on MS-Windows
270c6692
EZ
400@cindex @code{HOME} directory on MS-Windows
401
444246ca 402 The Windows equivalent of the @code{HOME} directory is the
270c6692 403@dfn{user-specific application data directory}. The actual location
ae742cb5
CY
404depends on the Windows version; typical values are @file{C:\Documents
405and Settings\@var{username}\Application Data} on Windows 2K/XP/2K3,
406@file{C:\Users\@var{username}\AppData\Roaming} on Windows Vista/7/2K8,
407and either @file{C:\WINDOWS\Application Data} or
408@file{C:\WINDOWS\Profiles\@var{username}\Application Data} on the
69cc79e9
EZ
409older Windows 9X/ME systems. If this directory does not exist or
410cannot be accessed, Emacs falls back to @file{C:\} as the default
411value of @code{HOME}.
412
413 You can override this default value of @code{HOME} by explicitly
414setting the environment variable @env{HOME} to point to any directory
415on your system. @env{HOME} can be set either from the command shell
416prompt or from the @samp{My Computer}s @samp{Properties} dialog.
417@code{HOME} can also be set in the system registry, for details see
b8a9e136
EZ
418@ref{MS-Windows Registry}.
419
69cc79e9
EZ
420 For compatibility with older versions of Emacs@footnote{
421Older versions of Emacs didn't check the application data directory.
422}, if there is a file named @file{.emacs} in @file{C:\}, the root
423directory of drive @file{C:}, and @env{HOME} is set neither in the
424environment nor in the Registry, Emacs will treat @file{C:\} as the
425default @code{HOME} location, and will not look in the application
426data directory, even if it exists. Note that only @file{.emacs} is
427looked for in @file{C:\}; the older name @file{_emacs} (see below) is
428not. This use of @file{C:\.emacs} to define @code{HOME} is
429deprecated.
430
431 Whatever the final place is, Emacs sets the internal value of the
432@env{HOME} environment variable to point to it, and it will use that
433location for other files and directories it normally looks for or
434creates in the user's home directory.
270c6692
EZ
435
436 You can always find out where Emacs thinks is your home directory's
437location by typing @kbd{C-x d ~/ @key{RET}}. This should present the
438list of files in the home directory, and show its full name on the
439first line. Likewise, to visit your init file, type @kbd{C-x C-f
69cc79e9
EZ
440~/.emacs @key{RET}} (assuming the file's name is @file{.emacs}).
441
442@cindex init file @file{.emacs} on MS-Windows
443 The home directory is where your init file is stored. It can have
444any name mentioned in @ref{Init File}.
270c6692
EZ
445
446@cindex @file{_emacs} init file, MS-Windows
447 Because MS-DOS does not allow file names with leading dots, and
fdeb32ec
CY
448older Windows systems made it hard to create files with such names,
449the Windows port of Emacs supports an init file name @file{_emacs}, if
450such a file exists in the home directory and @file{.emacs} does not.
451This name is considered obsolete.
270c6692 452
5a3e3201
EZ
453@node Windows Keyboard
454@section Keyboard Usage on MS-Windows
455@cindex keyboard, MS-Windows
456
457 This section describes the Windows-specific features related to
458keyboard input in Emacs.
459
e7379492 460@cindex MS-Windows keyboard shortcuts
668ef058
RS
461 Many key combinations (known as ``keyboard shortcuts'') that have
462conventional uses in MS-Windows programs conflict with traditional
51524f43
RS
463Emacs key bindings. (These Emacs key bindings were established years
464before Microsoft was founded.) Examples of conflicts include
465@kbd{C-c}, @kbd{C-x}, @kbd{C-z}, @kbd{C-a}, and @kbd{W-@key{SPC}}.
466You can redefine some of them with meanings more like the MS-Windows
467meanings by enabling CUA Mode (@pxref{CUA Bindings}).
e7379492 468
5a3e3201
EZ
469@kindex F10 @r{(MS-Windows)}
470@cindex menu bar access using keyboard @r{(MS-Windows)}
471 The @key{F10} key on Windows activates the menu bar in a way that
472makes it possible to use the menus without a mouse. In this mode, the
473arrow keys traverse the menus, @key{RET} selects a highlighted menu
474item, and @key{ESC} closes the menu.
475
a210f8e6
EZ
476@iftex
477@inforef{Windows Keyboard, , emacs}, for information about additional
478Windows-specific variables in this category.
479@end iftex
7d0a2d30 480@ifnottex
5a3e3201
EZ
481@vindex w32-alt-is-meta
482@cindex @code{Alt} key (MS-Windows)
483 By default, the key labeled @key{Alt} is mapped as the @key{META}
484key. If you wish it to produce the @code{Alt} modifier instead, set
485the variable @code{w32-alt-is-meta} to a @code{nil} value.
486
71ce5fd0
JB
487@findex w32-register-hot-key
488@findex w32-unregister-hot-key
2be6bfe2
EZ
489 MS-Windows reserves certain key combinations, such as
490@kbd{Alt-@key{TAB}}, for its own use. These key combinations are
491intercepted by the system before Emacs can see them. You can use the
492@code{w32-register-hot-key} function to allow a key sequence to be
493seen by Emacs instead of being grabbed by Windows. This functions
494registers a key sequence as a @dfn{hot key}, overriding the special
495meaning of that key sequence for Windows. (MS-Windows is told that
496the key sequence is a hot key only when one of the Emacs windows has
497focus, so that the special keys still have their usual meaning for
498other Windows applications.)
499
500 The argument to @code{w32-register-hot-key} must be a single key,
501with or without modifiers, in vector form that would be acceptable to
502@code{define-key}. The meta modifier is interpreted as the @key{ALT}
503key if @code{w32-alt-is-meta} is @code{t} (the default), and the hyper
504modifier is always interpreted as the Windows key (usually labeled
505with @key{start} and the Windows logo). If the function succeeds in
506registering the key sequence, it returns the hotkey ID, a number;
507otherwise it returns @code{nil}.
508
509@kindex M-TAB@r{, (MS-Windows)}
71ce5fd0
JB
510@cindex @kbd{M-@key{TAB}} vs @kbd{Alt-@key{TAB}} (MS-Windows)
511@cindex @kbd{Alt-@key{TAB}} vs @kbd{M-@key{TAB}} (MS-Windows)
512 For example, @code{(w32-register-hot-key [M-tab])} lets you use
2be6bfe2
EZ
513@kbd{M-TAB} normally in Emacs, for instance, to complete the word or
514symbol at point at top level, or to complete the current search string
515against previously sought strings during incremental search.
516
517 The function @code{w32-unregister-hot-key} reverses the effect of
518@code{w32-register-hot-key} for its argument key sequence.
71ce5fd0 519
5a3e3201
EZ
520@vindex w32-capslock-is-shiftlock
521 By default, the @key{CapsLock} key only affects normal character
522keys (it converts lower-case characters to their upper-case
523variants). However, if you set the variable
524@code{w32-capslock-is-shiftlock} to a non-@code{nil} value, the
525@key{CapsLock} key will affect non-character keys as well, as if you
526pressed the @key{Shift} key while typing the non-character key.
527
528@vindex w32-enable-caps-lock
529 If the variable @code{w32-enable-caps-lock} is set to a @code{nil}
530value, the @key{CapsLock} key produces the symbol @code{capslock}
531instead of the shifted version of they keys. The default value is
532@code{t}.
533
534@vindex w32-enable-num-lock
535@cindex keypad keys (MS-Windows)
536 Similarly, if @code{w32-enable-num-lock} is @code{nil}, the
537@key{NumLock} key will produce the symbol @code{kp-numlock}. The
538default is @code{t}, which causes @key{NumLock} to work as expected:
539toggle the meaning of the keys on the numeric keypad.
7d0a2d30 540@end ifnottex
5a3e3201 541
3a9d9327
EZ
542@vindex w32-apps-modifier
543 The variable @code{w32-apps-modifier} controls the effect of the
544@key{Apps} key (usually located between the right @key{Alt} and the
545right @key{Ctrl} keys). Its value can be one of the symbols
546@code{hyper}, @code{super}, @code{meta}, @code{alt}, @code{control},
547or @code{shift} for the respective modifier, or @code{nil} to appear
548as the key @code{apps}. The default is @code{nil}.
549
5a3e3201
EZ
550@vindex w32-lwindow-modifier
551@vindex w32-rwindow-modifier
552@vindex w32-scroll-lock-modifier
553 The variable @code{w32-lwindow-modifier} determines the effect of
554the left Windows key (usually labeled with @key{start} and the Windows
555logo). If its value is @code{nil} (the default), the key will produce
556the symbol @code{lwindow}. Setting it to one of the symbols
557@code{hyper}, @code{super}, @code{meta}, @code{alt}, @code{control},
558or @code{shift} will produce the respective modifier. A similar
559variable @code{w32-rwindow-modifier} controls the effect of the right
560Windows key, and @code{w32-scroll-lock-modifier} does the same for the
561@key{ScrLock} key. If these variables are set to @code{nil}, the
562right Windows key produces the symbol @code{rwindow} and @key{ScrLock}
563produces the symbol @code{scroll}.
564
565@vindex w32-pass-alt-to-system
37a75312
EZ
566@cindex Windows system menu
567@cindex @code{Alt} key invokes menu (Windows)
568 Emacs compiled as a native Windows application normally turns off
569the Windows feature that tapping the @key{ALT} key invokes the Windows
570menu. The reason is that the @key{ALT} serves as @key{META} in Emacs.
571When using Emacs, users often press the @key{META} key temporarily and
572then change their minds; if this has the effect of bringing up the
573Windows menu, it alters the meaning of subsequent commands. Many
574users find this frustrating.
575
576 You can re-enable Windows' default handling of tapping the @key{ALT}
577key by setting @code{w32-pass-alt-to-system} to a non-@code{nil}
578value.
579
7d0a2d30 580@ifnottex
5a3e3201
EZ
581@vindex w32-pass-lwindow-to-system
582@vindex w32-pass-rwindow-to-system
37a75312 583 The variables @code{w32-pass-lwindow-to-system} and
5a3e3201
EZ
584@code{w32-pass-rwindow-to-system} determine whether the respective
585keys are passed to Windows or swallowed by Emacs. If the value is
586@code{nil}, the respective key is silently swallowed by Emacs,
37a75312
EZ
587otherwise it is passed to Windows. The default is @code{t} for both
588of these variables. Passing each of these keys to Windows produces
589its normal effect: for example, @kbd{@key{Lwindow}} opens the
a26d12e3
EZ
590@code{Start} menu, etc.@footnote{
591Some combinations of the ``Windows'' keys with other keys are caught
592by Windows at low level in a way that Emacs currently cannot prevent.
593For example, @kbd{@key{Lwindow} r} always pops up the Windows
594@samp{Run} dialog. Customizing the value of
595@code{w32-phantom-key-code} might help in some cases, though.}
5a3e3201
EZ
596
597@vindex w32-recognize-altgr
598@kindex AltGr @r{(MS-Windows)}
599@cindex AltGr key (MS-Windows)
6041f4e1 600 The variable @code{w32-recognize-altgr} controls whether the
1521f22e
EZ
601@key{AltGr} key (if it exists on your keyboard), or its equivalent,
602the combination of the right @key{Alt} and left @key{Ctrl} keys
603pressed together, is recognized as the @key{AltGr} key. The default
604is @code{t}, which means these keys produce @code{AltGr}; setting it
605to @code{nil} causes @key{AltGr} or the equivalent key combination to
606be interpreted as the combination of @key{CTRL} and @key{META}
607modifiers.
7d0a2d30 608@end ifnottex
5a3e3201 609
37a75312
EZ
610@node Windows Mouse
611@section Mouse Usage on MS-Windows
612@cindex mouse, and MS-Windows
613
614 This section describes the Windows-specific variables related to
615mouse.
616
617@vindex w32-mouse-button-tolerance
618@cindex simulation of middle mouse button
619 The variable @code{w32-mouse-button-tolerance} specifies the
620time interval, in milliseconds, for faking middle mouse button press
621on 2-button mice. If both mouse buttons are depressed within this
622time interval, Emacs generates a middle mouse button click event
623instead of a double click on one of the buttons.
624
625@vindex w32-pass-extra-mouse-buttons-to-system
626 If the variable @code{w32-pass-extra-mouse-buttons-to-system} is
627non-@code{nil}, Emacs passes the fourth and fifth mouse buttons to
628Windows.
629
630@vindex w32-swap-mouse-buttons
631 The variable @code{w32-swap-mouse-buttons} controls which of the 3
632mouse buttons generates the @kbd{mouse-2} events. When it is
633@code{nil} (the default), the middle button generates @kbd{mouse-2}
634and the right button generates @kbd{mouse-3} events. If this variable
635is non-@code{nil}, the roles of these two buttons are reversed.
5a3e3201 636
ca2565b0 637@node Windows Processes
270c6692
EZ
638@section Subprocesses on Windows 9X/ME and Windows NT/2K/XP
639@cindex subprocesses on MS-Windows
ca2565b0 640
270c6692 641@cindex DOS applications, running from Emacs
049224f6 642 Emacs compiled as a native Windows application (as opposed to the DOS
ca2565b0
AI
643version) includes full support for asynchronous subprocesses.
644In the Windows version, synchronous and asynchronous subprocesses work
645fine on both
270c6692 646Windows 9X/ME and Windows NT/2K/XP as long as you run only 32-bit Windows
ca2565b0
AI
647applications. However, when you run a DOS application in a subprocess,
648you may encounter problems or be unable to run the application at all;
649and if you run two DOS applications at the same time in two
650subprocesses, you may have to reboot your system.
651
652Since the standard command interpreter (and most command line utilities)
270c6692 653on Windows 9X are DOS applications, these problems are significant when
ca2565b0
AI
654using that system. But there's nothing we can do about them; only
655Microsoft can fix them.
656
657If you run just one DOS application subprocess, the subprocess should
658work as expected as long as it is ``well-behaved'' and does not perform
659direct screen access or other unusual actions. If you have a CPU
660monitor application, your machine will appear to be 100% busy even when
661the DOS application is idle, but this is only an artifact of the way CPU
662monitors measure processor load.
663
664You must terminate the DOS application before you start any other DOS
665application in a different subprocess. Emacs is unable to interrupt or
666terminate a DOS subprocess. The only way you can terminate such a
667subprocess is by giving it a command that tells its program to exit.
668
669If you attempt to run two DOS applications at the same time in separate
670subprocesses, the second one that is started will be suspended until the
671first one finishes, even if either or both of them are asynchronous.
672
270c6692 673@cindex kill DOS application
ca2565b0
AI
674If you can go to the first subprocess, and tell it to exit, the second
675subprocess should continue normally. However, if the second subprocess
676is synchronous, Emacs itself will be hung until the first subprocess
677finishes. If it will not finish without user input, then you have no
ff43a665 678choice but to reboot if you are running on Windows 9X. If you are
270c6692
EZ
679running on Windows NT/2K/XP, you can use a process viewer application to kill
680the appropriate instance of NTVDM instead (this will terminate both DOS
ca2565b0
AI
681subprocesses).
682
ff43a665 683If you have to reboot Windows 9X in this situation, do not use the
ca2565b0
AI
684@code{Shutdown} command on the @code{Start} menu; that usually hangs the
685system. Instead, type @kbd{CTL-ALT-@key{DEL}} and then choose
686@code{Shutdown}. That usually works, although it may take a few minutes
687to do its job.
688
37a75312 689@vindex w32-quote-process-args
a210f8e6
EZ
690 The variable @code{w32-quote-process-args} controls how Emacs quotes
691the process arguments. Non-@code{nil} means quote with the @code{"}
692character. If the value is a character, use that character to escape
693any quote characters that appear; otherwise chose a suitable escape
694character based on the type of the program.
37a75312 695
ccff391f
EZ
696@ifnottex
697@findex w32-shell-execute
698 The function @code{w32-shell-execute} can be useful for writing
699customized commands that run MS-Windows applications registered to
700handle a certain standard Windows operation for a specific type of
701document or file. This function is a wrapper around the Windows
702@code{ShellExecute} API. See the MS-Windows API documentation for
703more details.
704@end ifnottex
705
270c6692
EZ
706@node Windows Printing
707@section Printing and MS-Windows
708
709 Printing commands, such as @code{lpr-buffer} (@pxref{Printing}) and
710@code{ps-print-buffer} (@pxref{PostScript}) work in MS-DOS and
711MS-Windows by sending the output to one of the printer ports, if a
712Posix-style @code{lpr} program is unavailable. The same Emacs
713variables control printing on all systems, but in some cases they have
714different default values on MS-DOS and MS-Windows.
715
716 Emacs on Windows automatically determines your default printer and
03bebefc 717sets the variable @code{printer-name} to that printer's name. But in
270c6692
EZ
718some rare cases this can fail, or you may wish to use a different
719printer from within Emacs. The rest of this section explains how to
720tell Emacs which printer to use.
721
03bebefc 722@vindex printer-name@r{, (MS-DOS/MS-Windows)}
270c6692
EZ
723 If you want to use your local printer, then set the Lisp variable
724@code{lpr-command} to @code{""} (its default value on Windows) and
725@code{printer-name} to the name of the printer port---for example,
726@code{"PRN"}, the usual local printer port or @code{"LPT2"}, or
727@code{"COM1"} for a serial printer. You can also set
728@code{printer-name} to a file name, in which case ``printed'' output
729is actually appended to that file. If you set @code{printer-name} to
730@code{"NUL"}, printed output is silently discarded (sent to the system
731null device).
732
733 You can also use a printer shared by another machine by setting
734@code{printer-name} to the UNC share name for that printer---for
735example, @code{"//joes_pc/hp4si"}. (It doesn't matter whether you use
736forward slashes or backslashes here.) To find out the names of shared
737printers, run the command @samp{net view} from the command prompt to
738obtain a list of servers, and @samp{net view @var{server-name}} to see
739the names of printers (and directories) shared by that server.
740Alternatively, click the @samp{Network Neighborhood} icon on your
741desktop, and look for machines which share their printers via the
742network.
743
744@cindex @samp{net use}, and printing on MS-Windows
745@cindex networked printers (MS-Windows)
746 If the printer doesn't appear in the output of @samp{net view}, or
747if setting @code{printer-name} to the UNC share name doesn't produce a
748hardcopy on that printer, you can use the @samp{net use} command to
749connect a local print port such as @code{"LPT2"} to the networked
750printer. For example, typing @kbd{net use LPT2: \\joes_pc\hp4si}@footnote{
751Note that the @samp{net use} command requires the UNC share name to be
752typed with the Windows-style backslashes, while the value of
753@code{printer-name} can be set with either forward- or backslashes.}
754causes Windows to @dfn{capture} the @code{LPT2} port and redirect the
755printed material to the printer connected to the machine @code{joes_pc}.
756After this command, setting @code{printer-name} to @code{"LPT2"}
757should produce the hardcopy on the networked printer.
758
759 With some varieties of Windows network software, you can instruct
760Windows to capture a specific printer port such as @code{"LPT2"}, and
761redirect it to a networked printer via the @w{@code{Control
762Panel->Printers}} applet instead of @samp{net use}.
763
764 If you set @code{printer-name} to a file name, it's best to use an
765absolute file name. Emacs changes the working directory according to
766the default directory of the current buffer, so if the file name in
767@code{printer-name} is relative, you will end up with several such
768files, each one in the directory of the buffer from which the printing
769was done.
770
375136cc
EZ
771 If the value of @code{printer-name} is correct, but printing does
772not produce the hardcopy on your printer, it is possible that your
773printer does not support printing plain text (some cheap printers omit
a210f8e6
EZ
774this functionality). In that case, try the PostScript print commands,
775described below.
375136cc 776
270c6692
EZ
777@findex print-buffer @r{(MS-DOS)}
778@findex print-region @r{(MS-DOS)}
779@vindex lpr-headers-switches @r{(MS-DOS)}
780 The commands @code{print-buffer} and @code{print-region} call the
781@code{pr} program, or use special switches to the @code{lpr} program, to
782produce headers on each printed page. MS-DOS and MS-Windows don't
783normally have these programs, so by default, the variable
784@code{lpr-headers-switches} is set so that the requests to print page
785headers are silently ignored. Thus, @code{print-buffer} and
786@code{print-region} produce the same output as @code{lpr-buffer} and
787@code{lpr-region}, respectively. If you do have a suitable @code{pr}
788program (for example, from GNU Coreutils), set
789@code{lpr-headers-switches} to @code{nil}; Emacs will then call
790@code{pr} to produce the page headers, and print the resulting output as
791specified by @code{printer-name}.
792
793@vindex print-region-function @r{(MS-DOS)}
794@cindex lpr usage under MS-DOS
795@vindex lpr-command @r{(MS-DOS)}
796@vindex lpr-switches @r{(MS-DOS)}
797 Finally, if you do have an @code{lpr} work-alike, you can set the
798variable @code{lpr-command} to @code{"lpr"}. Then Emacs will use
799@code{lpr} for printing, as on other systems. (If the name of the
800program isn't @code{lpr}, set @code{lpr-command} to specify where to
801find it.) The variable @code{lpr-switches} has its standard meaning
802when @code{lpr-command} is not @code{""}. If the variable
803@code{printer-name} has a string value, it is used as the value for the
804@code{-P} option to @code{lpr}, as on Unix.
805
806@findex ps-print-buffer @r{(MS-DOS)}
807@findex ps-spool-buffer @r{(MS-DOS)}
808@vindex ps-printer-name @r{(MS-DOS)}
809@vindex ps-lpr-command @r{(MS-DOS)}
810@vindex ps-lpr-switches @r{(MS-DOS)}
811 A parallel set of variables, @code{ps-lpr-command},
812@code{ps-lpr-switches}, and @code{ps-printer-name} (@pxref{PostScript
813Variables}), defines how PostScript files should be printed. These
814variables are used in the same way as the corresponding variables
815described above for non-PostScript printing. Thus, the value of
816@code{ps-printer-name} is used as the name of the device (or file) to
817which PostScript output is sent, just as @code{printer-name} is used
818for non-PostScript printing. (There are two distinct sets of
819variables in case you have two printers attached to two different
820ports, and only one of them is a PostScript printer.)
821
6c60bbdb 822@cindex Ghostscript, use for PostScript printing
270c6692
EZ
823 The default value of the variable @code{ps-lpr-command} is @code{""},
824which causes PostScript output to be sent to the printer port specified
825by @code{ps-printer-name}, but @code{ps-lpr-command} can also be set to
826the name of a program which will accept PostScript files. Thus, if you
827have a non-PostScript printer, you can set this variable to the name of
828a PostScript interpreter program (such as Ghostscript). Any switches
829that need to be passed to the interpreter program are specified using
830@code{ps-lpr-switches}. (If the value of @code{ps-printer-name} is a
831string, it will be added to the list of switches as the value for the
832@code{-P} option. This is probably only useful if you are using
833@code{lpr}, so when using an interpreter typically you would set
834@code{ps-printer-name} to something other than a string so it is
835ignored.)
836
837 For example, to use Ghostscript for printing on the system's default
838printer, put this in your @file{.emacs} file:
839
840@example
841(setq ps-printer-name t)
842(setq ps-lpr-command "D:/gs6.01/bin/gswin32c.exe")
843(setq ps-lpr-switches '("-q" "-dNOPAUSE" "-dBATCH"
8838673e
GM
844 "-sDEVICE=mswinpr2"
845 "-sPAPERSIZE=a4"))
270c6692
EZ
846@end example
847
848@noindent
849(This assumes that Ghostscript is installed in the
850@file{D:/gs6.01} directory.)
851
03bebefc
JR
852@node Windows Fonts
853@section Specifying Fonts on MS-Windows
854@cindex font specification (MS Windows)
855
856 Starting with Emacs 23, fonts are specified by their name, size
87e391bb
EZ
857and optional properties. The format for specifying fonts comes from the
858fontconfig library used in modern Free desktops:
03bebefc
JR
859
860@example
861 [Family[-PointSize]][:Option1=Value1[:Option2=Value2[...]]]
862@end example
863
864 The old XLFD based format is also supported for backwards compatibility.
865
87e391bb 866 Emacs 23 supports a number of backends. Currently, the @code{gdi}
ed6e7b11 867and @code{uniscribe} font backends are supported on Windows. The
86dca3e8 868@code{gdi} font backend is available on all versions of Windows, and
ed6e7b11 869supports all fonts that are natively supported by Windows. The
86dca3e8 870@code{uniscribe} font backend is available on Windows 2000 and later,
7877f373 871and supports TrueType and OpenType fonts. Some languages requiring
86dca3e8 872complex layout can only be properly supported by the uniscribe
ed6e7b11 873backend. By default, both backends are enabled if supported, with
86dca3e8 874@code{uniscribe} taking priority over @code{gdi}.
03bebefc
JR
875
876@cindex font properties (MS Windows)
877@noindent
878Optional properties common to all font backends on MS-Windows are:
879
87e391bb
EZ
880@table @code
881
03bebefc 882@vindex font-weight-table @r{(MS-Windows)}
87e391bb
EZ
883@item weight
884Specifies the weight of the font. Special values @code{light},
885@code{medium}, @code{demibold}, @code{bold}, and @code{black} can be specified
886without @code{weight=} (e.g., @kbd{Courier New-12:bold}). Otherwise,
03bebefc 887the weight should be a numeric value between 100 and 900, or one of the
87e391bb 888named weights in @code{font-weight-table}. If unspecified, a regular font
03bebefc
JR
889is assumed.
890
891@vindex font-slant-table @r{(MS-Windows)}
87e391bb
EZ
892@item slant
893Specifies whether the font is italic. Special values
03bebefc 894@code{roman}, @code{italic} and @code{oblique} can be specified
87e391bb
EZ
895without @code{slant=} (e.g., @kbd{Courier New-12:italic}).
896Otherwise, the slant should be a numeric value, or one of the named
03bebefc 897slants in @code{font-slant-table}. On Windows, any slant above 150 is
87e391bb 898treated as italics, and anything below as roman.
03bebefc 899
87e391bb
EZ
900@item family
901Specifies the font family, but normally this will be specified
03bebefc
JR
902at the start of the font name.
903
87e391bb
EZ
904@item pixelsize
905Specifies the font size in pixels. This can be used instead
03bebefc
JR
906of the point size specified after the family name.
907
87e391bb
EZ
908@item adstyle
909Specifies additional style information for the font.
03bebefc 910On MS-Windows, the values @code{mono}, @code{sans}, @code{serif},
87e391bb 911@code{script} and @code{decorative} are recognized. These are most useful
03bebefc
JR
912as a fallback with the font family left unspecified.
913
914@vindex w32-charset-info-alist
87e391bb
EZ
915@item registry
916Specifies the character set registry that the font is
7877f373 917expected to cover. Most TrueType and OpenType fonts will be unicode fonts
03bebefc
JR
918that cover several national character sets, but you can narrow down the
919selection of fonts to those that support a particular character set by
920using a specific registry from @code{w32-charset-info-alist} here.
921
87e391bb 922@item spacing
ed6e7b11 923Specifies how the font is spaced. The @code{p} spacing specifies
03bebefc
JR
924a proportional font, and @code{m} or @code{c} specify a monospaced font.
925
87e391bb
EZ
926@item foundry
927Not used on Windows, but for informational purposes and to
03bebefc
JR
928prevent problems with code that expects it to be set, is set internally to
929@code{raster} for bitmapped fonts, @code{outline} for scalable fonts,
930or @code{unknown} if the type cannot be determined as one of those.
87e391bb 931@end table
03bebefc
JR
932
933@cindex font properties (MS Windows gdi backend)
87e391bb
EZ
934Options specific to @code{GDI} fonts:
935
936@table @code
03bebefc
JR
937
938@cindex font scripts (MS Windows)
939@cindex font unicode subranges (MS Windows)
87e391bb
EZ
940@item script
941Specifies a unicode subrange the font should support.
942
943The following scripts are recognized on Windows: @code{latin}, @code{greek},
944@code{coptic}, @code{cyrillic}, @code{armenian}, @code{hebrew}, @code{arabic},
03bebefc
JR
945@code{syriac}, @code{nko}, @code{thaana}, @code{devanagari}, @code{bengali},
946@code{gurmukhi}, @code{gujarati}, @code{oriya}, @code{tamil}, @code{telugu},
947@code{kannada}, @code{malayam}, @code{sinhala}, @code{thai}, @code{lao},
948@code{tibetan}, @code{myanmar}, @code{georgian}, @code{hangul},
949@code{ethiopic}, @code{cherokee}, @code{canadian-aboriginal}, @code{ogham},
950@code{runic}, @code{khmer}, @code{mongolian}, @code{symbol}, @code{braille},
951@code{han}, @code{ideographic-description}, @code{cjk-misc}, @code{kana},
952@code{bopomofo}, @code{kanbun}, @code{yi}, @code{byzantine-musical-symbol},
953@code{musical-symbol}, and @code{mathematical}.
954
955@cindex font antialiasing (MS Windows)
87e391bb 956@item antialias
ae742cb5
CY
957Specifies the antialiasing method. The value @code{none} means no
958antialiasing, @code{standard} means use standard antialiasing,
959@code{subpixel} means use subpixel antialiasing (known as Cleartype on
960Windows), and @code{natural} means use subpixel antialiasing with
961adjusted spacing between letters. If unspecified, the font will use
962the system default antialiasing.
87e391bb 963@end table
03bebefc 964
37a75312
EZ
965@node Windows Misc
966@section Miscellaneous Windows-specific features
967
968 This section describes miscellaneous Windows-specific features.
969
a210f8e6
EZ
970@vindex w32-use-visible-system-caret
971@cindex screen reader software, MS-Windows
972 The variable @code{w32-use-visible-system-caret} is a flag that
86dca3e8
JR
973determines whether to make the system caret visible. The default when
974no screen reader software is in use is @code{nil}, which means Emacs
975draws its own cursor to indicate the position of point. A
976non-@code{nil} value means Emacs will indicate point location by the
977system caret; this facilitates use of screen reader software, and is
978the default when such software is detected when running Emacs.
979When this variable is non-@code{nil}, other variables affecting the
980cursor display have no effect.
a210f8e6
EZ
981
982@iftex
983@inforef{Windows Misc, , emacs}, for information about additional
984Windows-specific variables in this category.
985@end iftex
986
7d0a2d30 987@ifnottex
37a75312
EZ
988@vindex w32-grab-focus-on-raise
989@cindex frame focus policy, MS-Windows
990 The variable @code{w32-grab-focus-on-raise}, if set to a
991non-@code{nil} value causes a frame to grab focus when it is raised.
992The default is @code{t}, which fits well with the Windows default
993click-to-focus policy.
7d0a2d30 994@end ifnottex
37a75312 995
5798efc8
EZ
996@ifnottex
997@include msdog-xtra.texi
998@end ifnottex