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:
parent
732b9594ce
commit
658d8eb8fc
5 changed files with 60 additions and 23 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue