1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

Fix bug #11959 with startup warnings on MS-Windows about ../site-lisp.

src/w32.c (init_environment): Change the default values of many
 environment variables in dflt_envvars[] to NULL, to avoid pushing
 them into environment when they were not already defined.  Remove
 the code that deletes site-lisp subdirectories from the default
 value of EMACSLOADPATH, as it is no longer needed.
 (check_windows_init_file): Now external, not static.  Use
 Vload_path as is, without adding anything, as this function is now
 called when Vload_path is already set up.
 src/w32.h (check_windows_init_file): Add prototype.
 src/emacs.c (init_cmdargs) [WINDOWSNT]: When running from the build
 directory, ignore the /*/i386/ tail in Vinvocation_directory, for
 compatibility with Posix platforms.
 (main): Move the call to check_windows_init_file to here from
 w32.c.
 (decode_env_path) [WINDOWSNT]: Expand the %emacs_dir%/ prefix, if
 any, in the DEFALT argument into the root of the Emacs build or
 installation tree, as appropriate.
 src/callproc.c (init_callproc_1): Call decode_env_path instead of
 doing its equivalent by hand.
 (init_callproc): Replace DOS_NT condition with MSDOS, thus letting
 the code that sets Vexec_path run on MS-Windows.
 src/lread.c (init_lread): Add comments to #ifdef's.

 nt/paths.h (PATH_LOADSEARCH, PATH_SITELOADSEARCH, PATH_EXEC)
 (PATH_DATA, PATH_DOC): Replace dummy directory names with
 directories relative to %emacs_dir%.
 (PATH_EXEC): Add lib-src/oo-spd/i386 and lib-src/oo/i386, to cater
 to the use case of running un-installed Emacs.
This commit is contained in:
Eli Zaretskii 2012-08-04 17:17:10 +03:00
parent a09508f27e
commit 76151e2ce7
8 changed files with 106 additions and 63 deletions

View file

@ -18,14 +18,18 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* Relative file names in this file that begin with "%emacs_dir%/" are
treated specially by decode_env_path: they are expanded relative to
the value of the emacs_dir environment variable, which points to
the root of the Emacs tree. */
/* The default search path for Lisp function "load".
Together with PATH_SITELOADSEARCH, this sets load-path. */
/* #define PATH_LOADSEARCH "/usr/local/lib/emacs/lisp" */
#define PATH_LOADSEARCH "C:/emacs/lisp"
#define PATH_LOADSEARCH "%emacs_dir%/lisp;%emacs_dir%/leim"
/* Like PATH_LOADSEARCH, but contains the non-standard pieces. */
#define PATH_SITELOADSEARCH "C:/emacs/site-lisp"
#define PATH_SITELOADSEARCH "%emacs_dir%/site-lisp;%emacs_dir%/../site-lisp"
/* Like PATH_LOADSEARCH, but used only when Emacs is dumping. This
path is usually identical to PATH_LOADSEARCH except that the entry
@ -39,13 +43,13 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
variable exec-directory. exec-directory is used for finding
executables and other architecture-dependent files. */
/* #define PATH_EXEC "/usr/local/lib/emacs/etc" */
#define PATH_EXEC "C:/emacs/bin"
#define PATH_EXEC "%emacs_dir%/bin;%emacs_dir%/lib-src/oo-spd/i386;%emacs_dir%/lib-src/oo/i386"
/* Where Emacs should look for its architecture-independent data
files, like the NEWS file. The lisp variable data-directory
is set to this value. */
/* #define PATH_DATA "/usr/local/lib/emacs/data" */
#define PATH_DATA "C:/emacs/data"
#define PATH_DATA "%emacs_dir%/etc"
/* Where Emacs should look for X bitmap files.
The lisp variable x-bitmap-file-path is set based on this value. */
@ -53,11 +57,10 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* Where Emacs should look for its docstring file. The lisp variable
doc-directory is set to this value. */
#define PATH_DOC "C:/emacs/etc"
#define PATH_DOC "%emacs_dir%/etc"
/* Where the configuration process believes the info tree lives. The
lisp variable configure-info-directory gets its value from this
macro, and is then used to set the Info-default-directory-list. */
/* #define PATH_INFO "/usr/local/info" */
#define PATH_INFO "C:/emacs/info"