summaryrefslogtreecommitdiff
path: root/src/alloc.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2017-04-07 18:54:40 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2017-04-07 18:54:40 -0700
commita2b3fea957440b8358d3632a4a05e41dee964b5d (patch)
treea6ef4cf0ba807dfad9ae91b4bfde1935dc999a5f /src/alloc.c
parenta614cd416c5dd71702428a008992589395a722fc (diff)
downloademacs-a2b3fea957440b8358d3632a4a05e41dee964b5d.tar.gz
Deprecate copy-record in favor of copy-sequence
Since copy-sequence seems to be needed anyway for records, have it work on records, and remove copy-record as being superfluous. * doc/lispref/records.texi (Records, Record Functions): * lisp/emacs-lisp/cl-macs.el (cl-defstruct): * lisp/emacs-lisp/eieio.el (make-instance, clone): * test/src/alloc-tests.el (record-3): Use copy-sequence, not copy-record, to copy records. * doc/lispref/sequences.texi (Sequence Functions) (Array Functions): Document that aref and copy-sequence work on records. * etc/NEWS: Omit copy-record. * src/alloc.c (Fcopy_record): Remove. * src/data.c (Faref): Document that arg can be a record. * src/fns.c (Fcopy_sequence): Copy records, too.
Diffstat (limited to 'src/alloc.c')
-rw-r--r--src/alloc.c14
1 files changed, 0 insertions, 14 deletions
diff --git a/src/alloc.c b/src/alloc.c
index fad84b8a0b3..88a1a1ed660 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -3440,19 +3440,6 @@ usage: (record TYPE &rest SLOTS) */)
}
-DEFUN ("copy-record", Fcopy_record, Scopy_record, 1, 1, 0,
- doc: /* Return a new record that is a shallow copy of the argument RECORD. */)
- (Lisp_Object record)
-{
- CHECK_RECORD (record);
- ptrdiff_t size = ASIZE (record) & PSEUDOVECTOR_SIZE_MASK;
- struct Lisp_Vector *new = allocate_record (size);
- memcpy (new->contents, XVECTOR (record)->contents,
- size * sizeof (Lisp_Object));
- return make_lisp_ptr (new, Lisp_Vectorlike);
-}
-
-
DEFUN ("make-vector", Fmake_vector, Smake_vector, 2, 2, 0,
doc: /* Return a newly created vector of length LENGTH, with each element being INIT.
See also the function `vector'. */)
@@ -7523,7 +7510,6 @@ The time is in seconds as a floating point value. */);
defsubr (&Slist);
defsubr (&Svector);
defsubr (&Srecord);
- defsubr (&Scopy_record);
defsubr (&Sbool_vector);
defsubr (&Smake_byte_code);
defsubr (&Smake_list);