Subject: bug#51576: 27.2; Bad error message for `defface' with no doc string

From: Drew Adams <[email-masked]>
Date: Wed, 3 Nov 2021 02:30:09 +0000

emacs -Q

Eval this:

(defface foo '((t :background "gray70" :inherit region))
  :group 'faces :type 'sexp)

Instead of telling you the doc string is missing, the error message says
this:

Debugger entered--Lisp error: (error "Unknown keyword faces")
  signal(error ("Unknown keyword faces"))
  error("Unknown keyword %s" faces)
  custom-handle-keyword(foo faces :type custom-face)
  custom-handle-all-keywords(foo (faces :type sexp) custom-face)
  custom-declare-face(foo ((t :background "gray70" :inherit region)) :group faces :type sexp)
  eval-region(146 231 t #f(compiled-function (ignore) #<bytecode 0x2293dd9>))  ; Reading at buffer position 151
  elisp--eval-defun()
  eval-defun(nil)
  funcall-interactively(eval-defun nil)
  call-interactively(eval-defun nil nil)
  command-execute(eval-defun)

In GNU Emacs 27.2 (build 1, x86_64-w64-mingw32)
 of 2021-03-26 built on CIRROCUMULUS
Repository revision: deef5efafb70f4b171265b896505b92b6eef24e6
Repository branch: HEAD
Windowing system distributor 'Microsoft Corp.', version 10.0.19042
System Description: Microsoft Windows 10 Pro (v10.0.2009.19042.1288)