Note that there are some explanatory texts on larger screens.

plurals
  1. POIs there a way to make changes to toggles in my .emacs file apply without re-starting Emacs?
    text
    copied!<p>I want to be able to make the changes to my .emacs file without having to reload Emacs.</p> <p>I found three questions which sort of answer what I am asking (you can find them <a href="https://stackoverflow.com/questions/2580650/how-can-i-reload-emacs-after-changing-it">here</a>, <a href="https://stackoverflow.com/questions/167705/not-restarting-emacs">here</a> and <a href="https://stackoverflow.com/questions/2281593/how-can-i-load-changes-to-my-emacs-without-rebooting-emacs">here</a>), but the problem is that the change I have just made is to a toggle, and as the comments to two of the answers (<a href="https://stackoverflow.com/questions/2580650/how-can-i-reload-emacs-after-changing-it/2580726#2580726">a1</a>, <a href="https://stackoverflow.com/questions/2281593/how-can-i-load-changes-to-my-emacs-without-rebooting-emacs/2281628#2281628">a2</a>) to those questions explain, the solutions given there (such as M-x reload-file or M-x eval-buffer) don't apply to toggles.</p> <p>I imagine there is a way of toggling the variable again with a command, but if there is a way to reload the whole .emacs and have the all the toggles re-evaluated without having to specify them, I would prefer.</p> <p>In any case, I would also appreciate if someone told me how to toggle the value of a variable so that if I just changed one toggle I can do it with a command rather than re-start Emacs just for that (I am new to Emacs). I don't know how useful this information is, but the change I applied was the following (which I got from <a href="https://stackoverflow.com/questions/154097/whats-in-your-emacs/2643094#2643094">this</a> answer to another question):</p> <pre><code>(setq skeleton-pair t) (setq skeleton-pair-on-word t) (global-set-key (kbd "[") 'skeleton-pair-insert-maybe) (global-set-key (kbd "(") 'skeleton-pair-insert-maybe) (global-set-key (kbd "{") 'skeleton-pair-insert-maybe) (global-set-key (kbd "&lt;") 'skeleton-pair-insert-maybe) </code></pre> <p><strong>Edit</strong>: I included the above in .emacs and reloaded Emacs, so that the changes took effect. Then I commented all of it out and tried M-x load-file. This doesn't work. The suggestion below (C-x C-e by <a href="https://stackoverflow.com/users/209744/pp">PP</a> works if I am using it to evaluate the toggle first time, but not when I want to undo it). I would like something that would evaluate the commenting out, if such thing exists...</p> <p>Thanks :)</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload