unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Warning: Non-symbol arguments to cl-defgeneric
@ 2022-07-09 10:57 Stephen Leake
  2022-07-09 11:00 ` Stefan Kangas
  2022-07-09 15:33 ` Stefan Monnier
  0 siblings, 2 replies; 4+ messages in thread
From: Stephen Leake @ 2022-07-09 10:57 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 1241 bytes --]

I've just updated to emacs master HEAD
29c8866c7fcd325995c6fc9b2b18537855fee52c (last time I pulled was Dec
2021), and I'm now getting warnings like:

wisi-parse-common.el: Warning: Non-symbol arguments to cl-defgeneric: (parser wisi-parser)

wisi-parse-common.el:113:2: Error: Non-symbol arguments to cl-defgeneric: (parser wisi-parser)

The relevant code is:

(cl-defstruct wisi-parser
  ;; Per-language values for a wisi parser. Also holds transient
  ;; values set by the current parse, that must be used before the
  ;; next parse starts.

  repair-image
  ;; alist of (TOKEN-ID . STRING); used by repair error

  transaction-log-buffer
  ;; Buffer holding history of communications with parser; one log per
  ;; parser instance.

  (transaction-log-buffer-size wisi-parser-transaction-log-buffer-size-default)
  ;; Max character count to retain in transaction-log-buffer. Set to 0
  ;; to disable log. Default is large enough for all transactions in
  ;; test/ada_mode-incremental_parse.adb with lots of verbosity.
)

(cl-defgeneric wisi-parser-transaction-log-buffer-name ((parser wisi-parser))
  "Return a buffer name for the transaction log buffer.")

What does this warning mean?

full file attached, if that helps.

-- 
-- Stephe

[-- Attachment #2: wisi-parse-common.el --]
[-- Type: application/emacs-lisp, Size: 22608 bytes --]

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

* Re: Warning: Non-symbol arguments to cl-defgeneric
  2022-07-09 10:57 Warning: Non-symbol arguments to cl-defgeneric Stephen Leake
@ 2022-07-09 11:00 ` Stefan Kangas
  2022-07-09 15:33 ` Stefan Monnier
  1 sibling, 0 replies; 4+ messages in thread
From: Stefan Kangas @ 2022-07-09 11:00 UTC (permalink / raw)
  To: Stephen Leake; +Cc: emacs-devel

Stephen Leake <stephen_leake@stephe-leake.org> writes:

> I've just updated to emacs master HEAD
> 29c8866c7fcd325995c6fc9b2b18537855fee52c (last time I pulled was Dec
> 2021), and I'm now getting warnings like:
>
> wisi-parse-common.el: Warning: Non-symbol arguments to cl-defgeneric: (parser wisi-parser)
>
> wisi-parse-common.el:113:2: Error: Non-symbol arguments to cl-defgeneric: (parser wisi-parser)

I can't reproduce this.  Did you try "make bootstrap"?



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

* Re: Warning: Non-symbol arguments to cl-defgeneric
  2022-07-09 10:57 Warning: Non-symbol arguments to cl-defgeneric Stephen Leake
  2022-07-09 11:00 ` Stefan Kangas
@ 2022-07-09 15:33 ` Stefan Monnier
  2022-07-09 23:40   ` Stephen Leake
  1 sibling, 1 reply; 4+ messages in thread
From: Stefan Monnier @ 2022-07-09 15:33 UTC (permalink / raw)
  To: Stephen Leake; +Cc: emacs-devel

> (cl-defgeneric wisi-parser-transaction-log-buffer-name ((parser wisi-parser))
>   "Return a buffer name for the transaction log buffer.")

The arglist here puts a `wisi-parser` specializer on the arg.
That's something you can do in `cl-defmethod` but not in `cl-defgeneric`
(where you can only specify the general shape of the arglist).


        Stefan




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

* Re: Warning: Non-symbol arguments to cl-defgeneric
  2022-07-09 15:33 ` Stefan Monnier
@ 2022-07-09 23:40   ` Stephen Leake
  0 siblings, 0 replies; 4+ messages in thread
From: Stephen Leake @ 2022-07-09 23:40 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> (cl-defgeneric wisi-parser-transaction-log-buffer-name ((parser wisi-parser))
>>   "Return a buffer name for the transaction log buffer.")
>
> The arglist here puts a `wisi-parser` specializer on the arg.
> That's something you can do in `cl-defmethod` but not in `cl-defgeneric`
> (where you can only specify the general shape of the arglist).

Ah, right. Thanks. That does fix the problem.

-- 
-- Stephe



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

end of thread, other threads:[~2022-07-09 23:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-09 10:57 Warning: Non-symbol arguments to cl-defgeneric Stephen Leake
2022-07-09 11:00 ` Stefan Kangas
2022-07-09 15:33 ` Stefan Monnier
2022-07-09 23:40   ` Stephen Leake

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