User: aidan
Date: 06/04/23 22:12:34
Modified: xemacs/src ChangeLog alloc.c data.c
Log:
Take on board feedback from Stephen on my last changes.
Revision Changes Path
1.738 +7 -0 XEmacs/xemacs/lisp/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/ChangeLog,v
retrieving revision 1.737
retrieving revision 1.738
diff -u -p -r1.737 -r1.738
--- ChangeLog 2006/04/23 16:11:21 1.737
+++ ChangeLog 2006/04/23 20:12:25 1.738
@@ -1,3 +1,10 @@
+2006-04-23 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * cl.el (push):
+ * cl.el (pushnew):
+ Take on board Stephen's criticism of my last changes to the CL
+ docstrings.
+
2006-04-24 Stephen J. Turnbull <stephen(a)xemacs.org>
* dumped-lisp.el (fontconfig): Load only with Xft.
1.17 +7 -5 XEmacs/xemacs/lisp/cl.el
Index: cl.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/cl.el,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -p -r1.16 -r1.17
--- cl.el 2006/04/16 15:54:16 1.16
+++ cl.el 2006/04/23 20:12:26 1.17
@@ -159,15 +159,17 @@ PLACE may be a symbol, or any generalize
(cl-do-pop place)))
(defmacro push (newelt listname)
- "Add NEWELT to the list stored in LISTNAME.
-Analogous to (setf LISTNAME (cons NEWELT LISTNAME)), though more careful about
-evaluating each argument only once and in the right order. LISTNAME may
-be a symbol, or any generalized variable allowed by `setf'."
+ "Add NEWELT at the beginning of the list stored in LISTNAME.
+Analogous to (setf LISTNAME (cons NEWELT LISTNAME)), though more careful
+about evaluating each argument only once and in the right order. LISTNAME
+may be a symbol, or any generalized variable allowed by `setf'; that is, it
+does not necessarily have to be a list, though `push' is most often used on
+lists. "
(if (symbolp listname) `(setq ,listname (cons ,newelt ,listname))
(list 'callf2 'cons newelt listname)))
(defmacro pushnew (newelt listname &rest keys)
- "Add NEWELT to the list stored in LISTNAME, unless it's already there.
+ "Add NEWELT at the beginning of LISTNAME, unless it's already in LISTNAME.
Like (push NEWELT LISTNAME), except that the list is unmodified if NEWELT is
`eql' to an element already on the list.
Keywords supported: :test :test-not :key"
1.947 +10 -0 XEmacs/xemacs/src/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/ChangeLog,v
retrieving revision 1.946
retrieving revision 1.947
diff -u -p -r1.946 -r1.947
--- ChangeLog 2006/04/23 16:11:31 1.946
+++ ChangeLog 2006/04/23 20:12:30 1.947
@@ -1,3 +1,13 @@
+2006-04-23 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * alloc.c:
+ * data.c:
+ * data.c (Fconsp):
+ * data.c (Flistp):
+ Take on board feedback from Stephen on my last change; move the
+ explanation of what a cons is to the cons docstring, add cross
+ references to that from the consp and atomp docstrings.
+
2006-04-23 Stephen J. Turnbull <stephen(a)xemacs.org>
* Makefile.in.in (x_objs): Change xft-fonts.o to font-mgr.o.
1.126 +10 -1 XEmacs/xemacs/src/alloc.c
Index: alloc.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/alloc.c,v
retrieving revision 1.125
retrieving revision 1.126
diff -u -p -r1.125 -r1.126
--- alloc.c 2006/03/26 15:24:26 1.125
+++ alloc.c 2006/04/23 20:12:31 1.126
@@ -1255,7 +1255,16 @@ DEFINE_BASIC_LRECORD_IMPLEMENTATION ("co
Lisp_Cons);
DEFUN ("cons", Fcons, 2, 2, 0, /*
-Create a new cons, give it CAR and CDR as components, and return it.
+Create a new cons cell, give it CAR and CDR as components, and return it.
+
+A cons cell is a Lisp object (an area in memory) made up of two pointers
+called the CAR and the CDR. Each of these pointers can point to any other
+Lisp object. The common Lisp data type, the list, is a specially-structured
+series of cons cells.
+
+The pointers are accessed from Lisp with `car' and `cdr', and mutated with
+`setcar' and `setcdr' respectively. For historical reasons, the aliases
+`rplaca' and `rplacd' (for `setcar' and `setcdr') are supported.
*/
(car, cdr))
{
1.67 +8 -7 XEmacs/xemacs/src/data.c
Index: data.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/data.c,v
retrieving revision 1.66
retrieving revision 1.67
diff -u -p -r1.66 -r1.67
--- data.c 2006/04/16 15:54:21 1.66
+++ data.c 2006/04/23 20:12:31 1.67
@@ -217,10 +217,8 @@ Return t if OBJECT is nil.
DEFUN ("consp", Fconsp, 1, 1, 0, /*
Return t if OBJECT is a cons cell. `nil' is not a cons cell.
-A cons cell is a Lisp object (an area in memory) comprising two pointers
-called the CAR and the CDR. Each of these pointers can point to any other
-Lisp object. The common Lisp data type, the list, is a specially-structured
-series of cons cells.
+See the documentation for `cons' or the Lisp manual for more details on what
+a cons cell is.
*/
(object))
{
@@ -229,6 +227,9 @@ series of cons cells.
DEFUN ("atom", Fatom, 1, 1, 0, /*
Return t if OBJECT is not a cons cell. `nil' is not a cons cell.
+
+See the documentation for `cons' or the Lisp manual for more details on what
+a cons cell is.
*/
(object))
{
@@ -238,9 +239,9 @@ Return t if OBJECT is not a cons cell.
DEFUN ("listp", Flistp, 1, 1, 0, /*
Return t if OBJECT is a list. `nil' is a list.
-A list is implemented as a series of cons cells structured such that the CDR
-of each cell either points to another cons cell or to `nil', the special
-Lisp value for both Boolean false and the empty list.
+A list is either the Lisp object nil (a symbol), interpreted as the empty
+list in this context, or a cons cell whose CDR refers to either nil or a
+cons cell. A "proper list" contains no cycles.
*/
(object))
{