mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-06 14:30:50 -08:00
; Add cross-references to push and pop docstrings
* lisp/subr.el (push, pop): Add cross-references to Info manual.
This commit is contained in:
parent
2d5cf22818
commit
f1acefd86f
1 changed files with 10 additions and 2 deletions
12
lisp/subr.el
12
lisp/subr.el
|
|
@ -245,8 +245,12 @@ STATES should be an object returned by `buffer-local-set-state'."
|
|||
|
||||
(defmacro push (newelt place)
|
||||
"Add NEWELT to the list stored in the generalized variable PLACE.
|
||||
|
||||
This is morally equivalent to (setf PLACE (cons NEWELT PLACE)),
|
||||
except that PLACE is evaluated only once (after NEWELT)."
|
||||
except that PLACE is evaluated only once (after NEWELT).
|
||||
|
||||
For more information about generalized variables, see Info node
|
||||
`(elisp) Generalized Variables'."
|
||||
(declare (debug (form gv-place)))
|
||||
(if (symbolp place)
|
||||
;; Important special case, to avoid triggering GV too early in
|
||||
|
|
@ -260,9 +264,13 @@ except that PLACE is evaluated only once (after NEWELT)."
|
|||
|
||||
(defmacro pop (place)
|
||||
"Return the first element of PLACE's value, and remove it from the list.
|
||||
|
||||
PLACE must be a generalized variable whose value is a list.
|
||||
If the value is nil, `pop' returns nil but does not actually
|
||||
change the list."
|
||||
change the list.
|
||||
|
||||
For more information about generalized variables, see Info node
|
||||
`(elisp) Generalized Variables'."
|
||||
(declare (debug (gv-place)))
|
||||
;; We use `car-safe' here instead of `car' because the behavior is the same
|
||||
;; (if it's not a cons cell, the `cdr' would have signaled an error already),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue