diff options
Diffstat (limited to 'src/data.c')
-rw-r--r-- | src/data.c | 37 |
1 files changed, 11 insertions, 26 deletions
diff --git a/src/data.c b/src/data.c index 1dbec4687b8..69ed68782b0 100644 --- a/src/data.c +++ b/src/data.c @@ -30,7 +30,6 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */ #include "lisp.h" #include "bignum.h" -#include "puresize.h" #include "character.h" #include "buffer.h" #include "keyboard.h" @@ -144,12 +143,6 @@ wrong_type_argument (Lisp_Object predicate, Lisp_Object value) } void -pure_write_error (Lisp_Object obj) -{ - xsignal2 (Qerror, build_string ("Attempt to modify read-only object"), obj); -} - -void args_out_of_range (Lisp_Object a1, Lisp_Object a2) { xsignal2 (Qargs_out_of_range, a1, a2); @@ -645,7 +638,6 @@ DEFUN ("setcar", Fsetcar, Ssetcar, 2, 2, 0, (register Lisp_Object cell, Lisp_Object newcar) { CHECK_CONS (cell); - CHECK_IMPURE (cell, XCONS (cell)); XSETCAR (cell, newcar); return newcar; } @@ -655,7 +647,6 @@ DEFUN ("setcdr", Fsetcdr, Ssetcdr, 2, 2, 0, (register Lisp_Object cell, Lisp_Object newcdr) { CHECK_CONS (cell); - CHECK_IMPURE (cell, XCONS (cell)); XSETCDR (cell, newcdr); return newcdr; } @@ -943,10 +934,6 @@ The return value is undefined. */) (register Lisp_Object symbol, Lisp_Object definition, Lisp_Object docstring) { CHECK_SYMBOL (symbol); - if (!NILP (Vpurify_flag) - /* If `definition' is a keymap, immutable (and copying) is wrong. */ - && !KEYMAPP (definition)) - definition = Fpurecopy (definition); defalias (symbol, definition); @@ -2590,7 +2577,6 @@ bool-vector. IDX starts at 0. */) if (VECTORP (array)) { - CHECK_IMPURE (array, XVECTOR (array)); if (idxval < 0 || idxval >= ASIZE (array)) args_out_of_range (array, idx); ASET (array, idxval, newelt); @@ -2614,7 +2600,6 @@ bool-vector. IDX starts at 0. */) } else /* STRINGP */ { - CHECK_IMPURE (array, XSTRING (array)); if (idxval < 0 || idxval >= SCHARS (array)) args_out_of_range (array, idx); CHECK_CHARACTER (newelt); @@ -4143,7 +4128,7 @@ syms_of_data (void) DEFSYM (Qcdr, "cdr"); - error_tail = pure_cons (Qerror, Qnil); + error_tail = Fcons (Qerror, Qnil); /* ERROR is used as a signaler for random errors for which nothing else is right. */ @@ -4151,14 +4136,14 @@ syms_of_data (void) Fput (Qerror, Qerror_conditions, error_tail); Fput (Qerror, Qerror_message, - build_pure_c_string ("error")); + build_string ("error")); #define PUT_ERROR(sym, tail, msg) \ - Fput (sym, Qerror_conditions, pure_cons (sym, tail)); \ - Fput (sym, Qerror_message, build_pure_c_string (msg)) + Fput (sym, Qerror_conditions, Fcons (sym, tail)); \ + Fput (sym, Qerror_message, build_string (msg)) PUT_ERROR (Qquit, Qnil, "Quit"); - PUT_ERROR (Qminibuffer_quit, pure_cons (Qquit, Qnil), "Quit"); + PUT_ERROR (Qminibuffer_quit, Fcons (Qquit, Qnil), "Quit"); PUT_ERROR (Quser_error, error_tail, ""); PUT_ERROR (Qwrong_length_argument, error_tail, "Wrong length argument"); @@ -4184,14 +4169,14 @@ syms_of_data (void) PUT_ERROR (Qno_catch, error_tail, "No catch for tag"); PUT_ERROR (Qend_of_file, error_tail, "End of file during parsing"); - arith_tail = pure_cons (Qarith_error, error_tail); + arith_tail = Fcons (Qarith_error, error_tail); Fput (Qarith_error, Qerror_conditions, arith_tail); - Fput (Qarith_error, Qerror_message, build_pure_c_string ("Arithmetic error")); + Fput (Qarith_error, Qerror_message, build_string ("Arithmetic error")); PUT_ERROR (Qbeginning_of_buffer, error_tail, "Beginning of buffer"); PUT_ERROR (Qend_of_buffer, error_tail, "End of buffer"); PUT_ERROR (Qbuffer_read_only, error_tail, "Buffer is read-only"); - PUT_ERROR (Qtext_read_only, pure_cons (Qbuffer_read_only, error_tail), + PUT_ERROR (Qtext_read_only, Fcons (Qbuffer_read_only, error_tail), "Text is read-only"); PUT_ERROR (Qinhibited_interaction, error_tail, "User interaction while inhibited"); @@ -4214,10 +4199,10 @@ syms_of_data (void) PUT_ERROR (Qunderflow_error, Fcons (Qrange_error, arith_tail), "Arithmetic underflow error"); - recursion_tail = pure_cons (Qrecursion_error, error_tail); + recursion_tail = Fcons (Qrecursion_error, error_tail); Fput (Qrecursion_error, Qerror_conditions, recursion_tail); - Fput (Qrecursion_error, Qerror_message, build_pure_c_string - ("Excessive recursive calling error")); + Fput (Qrecursion_error, Qerror_message, + build_string ("Excessive recursive calling error")); PUT_ERROR (Qexcessive_variable_binding, recursion_tail, "Variable binding depth exceeds max-specpdl-size"); |