1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

Avoid calling customize-save-variable during startup (Bug#8720).

* lisp/cus-edit.el (customize-push-and-save): New function.

* lisp/files.el (hack-local-variables-confirm): Use it.

* lisp/custom.el (load-theme): New arg NO-CONFIRM.  Use
customize-push-and-save (Bug#8720).
(custom-enabled-themes): Doc fix.

* lisp/cus-theme.el (customize-create-theme)
(custom-theme-merge-theme): Callers to load-theme changed.
This commit is contained in:
Chong Yidong 2011-06-29 21:39:52 -04:00
parent 732b9594ce
commit 658d8eb8fc
5 changed files with 60 additions and 23 deletions

View file

@ -2943,16 +2943,7 @@ n -- to ignore the local variables list.")
(setq char nil)))
(kill-buffer buf)
(when (and offer-save (= char ?!) unsafe-vars)
(dolist (elt unsafe-vars)
(add-to-list 'safe-local-variable-values elt))
;; When this is called from desktop-restore-file-buffer,
;; coding-system-for-read may be non-nil. Reset it before
;; writing to .emacs.
(if (or custom-file user-init-file)
(let ((coding-system-for-read nil))
(customize-save-variable
'safe-local-variable-values
safe-local-variable-values))))
(customize-push-and-save 'safe-local-variable-values unsafe-vars))
(memq char '(?! ?\s ?y))))))
(defun hack-local-variables-prop-line (&optional mode-only)