unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#51576: 27.2; Bad error message for `defface' with no doc string
@ 2021-11-03  2:30 Drew Adams
  2021-11-03  2:36 ` Drew Adams
  2021-11-03 22:29 ` Stefan Kangas
  0 siblings, 2 replies; 4+ messages in thread
From: Drew Adams @ 2021-11-03  2:30 UTC (permalink / raw)
  To: 51576

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)





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#51576: 27.2; Bad error message for `defface' with no doc string
  2021-11-03  2:30 bug#51576: 27.2; Bad error message for `defface' with no doc string Drew Adams
@ 2021-11-03  2:36 ` Drew Adams
  2021-11-03 22:29 ` Stefan Kangas
  1 sibling, 0 replies; 4+ messages in thread
From: Drew Adams @ 2021-11-03  2:36 UTC (permalink / raw)
  To: Drew Adams, 51576@debbugs.gnu.org

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

Typo (doesn't matter for the report though).
Remove the :type 'sexp.





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#51576: 27.2; Bad error message for `defface' with no doc string
  2021-11-03  2:30 bug#51576: 27.2; Bad error message for `defface' with no doc string Drew Adams
  2021-11-03  2:36 ` Drew Adams
@ 2021-11-03 22:29 ` Stefan Kangas
  2021-11-04 18:23   ` Lars Ingebrigtsen
  1 sibling, 1 reply; 4+ messages in thread
From: Stefan Kangas @ 2021-11-03 22:29 UTC (permalink / raw)
  To: Drew Adams; +Cc: 51576

tags 51576 + confirmed easy
found 51576 29.0.50
thanks

Drew Adams <drew.adams@oracle.com> writes:

> 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)

I can reproduce this on current master.  I agree that it would be better
to say that the docstring is missing here.





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#51576: 27.2; Bad error message for `defface' with no doc string
  2021-11-03 22:29 ` Stefan Kangas
@ 2021-11-04 18:23   ` Lars Ingebrigtsen
  0 siblings, 0 replies; 4+ messages in thread
From: Lars Ingebrigtsen @ 2021-11-04 18:23 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: 51576

Stefan Kangas <stefan@marxist.se> writes:

> I can reproduce this on current master.  I agree that it would be better
> to say that the docstring is missing here.

I've now done this on the trunk.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-11-04 18:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-03  2:30 bug#51576: 27.2; Bad error message for `defface' with no doc string Drew Adams
2021-11-03  2:36 ` Drew Adams
2021-11-03 22:29 ` Stefan Kangas
2021-11-04 18:23   ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).