1

For context, I'm writing an extension.

I need to check if a particular symbol is an autoload symbol, such that autoloadp = t.

After doing some digging I found that the defined autoloads in loaddefs.el do not match up with every declared autoload in the repository.

Check these screenshots out for clarity:

enter image description here


enter image description here


enter image description here


As shown, symbol org-capture-string is declared to be an autoload, which is accurately reflected in the loaddefs.el file.

But symbols orgtbl-exp-regexp and org-table-to-lisp are also declared to be an autoload, which is inaccurately reflected in the loaddefs.el file, since they are no where to be found.

What gives?

3
  • Which version of Emacs?
    – phils
    Aug 25 at 7:28
  • @phils Currently using the master branch. Are those symbols (and all others for that matter) accurately reflected in the loaddefs.el file in the most recent release? Aug 25 at 8:07
  • I'm also seeing this pattern with the finder-inf.el file. cl-macs is clearly a built-in Emacs package, but it's no where to be found in the finder-inf.el file Aug 25 at 9:11
1

loaddefs.el is automatically generated at build time. See src/Makefile.in line 774 (in whatever version I happened to have checked out; it might be a different line in yours).

3
  • How is the cus-load.el file even generated when the function custom-make-dependencies isn't even defined? github.com/emacs-mirror/emacs/blob/…. Am I missing something? Aug 25 at 9:26
  • 1
    Note the -l cus-dep on that line. This tells it to load the cus-dep.el file first, where custom-make-dependencies is located. Since that function isn’t needed most of the time, it isn’t even marked for autoloading. You can load the file if you want: (load "cus-dep")
    – db48x
    Aug 25 at 9:42
  • not sure how I skipped over that when grepping for it; thanks Aug 25 at 18:33
1

You'll find the org loaddefs in org-loaddefs.el, due to the file-local variable generated-autoload-file.

cl-macs is not a package, it is an internal component of cl-lib, which is in finder-inf.el.

2
0

In addition to what @db48x said, this is how it happens, and how you can yourself update loaddefs.el (or another file of autoloads). C-h f batch-update-autoloads tells us:

batch-update-autoloads is an autoloaded Lisp function in autoload.el.

(batch-update-autoloads)

Update loaddefs.el autoloads in batch mode.

Calls update-directory-autoloads on the command line arguments. Definitions are written to generated-autoload-file (which should be non-nil).

See also update-directory-autoloads, update-file-autoloads, and w32-batch-update-autoloads.

1
  • So from my understanding, someone forgot to update ldefs-boot.el for the symbols orgtbl-exp-regexp and org-table-to-lisp (in my example (I'm assuming there are others as well))? Aug 25 at 20:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.