Make bytecomp.el understand that defmethod defines functions.

* lisp/emacs-lisp/eieio.el (eieio--defalias, eieio--defgeneric-init-form):
New functions.
(defgeneric, eieio--defmethod): Use them.
(eieio-defgeneric): Remove.
(defmethod): Call defgeneric in a way visible to the byte-compiler.

Fixes: debbugs:8631
This commit is contained in:
Stefan Monnier 2011-05-07 01:03:49 -03:00
parent 4d3fcc8e60
commit d1dc2cc2ce
3 changed files with 54 additions and 33 deletions

View file

@ -4173,6 +4173,7 @@ binding slots have been popped."
;; Compile normally, but deal with warnings for the function being defined.
(put 'defalias 'byte-hunk-handler 'byte-compile-file-form-defalias)
;; Used for eieio--defalias as well.
(defun byte-compile-file-form-defalias (form)
(if (and (consp (cdr form)) (consp (nth 1 form))
(eq (car (nth 1 form)) 'quote)