(setq docs (nth 3 form)))
('lambda
(setq kind "") ; can't be "function", unfortunately
- (setq docs (nth 2 form))))
+ (let* ((definer (and (cadr form) (symbolp (cadr form))))
+ (docstring (nth (if definer 3 2) form)))
+ (setq docs (and (stringp docstring)
+ docstring)))))
+ (when (and (consp name) (eq (car name) 'quote))
+ (setq name (cadr name)))
(when (and kind docs (stringp docs))
(let ((col (max byte-compile-docstring-max-column fill-column)))
- (when (byte-compile--wide-docstring-p docs col)
+ (when (and (byte-compile-warning-enabled-p 'docstrings-wide)
+ (byte-compile--wide-docstring-p docs col))
(byte-compile-warn-x
name
"%sdocstring wider than %s characters" (funcall prefix) col)))