From: Noam Postavsky Date: Fri, 18 Aug 2017 12:15:25 +0000 (-0400) Subject: Drop docstrings from cl-defsubst produced inline bodies (Bug#27748) X-Git-Tag: emacs-26.0.90~294 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=bc5d96a0b2a1dccf7eeeec459e40d21b54c977f4;p=emacs.git 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. --- 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