Mercurial > hg > xemacs-beta
changeset 5381:4f39e57a82b4
Improve read-only error reporting.
-------------------- ChangeLog entries follow: --------------------
src/ChangeLog addition:
2011-03-17 Didier Verna <didier@xemacs.org>
* data.c (init_errors_once_early): Define Qextent_read_only error.
* lisp.h: Declare it.
* extents.c (verify_extent_mapper): Signal an extent-read-only
error instead of a buffer-read-only one.
author | Didier Verna <didier@lrde.epita.fr> |
---|---|
date | Thu, 17 Mar 2011 16:20:09 +0100 |
parents | 919c77c567bb |
children | d363790fd936 |
files | src/ChangeLog src/data.c src/extents.c src/lisp.h |
diffstat | 4 files changed, 13 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog Mon Mar 21 12:27:07 2011 +0000 +++ b/src/ChangeLog Thu Mar 17 16:20:09 2011 +0100 @@ -1,3 +1,10 @@ +2011-03-17 Didier Verna <didier@xemacs.org> + + * data.c (init_errors_once_early): Define Qextent_read_only error. + * lisp.h: Declare it. + * extents.c (verify_extent_mapper): Signal an extent-read-only + error instead of a buffer-read-only one. + 2011-03-15 Aidan Kehoe <kehoea@parhasard.net> * config.h.in (SUPPORT_CONFOUNDING_FUNCTIONS): New #define,
--- a/src/data.c Mon Mar 21 12:27:07 2011 +0000 +++ b/src/data.c Thu Mar 17 16:20:09 2011 +0100 @@ -50,7 +50,8 @@ Lisp_Object Qinvalid_operation, Qinvalid_change, Qprinting_unreadable_object; Lisp_Object Qsetting_constant; Lisp_Object Qediting_error; -Lisp_Object Qbeginning_of_buffer, Qend_of_buffer, Qbuffer_read_only; +Lisp_Object Qbeginning_of_buffer, Qend_of_buffer; +Lisp_Object Qbuffer_read_only, Qextent_read_only; Lisp_Object Qio_error, Qfile_error, Qconversion_error, Qend_of_file; Lisp_Object Qtext_conversion_error; Lisp_Object Qarith_error, Qrange_error, Qdomain_error; @@ -3493,6 +3494,7 @@ DEFERROR_STANDARD (Qbeginning_of_buffer, Qediting_error); DEFERROR_STANDARD (Qend_of_buffer, Qediting_error); DEFERROR (Qbuffer_read_only, "Buffer is read-only", Qediting_error); + DEFERROR (Qextent_read_only, "Extent is read-only", Qediting_error); DEFERROR (Qio_error, "IO Error", Qinvalid_operation); DEFERROR_STANDARD (Qfile_error, Qio_error);
--- a/src/extents.c Mon Mar 21 12:27:07 2011 +0000 +++ b/src/extents.c Thu Mar 17 16:20:09 2011 +0100 @@ -4450,7 +4450,7 @@ #endif while (1) - Fsignal (Qbuffer_read_only, (list1 (closure->object))); + Fsignal (Qextent_read_only, (list1 (wrap_extent (extent)))); RETURN_NOT_REACHED(0); }
--- a/src/lisp.h Mon Mar 21 12:27:07 2011 +0000 +++ b/src/lisp.h Thu Mar 17 16:20:09 2011 +0100 @@ -4532,7 +4532,8 @@ extern MODULE_API Lisp_Object Qintegerp; extern Lisp_Object Qargs_out_of_range, Qarith_error, Qbeginning_of_buffer, - Qbuffer_read_only, Qcircular_list, Qcircular_property_list, + Qbuffer_read_only, Qextent_read_only, + Qcircular_list, Qcircular_property_list, Qconversion_error, Qcyclic_variable_indirection, Qdomain_error, Qediting_error, Qend_of_buffer, Qend_of_file, Qerror, Qfile_error, Qinternal_error, Qinvalid_change, Qinvalid_constant, Qinvalid_function,