emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Problem with autoloads


From: Michael Markert
Subject: Re: [O] Problem with autoloads
Date: Tue, 28 Jun 2011 08:56:59 +0200
User-agent: Wanderlust/2.15.9 (Almost Unreal) Emacs/24.0 Mule/6.0 (HANACHIRUSATO)

On 28 Jun 2011, Nick Dokos wrote:
> <snip>
>
> Suvayu and I worked on this in an email exchange: it turns out that
> Michael was right in that (recent) emacs 24 is indeed the culprit. In
> particular, the variable generated-autoload-file is now initialized to
> nil:
>
> ,----
> | (defvar generated-autoload-file nil
> |   "File into which to write autoload definitions.
> | A Lisp file can set this in its local variables section to make
> | its autoloads go somewhere else.
> |
> | If this is a relative file name, the directory is determined as
> | follows:
> |  - If a Lisp file defined `generated-autoload-file' as a
> |    file-local variable, use its containing directory.
> |  - Otherwise use the \"lisp\" subdirectory of `source-directory'.
> |
> | The autoload file is assumed to contain a trailer starting with a
> | FormFeed character.")
> `----
>
> whereas before (e.g. in the version of emacs 24 that I'm running: GNU
> Emacs 24.0.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.22.0) of
> 2011-04-13) it was initialized to "loaddefs.el":
>
>
> ,---- | (defvar generated-autoload-file "loaddefs.el" | "*File
> \\[update-file-autoloads] puts autoloads into.  | A `.el' file can set
> this in its local variables section to make its | autoloads go
> somewhere else.  The autoload file is assumed to contain a | trailer
> starting with a FormFeed character.")  `----
>
> The particular value is not that important: the fact that it was
> a relative file name is, as indicated by the comment above.
>
> I think the following patch fixes it and does not break any earlier
> versions of org. Suvayu, Michael (and anybody else who cares to try
> it): would you mind checking and reporting back?

Hi Nick,

thanks for looking into it.

But the patch doesn't work. I think that stems from the fact, that the
first thing `generate-file-autoloads' does is to bind it new:

,----
| (defun generate-file-autoloads (file)
|   "Insert at point a loaddefs autoload section for FILE.
| Autoloads are generated for defuns and defmacros in FILE
| marked by `generate-autoload-cookie' (which see).
| If FILE is being visited in a buffer, the contents of the buffer
| are used.
| Return non-nil in the case where no autoloads were added at point."
|   (interactive "fGenerate autoloads for file: ")
|   (let ((generated-autoload-file buffer-file-name))
|     (autoload-generate-file-autoloads file (current-buffer))))
`----

And because we feed it a relative file name it's bound to a relative
file name.

Michael

Attachment: pgpuuT80wBvnG.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]