Let #'eval-after-load accept symbol for FILE arg
authorSteve Youngs <steve@sxemacs.org>
Sat, 18 Jun 2016 09:53:23 +0000 (19:53 +1000)
committerSteve Youngs <steve@sxemacs.org>
Sat, 18 Jun 2016 09:53:23 +0000 (19:53 +1000)
commit8f178e721b917a2f562033f15fe1a594416271fd
tree7a9da17b7d0704678e935c436d9070d1ea10bf3f
parentae2462c24067ecb048e20779fe688cfd84c4b895
Let #'eval-after-load accept symbol for FILE arg

While looking into bug 183 I noticed that FSF's #'eval-after-load also
accepts a feature (i.e, a symbol) for the FILE arg.  I personally don't
think that's a wonderful idea, but I did see that a few things in
GNU/Emacs are using it (Tramp, for example).  This change adds rudimentary
support in our #'eval-after-load.  Basically, if FILE is a symbol, look up
a filename from #'feature-file, or use #'symbol-name if that fails.

The doc string was amended accordingly, and a note about the futility of
using #'eval-after-load with dumped lisp was also added.

* lisp/subr.el (eval-after-load): Also accept symbols for FILE
arg.
Add a note to doc string about the futility of using this on
dumped lisp.

Signed-off-by: Steve Youngs <steve@sxemacs.org>
lisp/subr.el