]> git.eshelyaron.com Git - emacs.git/commitdiff
; Add cross-references to push and pop docstrings
authorStefan Kangas <stefankangas@gmail.com>
Wed, 19 Mar 2025 20:27:38 +0000 (21:27 +0100)
committerEshel Yaron <me@eshelyaron.com>
Sun, 23 Mar 2025 18:10:01 +0000 (19:10 +0100)
* lisp/subr.el (push, pop): Add cross-references to Info manual.

(cherry picked from commit f1acefd86f8d88d26455fec43961d3060451b6f0)

lisp/subr.el

index d5aa211a30d06741d5f7f72f6c2599a8eec2eb37..a845e0451dc9000a4ee5a5274fc15a255e1158f9 100644 (file)
@@ -285,8 +285,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
@@ -300,9 +304,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),