Fixes: debbugs:13316

* emacs-lisp/byte-run.el (defmacro): Don't lose final nil if
neither DOCSTRING nor DECL was given.
This commit is contained in:
Andreas Schwab 2012-12-31 20:15:32 +01:00
parent fee0bd5f32
commit bdcad781aa
2 changed files with 10 additions and 5 deletions

View file

@ -128,12 +128,12 @@ DECLS is a list of elements of the form (PROP . VALUES). These are
interpreted according to `macro-declarations-alist'.
The return value is undefined."
(if (stringp docstring) nil
(if decl (setq body (cons decl body)))
(setq decl docstring)
(setq docstring nil))
(setq body (cons decl body))
(setq decl docstring)
(setq docstring nil))
(if (or (null decl) (eq 'declare (car-safe decl))) nil
(setq body (cons decl body))
(setq decl nil))
(setq body (cons decl body))
(setq decl nil))
(if (null body) (setq body '(nil)))
(if docstring (setq body (cons docstring body)))
;; Can't use backquote because it's not defined yet!