bug#81658: 31.1; :custom-face doesn't work anymore

Vincent Zhang <[email protected]>
Newsgroups gmane.emacs.bugs
Message-ID <[email protected]>
After I upgrade Emacs to 31 on macOS, :custom-face of use-package seems not working with doom-themes. 

My config:

```elisp
(use-package doom-themes
  :init (load-theme 'doom-one-theme t))

(use-package symbol-overlay
  :custom-face
  (symbol-overlay-default-face ((t (:inherit region :background unspecified :foreground unspecified))))
  (symbol-overlay-face-1 ((t (:inherit nerd-icons-blue :background unspecified :foreground unspecified :inverse-video t))))
  (symbol-overlay-face-2 ((t (:inherit nerd-icons-pink :background unspecified :foreground unspecified :inverse-video t))))
  (symbol-overlay-face-3 ((t (:inherit nerd-icons-yellow :background unspecified :foreground unspecified :inverse-video t))))
  (symbol-overlay-face-4 ((t (:inherit nerd-icons-purple :background unspecified :foreground unspecified :inverse-video t))))
  (symbol-overlay-face-5 ((t (:inherit nerd-icons-red :background unspecified :foreground unspecified :inverse-video t))))
  (symbol-overlay-face-6 ((t (:inherit nerd-icons-orange :background unspecified :foreground unspecified :inverse-video t))))
  (symbol-overlay-face-7 ((t (:inherit nerd-icons-green :background unspecified :foreground unspecified :inverse-video t))))
  (symbol-overlay-face-8 ((t (:inherit nerd-icons-cyan :background unspecified :foreground unspecified :inverse-video t))))
  :bind (("M-i"  . symbol-overlay-put)
         ("M-n"  . symbol-overlay-jump-next)
         ("M-p"  . symbol-overlay-jump-prev))
  :bind-keymap ("M-s s"  . symbol-overlay-map)
  :hook (prog-mode yaml-mode yaml-ts-mode))
```

It seems this was a recent change in use-package. Pre-31, :custom-face
used face-spec-set without the face-defface-spec type (which makes it
equivalent to custom-set-faces), but now it does.

Now the workaround is use `custom-set-faces` or revert
`use-package-handler/:custom-face` to the old version.

Please see https://github.com/doomemacs/themes/issues/893 for more
details.

In GNU Emacs 31.1 (build 1, aarch64-apple-darwin25.5.0, NS
appkit-2685.60 Version 26.5.2 (Build 25F84)) of 2026-08-19 built on
sjc22-bm210-e307fdb9-8f97-4f54-8579-54c29824f34f-3E65A34C818D.local
Repository revision: 1988e330c1c5ad6f161e66c348cd8e65cd95e9cd
Repository branch: emacs-31
Windowing system distributor 'Apple', version 10.3.2685
System Description:  macOS 26.6.2

Configured using:
 'configure 'CFLAGS=-DFD_SETSIZE=10000 -DDARWIN_UNLIMITED_SELECT
-I/opt/homebrew/opt/gcc/include -I/opt/homebrew/opt/libgccjit/include'
'LDFLAGS=-L/opt/homebrew/lib/gcc/current
-Wl,-rpath,/opt/homebrew/lib/gcc/current'
--enable-locallisppath=/opt/homebrew/share/emacs/site-lisp --with-ns
--with-native-compilation=aot --with-xwidgets --with-tree-sitter
--with-mailutils --with-modules --with-rsvg --with-webp --without-dbus
--without-compress-install'

Configured features:
ACL GLIB GNUTLS JPEG LCMS2 LIBXML2 MODULES NATIVE_COMP NOTIFY KQUEUE NS
PDUMPER PNG RSVG SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER
WEBP XIM XWIDGETS ZLIB

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8

Major mode: Elisp/l

