summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/cl-macs.el
diff options
context:
space:
mode:
authorAlan Mackenzie <acm@muc.de>2022-01-22 17:41:03 +0000
committerAlan Mackenzie <acm@muc.de>2022-01-22 17:41:03 +0000
commit88e1f8b02086aaf652e3058b36b7612c073c04b3 (patch)
tree0a12af666638c4629e2b0c34bcce1cad9945930e /lisp/emacs-lisp/cl-macs.el
parent1edde2fc7a1a82b0e65d2b7a4237e7c18d0bc0c1 (diff)
parent14d64a8adcc866deecd758b898e8ef2d836b354a (diff)
downloademacs-88e1f8b02086aaf652e3058b36b7612c073c04b3.tar.gz
emacs-88e1f8b02086aaf652e3058b36b7612c073c04b3.tar.bz2
emacs-88e1f8b02086aaf652e3058b36b7612c073c04b3.zip
Merge branch 'scratch/correct-warning-pos'
Diffstat (limited to 'lisp/emacs-lisp/cl-macs.el')
-rw-r--r--lisp/emacs-lisp/cl-macs.el12
1 files changed, 8 insertions, 4 deletions
diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el
index 66c269b6581..470168177ca 100644
--- a/lisp/emacs-lisp/cl-macs.el
+++ b/lisp/emacs-lisp/cl-macs.el
@@ -2429,10 +2429,12 @@ by EXPANSION, and (setq NAME ...) will act like (setf EXPANSION ...).
(append bindings venv))
macroexpand-all-environment))))
(if malformed-bindings
- (macroexp-warn-and-return
- (format-message "Malformed `cl-symbol-macrolet' binding(s): %S"
- (nreverse malformed-bindings))
- expansion)
+ (let ((rev-malformed-bindings (nreverse malformed-bindings)))
+ (macroexp-warn-and-return
+ rev-malformed-bindings
+ (format-message "Malformed `cl-symbol-macrolet' binding(s): %S"
+ rev-malformed-bindings)
+ expansion))
expansion)))
(unless advised
(advice-remove 'macroexpand #'cl--sm-macroexpand)))))
@@ -3116,6 +3118,7 @@ To see the documentation for a defined struct type, use
(when (cl-oddp (length desc))
(push
(macroexp-warn-and-return
+ (car (last desc))
(format "Missing value for option `%S' of slot `%s' in struct %s!"
(car (last desc)) slot name)
'nil)
@@ -3125,6 +3128,7 @@ To see the documentation for a defined struct type, use
(let ((kw (car defaults)))
(push
(macroexp-warn-and-return
+ kw
(format " I'll take `%s' to be an option rather than a default value."
kw)
'nil)