aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2017-12-22 12:04:23 +0200
committerEli Zaretskii2017-12-22 12:04:23 +0200
commit861d1100784ad2f4c7285a7afdc21e0ce216682c (patch)
tree7b2ff5e405a9791675a508ee6bd64eadf66a984c
parent22b3075bb216c69ee7660151fda4eda70b9c3296 (diff)
downloademacs-861d1100784ad2f4c7285a7afdc21e0ce216682c.tar.gz
emacs-861d1100784ad2f4c7285a7afdc21e0ce216682c.zip
Improve documentation of records
* doc/lispref/Makefile.in (srcs): Add the forgotten records.texi. * doc/lispref/records.texi (Records): Recommend that record type names use package-naming conventions. * etc/NEWS: Add the naming convention recommendation for record types.
-rw-r--r--doc/lispref/Makefile.in1
-rw-r--r--doc/lispref/records.texi9
-rw-r--r--etc/NEWS4
3 files changed, 13 insertions, 1 deletions
diff --git a/doc/lispref/Makefile.in b/doc/lispref/Makefile.in
index 9fa5901a1ac..50d6d161ef6 100644
--- a/doc/lispref/Makefile.in
+++ b/doc/lispref/Makefile.in
@@ -118,6 +118,7 @@ srcs = \
118 $(srcdir)/package.texi \ 118 $(srcdir)/package.texi \
119 $(srcdir)/positions.texi \ 119 $(srcdir)/positions.texi \
120 $(srcdir)/processes.texi \ 120 $(srcdir)/processes.texi \
121 $(srcdir)/records.texi \
121 $(srcdir)/searching.texi \ 122 $(srcdir)/searching.texi \
122 $(srcdir)/sequences.texi \ 123 $(srcdir)/sequences.texi \
123 $(srcdir)/streams.texi \ 124 $(srcdir)/streams.texi \
diff --git a/doc/lispref/records.texi b/doc/lispref/records.texi
index 7cc36f14068..cae0f31f273 100644
--- a/doc/lispref/records.texi
+++ b/doc/lispref/records.texi
@@ -5,7 +5,7 @@
5@c See the file elisp.texi for copying conditions. 5@c See the file elisp.texi for copying conditions.
6@node Records 6@node Records
7@chapter Records 7@chapter Records
8@cindex record 8@cindex records
9 9
10 The purpose of records is to allow programmers to create objects 10 The purpose of records is to allow programmers to create objects
11with new types that are not built into Emacs. They are used as the 11with new types that are not built into Emacs. They are used as the
@@ -28,6 +28,13 @@ type descriptor, the symbol naming its type will be returned;
28list specifying the contents. The first list element must be the 28list specifying the contents. The first list element must be the
29record type. The following elements are the record slots. 29record type. The following elements are the record slots.
30 30
31 To avoid conflicts with other type names, Lisp programs that define
32new types of records should normally use the naming conventions of the
33package where these record types are introduced for the names of the
34types. Note that the names of the types which could possibly conflict
35might not be known at the time the package defining a record type is
36loaded; they could be loaded at some future point in time.
37
31 A record is considered a constant for evaluation: the result of 38 A record is considered a constant for evaluation: the result of
32evaluating it is the same record. This does not evaluate or even 39evaluating it is the same record. This does not evaluate or even
33examine the slots. @xref{Self-Evaluating Forms}. 40examine the slots. @xref{Self-Evaluating Forms}.
diff --git a/etc/NEWS b/etc/NEWS
index ccd819077ea..692c28a7210 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1584,6 +1584,10 @@ functions 'make-record', 'record', and 'recordp'. Records are now
1584used internally to represent cl-defstruct and defclass instances, for 1584used internally to represent cl-defstruct and defclass instances, for
1585example. 1585example.
1586 1586
1587If your program defines new record types, you should use
1588package-naming conventions for naming those types. This is so any
1589potential conflicts with other types are avoided.
1590
1587+++ 1591+++
1588** 'save-some-buffers' now uses 'save-some-buffers-default-predicate' 1592** 'save-some-buffers' now uses 'save-some-buffers-default-predicate'
1589to decide which buffers to ask about, if the PRED argument is nil. 1593to decide which buffers to ask about, if the PRED argument is nil.