help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Bug when compiling elc code?


From: Sven Joachim
Subject: Re: Bug when compiling elc code?
Date: Wed, 08 Aug 2007 18:45:22 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux)

[Please keep this topic on-list. Thanks.]

Hadron <hadronquark@googlemail.com> writes:

> The problem is that even if personal.elc exists in 600 mode, then a
> recompile puts it back to 644. This is surely a bug?

Maybe, but other compilers (gcc, for instant) behave similarly: they
remove the target before they write to it.  And Emacs has a good
reason to do this, as can be seen from this comment in the
byte-compile-file function in bytecomp.el:

,----
|                 (when (file-exists-p target-file)
|                   ;; Remove the target before writing it, so that any
|                   ;; hard-links continue to point to the old file (this makes
|                   ;; it possible for installed files to share disk space with
|                   ;; the build tree, without causing problems when emacs-lisp
|                   ;; files in the build tree are recompiled).
|                   (delete-file target-file))
|                 (write-region (point-min) (point-max) target-file))
`----

Regards,
        Sven




reply via email to

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