sperber(a)informatik.uni-tuebingen.de (Michael Sperber [Mr. Preprocessor]) writes:
What's a politically correct (and preferably simple) to determine
the
set/region of forms in ~/.emacs under the control of customize? Can I
search for (custom-load-themes ...) or (custom-set-variables ...) and
take the region from there to the end of the file? Or can I take all
forms starting with (custom-... ...). Or what?
(defun migrate-custom (oldfile newfile)
(require 'cus-edit)
(let ((custom-file oldfile))
(mapc 'custom-save-delete
'(custom-load-themes custom-reset-variables
custom-set-variables
custom-set-faces
custom-reset-faces)))
(setq custom-file newfile)
(custom-save-all))