[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: autoloads question
From: |
Emanuele Giaquinta |
Subject: |
Re: autoloads question |
Date: |
Mon, 12 May 2008 16:59:08 +0200 |
On Mon, May 12, 2008 at 10:28:01AM -0400, Stefan Monnier wrote:
> >>>>> "Emanuele" == Emanuele Giaquinta <address@hidden> writes:
>
> > On Mon, May 12, 2008 at 12:42:09PM +0200, Juanma Barranquero wrote:
> >> On Mon, May 12, 2008 at 12:09 PM, Emanuele Giaquinta
> >> <address@hidden> wrote:
> >>
> >> > -;;;;;; "widget.el" "window.el" "x-dnd.el") (18472 4851 825214))
> >> > +;;;;;; "widget.el" "window.el" "x-dnd.el") (18472 4853 658506))
> >> >
> >> > Is it expected?
> >>
> >> That is a timestamp.
>
> > Ah I see, thanks.
> > It is a bit boring because it causes an unneeded rebuild of emacs.
>
> I use the patch below to avoid the problem,
> @@ -632,7 +725,12 @@
> (current-buffer) nil nil no-autoloads this-time)
> (insert generate-autoload-section-trailer))
>
> - (save-buffer)
> + ;; Don't modify the file if its content has not been changed, so make
> + ;; dependencies don't trigger unnecessarily. This fails to update the
> + ;; time-stamp of the `no-autoloads' section, so it may cause redundant
> + ;; scans of files in future invocations. I.e. it's a trade-off.
> + (when changed (save-buffer))
> +
> ;; In case autoload entries were added to other files because of
> ;; file-local autoload-generated-file settings.
> (autoload-save-buffers))))
>
Wouldn't it be better to save the file mtime and restore it with
set-file-times if changed is nil?
Emanuele