bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#24491: Avoid recursive require of eshell


From: Brendan O'Dea
Subject: bug#24491: Avoid recursive require of eshell
Date: Wed, 21 Sep 2016 13:14:33 +1000

Package: emacs
Version: 25.1.1
Tags: patch

Attempting add a function to eshell-load-hook, and that function is
autoloaded from a file which also requires eshell, produces the
following error:

  Recursive ‘require’ for feature ‘eshell’

Specifically, I'm trying to do this:

  (add-hook 'eshell-load-hook #'eshell-local-setup)

where eshell-local-setup is an autoloaded function which does a few
things, including adding to eshell-variable-aliases-list and the file
it is defined in has:

  (require 'esh-var)

which indirectly attempts to require eshell.

The simple fix for this is to run the hook after providing eshell.
This seems to be fairly common (see align.el, autorevert.el, dired.el,
expand.el, ibuffer.el, etc) although not consistent (bookmark.el,
cmuscheme.el, etc. do it in the other order).

--bod

Attachment: eshell.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]