]> sourceware.org Git - automake.git/commitdiff
* m4/lispdir.m4: Redirect /dev/null to stdin when running $EMACS
authorTim Van Holder <tim.van.holder@pandora.be>
Wed, 20 Feb 2002 18:10:17 +0000 (18:10 +0000)
committerTim Van Holder <tim.van.holder@pandora.be>
Wed, 20 Feb 2002 18:10:17 +0000 (18:10 +0000)
  to try and prevent a non-lisp emacs from starting in interactive
  mode.
* automake.texi: Document this change.

ChangeLog
automake.texi
m4/lispdir.m4

index 8c84bd53ea8c3e48f717db9c38c7c15abd7a9a7f..9e92e16d4836eba0104abf83889a6ce51b49ea30 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2002-02-20  Tim Van Holder  <tim.van.holder@pandora.be>
+
+       * m4/lispdir.m4: Redirect /dev/null to stdin when running $EMACS
+       to try and prevent a non-lisp emacs from starting in interactive
+       mode.
+       * automake.texi: Document this change.
+
 2002-02-19  Alexandre Duret-Lutz  <duret_g@epita.fr>
 
        * automake.texi (Macros): Split into ...
index 447b95a5485b024f1851ab0ad84e2cb803df9383..15e61c3abbc6a31f41a10bde37be016cffe1e836 100644 (file)
@@ -1447,6 +1447,17 @@ or by passing a third non-empty argument to the obsolete form.
 @item AM_PATH_LISPDIR
 Searches for the program @code{emacs}, and, if found, sets the output
 variable @code{lispdir} to the full path to Emacs' site-lisp directory.
+
+Note that this test assumes the @code{emacs} found to be a version that
+supports Emacs Lisp (such as @sc{gnu} Emacs or XEmacs).  Other emacsen
+can cause this test to hang (some, like old versions of MicroEmacs,
+start up in interactive mode, requiring @samp{C-x C-c} to exit, which
+is hardly obvious for a non-emacs user).  In most cases, however, you
+should be able to use @samp{C-c} to kill the test.  In order to avoid
+problems, you can set @code{EMACS} to ``no'' in the environment, or
+use the @samp{--with-lispdir} option to @command{configure} to
+explictly set the correct path (if you're sure you have an @code{emacs}
+that supports Emacs Lisp.
 @cvindex AM_PATH_LISPDIR
 
 @item AM_PROG_AS
index 4d7b60d1b14e3e0071660e0d346c55f59a5efa84..a790ad438e8af159e3d230fdfe7f56a0b980ff55 100644 (file)
@@ -39,7 +39,12 @@ AC_DEFUN([AM_PATH_LISPDIR],
  if test $EMACS != "no"; then
    if test x${lispdir+set} != xset; then
      AC_CACHE_CHECK([where .elc files should go], [am_cv_lispdir],
-       [AC_RUN_LOG([$EMACS -batch -q -eval '(while load-path (princ (concat (car load-path) "\n")) (setq load-path (cdr load-path)))' >conftest.out])
+       [# If $EMACS isn't GNU Emacs or XEmacs, this can blow up pretty badly
+  # Some emacsen will start up in interactive mode, requiring C-x C-c to exit,
+  #  which is non-obvious for non-emacs users.
+  # Redirecting /dev/null should help a bit; pity we can't detect "broken"
+  #  emacsen earlier and avoid running this altogether.
+  AC_RUN_LOG([$EMACS -batch -q -eval '(while load-path (princ (concat (car load-path) "\n")) (setq load-path (cdr load-path)))' </dev/null >conftest.out])
         am_cv_lispdir=`sed -n \
        -e 's,/$,,' \
        -e '/.*\/lib\/\(x\?emacs\/site-lisp\)$/{s,,${libdir}/\1,;p;q;}' \
This page took 0.036611 seconds and 5 git commands to generate.