all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Something like `with-eval-before-load'?
@ 2014-11-25 16:35 Alexander Shukaev
  2014-11-26  2:17 ` Yuri Khan
  0 siblings, 1 reply; 3+ messages in thread
From: Alexander Shukaev @ 2014-11-25 16:35 UTC (permalink / raw)
  To: help-gnu-emacs

`with-eval-after-load' is indeed very handy form. But currently I'm in the
situation where I need its counterpart --- `with-eval-before-load'.

Let me give you an example. Imagine that I want to wipe out
`undo-tree-map'. How would you expect one to do so? Here is one way:

(set 'undo-tree-map (make-sparse-keymap))
(require 'undo-tree)


So far so good, but it will only work if `undo-tree' has not been ever
required before. In my case I don't want to track whether it was required
before or not (by other packages which depend on it of course) because my
configuration is modular and all I would like to do would be to write
something like

(with-eval-before-load 'undo-tree
  (set 'undo-tree-map (make-sparse-keymap)))


in some separate file which is dedicated for configuring only `undo-tree'
say `init-undo-tree.el'.

Then in some global configuration file, for example, `init.el' we can have

...
(require 'init-this)
(require 'init-that)
(require 'init-them)
(require 'init-him)
(require 'init-her)
(require 'init-undo-tree)
...


and the key feature here would be that the order where I put `(require
'init-undo-tree)' would not matter.

Is there any facility like `with-eval-before-load' available?


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-11-26  9:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-25 16:35 Something like `with-eval-before-load'? Alexander Shukaev
2014-11-26  2:17 ` Yuri Khan
2014-11-26  9:36   ` Alexander Shukaev

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.