1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-21 06:55:39 +00:00

Preload leim-list.el

* Makefile.in (abs_builddir): New, set by configure.
(buildlisppath): Add leim/.
(epaths-force-w32): Set BLD.

* lisp/loadup.el: Load leim-list.el when found.

* lisp/startup.el (normal-top-level): Skip re-loading leim/leim-list.el.

* nt/epaths.nt (PATH_DUMPLOADSEARCH): Add leim/.

* src/callproc.c (init_callproc): Don't assume PATH_DUMPLOADSEARCH
is a single directory.

* src/epaths.in (PATH_DUMPLOADSEARCH): Add leim/.

Fixes: debbugs:4789
This commit is contained in:
Glenn Morris 2013-11-25 20:06:23 -05:00
parent 3f73284a46
commit 624780f09d
10 changed files with 75 additions and 34 deletions

View File

@ -1,3 +1,10 @@
2013-11-26 Glenn Morris <rgm@gnu.org>
Preload leim-list.el.
* Makefile.in (abs_builddir): New, set by configure.
(buildlisppath): Add leim/.
(epaths-force-w32): Set BLD.
2013-11-21 Paul Eggert <eggert@cs.ucla.edu>
Fix some dependency problems that cause unnecessary recompiles.

View File

@ -164,6 +164,7 @@ bitmapdir=@bitmapdir@
# We use $(srcdir) explicitly in dependencies so as not to depend on VPATH.
srcdir=@srcdir@
abs_srcdir=@abs_srcdir@
abs_builddir=@abs_builddir@
# MinGW CPPFLAGS may use this.
abs_top_srcdir=@abs_top_srcdir@
@ -213,13 +214,16 @@ locallisppath=@locallisppath@
# The default is ${locallisppath}:${standardlisppath}.
lisppath=@lisppath@
# Where Emacs will search for its lisp files while
# building. This is only used during the process of
# compiling Emacs, to help Emacs find its lisp files
# before they've been installed in their final location.
# Where Emacs will search for its lisp files while building.
# This is only used during the process of compiling Emacs,
# to help Emacs find its lisp files before they've been installed
# in their final location.
# This should be a colon-separated list of directories.
# Normally it points to the lisp/ directory in the sources.
buildlisppath=${abs_srcdir}/lisp
# Normally it points to the lisp/ directory in the sources and
# the leim/ directory in the build tree.
# NB lread.c relies on lisp/ being first here.
# TODO generate leim in srcdir also, prebuild in tarfiles.
buildlisppath=${abs_srcdir}/lisp:${abs_builddir}/leim
# Where to install the other architecture-independent
# data files distributed with Emacs (like the tutorial,
@ -337,6 +341,7 @@ msys_sed_sh_escape=sed -e 's/[];$$*.^[]/\\\\&/g'
# '/foo/bar').
epaths-force-w32: FRC
@(w32srcdir=`${srcdir}/build-aux/msys-to-w32 "${srcdir}"`; \
w32blddir=`${srcdir}/build-aux/msys-to-w32 .`; \
w32prefix=`${srcdir}/build-aux/msys-to-w32 "${prefix}" N`; \
w32prefixpattern=`echo "${w32prefix}" | ${msys_sed_sh_escape}` ; \
w32locallisppath=`${srcdir}/build-aux/msys-to-w32 "${locallisppath}" N ":" "\\;" | ${msys_w32prefix_subst}` ; \
@ -344,6 +349,7 @@ epaths-force-w32: FRC
-e 's;\(#.*PATH_SITELOADSEARCH\).*$$;\1 "'"$${w32locallisppath}"'";' \
-e '/^.*#/s/@VER@/${version}/g' \
-e '/^.*#/s/@CFG@/${configuration}/g' \
-e '/^.*#/s|@BLD@|$${w32blddir}|g' \
-e "/^.*#/s|@SRC@|$${w32srcdir}|g") && \
${srcdir}/build-aux/move-if-change epaths.h.$$$$ src/epaths.h

