diff options
| author | Eli Zaretskii | 2017-12-22 12:04:23 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2017-12-22 12:04:23 +0200 |
| commit | 861d1100784ad2f4c7285a7afdc21e0ce216682c (patch) | |
| tree | 7b2ff5e405a9791675a508ee6bd64eadf66a984c | |
| parent | 22b3075bb216c69ee7660151fda4eda70b9c3296 (diff) | |
| download | emacs-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.in | 1 | ||||
| -rw-r--r-- | doc/lispref/records.texi | 9 | ||||
| -rw-r--r-- | etc/NEWS | 4 |
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 |
| 11 | with new types that are not built into Emacs. They are used as the | 11 | with 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; | |||
| 28 | list specifying the contents. The first list element must be the | 28 | list specifying the contents. The first list element must be the |
| 29 | record type. The following elements are the record slots. | 29 | record type. The following elements are the record slots. |
| 30 | 30 | ||
| 31 | To avoid conflicts with other type names, Lisp programs that define | ||
| 32 | new types of records should normally use the naming conventions of the | ||
| 33 | package where these record types are introduced for the names of the | ||
| 34 | types. Note that the names of the types which could possibly conflict | ||
| 35 | might not be known at the time the package defining a record type is | ||
| 36 | loaded; 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 |
| 32 | evaluating it is the same record. This does not evaluate or even | 39 | evaluating it is the same record. This does not evaluate or even |
| 33 | examine the slots. @xref{Self-Evaluating Forms}. | 40 | examine the slots. @xref{Self-Evaluating Forms}. |
| @@ -1584,6 +1584,10 @@ functions 'make-record', 'record', and 'recordp'. Records are now | |||
| 1584 | used internally to represent cl-defstruct and defclass instances, for | 1584 | used internally to represent cl-defstruct and defclass instances, for |
| 1585 | example. | 1585 | example. |
| 1586 | 1586 | ||
| 1587 | If your program defines new record types, you should use | ||
| 1588 | package-naming conventions for naming those types. This is so any | ||
| 1589 | potential 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' |
| 1589 | to decide which buffers to ask about, if the PRED argument is nil. | 1593 | to decide which buffers to ask about, if the PRED argument is nil. |