mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-06 06:20:55 -08:00
* lisp/emacs-lisp/macroexp.el (macroexp-parse-body): Fix bug#67568
This fixes a regression introduced in commit f616edb4cc.
This commit is contained in:
parent
e33f560bad
commit
9c1f24d7a4
1 changed files with 12 additions and 11 deletions
|
|
@ -533,17 +533,18 @@ definitions to shadow the loaded ones for use in file byte-compilation."
|
|||
(defun macroexp-parse-body (body)
|
||||
"Parse a function BODY into (DECLARATIONS . EXPS)."
|
||||
(let ((decls ()))
|
||||
;; If there is only a string literal with nothing following, we
|
||||
;; consider this to be part of the body (the return value) rather
|
||||
;; than a declaration at this point.
|
||||
(unless (and (null (cdr body)) (stringp (car body)))
|
||||
(while
|
||||
(and body
|
||||
(let ((e (car body)))
|
||||
(or (stringp e)
|
||||
(memq (car-safe e)
|
||||
'(:documentation declare interactive cl-declare)))))
|
||||
(push (pop body) decls)))
|
||||
(while
|
||||
(and body
|
||||
(let ((e (car body)))
|
||||
(or (and (stringp e)
|
||||
;; If there is only a string literal with
|
||||
;; nothing following, we consider this to be
|
||||
;; part of the body (the return value) rather
|
||||
;; than a declaration at this point.
|
||||
(cdr body))
|
||||
(memq (car-safe e)
|
||||
'(:documentation declare interactive cl-declare)))))
|
||||
(push (pop body) decls))
|
||||
(cons (nreverse decls) body)))
|
||||
|
||||
(defun macroexp-progn (exps)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue