Ar an dara lá déag de mí na Nollaig, scríobh Sean MacLennan:
I am using Didier Verna's rcfiles package (thanks Didier!). But I
that I couldn't get it to work with some packages such as lisp-mode.
The rcfiles package uses `eval-after-load' which looks up the mode in
`load-history' to see if it has already been loaded. If so, it runs the
form for you.
But, unfortunately, files such as lisp-mode have the full path rather
than a simple load name. This path is useless on any machine except the
So I wrote some simple code to massage the load-history so it would
(mapcar (lambda (elt)
(let ((a (car elt)))
(if (eq 0 (string-match "/.*/\\([^/]+\\)\.elc" a))
(list (match-string 1 a) (cdr elt))
Feel free to make fun of the code.... or make suggestions.... but my
real question is: will this cause problems? Anybody know of code that
needs the full path?
Nothing needs it, and it can construct it using the source-lisp variable if
it did need it. I added pretty much your code in 2010 for a slightly
different reason, see
for the context
and why it was removed. I’m happy to put it back, with your improvement that
.elc is removed.
#'eval-after-load is a whole other vale of tears.
‘Liston operated so fast that he once accidentally amputated an assistant’s
fingers along with a patient’s leg, […] The patient and the assistant both
died of sepsis, and a spectator reportedly died of shock, resulting in the
only known procedure with a 300% mortality.’ (Atul Gawande, NEJM, 2012)
XEmacs-Beta mailing list