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: weber
Subject: Re: Bug when compiling elc code?
Date: Wed, 08 Aug 2007 16:09:51 -0000
User-agent: G2/1.0

On 8 ago, 11:59, Sven Joachim <svenj...@gmx.de> wrote:
> bojohan+n...@dd.chalmers.se (Johan Bockgård) writes:
> > Sven Joachim <svenj...@gmx.de> writes:
>
> >>     (let ((old-mode (default-file-modes)))
> >>       (set-default-file-modes (file-modes buffer-file-name))
> >>       (byte-compile-file buffer-file-name)
> >>       (set-default-file-modes old-mode)))
>
> > You should use `unwind-protect' here.
>
> Right, thanks.  Is the following okay?
>
> (add-hook 'emacs-lisp-mode-hook
>           '(lambda ()
>              (make-local-hook 'after-save-hook)
>              (add-hook 'after-save-hook
>                        '(lambda ()
>                           (let ((old-mode (default-file-modes)))
>                             (unwind-protect
>                                 (progn
>                                   (set-default-file-modes (file-modes 
> buffer-file-name))
>                                   (byte-compile-file buffer-file-name))
>                               (set-default-file-modes old-mode))))
>                        nil t)))

Btw, is keeping a password inside a .elc file and deleting the
original .el a semi-safe way to hide your personal info ?



reply via email to

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