summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@linux-m68k.org>2012-12-31 20:15:32 +0100
committerAndreas Schwab <schwab@linux-m68k.org>2012-12-31 20:15:32 +0100
commitbdcad781aaa4ea4b5e63e6118bddab964acf77e4 (patch)
tree7add5519ee77557a050d3ce5773728ce0caf15fc /lisp
parentfee0bd5f3248ba4485e9a08fdb30cad5b20f7f74 (diff)
downloademacs-bdcad781aaa4ea4b5e63e6118bddab964acf77e4.tar.gz
Fixes: debbugs:13316
* emacs-lisp/byte-run.el (defmacro): Don't lose final nil if neither DOCSTRING nor DECL was given.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/emacs-lisp/byte-run.el10
2 files changed, 10 insertions, 5 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 84e0ec4a095..0bf336cfbe1 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2012-12-31 Andreas Schwab <schwab@linux-m68k.org>
+
+ * emacs-lisp/byte-run.el (defmacro): Don't lose final nil if
+ neither DOCSTRING nor DECL was given. (Bug#13316)
+
2012-12-30 Glenn Morris <rgm@gnu.org>
* net/mairix.el (rmail, rmail-summary-displayed, rmail-summary):
diff --git a/lisp/emacs-lisp/byte-run.el b/lisp/emacs-lisp/byte-run.el
index 544b64bc3a6..0cbf2616ba2 100644
--- a/lisp/emacs-lisp/byte-run.el
+++ b/lisp/emacs-lisp/byte-run.el
@@ -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!