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