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: Tue, 15 Apr 2008 03:12:51 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (berkeley-unix)

On Mon, 14 Apr 2008 16:51:45 -0700 (PDT), istillshine@gmail.com wrote:
> How to see the results of my change of .emacs without exiting emacs?
> Thanks.

Most changes can be evaluated right there, in the buffer that you have
opened to edit your ~/.emacs file.  If you have changed the default
value of a variable:

    (setq-default diff-switches "-u")

You can move past the closing parenthesis, and type `C-x C-e'.  This
will evaluate the expression, and you are done.

If you are adding a new hook to text-mode

    (defun keramida-text-mode-hook ()
      (setq fill-colum 72))
    (add-hook 'text-mode-hook 'keramida-text-mode-hook)

You can mark the two expressions, and type `M-x eval-region'.  The
expressions in the current region will be evaluated, and immediatelly
apply to any new text-mode buffers that you open.

There _are_ a few exceptions, i.e. some of the changes to `customize'
stuff are trickier to evaluate directly in the buffer that edits your
~/.emacs file.  If you are making this sort of change, I'm sure some of
the experienced Emacs hackers who hang out here can help :)



reply via email to

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