Lars Ingebrigtsen writes: > Philip Kaludercic writes: > >> The last issue preventing this patch from being merged is that >> expressions marked for auto-loading are not gathered. I believe one >> option was adding etc/themes to the list of scraped directories, but >> that would require comments like >> >> ;;;###autoload >> (when (and (boundp 'custom-theme-load-path) >> load-file-name) >> ;; Add theme folder to `custom-theme-load-path' when installing over MELPA. >> (add-to-list 'custom-theme-load-path >> (file-name-as-directory (file-name-directory load-file-name)))) >> >> from leuven-theme.el to be removed. > > Ah, right. > > Well, we could come up with a special rule for etc/themes. For > instance, we could use > > ;;;###theme-autoload (put ...) > > for these things, and add a function to loaddefs-gen that only fetched > those for the Emacs build (it'd almost be trivial -- we just bind > lisp-mode-autoload-regexp to ";;;###theme-autoload" and then point the > scraping function at etc/themes). I am not sure how that is done exactly, but if we take the ";;;###theme-autoload" approach it should be able to have a handler to convert autoloaded (defcustom ...) forms in to (put ...) ones: