From: Alan Mackenzie Date: Wed, 25 Oct 2023 20:44:00 +0000 (+0000) Subject: Merge branch 'master' into feature/named-lambdas X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=8c3b0668888917763b817e421462f19e0c9b289c;p=emacs.git Merge branch 'master' into feature/named-lambdas --- 8c3b0668888917763b817e421462f19e0c9b289c diff --cc lisp/emacs-lisp/bytecomp.el index 8cf4e739c2f,cc68db73c9f..6425789062f --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@@ -1753,15 -1780,11 +1780,16 @@@ It is too wide if it has any lines long (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)))