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

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

bug#8720: 24.0.50; load-theme in .emacs makes it easy to inadvertently d


From: David Engster
Subject: bug#8720: 24.0.50; load-theme in .emacs makes it easy to inadvertently delete custom-set variables
Date: Mon, 23 May 2011 21:58:13 +0200

This is with Emacs revno 104332 on GNU/Linux.

Here's a recipe:

* Create a minimal .emacs file, containing the following:

-------------------
;; Load a theme - it doesn't matter which.
(load-theme 'sometheme)

(custom-set-variables
 ;; custom-set-variables was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 '(user-mail-address "address@hidden"))
-------------------

* Start Emacs with that init file. Answer both questions "Really load?"
  and "Treat this theme as safe in future sessions?" with 'y'.

* Exit Emacs.

* The .emacs file will now look like this:

-------------------
;; Load a theme - it doesn't matter which
(load-theme 'zenburn)

(custom-set-variables
 ;; custom-set-variables was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 '(custom-safe-themes (quote ("79debafda48631fbb02f822cab5bb8d50df6e3f6" 
default))))
(custom-set-faces
 ;; custom-set-faces was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 )
--------------------

As you can see, the existing customization for user-mail-address was
deleted; in fact, every existing entry there will be deleted.  I know
this can be fixed by putting the `load-theme' at the end of the .emacs
file, but this isn't mentioned in the doc-string and I'd still consider
this at least as unexpected behavior.

-David





reply via email to

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