Minor modes in effect:
  windmove-mode: t
  popper-tab-line-mode: t
  popper-mode: t
  gcmh-mode: t
  pulsar-global-mode: t
  pulsar-mode: t
  save-place-mode: t
  savehist-mode: t
  doom-modeline-mode: t
  minions-mode: t
  default-text-scale-mode: t
  global-page-break-lines-mode: t
  page-break-lines-mode: t
  transient-posframe-mode: t
  ace-pinyin-global-mode: t
  ace-pinyin-mode: t
  global-anzu-mode: t
  anzu-mode: t
  beginend-global-mode: t
  beginend-prog-mode: t
  drag-stuff-global-mode: t
  drag-stuff-mode: t
  electric-pair-mode: t
  global-hungry-delete-mode: t
  hungry-delete-mode: t
  xclip-mode: t
  global-so-long-mode: t
  vertico-posframe-mode: t
  vertico-mode: t
  nerd-icons-completion-mode: t
  marginalia-mode: t
  corfu-popupinfo-mode: t
  corfu-history-mode: t
  global-corfu-mode: t
  corfu-mode: t
  yas-global-mode: t
  yas-minor-mode: t
  global-hl-line-mode: t
  global-region-occurrences-highlighter-mode: t
  region-occurrences-highlighter-mode: t
  global-colorful-mode: t
  colorful-mode: t
  global-diff-hl-show-hunk-mouse-mode: t
  diff-hl-show-hunk-mouse-mode: t
  diff-hl-flydiff-mode: t
  global-diff-hl-mode: t
  diff-hl-mode: t
  delete-selection-mode: t
  tabspaces-mode: t
  popterm-global-mode: t
  which-key-posframe-mode: t
  which-key-mode: t
  display-line-numbers-mode: t
  goto-address-prog-mode: t
  flyspell-mode: t
  subword-mode: t
  symbol-overlay-mode: t
  display-fill-column-indicator-mode: t
  indent-bars-mode: t
  rainbow-delimiters-mode: t
  goggles-mode: t
  flyover-mode: t
  flymake-mode: t
  persistent-scratch-autosave-mode: t
  magit-prime-mode: t
  magit-todos-mode: t
  global-hl-todo-mode: t
  hl-todo-mode: t
  global-git-commit-mode: t
  global-auto-revert-mode: t
  server-mode: t
  global-treesit-auto-mode: t
  editorconfig-mode: t
  recentf-mode: t
  solaire-global-mode: t
  override-global-mode: t
  apheleia-global-mode: t
  apheleia-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  prettify-symbols-mode: t
  tab-bar-history-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  window-divider-mode: t
  minibuffer-nonselected-mode: t
  minibuffer-regexp-mode: t
  size-indication-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  hs-minor-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rfc822 mml mml-sec gnus-util
