GNU bug report logs - #20509
compiler warns about cl-defmethod defined after use

Previous Next

Package: emacs;

Reported by: Glenn Morris <rgm <at> gnu.org>

Date: Tue, 5 May 2015 18:17:02 UTC

Severity: normal

Found in version 25.0.50

Fixed in version 25.1

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 20509 <at> debbugs.gnu.org
Subject: bug#20509: compiler warns about cl-defmethod defined after use
Date: Wed, 06 May 2015 00:28:12 -0400
>> While using cl-defmethod without a previous cl-defgeneric is supported,
>> it's not recommended.
> It's used without one in several places in Emacs:

That's because EIEIO's older `defmethod' always counted as
a "full" definition.  We can fix those warnings in one of the following ways:
- Add a corresponding cl-defgeneric.
- Add a corresponding `require' which loads the package where the
  corresponding `cl-defgeneric' is found.
- Reorder the code so that the cl-defmethod appears before the call(s).
- Change cl-generic.el to use the same kind of bytecompiler hack that
  eieio used to use instead if using `declare-function'.


        Stefan




This bug report was last modified 10 years and 19 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.