[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: problem of define-minor-mode while bootstrapping
From: |
Richard Stallman |
Subject: |
Re: problem of define-minor-mode while bootstrapping |
Date: |
Fri, 18 Oct 2002 01:00:28 -0600 (MDT) |
In RC, if both :global and :init-value of define-minor-mode
is non-nil, define-minor-mode calls eval-after-load as below:
;; If the mode is global, call the function according to the default.
,(if (and globalp (null init-value))
`(if (and load-file-name ,mode)
(eval-after-load load-file-name '(,mode 1)))))))
And, eval-after-load calls load-symbol-file-load-history,
and load-symbol-file-load-history loads "fns-XX.YY.ZZ.el".
But, at bootstrapping time, as "fns-XX.YY.ZZ.el" is not yet
generated, it signals an error.
I looked at RC and found this code:
;; If the mode is global, call the function according to the default.
,(if globalp
`(if (and load-file-name ,mode)
(eval-after-load load-file-name '(,mode 1)))))))
As far as I can tell, the (null init-value) was never there.
Should I add it?
Anyway, I think the bug you found can be fixed this way:
;; If the mode is global, call the function according to the default.
,(if globalp
`(if (and load-file-name ,mode
(not purify-flag))
(eval-after-load load-file-name '(,mode 1)))))))
Does that fix work?