mm-decode mm-bodies mm-encode mailabbrev gmm-utils mailheader sendmail
tramp-cmds easy-kill mwim consult textsec uni-scripts idna-mapping
uni-confusable textsec-check elfeed-tree elfeed-show elfeed-search
elfeed elfeed-curl elfeed-log elfeed-db elfeed-lib shr pixel-fill
kinsoku svg avl-tree generator url-queue url-file xml-query apheleia
apheleia-rcs apheleia-dp apheleia-formatters apheleia-utils apheleia-log
apheleia-formatter-context shortdoc shortdoc-doc ace-window cape-keyword
yasnippet-capf mail-utils gnutls network-stream url-http mail-parse
rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr url-gw nsm puny
url-cache url-auth newst-treeview newst-reader newst-backend xml
vertico-directory vertico-sort orderless cape eldoc-mouse helpful
cc-langs cc-vars cc-defs trace cl-print edebug info-look help-fns
radix-tree elisp-refs markdown-toc markdown-toc-pandoc yank-media
markdown-mode eglot external-completion jsonrpc xref ert debug backtrace
find-func sh-script smie executable windmove tab-line popper-echo popper
gcmh pulsar atomic-chrome websocket bindat let-alist saveplace savehist
doom-modeline doom-modeline-segments doom-modeline-env
doom-modeline-core shrink-path minions default-text-scale disp-table
page-break-lines transient-posframe ace-pinyin pinyinlib avy anzu
beginend drag-stuff elec-pair smart-region multiple-cursors
mc-separate-operations rectangular-region-mode mc-mark-pop mc-edit-lines
mc-hide-unmatched-lines-mode mc-mark-more html-mode-expansions sgml-mode
facemenu dom mc-cycle-cursors multiple-cursors-core expand-region
subword-mode-expansions text-mode-expansions er-basic-expansions
expand-region-core expand-region-custom hungry-delete xclip so-long
vertico-posframe vertico-multiform vertico nerd-icons-completion
marginalia corfu-popupinfo corfu-history corfu-auto corfu
yasnippet-snippets yasnippet vc-git time hl-line
region-occurrences-highlighter hi-lock colorful-mode diff-hl-show-hunk
diff-hl-flydiff diff-hl log-view vc-dir ewoc browse-kill-ring delsel
tabspaces popterm which-key-posframe which-key display-line-numbers
goto-addr elisp-scope flyspell ispell cap-words superword subword
hideshow symbol-overlay display-fill-column-indicator indent-bars-ts
indent-bars noutline outline rainbow-delimiters goggles pulse color
flyover checkdoc lisp-mnt flymake project persistent-scratch rg vc
vc-dispatcher rg-info-hack info rg-menu rg-ibuffer rg-result wgrep-rg
wgrep rg-history rg-header ibuf-ext ibuffer ibuffer-loaddefs magit-prime
tramp-sh tramp-cache time-stamp tramp trampver tramp-integration files-x
tramp-message tramp-compat parse-time iso8601 time-date tramp-loaddefs
magit-bookmark magit-submodule magit-blame magit-stash magit-reflog
magit-bisect magit-push magit-pull magit-fetch magit-clone magit-remote
magit-commit magit-sequence magit-notes magit-worktree magit-tag
magit-merge magit-branch magit-reset magit-files bookmark magit-refs
magit-todos pcre2el rxt advice re-builder hl-todo f async magit-status
magit epa magit-repos magit-apply dired-x dired dired-loaddefs magit-wip
magit-log magit-diff which-func imenu smerge-mode diff diff-mode
track-changes git-commit log-edit pcvs-util add-log magit-core
magit-autorevert autorevert filenotify magit-margin magit-transient
magit-process with-editor shell pcomplete magit-mode benchmark magit-git
server magit-base magit-section cursor-sensor transient byte-opt
format-spec crm llama comp comp-cstr warnings comp-run comp-common
cond-let treesit-auto treesit editorconfig editorconfig-core
editorconfig-core-handle editorconfig-fnmatch init-web init-elixir
init-ruby init-python init-rust init-go init-c init-elisp init-prog
init-ai init-dap init-lsp init-check init-vc init-utils grep compile
text-property-search comint ansi-osc ansi-color init-player init-docker
init-dict init-reader init-org init-markdown init-shell init-eshell
init-treemacs init-window init-workspace init-kill-ring init-ibuffer
init-highlight init-dired init-dashboard dashboard dashboard-widgets
rect recentf tree-widget ffap thingatpt nerd-icons nerd-icons-faces
nerd-icons-data nerd-icons-data-mdicon nerd-icons-data-flicon
nerd-icons-data-codicon nerd-icons-data-devicon nerd-icons-data-sucicon
nerd-icons-data-wicon nerd-icons-data-faicon nerd-icons-data-powerline
nerd-icons-data-octicon nerd-icons-data-pomicon nerd-icons-data-ipsicon
init-calendar init-bookmark derived init-snippet init-completion
init-edit init-ui solaire-mode doom-themes-ext-visual-bell face-remap
posframe doom-one-theme doom-themes doom-themes-base init-hydra
pretty-hydra hydra ring lv s dash compat init-base diminish edmacro
kmacro use-package-bind-key exec-path-from-shell bind-key init-package
finder-inf ace-pinyin-autoloads add-node-modules-path-autoloads
agent-shell-autoloads acp-autoloads anzu-autoloads apheleia-autoloads
atom-one-dark-theme-autoloads atomic-chrome-autoloads
auto-dark-autoloads avy-zap-autoloads beginend-autoloads
browse-kill-ring-autoloads cal-china-x-autoloads cape-autoloads
cask-mode-autoloads circadian-autoloads cmake-mode-autoloads
coffee-mode-autoloads colorful-mode-autoloads consult-dir-autoloads
consult-eglot-autoloads consult-flyspell-autoloads
consult-yasnippet-autoloads corfu-autoloads csv-mode-autoloads
cue-sheet-mode-autoloads rx dape-autoloads dart-mode-autoloads
dashboard-autoloads default-text-scale-autoloads devdocs-autoloads
diff-hl-autoloads diminish-autoloads dired-git-info-autoloads
dired-quick-sort-autoloads dired-rsync-autoloads diredfl-autoloads
docker-autoloads aio-autoloads doom-modeline-autoloads
doom-themes-autoloads drag-stuff-autoloads dslide-autoloads
easy-kill-autoloads eldoc-mouse-autoloads elfeed-webkit-autoloads
elfeed-autoloads embark-consult-autoloads consult-autoloads
embark-autoloads empv-autoloads esh-help-autoloads
eshell-prompt-extras-autoloads eshell-z-autoloads
exec-path-from-shell-autoloads fanyi-autoloads file-info-autoloads
browse-at-remote-autoloads fish-mode-autoloads flymake-ruff-autoloads
flyover-autoloads gcmh-autoloads ghostel-autoloads
git-messenger-autoloads git-modes-autoloads git-timemachine-autoloads
epg rfc6068 epg-config gnu-elpa-keyring-update goggles-autoloads
goto-chg-autoloads gptel-magit-autoloads gptel-autoloads
grip-mode-autoloads gt-autoloads haml-mode-autoloads helpful-autoloads
elisp-refs-autoloads hide-mode-line-autoloads hungry-delete-autoloads
ialign-autoloads ibuffer-project-autoloads iedit-autoloads
indent-bars-autoloads inf-ruby-autoloads julia-ts-mode-autoloads
julia-mode-autoloads link-hint-autoloads macrostep-autoloads
magit-prime-autoloads magit-todos-autoloads hl-todo-autoloads
async-autoloads marginalia-autoloads markdown-toc-autoloads
markdown-mode-autoloads mermaid-ts-mode-autoloads minions-autoloads
mixed-pitch-autoloads mwim-autoloads nerd-icons-completion-autoloads
nerd-icons-corfu-autoloads nerd-icons-dired-autoloads
nerd-icons-ibuffer-autoloads nov-autoloads esxml-autoloads
ob-go-autoloads ob-mermaid-autoloads ob-powershell-autoloads
ob-rust-autoloads olivetti-autoloads orderless-autoloads
org-appear-autoloads org-modern-autoloads org-pomodoro-autoloads
org-preview-html-autoloads org-rich-yank-autoloads org-roam-ui-autoloads
org-roam-autoloads emacsql-autoloads osx-dictionary-autoloads
ox-gfm-autoloads page-break-lines-autoloads pcre2el-autoloads
pdd-autoloads pdf-tools-autoloads persistent-scratch-autoloads
php-mode-autoloads pinyinlib-autoloads pomidor-autoloads alert-autoloads
log4e-autoloads gntp-autoloads popper-autoloads popterm-autoloads
popup-autoloads powershell-autoloads pretty-hydra-autoloads
protobuf-mode-autoloads pulsar-autoloads quickrun-autoloads
rainbow-delimiters-autoloads region-occurrences-highlighter-autoloads
restclient-autoloads reveal-in-folder-autoloads rg-autoloads
ron-mode-autoloads rspec-mode-autoloads ruby-refactor-autoloads
rust-mode-autoloads saveplace-pdf-view-autoloads scala-ts-mode-autoloads
scss-mode-autoloads shell-maker-autoloads shrink-path-autoloads
f-autoloads simple-httpd-autoloads smart-region-autoloads
multiple-cursors-autoloads expand-region-autoloads
solaire-mode-autoloads sudo-edit-autoloads swift-ts-mode-autoloads
symbol-overlay-autoloads tablist-autoloads tabspaces-autoloads
toc-org-autoloads transient-posframe-autoloads transwin-autoloads
treemacs-magit-autoloads magit-autoloads magit-section-autoloads
treemacs-nerd-icons-autoloads nerd-icons-autoloads
treemacs-tab-bar-autoloads treemacs-autoloads cfrs-autoloads
ht-autoloads pfuture-autoloads ace-window-autoloads avy-autoloads
s-autoloads treesit-auto-autoloads v-mode-autoloads hydra-autoloads
lv-autoloads dash-autoloads vertico-posframe-autoloads vertico-autoloads
vimrc-mode-autoloads vundo-autoloads web-mode-autoloads
websocket-autoloads wgrep-autoloads which-key-posframe-autoloads
posframe-autoloads with-editor-autoloads llama-autoloads
cond-let-autoloads xclip-autoloads xterm-color-autoloads
yard-mode-autoloads yari-autoloads yasnippet-capf-autoloads
yasnippet-snippets-autoloads yasnippet-autoloads ztree-autoloads
cus-edit pp cus-start cus-load wid-edit init-funcs use-package-diminish
cl-extra help-mode use-package-ensure use-package-core bytecomp
byte-compile pcase easy-mmode init-custom package browse-url xdg url
url-proxy url-privacy url-expand url-methods url-history url-cookie
generate-lisp-file url-domsuf url-util mailcap url-handlers url-parse
auth-source cl-seq eieio eieio-core cl-macs gv icons password-cache json
subr-x map url-vars cl-loaddefs cl-lib package-activate init-const rmc
iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook
vc-hooks lisp-float-type elisp-mode mwheel term/ns-win ns-win
ucs-normalize mule-util term/common-win tool-bar dnd fontset image
regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode
prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu
timer select scroll-bar mouse jit-lock font-lock syntax font-core
term/tty-colors frame minibuffer nadvice seq simple cl-generic
indonesian philippine cham georgian utf-8-lang misc-lang vietnamese
tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek
romanian slovak czech european ethiopic indian cyrillic chinese
composite emoji-zwj charscript charprop case-table epa-hook
jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs
theme-loaddefs faces cus-face macroexp files window text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget keymap
hashtable-print-readable backquote threads xwidget-internal kqueue cocoa
ns lcms2 multi-tty make-network-process tty-child-frames native-compile
emacs)

Memory information:
((conses 16 1082288 777794) (symbols 48 51850 3) (strings 32 295353 52715) (string-bytes 1 12515364)
 (vectors 16 94328) (vector-slots 8 1494211 229529) (floats 8 2592 7580) (intervals 56 32885 7899)
 (buffers 1064 113))
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.