mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-30 12:21:25 -08:00
* lisp/loadup.el: Add workaround for occasional "bootstrap" failure
This commit is contained in:
parent
cdf49336cd
commit
ee3ef57c24
1 changed files with 17 additions and 0 deletions
|
|
@ -191,6 +191,23 @@
|
|||
(setq definition-prefixes new))
|
||||
|
||||
(load "button") ;After loaddefs, because of define-minor-mode!
|
||||
|
||||
(when (interpreted-function-p (symbol-function 'add-hook))
|
||||
;; `subr.el' is needed early and hence can't use macros like `setf'
|
||||
;; liberally. Yet, it does use such macros in code that it knows will not
|
||||
;; be executed too early, such as `add-hook'. Usually, by the time we
|
||||
;; run that code, either `subr.el' was already compiled to start with
|
||||
;; or on the contrary many files aren't compiled yet and have thus caused
|
||||
;; macro packages like `gv' to be loaded. But not always.
|
||||
;; The specific error we're trying to work around, here, occurs when
|
||||
;; `cl-preloaded's `provide' ends up (because of an `eval-after-load')
|
||||
;; calling `add-hook' which burps with a "void-function setf" on
|
||||
;; (setf (get hook 'hook--depth-alist) depth-sym)'.
|
||||
;; FIXME: We should probably split `subr.el' into one that's loaded early
|
||||
;; where we refrain from using macros like `setf', and another loaded later
|
||||
;; where we can blissfully `require' packages like `gv'.
|
||||
(require 'gv))
|
||||
|
||||
(load "emacs-lisp/cl-preloaded")
|
||||
(load "emacs-lisp/oclosure") ;Used by cl-generic
|
||||
(load "obarray") ;abbrev.el is implemented in terms of obarrays.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue