From: Glenn Morris Date: Tue, 26 Nov 2013 01:06:23 +0000 (-0500) Subject: Preload leim-list.el X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~694 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=624780f09dd117edbe8b2b71be44622fc7002f91;p=emacs.git 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 --- diff --git a/ChangeLog b/ChangeLog index 0c9dedf1b42..9285cc1b376 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2013-11-26 Glenn Morris + + 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 Fix some dependency problems that cause unnecessary recompiles. diff --git a/Makefile.in b/Makefile.in index 1848c41a1e3..969a22419a0 100644 --- a/Makefile.in +++ b/Makefile.in @@ -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 diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6f5519e8803..fd41ed84d64 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2013-11-26 Glenn Morris + + 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 * emacs-lisp/bytecomp.el (byte-compile-form): Fix a typo. diff --git a/lisp/loadup.el b/lisp/loadup.el index 98e3b877144..fe4fe1fe571 100644 --- a/lisp/loadup.el +++ b/lisp/loadup.el @@ -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 diff --git a/lisp/startup.el b/lisp/startup.el index 88ec1f359eb..0b1c55b36a0 100644 --- a/lisp/startup.el +++ b/lisp/startup.el @@ -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. diff --git a/nt/ChangeLog b/nt/ChangeLog index 1b766f0f349..61a84995bc6 100644 --- a/nt/ChangeLog +++ b/nt/ChangeLog @@ -1,3 +1,7 @@ +2013-11-26 Glenn Morris + + * epaths.nt (PATH_DUMPLOADSEARCH): Add leim/. + 2013-11-12 Dani Moncayo * msysconfig.sh: Remove. diff --git a/nt/epaths.nt b/nt/epaths.nt index 6e297476528..553d80c2e5e 100644 --- a/nt/epaths.nt +++ b/nt/epaths.nt @@ -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 . */ #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: /lisp. + when Emacs is dumping. Configure (using "make epaths-force-w32") sets + this to $buildlisppath, which normally has the value: + /lisp;/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 diff --git a/src/ChangeLog b/src/ChangeLog index bf4392d519d..9a32c174d8f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2013-11-26 Glenn Morris + + 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 bool-vector-subsetp is now the normal direction (Bug#15912). diff --git a/src/callproc.c b/src/callproc.c index dfe315ab8db..b44f680b352 100644 --- a/src/callproc.c +++ b/src/callproc.c @@ -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)) diff --git a/src/epaths.in b/src/epaths.in index 1f5701e5337..02e755935c4 100644 --- a/src/epaths.in +++ b/src/epaths.in @@ -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 . */ /* 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: /lisp. + this to $buildlisppath, which normally has the value: + /lisp:/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