emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: address@hidden: Re: Success using Windows NT]


From: Jason Rumney
Subject: Re: address@hidden: Re: Success using Windows NT]
Date: 13 Jun 2002 00:40:11 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

Richard Stallman <address@hidden> writes:

> Could you propose changes to the manual to DTRT?

OK, here are my proposed changes to the Environment Variables section
of cmdargs.texi.  An MS-Windows section containing details of all the 
MS-Windows specific issues will take some time, as I have to look
through the FAQ and my previous notes about what should go in such a
section to determine exactly what needs to be written.

> Should the build process still run addpm?  It seems no longer to be
> necessary.

It is necessary if the user is upgrading from an older version of
Emacs that did not use emacs_dir, and it does not do any harm for
other users.



*** cmdargs.texi.~1.63.~        Thu May 30 20:17:49 2002
--- cmdargs.texi        Thu Jun 13 00:28:35 2002
***************
*** 347,359 ****
  setenv ORGANIZATION "not very much"
  @end example
  
!   When Emacs is uses the X Window System, it inherits the use
  of a large number of environment variables from the X libraries.  See
  the X documentation for more information.
  
  @menu
  * General Variables::   Environment variables that all versions of Emacs use.
  * Misc Variables::      Certain system-specific variables.
  @end menu
  
  @node General Variables
--- 347,360 ----
  setenv ORGANIZATION "not very much"
  @end example
  
!   When Emacs uses the X Window System, it inherits the use
  of a large number of environment variables from the X libraries.  See
  the X documentation for more information.
  
  @menu
  * General Variables::   Environment variables that all versions of Emacs use.
  * Misc Variables::      Certain system-specific variables.
+ * MS-Windows Registry:: An alternative to the environment on MS-Windows.
  @end menu
  
  @node General Variables
***************
*** 430,435 ****
--- 431,441 ----
  @env{LANG} is not set.  But if @env{LC_ALL} is specified, it overrides
  the settings of all the other locale environment variables.
  
+ On MS-Windows, if LANG is not already set in the environment when
+ Emacs starts, it will be set by Emacs based on the system-wide default
+ language, which can be set in the `Regional Settings' Control Panel on
+ some versions of MS-Windows.
+ 
  The value of the LC_CTYPE category is
  matched against entries in @code{locale-language-names},
  @code{locale-charset-language-names}, and
***************
*** 540,546 ****
--- 546,600 ----
  
  @item WINDOW_GFX
  Used when initializing the Sun windows system.
+ 
+ @item PRELOAD_WINSOCK
+ On MS-Windows, if this variable is set, the network library will be
+ loaded and initialized at startup instead of waiting until the first
+ time it is required.
+ 
+ @item emacs_dir
+ On MS-Windows, @env{emacs_dir} is a special environment variable that
+ is calculated by Emacs at startup to be the full path of the directory
+ in which Emacs is installed, provided it is installed in the standard
+ directory structure.  It is not much use setting this variable
+ yourself unless your installation is non-standard, since unlike other
+ environment variables, it will be overridden by Emacs at startup.
+ When setting other environment variables, such as @env{EMACSLOADPATH},
+ you may find it useful to use @env{emacs_dir} rather than hard-coding
+ an absolute path.  This allows multiple versions of Emacs to be used
+ on a Windows machine with the same environment variable settings, and
+ the Emacs installation directory to be moved without changing any
+ environment or registry settings.
  @end table
+ 
+ @node MS-Windows Registry
+ @appendixsubsec The MS-Windows System Registry
+ @cindex addpm, MS-Windows installation program
+ @cindex registry, environment variables on MS-Windows
+ 
+ On MS-Windows, the installation program @code{addpm.exe} adds values
+ for @env{emacs_dir}, @env{EMACSLOADPATH}, @env{EMACSDATA},
+ @env{EMACSPATH}, @env{EMACSDOC}, @env{SHELL} and @env{TERM} to the
+ @file{HKEY_LOCAL_MACHINE} section of the system registry, under
+ @file{/Software/GNU/Emacs}.  It does this because there is no standard
+ place to set environment variables across different versions of
+ Windows.  While running @code{addpm.exe} is no longer strictly
+ neccesary in recent versions of Emacs, if you are upgrading from an
+ older version, running addpm.exe ensures that you do not have older
+ registry entries from a previous installation, which may not be
+ compatible with the latest version of Emacs.
+ 
+ When Emacs starts, as well as checking the environment, it also checks
+ the System Registry for those variables and for @env{HOME}, @env{LANG}
+ and @env{PRELOAD_WINSOCK}.
+ 
+ To determine the value of those variables, Emacs goes through the
+ following procedure.  First, the environment is checked.  If the
+ variable is not found there, Emacs looks for registry keys by that
+ name under @file{/Software/GNU/Emacs}; first in the
+ @file{HKEY_CURRENT_USER} section of the registry, and if not found
+ there, in the @file{HKEY_LOCAL_MACHINE} section.  Finally, if the
+ values are still not determined, the compiled in defaults are used.
  
  @node Display X
  @appendixsec Specifying the Display Name 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]