From 0fea9e10df6927091619a5de52d0d8256d23f2b6 Mon Sep 17 00:00:00 2001 From: yamaoka Date: Thu, 9 Nov 2000 10:52:09 +0000 Subject: [PATCH] Fix last change and some more... * lisp/dgnushack.el: Load dgnuspath.el and ~/.lpath.el just before path-util is loaded. (dgnushack-compile): Show `load-path'. (dgnushack-w3-dir): Ignore the env var W3DIR if it is empty. --- ChangeLog | 6 ++++-- aclocal.m4 | 6 +++--- configure | 6 +++--- lisp/dgnushack.el | 26 ++++++++++++++++---------- 4 files changed, 26 insertions(+), 18 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0d56a44..4f53964 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,8 +5,10 @@ * aclocal.m4 (AC_CHECK_W3): Substitute `W3' with empty string instead of "no" if it is not acceptable. - * lisp/dgnushack.el: Load ~/.lpath.el just before `srcdir' is added - to `load-path'. + * lisp/dgnushack.el: Load dgnuspath.el and ~/.lpath.el just before + path-util is loaded. + (dgnushack-compile): Show `load-path'. + (dgnushack-w3-dir): Ignore the env var W3DIR if it is empty. * lisp/lpath.el: Move out `load-path' modification for APEL, FLIM and SEMI to dgnushack.el. diff --git a/aclocal.m4 b/aclocal.m4 index f3b6f3a..c03607b 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -149,10 +149,10 @@ fi AC_ARG_WITH(w3,[ --with-w3=DIR Specify where to find the w3 package], [ EMACS_cv_ACCEPTABLE_W3=`( cd $withval && pwd || echo "$withval" ) 2> /dev/null` ]) W3=${EMACS_cv_ACCEPTABLE_W3} AC_SUBST(W3) - if test "x${EMACS_cv_ACCEPTABLE_W3}" = "xyes"; then - AC_MSG_RESULT("${W3}") - else + if test "x${EMACS_cv_ACCEPTABLE_W3}" = "x"; then AC_MSG_RESULT("not found") + else + AC_MSG_RESULT("${W3}") fi ]) diff --git a/configure b/configure index 4b76074..d407bfb 100755 --- a/configure +++ b/configure @@ -1061,10 +1061,10 @@ fi W3=${EMACS_cv_ACCEPTABLE_W3} - if test "x${EMACS_cv_ACCEPTABLE_W3}" = "xyes"; then - echo "$ac_t"""${W3}"" 1>&6 - else + if test "x${EMACS_cv_ACCEPTABLE_W3}" = "x"; then echo "$ac_t"""not found"" 1>&6 + else + echo "$ac_t"""${W3}"" 1>&6 fi if test ${EMACS_FLAVOR} = xemacs; then diff --git a/lisp/dgnushack.el b/lisp/dgnushack.el index 202c66b..1fc7f53 100644 --- a/lisp/dgnushack.el +++ b/lisp/dgnushack.el @@ -52,12 +52,11 @@ (defvar srcdir (or (getenv "srcdir") ".")) -(defvar dgnushack-w3-dir - (file-name-as-directory - (or (getenv "W3DIR") (expand-file-name "../../w3/lisp/" srcdir)))) -(push dgnushack-w3-dir load-path) - -(load (expand-file-name "dgnuspath.el" srcdir) nil nil t) +(defvar dgnushack-w3-dir (let ((w3dir (getenv "W3DIR"))) + (unless (zerop (length w3dir)) + (file-name-as-directory w3dir)))) +(when dgnushack-w3-dir + (push dgnushack-w3-dir load-path)) ;; If we are building w3 in a different directory than the source ;; directory, we must read *.el from source directory and write *.elc @@ -127,6 +126,12 @@ '(char-before (point)) form)))) +(load (expand-file-name "dgnuspath.el" srcdir) nil nil t) + +(condition-case err + (load "~/.lpath.el" t nil t) + (error (message "Error in \"~/.lpath.el\" file: %s" err))) + ;; Don't load path-util until `char-after' and `char-before' have been ;; optimized because it requires `poe' and then modify the functions. (or (featurep 'path-util) @@ -135,10 +140,6 @@ (add-path "flim") (add-path "semi") -(condition-case err - (load "~/.lpath.el" t nil t) - (error (message "Error in \"~/.lpath.el\" file: %s" err))) - (push srcdir load-path) (load (expand-file-name "lpath.el" srcdir) nil t t) @@ -247,6 +248,11 @@ You also then need to add the following to the lisp/dgnushack.el file: (push \"~/lisp/custom\" load-path) Modify to suit your needs.")) + + ;; Show `load-path'. + (message "load-path=(\"%s\")" + (mapconcat 'identity load-path "\"\n \"")) + (dolist (file dgnushack-exporting-files) (setq file (expand-file-name file srcdir)) (when (and (file-exists-p (setq elc (concat file "c"))) -- 1.7.10.4