emacs-devel
[Top][All Lists]
Advanced

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

test whether init file loaded without error


From: Drew Adams
Subject: test whether init file loaded without error
Date: Fri, 21 Mar 2008 09:49:22 -0700

Is there an easy way for Lisp code to test whether a user's
init file was loaded without error? I imagine that it could
try to use `after-init-hook' in some way (not sure how,
though), but is there some straightforward way to test this?

For example: A user's init file might use code that sets up
`kill-emacs-hook' to save some custom variable. But it might
be inappropriate to do that if the init file was not loaded
successfully. The init file might, for example, define
`custom-file' at the end, and if an error were raised during
load, before the `custom-file' definition, then exiting
Emacs would cause `kill-emacs-hook' to write the
customization (incorrectly) to the init file instead of the
`custom-file'.







reply via email to

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