(defun cl-generic--method-qualifier-p (x)
(not (listp x)))
+(defun cl--defmethod-doc-pos ()
+ "Return the index of the docstring for a `cl-defmethod'.
+Presumes point is at the end of the `cl-defmethod' symbol."
+ (save-excursion
+ (let ((n 2))
+ (while (and (ignore-errors (forward-sexp 1) t)
+ (not (eq (char-before) ?\))))
+ (cl-incf n))
+ n)))
+
;;;###autoload
(defmacro cl-defmethod (name args &rest body)
"Define a new method for generic function NAME.
\(and can be extended) by the various methods of `cl-generic-generalizers'.
\(fn NAME [QUALIFIER] ARGS &rest [DOCSTRING] BODY)"
- (declare (doc-string 3) (indent defun)
+ (declare (doc-string cl--defmethod-doc-pos) (indent defun)
(debug
(&define ; this means we are defining something
[&name [sexp ;Allow (setf ...) additionally to symbols.