diff options
| author | Paul Eggert | 2017-04-07 18:54:40 -0700 |
|---|---|---|
| committer | Paul Eggert | 2017-04-07 18:54:40 -0700 |
| commit | a2b3fea957440b8358d3632a4a05e41dee964b5d (patch) | |
| tree | a6ef4cf0ba807dfad9ae91b4bfde1935dc999a5f /src/alloc.c | |
| parent | a614cd416c5dd71702428a008992589395a722fc (diff) | |
| download | emacs-a2b3fea957440b8358d3632a4a05e41dee964b5d.tar.gz emacs-a2b3fea957440b8358d3632a4a05e41dee964b5d.zip | |
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.c | 14 |
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) */) | |||
| 3440 | } | 3440 | } |
| 3441 | 3441 | ||
| 3442 | 3442 | ||
| 3443 | DEFUN ("copy-record", Fcopy_record, Scopy_record, 1, 1, 0, | ||
| 3444 | doc: /* Return a new record that is a shallow copy of the argument RECORD. */) | ||
| 3445 | (Lisp_Object record) | ||
| 3446 | { | ||
| 3447 | CHECK_RECORD (record); | ||
| 3448 | ptrdiff_t size = ASIZE (record) & PSEUDOVECTOR_SIZE_MASK; | ||
| 3449 | struct Lisp_Vector *new = allocate_record (size); | ||
| 3450 | memcpy (new->contents, XVECTOR (record)->contents, | ||
| 3451 | size * sizeof (Lisp_Object)); | ||
| 3452 | return make_lisp_ptr (new, Lisp_Vectorlike); | ||
| 3453 | } | ||
| 3454 | |||
| 3455 | |||
| 3456 | DEFUN ("make-vector", Fmake_vector, Smake_vector, 2, 2, 0, | 3443 | DEFUN ("make-vector", Fmake_vector, Smake_vector, 2, 2, 0, |
| 3457 | doc: /* Return a newly created vector of length LENGTH, with each element being INIT. | 3444 | doc: /* Return a newly created vector of length LENGTH, with each element being INIT. |
| 3458 | See also the function `vector'. */) | 3445 | See also the function `vector'. */) |
| @@ -7523,7 +7510,6 @@ The time is in seconds as a floating point value. */); | |||
| 7523 | defsubr (&Slist); | 7510 | defsubr (&Slist); |
| 7524 | defsubr (&Svector); | 7511 | defsubr (&Svector); |
| 7525 | defsubr (&Srecord); | 7512 | defsubr (&Srecord); |
| 7526 | defsubr (&Scopy_record); | ||
| 7527 | defsubr (&Sbool_vector); | 7513 | defsubr (&Sbool_vector); |
| 7528 | defsubr (&Smake_byte_code); | 7514 | defsubr (&Smake_byte_code); |
| 7529 | defsubr (&Smake_list); | 7515 | defsubr (&Smake_list); |