From 82ba818ff456bcd6d56a06226e3f27e98fbb55c3 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Thu, 14 Aug 2025 22:58:58 -0500 Subject: removing all downloaded devdocs files --- devdocs/elisp/simple-macro.html | 11 ----------- 1 file changed, 11 deletions(-) delete mode 100644 devdocs/elisp/simple-macro.html (limited to 'devdocs/elisp/simple-macro.html') diff --git a/devdocs/elisp/simple-macro.html b/devdocs/elisp/simple-macro.html deleted file mode 100644 index b2e75c46..00000000 --- a/devdocs/elisp/simple-macro.html +++ /dev/null @@ -1,11 +0,0 @@ -

A Simple Example of a Macro

Suppose we would like to define a Lisp construct to increment a variable value, much like the ++ operator in C. We would like to write (inc x) and have the effect of (setq x (1+ x)). Here’s a macro definition that does the job:

(defmacro inc (var)
-   (list 'setq var (list '1+ var)))
-
-

When this is called with (inc x), the argument var is the symbol xnot the value of x, as it would be in a function. The body of the macro uses this to construct the expansion, which is (setq x (1+ x)). Once the macro definition returns this expansion, Lisp proceeds to evaluate it, thus incrementing x.

Function: macrop object -

This predicate tests whether its argument is a macro, and returns t if so, nil otherwise.

-
-

- Copyright © 1990-1996, 1998-2022 Free Software Foundation, Inc.
Licensed under the GNU GPL license.
- https://www.gnu.org/software/emacs/manual/html_node/elisp/Simple-Macro.html -

-
-- cgit v1.2.3