How to treat my custom emacs theme as a “safe theme”?

I'm new to Emacs.

So, I'm using emacs 24 and solarized color theme.

When Emacs starts up, it prompt me with "Loading a theme can run Lisp code, really load?".

When I answer with "yes", it continues to "Treat this theme as safe in future sessions?".

If I say "y", the theme gets loaded, and

    (custome-safe-themes (quote ("..." default))))

gets added to ~/.emacs automatically.

However, those questions come back every time I open Emacs!

What's the proper way to turn those off?


If you use M-x customize-themes to set and save your preferred theme, then everything should work nicely.

If, instead, you've added code to your .emacs to enable the theme, but that code appears earlier in the file than the custom-set-variables command, then that might be the problem.

You can force Emacs to load a theme without prompting you to confirm its safety by using the load-theme function's NO-CONFIRM flag:

(load-theme 'solarized-light t)

the same problem happened here. I solved this issue putting the custom-set-variables code before a load the theme.

 '(custom-safe-themes (quote ("9527feeeec43970b1d725bdc04e97eb2b03b15be982ac50089ad223d3c6f2920" default))))

Then I load my theme:

(defun use-default-theme()
  (load-theme 'default-black))


I had the same problem and i just removed the lines in .emacs and lo and behold the whole thing worked.

Need Your Help

Lex: How do I Prevent it from matching against substrings?

c lex

For example, I'm supposed to convert "int" to "INT". But if there's the word "integer", I don't think it's supposed to turn into "INTeger".

Save image file from one server to another repeatedly every x minutes

php image cron copy jpeg

What I'm asking for is how to set copy action on PHP server to copy image file from remote server in intervals of x minutes.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.