]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
When computing lispdir, don't load emacs site wide init file.
authorAndrew Burgess <andrew.burgess@embecosm.com>
Wed, 30 Jul 2014 16:41:15 +0000 (17:41 +0100)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Fri, 19 Dec 2014 20:14:17 +0000 (21:14 +0100)
When computing the lispdir emacs was previously invoked with the '-q'
option to avoid loading the users initialisation files, however, the
site wide initialisation file was still loaded, in some cases this can
cause emacs to hang, with the result that a configure can also hang.

The lisp code that aclocal causes to be executed reduces the load-path
list (in emacs) to empty.  The load-path is used by emacs to find
packages which it wants to load.  Currently, if emacs tries to auto
load a package during shut down, and the package is not found, then
emacs will hang.  This does seem like an emacs bug, but protecting
against this in aclocal is simply a case of not loading the site wide
initialisation file.

In this patch then the '-q' option to emacs is replaced with '-Q',
this has the same, the '-Q' option is similar to '-q --no-site-file
--no-splash'.

* doc/automake.texi (Hard-Coded Install Paths): Update explanation of
emacs code used to get lispdir.
* m4/lispdir.m4 (AM_PATH_LISPDIR): Update emacs flags.

Copyright-paperwork-exempt: yes
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
doc/automake.texi
m4/lispdir.m4

index 913dee4f0863fb51b1ecb72e887bd29fffc5f0f0..e690d52b7de0504388ad65259ee58cde90e14417 100644 (file)
@@ -12991,7 +12991,7 @@ instance, here is how @code{AM_PATH_LISPDIR} (@pxref{Emacs Lisp})
 computes @samp{$(lispdir)}:
 
 @example
-$EMACS -batch -q -eval '(while load-path
+$EMACS -batch -Q -eval '(while load-path
   (princ (concat (car load-path) "\n"))
   (setq load-path (cdr load-path)))' >conftest.out
 lispdir=`sed -n
index 4e0c9140d5ed0c9c29d081f0927626b3c056fc7a..ed2e224c2cd0c41e7e8e07eaade0fb2d48101581 100644 (file)
@@ -34,7 +34,7 @@ AC_DEFUN([AM_PATH_LISPDIR],
   #  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])
+  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,.*/lib/\(x*emacs/site-lisp\)$,${libdir}/\1,;p;q;}' \