On 8 ago, 11:59, Sven Joachim wrote: > bojohan+n...@dd.chalmers.se (Johan Bockgård) writes: > > Sven Joachim 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 ?