On 5 February 2011 15:33, Eli Zaretskii wrote: > > From: Reuben Thomas > > Date: Sat, 05 Feb 2011 13:06:15 +0000 > > Cc: > > > > 1. It updated all the autoloads, not just the ones for that directory. > > This seems to contradict the docstring for update-directory-autoloads, > > which says “Update loaddefs.el with all the current autoloads from > > DIRS”, and I had supplied precisely one directory, interactively. > > Please show exactly how you invoked update-directory-autoloads, with > all its arguments. > M-x update-directory-autoloads RET ~/local/share/emacs/site-lisp RET > > 2. It then wrote the resulting loaddefs.el to the source directory for > > Emacs. This is very clear in the code, in autoload-generated-file, but > > I’m at a loss to explain it: I can see this is useful while building > > Emacs, but I can’t see what possible utility it has when using an > > installed Emacs. > > See generated-autoload-file. > I did, but I didn't see anything useful there; sorry if I'm being obtuse. The apparently relevant bits say: generated-autoload-file is a variable defined in `autoload.el'. Its value is "loaddefs.el" Documentation: *File M-x update-file-autoloads puts autoloads into. A `.el' file can set this in its local variables section to make its autoloads go somewhere else. First, there's something missing here: it doesn't explain that if the value is a plain file name, then a directory is automatically prepended (and that's the source directory, which seems odd). Secondly, it doesn't tell me what to do to get the files I've installed in my own directory to have a sensible loaddefs.el written. From reading the above, there are two options: 1. I could annotate all the files I install in my personal site-lisp directory with generated-autoload-file settings. That seems perverse. 2. I could set generated-autoload-file before running update-directory-autoloads, but I have no idea whether this would have a deleterious effect on, for example, ELPA. In a nutshell, why would I want to set a global variable for a one-off operation? -- http://rrt.sc3d.org