aboutsummaryrefslogtreecommitdiff
path: root/compat-28.el
diff options
context:
space:
mode:
authorDaniel Mendler <mail@daniel-mendler.de>2023-01-14 20:40:54 +0100
committerDaniel Mendler <mail@daniel-mendler.de>2023-01-14 20:40:54 +0100
commit42df9609d53ee5be5bed0cebf8f4ea78ab4c5468 (patch)
tree751b6b21c96d3bf150651475cc2bd06f1605d16b /compat-28.el
parent02fa6c9725cd5e6529877785ef25591721a32c5b (diff)
compat-28: Add macroexp-warn-and-return
Diffstat (limited to 'compat-28.el')
-rw-r--r--compat-28.el10
1 files changed, 10 insertions, 0 deletions
diff --git a/compat-28.el b/compat-28.el
index db5a2c7..ebcb68a 100644
--- a/compat-28.el
+++ b/compat-28.el
@@ -738,6 +738,16 @@ where the mouse button is clicked to find a thing nearby."
;;;; Defined in macroexp.el
+(compat-defun macroexp-warn-and-return (msg form &optional _category _compile-only _arg) ;; <OK>
+ "Return code equivalent to FORM labeled with warning MSG.
+CATEGORY is the category of the warning, like the categories that
+can appear in `byte-compile-warnings'.
+COMPILE-ONLY non-nil means no warning should be emitted if the code
+is executed without being compiled first.
+ARG is a symbol (or a form) giving the source code position for the message.
+It should normally be a symbol with position and it defaults to FORM."
+ (macroexp--warn-and-return msg form))
+
(compat-defun macroexp-file-name () ;; <OK>
"Return the name of the file from which the code comes.
Returns nil when we do not know.