View File

@ -1,3 +1,9 @@
2013-11-26 Glenn Morris <rgm@gnu.org>
Preload leim-list.el. (Bug#4789)
* loadup.el: Load leim-list.el when found.
* startup.el (normal-top-level): Skip re-loading leim/leim-list.el.
2013-11-25 Bozhidar Batsov <bozhidar@batsov.com>
* emacs-lisp/bytecomp.el (byte-compile-form): Fix a typo.

View File

@ -1,7 +1,7 @@
;;; loadup.el --- load up standardly loaded Lisp files for Emacs
;; Copyright (C) 1985-1986, 1992, 1994, 2001-2013 Free Software
;; Foundation, Inc.
;; Copyright (C) 1985-1986, 1992, 1994, 2001-2013
;; Free Software Foundation, Inc.
;; Maintainer: FSF
;; Keywords: internal
@ -98,6 +98,8 @@
(load "env")
(load "format")
(load "bindings")
;; This sets temporary-file-directory, used by eg
;; auto-save-file-name-transforms in files.el.
(load "cus-start")
(load "window") ; Needed here for `replace-buffer-in-windows'.
(setq load-source-file-function 'load-with-code-conversion)
@ -278,12 +280,16 @@
(load "vc/ediff-hook")
(if (not (eq system-type 'ms-dos)) (load "tooltip"))
;If you want additional libraries to be preloaded and their
;doc strings kept in the DOC file rather than in core,
;you may load them with a "site-load.el" file.
;But you must also cause them to be scanned when the DOC file
;is generated.
;For other systems, you must edit ../src/Makefile.in.
;; This file doesn't exist when building a development version of Emacs
;; from the repository. It is generated just after temacs is built.
(load "leim-list.el" t)
;; If you want additional libraries to be preloaded and their
;; doc strings kept in the DOC file rather than in core,
;; you may load them with a "site-load.el" file.
;; But you must also cause them to be scanned when the DOC file
;; is generated.
;; For other systems, you must edit ../src/Makefile.in.
(load "site-load" t)
;; Make sure default-directory is unibyte when dumping. This is

View File

@ -499,18 +499,23 @@ It is the default value of the variable `top-level'."
;; available input methods.
(let ((tail load-path)
(lispdir (expand-file-name "../lisp" data-directory))
;; For out-of-tree builds, leim-list is generated in the build dir.
;;; (leimdir (expand-file-name "../leim" doc-directory))
;; For out-of-tree builds, leim-list is generated in the build dir.
(leimdir (expand-file-name "../leim" doc-directory))
dir)
(while tail
(setq dir (car tail))
(let ((default-directory dir))
(load (expand-file-name "subdirs.el") t t t))
;; Do not scan standard directories that won't contain a leim-list.el.
;; http://lists.gnu.org/archive/html/emacs-devel/2009-10/msg00502.html
(or (string-match (concat "\\`" lispdir) dir)
(let ((default-directory dir))
(load (expand-file-name "leim-list.el") t t t)))
;; Do not scan standard directories that won't contain a leim-list.el.
;; http://lists.gnu.org/archive/html/emacs-devel/2009-10/msg00502.html
;; Also skip leim/leim-list.el, since we preloaded that one.
(or (string-prefix-p lispdir dir)
;; Not supposed to be subdirs.el in leim, but someone
;; might have added one and be keeping their own leim-list
;; files in subdirs of leim.
(string-equal leimdir dir)
(let ((default-directory dir))
(load (expand-file-name "leim-list.el") t t t)))
;; We don't use a dolist loop and we put this "setq-cdr" command at
;; the end, because the subdirs.el files may add elements to the end
;; of load-path and we want to take it into account.

View File

@ -1,3 +1,7 @@
2013-11-26 Glenn Morris <rgm@gnu.org>
* epaths.nt (PATH_DUMPLOADSEARCH): Add leim/.
2013-11-12 Dani Moncayo <dmoncayo@gmail.com>
* msysconfig.sh: Remove.

View File

@ -12,8 +12,7 @@
the host system (e.g., i686-pc-mingw32), and @SRC@ by the root of
the Emacs source tree used to build Emacs. */
/*
Copyright (C) 1993, 1995, 1997, 1999, 2001-2013 Free Software
Foundation, Inc.
Copyright (C) 1993, 1995, 1997, 1999, 2001-2013 Free Software Foundation, Inc.
This file is part of GNU Emacs.
@ -51,10 +50,11 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#define PATH_SITELOADSEARCH "%emacs_dir%/share/emacs/@VER@/site-lisp;%emacs_dir%/share/emacs/site-lisp"
/* Like PATH_LOADSEARCH, but used only during the build process
when Emacs is dumping. Configure (using "make epaths-force") sets
this to $buildlisppath, which normally has the value: <srcdir>/lisp.
when Emacs is dumping. Configure (using "make epaths-force-w32") sets
this to $buildlisppath, which normally has the value:
<srcdir>/lisp;<builddir>/leim.
*/
#define PATH_DUMPLOADSEARCH "@SRC@/lisp"
#define PATH_DUMPLOADSEARCH "@SRC@/lisp;@BLD@/leim"
/* The extra search path for programs to invoke. This is appended to
whatever the PATH environment variable says to set the Lisp

View File

@ -1,3 +1,10 @@
2013-11-26 Glenn Morris <rgm@gnu.org>
Preload leim-list.el.
* epaths.in (PATH_DUMPLOADSEARCH): Add leim/.
* callproc.c (init_callproc): Don't assume PATH_DUMPLOADSEARCH
is a single directory.
2013-11-25 Paul Eggert <eggert@cs.ucla.edu>
bool-vector-subsetp is now the normal direction (Bug#15912).

View File

@ -1607,16 +1607,16 @@ init_callproc (void)
if (data_dir == 0)
{
Lisp_Object tem, tem1, srcdir;
Lisp_Object lispdir = Fcar (decode_env_path (0, PATH_DUMPLOADSEARCH, 0));
srcdir = Fexpand_file_name (build_string ("../src/"), lispdir);
srcdir = Fexpand_file_name (build_string ("../src/"),
build_unibyte_string (PATH_DUMPLOADSEARCH));
tem = Fexpand_file_name (build_string ("GNU"), Vdata_directory);
tem1 = Ffile_exists_p (tem);
if (!NILP (Fequal (srcdir, Vinvocation_directory)) || NILP (tem1))
{
Lisp_Object newdir;
newdir = Fexpand_file_name (build_string ("../etc/"),
build_unibyte_string (PATH_DUMPLOADSEARCH));
newdir = Fexpand_file_name (build_string ("../etc/"), lispdir);
tem = Fexpand_file_name (build_string ("GNU"), newdir);
tem1 = Ffile_exists_p (tem);
if (!NILP (tem1))

View File

@ -1,7 +1,6 @@
/* Hey Emacs, this is -*- C -*- code! */
/*
Copyright (C) 1993, 1995, 1997, 1999, 2001-2013 Free Software
Foundation, Inc.
Copyright (C) 1993, 1995, 1997, 1999, 2001-2013 Free Software Foundation, Inc.
This file is part of GNU Emacs.
@ -42,9 +41,10 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* Like PATH_LOADSEARCH, but used only during the build process
when Emacs is dumping. Configure (using "make epaths-force") sets
this to $buildlisppath, which normally has the value: <srcdir>/lisp.
this to $buildlisppath, which normally has the value:
<srcdir>/lisp:<builddir>/leim.
*/
#define PATH_DUMPLOADSEARCH "../lisp"
#define PATH_DUMPLOADSEARCH "../lisp:../leim"
/* The extra search path for programs to invoke. This is appended to
whatever the PATH environment variable says to set the Lisp