diff options
| author | Daniel Colascione | 2015-03-02 19:08:06 -0800 |
|---|---|---|
| committer | Daniel Colascione | 2015-03-02 19:08:06 -0800 |
| commit | 2cc23f170f920cbfc9df4c28bce6ca9d82c4e6cd (patch) | |
| tree | ba2ba78402bf75eed26d3f20abeac5c02eb74694 /src/print.c | |
| parent | 8af3e1848cbdc570b6c173480c2988a552f3f74d (diff) | |
| download | emacs-2cc23f170f920cbfc9df4c28bce6ca9d82c4e6cd.tar.gz emacs-2cc23f170f920cbfc9df4c28bce6ca9d82c4e6cd.zip | |
Finalizer documentation, minor improvements
* doc/lispref/objects.texi (Finalizer Type): New section
(Type Predicates): Mention finalizers in `type-of' documentation.
* doc/lispref/elisp.texi (Top): Link to finalizer type.
* src/data.c (Ftype_of): Make `type-of' work with finalizers.
(syms_of_data): Register Qfinalizer.
* src/print.c (print_object): Print whether a finalizer has
been called.
* test/automated/finalizer-tests.el (finalizer-object-type): Test that
`type-of' works correctly for finalizers.
Diffstat (limited to 'src/print.c')
| -rw-r--r-- | src/print.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/print.c b/src/print.c index d391fd5f7a3..838d03666d4 100644 --- a/src/print.c +++ b/src/print.c | |||
| @@ -2046,7 +2046,10 @@ print_object (Lisp_Object obj, Lisp_Object printcharfun, bool escapeflag) | |||
| 2046 | break; | 2046 | break; |
| 2047 | 2047 | ||
| 2048 | case Lisp_Misc_Finalizer: | 2048 | case Lisp_Misc_Finalizer: |
| 2049 | strout ("#<finalizer>", -1, -1, printcharfun); | 2049 | strout ("#<finalizer", -1, -1, printcharfun); |
| 2050 | if (NILP (XFINALIZER (obj)->function)) | ||
| 2051 | strout (" used", -1, -1, printcharfun); | ||
| 2052 | strout (">", -1, -1, printcharfun); | ||
| 2050 | break; | 2053 | break; |
| 2051 | 2054 | ||
| 2052 | /* Remaining cases shouldn't happen in normal usage, but let's | 2055 | /* Remaining cases shouldn't happen in normal usage, but let's |