Emacs 27でカスタムテーマを修正する

配布されているカスタムテーマを一部修正したいときに custom-theme-set-faces を使うが、Emacs 27.0.91 をビルドしてみたところ、修正が反映されなかった。

行儀のよい設定方法ではなさそうだが、変数 setq custom--inhibit-theme-enablenil を設定すれば反映されるようになった。

参考まで、sanityinc-tomorrowを変更している箇所。

(setq custom--inhibit-theme-enable nil)
(load-theme 'sanityinc-tomorrow-bright t)
(color-theme-sanityinc-tomorrow--with-colors
 'bright
 (custom-theme-set-faces
  'sanityinc-tomorrow-bright
  `(cursor ((t . (:background ,yellow))))
  `(line-number-current-line ((t . (:background ,comment :foreground ,foreground :weight bold))))
  `(mode-line-buffer-id ((t . (:foreground ,foreground :weight bold)))))))

ref: custom-theme-set-faces does not work in emacs 27 - Emacs Stack Exchange