comparison lisp/subr.el @ 25437:95301c74bdd9

Fix previous change.
author Richard M. Stallman <rms@gnu.org>
date Sun, 29 Aug 1999 20:27:40 +0000
parents d24cf1a4dd34
children 6762c8a75fd7
comparison
equal deleted inserted replaced
25436:d24cf1a4dd34 25437:95301c74bdd9
49 BODY should be a list of lisp expressions." 49 BODY should be a list of lisp expressions."
50 ;; Note that this definition should not use backquotes; subr.el should not 50 ;; Note that this definition should not use backquotes; subr.el should not
51 ;; depend on backquote.el. 51 ;; depend on backquote.el.
52 (list 'function (cons 'lambda cdr))) 52 (list 'function (cons 'lambda cdr)))
53 53
54 (defmacro push (value listname) 54 (defmacro push (newelt listname)
55 "Add VALUE to the list which is the value of LISTNAME. 55 "Add NEWELT to the list which is the value of LISTNAME.
56 This is equivalent to (setq LISTNAME (cons VALUE LISTNAME)). 56 This is equivalent to (setq LISTNAME (cons NEWELT LISTNAME)).
57 LISTNAME must be a symbol." 57 LISTNAME must be a symbol."
58 (list 'setq list 58 (list 'setq list
59 (list 'cons value list))) 59 (list 'cons newelt list)))
60 60
61 (defmacro pop (listname) 61 (defmacro pop (listname)
62 "Return the first element of LISTNAME's value, and remove it from the list. 62 "Return the first element of LISTNAME's value, and remove it from the list.
63 LISTNAME must be a symbol whose value is a list. 63 LISTNAME must be a symbol whose value is a list.
64 If the value is nil, `pop' returns nil but does not actually 64 If the value is nil, `pop' returns nil but does not actually