From bc5d96a0b2a1dccf7eeeec459e40d21b54c977f4 Mon Sep 17 00:00:00 2001 From: Noam Postavsky Date: Fri, 18 Aug 2017 08:15:25 -0400 Subject: [PATCH] Drop docstrings from cl-defsubst produced inline bodies (Bug#27748) * lisp/emacs-lisp/cl-macs.el (cl-defsubst): Use macroexp-parse-progn to drop the docstring. Add a simple docstring to the compiler-macro. --- lisp/emacs-lisp/cl-macs.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el index b1ada00f4a4..20a956b474a 100644 --- a/lisp/emacs-lisp/cl-macs.el +++ b/lisp/emacs-lisp/cl-macs.el @@ -2503,8 +2503,9 @@ The function's arguments should be treated as immutable. ,(if (memq '&key args) `(&whole cl-whole &cl-quote ,@args) (cons '&cl-quote args)) + ,(format "compiler-macro for inlining `%s'." name) (cl--defsubst-expand - ',argns '(cl-block ,name ,@body) + ',argns '(cl-block ,name ,@(cdr (macroexp-parse-body body))) ;; We used to pass `simple' as ;; (not (or unsafe (cl-expr-access-order pbody argns))) ;; But this is much too simplistic since it -- 2.39.2