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

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

Re: Take effect on changes in .emacs without closing emacs


From: Giorgos Keramidas
Subject: Re: Take effect on changes in .emacs without closing emacs
Date: Thu, 17 Apr 2008 02:55:31 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (berkeley-unix)

On Wed, 16 Apr 2008 21:58:38 +0200, Rob Wolfe <rw@smsnet.pl> wrote:
> istillshine@gmail.com writes:
>
>> How to see the results of my change of .emacs without exiting emacs?
>
> I use this function:
>
> ;; reload the init file
> (defun reload ()
>   "Reload the .emacs file"
>   (interactive "*" )
>   (load-file ".emacs"))

The current directory may have changed since Emacs started.  A minor
improvement is probably:

    (load-file user-init-file)

The `user-init-file' contains the absolute path of the user's init file.
If the actual init file loaded is a compiled file, such as `.emacs.elc',
the value refers to the corresponding source file, so the `load-file'
call will DTRT regardless of the current working directory.



reply via email to

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