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/setting-generalized-variables.html | 31 ------------------------ 1 file changed, 31 deletions(-) delete mode 100644 devdocs/elisp/setting-generalized-variables.html (limited to 'devdocs/elisp/setting-generalized-variables.html') diff --git a/devdocs/elisp/setting-generalized-variables.html b/devdocs/elisp/setting-generalized-variables.html deleted file mode 100644 index d3efaf79..00000000 --- a/devdocs/elisp/setting-generalized-variables.html +++ /dev/null @@ -1,31 +0,0 @@ -

The setf Macro

The setf macro is the most basic way to operate on generalized variables. The setf form is like setq, except that it accepts arbitrary place forms on the left side rather than just symbols. For example, (setf (car a) b) sets the car of a to b, doing the same operation as (setcar a b), but without you having to use two separate functions for setting and accessing this type of place.

Macro: setf [place form]… -

This macro evaluates form and stores it in place, which must be a valid generalized variable form. If there are several place and form pairs, the assignments are done sequentially just as with setq. setf returns the value of the last form.

-

The following Lisp forms are the forms in Emacs that will work as generalized variables, and so may appear in the place argument of setf:

setf signals an error if you pass a place form that it does not know how to handle.

Note that for nthcdr, the list argument of the function must itself be a valid place form. For example, (setf (nthcdr -0 foo) 7) will set foo itself to 7.

The macros push (see List Variables) and pop (see List Elements) can manipulate generalized variables, not just lists. (pop place) removes and returns the first element of the list stored in place. It is analogous to (prog1 (car place) (setf place (cdr place))), except that it takes care to evaluate all subforms only once. (push x place) inserts x at the front of the list stored in place. It is analogous to (setf -place (cons x place)), except for evaluation of the subforms. Note that push and pop on an nthcdr place can be used to insert or delete at any position in a list.

The cl-lib library defines various extensions for generalized variables, including additional setf places. See Generalized Variables in Common Lisp Extensions.

-

- 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/Setting-Generalized-Variables.html -

-
-- cgit v1.2.3