]> git.eshelyaron.com Git - emacs.git/commitdiff
Pure storage removal: Replace calls to removed functions
authorPip Cet <pipcet@protonmail.com>
Tue, 20 Aug 2024 19:00:20 +0000 (19:00 +0000)
committerEshel Yaron <me@eshelyaron.com>
Mon, 3 Feb 2025 10:24:19 +0000 (11:24 +0100)
* src/alloc.c (string_bytes, pin_string, valid_lisp_object_p)
(process_mark_stack, survives_gc_p, syms_of_alloc):
* src/androidterm.c (android_term_init): Replace call to
'build_pure_c_string'.
* src/buffer.c (init_buffer_once, syms_of_buffer):
* src/bytecode.c (exec_byte_code):
* src/callint.c (syms_of_callint):
* src/callproc.c (syms_of_callproc):
* src/category.c (Fdefine_category):
* src/coding.c (syms_of_coding):
* src/comp.c (Fcomp__compile_ctxt_to_file0)
(maybe_defer_native_compilation, syms_of_comp):
* src/data.c (Fsetcar, Fsetcdr, Fdefalias, Faset, syms_of_data):
* src/dbusbind.c (syms_of_dbusbind):
* src/doc.c (Fsnarf_documentation):
* src/emacs-module.c (syms_of_module):
* src/eval.c (Finternal__define_uninitialized_variable)
(Fdefconst_1, define_error, syms_of_eval):
* src/fileio.c (syms_of_fileio):
* src/fns.c (Ffillarray, Fclear_string, check_mutable_hash_table):
* src/fontset.c (syms_of_fontset):
* src/frame.c (make_initial_frame):
* src/haikufns.c (syms_of_haikufns):
* src/intervals.c (create_root_interval):
* src/keyboard.c (syms_of_keyboard):
* src/keymap.c (Fmake_sparse_keymap, Fset_keymap_parent)
(store_in_keymap, syms_of_keymap):
* src/lisp.h:
* src/lread.c (Fload, read0, intern_c_string_1, define_symbol)
(Fintern, defsubr, syms_of_lread):
* src/pdumper.c (Fdump_emacs_portable):
* src/pgtkfns.c (syms_of_pgtkfns):
* src/pgtkterm.c (syms_of_pgtkterm):
* src/process.c (syms_of_process):
* src/search.c (syms_of_search):
* src/sqlite.c (syms_of_sqlite):
* src/syntax.c (syms_of_syntax):
* src/treesit.c (syms_of_treesit):
* src/w32fns.c (syms_of_w32fns):
* src/xdisp.c (syms_of_xdisp):
* src/xfaces.c (syms_of_xfaces):
* src/xfns.c (syms_of_xfns):
* src/xftfont.c (syms_of_xftfont):
* src/xterm.c (syms_of_xterm): Remove calls to 'PURE_P', 'CHECK_IMPURE',
'Fpurecopy', and replace calls to 'build_pure_c_string', 'pure_list',
'pure_listn', etc., by impure equivalents.

(cherry picked from commit 5ec86966638885a0f8df8afa28a01ca103ad2a49)

38 files changed:
src/alloc.c
src/androidterm.c
src/buffer.c
src/bytecode.c
src/callint.c
src/callproc.c
src/category.c
src/coding.c
src/comp.c
src/data.c
src/dbusbind.c
src/doc.c
src/emacs-module.c
src/eval.c
src/fileio.c
src/fns.c
src/fontset.c
src/frame.c
src/haikufns.c
src/intervals.c
src/keyboard.c
src/keymap.c
src/lisp.h
src/lread.c
src/pdumper.c
src/pgtkfns.c
src/pgtkterm.c
src/process.c
src/search.c
src/sqlite.c
src/syntax.c
src/treesit.c
src/w32fns.c
src/xdisp.c
src/xfaces.c
src/xfns.c
src/xftfont.c
src/xterm.c

index dcc5f567013dd0499e7eca4346326a590329f515..36a28e0652fbfd63527d511bd6bd2f01fa0993d0 100644 (file)
@@ -1689,7 +1689,7 @@ string_bytes (struct Lisp_String *s)
   ptrdiff_t nbytes =
     (s->u.s.size_byte < 0 ? s->u.s.size & ~ARRAY_MARK_FLAG : s->u.s.size_byte);
 
-  if (!PURE_P (s) && !pdumper_object_p (s) && s->u.s.data
+  if (!pdumper_object_p (s) && s->u.s.data
       && nbytes != SDATA_NBYTES (SDATA_OF_STRING (s)))
     emacs_abort ();
   return nbytes;
@@ -2540,7 +2540,7 @@ pin_string (Lisp_Object string)
   unsigned char *data = s->u.s.data;
 
   if (!(size > LARGE_STRING_BYTES
-       || PURE_P (data) || pdumper_object_p (data)
+       || pdumper_object_p (data)
        || s->u.s.size_byte == -3))
     {
       eassert (s->u.s.size_byte == -1);
@@ -5498,8 +5498,6 @@ valid_lisp_object_p (Lisp_Object obj)
     return 1;
 
   void *p = XPNTR (obj);
-  if (PURE_P (p))
-    return 1;
 
   if (BARE_SYMBOL_P (obj) && c_symbol_p (p))
     return ((char *) p - (char *) lispsym) % sizeof lispsym[0] == 0;
@@ -6686,8 +6684,6 @@ process_mark_stack (ptrdiff_t base_sp)
       Lisp_Object obj = mark_stack_pop ();
     mark_obj: ;
       void *po = XPNTR (obj);
-      if (PURE_P (po))
-       continue;
 
 #if GC_REMEMBER_LAST_MARKED
       last_marked[last_marked_index++] = obj;
@@ -6931,8 +6927,7 @@ process_mark_stack (ptrdiff_t base_sp)
                break;
              default: emacs_abort ();
              }
-           if (!PURE_P (XSTRING (ptr->u.s.name)))
-             set_string_marked (XSTRING (ptr->u.s.name));
+           set_string_marked (XSTRING (ptr->u.s.name));
            mark_interval_tree (string_intervals (ptr->u.s.name));
            /* Inner loop to mark next symbol in this bucket, if any.  */
            po = ptr = ptr->u.s.next;
@@ -7067,7 +7062,7 @@ survives_gc_p (Lisp_Object obj)
       emacs_abort ();
     }
 
-  return survives_p || PURE_P (XPNTR (obj));
+  return survives_p;
 }
 
 
@@ -7736,10 +7731,10 @@ allocated but to know if we're in the preload phase of Emacs's build.  */);
   /* We build this in advance because if we wait until we need it, we might
      not be able to allocate the memory to hold it.  */
   Vmemory_signal_data
-    = pure_list (Qerror,
-                build_pure_c_string ("Memory exhausted--use"
-                                     " M-x save-some-buffers then"
-                                     " exit and restart Emacs"));
+    = list (Qerror,
+           build_string ("Memory exhausted--use"
+                         " M-x save-some-buffers then"
+                         " exit and restart Emacs"));
 
   DEFVAR_LISP ("memory-full", Vmemory_full,
               doc: /* Non-nil means Emacs cannot get much more Lisp memory.  */);
index e0f666523000d3ae519325e73960d6b50ebe1c1a..3e367b391a8543ebe2381536e70d78f69979a63c 100644 (file)
@@ -6631,7 +6631,7 @@ android_term_init (void)
   x_display_list = dpyinfo;
 
   dpyinfo->name_list_element
-    = Fcons (build_pure_c_string ("android"), Qnil);
+    = Fcons (build_string ("android"), Qnil);
 
   color_file = Fexpand_file_name (build_string ("rgb.txt"),
                                  Vdata_directory);
index 07a4e00fa6887a891313c4a030dd03e4cdaf43e8..40f7ec83d6b73ce96837e18ffe877d2ae8d108ff 100644 (file)
@@ -4788,8 +4788,8 @@ init_buffer_once (void)
   set_buffer_intervals (&buffer_defaults, NULL);
   set_buffer_intervals (&buffer_local_symbols, NULL);
   /* This is not strictly necessary, but let's make them initialized.  */
-  bset_name (&buffer_defaults, build_pure_c_string (" *buffer-defaults*"));
-  bset_name (&buffer_local_symbols, build_pure_c_string (" *buffer-local-symbols*"));
+  bset_name (&buffer_defaults, build_string (" *buffer-defaults*"));
+  bset_name (&buffer_local_symbols, build_string (" *buffer-local-symbols*"));
   BUFFER_PVEC_INIT (&buffer_defaults);
   BUFFER_PVEC_INIT (&buffer_local_symbols);
 
@@ -4797,7 +4797,7 @@ init_buffer_once (void)
   /* Must do these before making the first buffer! */
 
   /* real setup is done in bindings.el */
-  bset_mode_line_format (&buffer_defaults, build_pure_c_string ("%-"));
+  bset_mode_line_format (&buffer_defaults, build_string ("%-"));
   bset_header_line_format (&buffer_defaults, Qnil);
   bset_tab_line_format (&buffer_defaults, Qnil);
   bset_abbrev_mode (&buffer_defaults, Qnil);
@@ -4865,7 +4865,7 @@ init_buffer_once (void)
   current_buffer = 0;
   pdumper_remember_lv_ptr_raw (&current_buffer, Lisp_Vectorlike);
 
-  QSFundamental = build_pure_c_string ("Fundamental");
+  QSFundamental = build_string ("Fundamental");
 
   DEFSYM (Qfundamental_mode, "fundamental-mode");
   bset_major_mode (&buffer_defaults, Qfundamental_mode);
@@ -4879,10 +4879,10 @@ init_buffer_once (void)
 
   /* Super-magic invisible buffer.  */
   Vprin1_to_string_buffer =
-    Fget_buffer_create (build_pure_c_string (" prin1"), Qt);
+    Fget_buffer_create (build_string (" prin1"), Qt);
   Vbuffer_alist = Qnil;
 
-  Fset_buffer (Fget_buffer_create (build_pure_c_string ("*scratch*"), Qnil));
+  Fset_buffer (Fget_buffer_create (build_string ("*scratch*"), Qnil));
 
   inhibit_modification_hooks = 0;
 }
@@ -5065,9 +5065,9 @@ syms_of_buffer (void)
               Qoverwrite_mode_binary));
 
   Fput (Qprotected_field, Qerror_conditions,
-       pure_list (Qprotected_field, Qerror));
+       list (Qprotected_field, Qerror));
   Fput (Qprotected_field, Qerror_message,
-       build_pure_c_string ("Attempt to modify a protected field"));
+       build_string ("Attempt to modify a protected field"));
 
   DEFSYM (Qclone_indirect_buffer_hook, "clone-indirect-buffer-hook");
 
index b2d77ef03a65bec951e6391b6ba5378c090772b1..ecea0c6df367df70c45fc5824bb33568ca8938b1 100644 (file)
@@ -1638,7 +1638,6 @@ exec_byte_code (Lisp_Object fun, ptrdiff_t args_template,
                record_in_backtrace (Qsetcar, &TOP, 2);
                wrong_type_argument (Qconsp, cell);
              }
-           CHECK_IMPURE (cell, XCONS (cell));
            XSETCAR (cell, newval);
            TOP = newval;
            NEXT;
@@ -1653,7 +1652,6 @@ exec_byte_code (Lisp_Object fun, ptrdiff_t args_template,
                record_in_backtrace (Qsetcdr, &TOP, 2);
                wrong_type_argument (Qconsp, cell);
              }
-           CHECK_IMPURE (cell, XCONS (cell));
            XSETCDR (cell, newval);
            TOP = newval;
            NEXT;
index c8d29040d3d56538fc8e03b52818f604529f2616..7979d8b2ef0d34f0b72e3091f1c663aeff11470e 100644 (file)
@@ -810,10 +810,10 @@ syms_of_callint (void)
   callint_message = Qnil;
   staticpro (&callint_message);
 
-  preserved_fns = pure_list (intern_c_string ("region-beginning"),
-                            intern_c_string ("region-end"),
-                            intern_c_string ("point"),
-                            intern_c_string ("mark"));
+  preserved_fns = list (intern_c_string ("region-beginning"),
+                       intern_c_string ("region-end"),
+                       intern_c_string ("point"),
+                       intern_c_string ("mark"));
   staticpro (&preserved_fns);
 
   DEFSYM (Qlist, "list");
index a70c374881f045d7692bc03b415fb9faff5e73f7..cc6df35998d424dc29050b4ee82def6d38cabccb 100644 (file)
@@ -2171,9 +2171,9 @@ See `setenv' and `getenv'.  */);
 Use this instead of calling `ctags' directly, as `ctags' may have been
 renamed to comply with executable naming restrictions on the system.  */);
 #if !defined HAVE_ANDROID || defined ANDROID_STUBIFY
-  Vctags_program_name = build_pure_c_string ("ctags");
+  Vctags_program_name = build_string ("ctags");
 #else
-  Vctags_program_name = build_pure_c_string ("libctags.so");
+  Vctags_program_name = build_string ("libctags.so");
 #endif
 
   DEFVAR_LISP ("etags-program-name", Vetags_program_name,
@@ -2181,9 +2181,9 @@ renamed to comply with executable naming restrictions on the system.  */);
 Use this instead of calling `etags' directly, as `etags' may have been
 renamed to comply with executable naming restrictions on the system.  */);
 #if !defined HAVE_ANDROID || defined ANDROID_STUBIFY
-  Vetags_program_name = build_pure_c_string ("etags");
+  Vetags_program_name = build_string ("etags");
 #else
-  Vetags_program_name = build_pure_c_string ("libetags.so");
+  Vetags_program_name = build_string ("libetags.so");
 #endif
 
   DEFVAR_LISP ("hexl-program-name", Vhexl_program_name,
@@ -2191,9 +2191,9 @@ renamed to comply with executable naming restrictions on the system.  */);
 Use this instead of calling `hexl' directly, as `hexl' may have been
 renamed to comply with executable naming restrictions on the system.  */);
 #if !defined HAVE_ANDROID || defined ANDROID_STUBIFY
-  Vhexl_program_name = build_pure_c_string ("hexl");
+  Vhexl_program_name = build_string ("hexl");
 #else
-  Vhexl_program_name = build_pure_c_string ("libhexl.so");
+  Vhexl_program_name = build_string ("libhexl.so");
 #endif
 
   DEFVAR_LISP ("emacsclient-program-name", Vemacsclient_program_name,
@@ -2202,9 +2202,9 @@ Use this instead of calling `emacsclient' directly, as `emacsclient'
 may have been renamed to comply with executable naming restrictions on
 the system.  */);
 #if !defined HAVE_ANDROID || defined ANDROID_STUBIFY
-  Vemacsclient_program_name = build_pure_c_string ("emacsclient");
+  Vemacsclient_program_name = build_string ("emacsclient");
 #else
-  Vemacsclient_program_name = build_pure_c_string ("libemacsclient.so");
+  Vemacsclient_program_name = build_string ("libemacsclient.so");
 #endif
 
   DEFVAR_LISP ("movemail-program-name", Vmovemail_program_name,
@@ -2216,9 +2216,9 @@ the system.  */);
      use movemail from another source.  */
 #if !defined HAVE_ANDROID || defined ANDROID_STUBIFY   \
   || defined HAVE_MAILUTILS
-  Vmovemail_program_name = build_pure_c_string ("movemail");
+  Vmovemail_program_name = build_string ("movemail");
 #else
-  Vmovemail_program_name = build_pure_c_string ("libmovemail.so");
+  Vmovemail_program_name = build_string ("libmovemail.so");
 #endif
 
   DEFVAR_LISP ("rcs2log-program-name", Vrcs2log_program_name,
@@ -2227,9 +2227,9 @@ Use this instead of calling `rcs2log' directly, as `rcs2log'
 may have been renamed to comply with executable naming restrictions on
 the system.  */);
 #if !defined HAVE_ANDROID || defined ANDROID_STUBIFY
-  Vrcs2log_program_name = build_pure_c_string ("rcs2log");
+  Vrcs2log_program_name = build_string ("rcs2log");
 #else /* HAVE_ANDROID && !ANDROID_STUBIFY */
-  Vrcs2log_program_name = build_pure_c_string ("librcs2log.so");
+  Vrcs2log_program_name = build_string ("librcs2log.so");
 #endif /* !HAVE_ANDROID || ANDROID_STUBIFY */
 
   defsubr (&Scall_process);
index 2611d6419e80c8939f8e0f10d11d5167ab7e3a49..b5eb2136bb35103bef08efb9ed04f48e13b5b631 100644 (file)
@@ -118,8 +118,6 @@ the current buffer's category table.  */)
 
   if (!NILP (CATEGORY_DOCSTRING (table, XFIXNAT (category))))
     error ("Category `%c' is already defined", (int) XFIXNAT (category));
-  if (!NILP (Vpurify_flag))
-    docstring = Fpurecopy (docstring);
   SET_CATEGORY_DOCSTRING (table, XFIXNAT (category), docstring);
 
   return Qnil;
index 6875d4af823c32af82a9d47c4d09b51ab617f892..4f7cf23e96e17abff66fd279e987060a425bdc44 100644 (file)
@@ -11766,7 +11766,7 @@ syms_of_coding (void)
   Vcode_conversion_reused_workbuf = Qnil;
 
   staticpro (&Vcode_conversion_workbuf_name);
-  Vcode_conversion_workbuf_name = build_pure_c_string (" *code-conversion-work*");
+  Vcode_conversion_workbuf_name = build_string (" *code-conversion-work*");
 
   reused_workbuf_in_use = false;
   PDUMPER_REMEMBER_SCALAR (reused_workbuf_in_use);
@@ -11830,9 +11830,9 @@ syms_of_coding (void)
   /* Error signaled when there's a problem with detecting a coding system.  */
   DEFSYM (Qcoding_system_error, "coding-system-error");
   Fput (Qcoding_system_error, Qerror_conditions,
-       pure_list (Qcoding_system_error, Qerror));
+       list (Qcoding_system_error, Qerror));
   Fput (Qcoding_system_error, Qerror_message,
-       build_pure_c_string ("Invalid coding system"));
+       build_string ("Invalid coding system"));
 
   DEFSYM (Qtranslation_table, "translation-table");
   Fput (Qtranslation_table, Qchar_table_extra_slots, make_fixnum (2));
@@ -12107,22 +12107,22 @@ used for encoding standard output and error streams.  */);
   DEFVAR_LISP ("eol-mnemonic-unix", eol_mnemonic_unix,
               doc: /*
 String displayed in mode line for UNIX-like (LF) end-of-line format.  */);
-  eol_mnemonic_unix = build_pure_c_string (":");
+  eol_mnemonic_unix = build_string (":");
 
   DEFVAR_LISP ("eol-mnemonic-dos", eol_mnemonic_dos,
               doc: /*
 String displayed in mode line for DOS-like (CRLF) end-of-line format.  */);
-  eol_mnemonic_dos = build_pure_c_string ("\\");
+  eol_mnemonic_dos = build_string ("\\");
 
   DEFVAR_LISP ("eol-mnemonic-mac", eol_mnemonic_mac,
               doc: /*
 String displayed in mode line for MAC-like (CR) end-of-line format.  */);
-  eol_mnemonic_mac = build_pure_c_string ("/");
+  eol_mnemonic_mac = build_string ("/");
 
   DEFVAR_LISP ("eol-mnemonic-undecided", eol_mnemonic_undecided,
               doc: /*
 String displayed in mode line when end-of-line format is not yet determined.  */);
-  eol_mnemonic_undecided = build_pure_c_string (":");
+  eol_mnemonic_undecided = build_string (":");
 
   DEFVAR_LISP ("enable-character-translation", Venable_character_translation,
               doc: /*
@@ -12262,7 +12262,7 @@ internal character representation.  */);
       intern_c_string (":for-unibyte"),
       args[coding_arg_for_unibyte] = Qt,
       intern_c_string (":docstring"),
-      (build_pure_c_string
+      (build_string
        ("Do no conversion.\n"
        "\n"
        "When you visit a file with this coding, the file is read into a\n"
@@ -12282,7 +12282,7 @@ internal character representation.  */);
   plist[8] = intern_c_string (":charset-list");
   plist[9] = args[coding_arg_charset_list] = list1 (Qascii);
   plist[11] = args[coding_arg_for_unibyte] = Qnil;
-  plist[13] = build_pure_c_string ("No conversion on encoding, "
+  plist[13] = build_string ("No conversion on encoding, "
                                   "automatic conversion on decoding.");
   plist[15] = args[coding_arg_eol_type] = Qnil;
   args[coding_arg_plist] = CALLMANY (Flist, plist);
index 25b00f31f1ef20353f8271f43149ee9abd677e2a..1631e2b4ce0e64eefeb5591008a407b6013303e3 100644 (file)
@@ -4945,7 +4945,6 @@ DEFUN ("comp--compile-ctxt-to-file0", Fcomp__compile_ctxt_to_file0,
   define_GET_SYMBOL_WITH_POSITION ();
   define_CHECK_TYPE ();
   define_SYMBOL_WITH_POS_SYM ();
-  define_CHECK_IMPURE ();
   define_bool_to_lisp_obj ();
   define_setcar_setcdr ();
   define_add1_sub1 ();
@@ -5192,11 +5191,11 @@ maybe_defer_native_compilation (Lisp_Object function_name,
     return;
 
   Lisp_Object src =
-    concat2 (CALLNI (file-name-sans-extension, Vload_true_file_name),
-            build_pure_c_string (".el"));
+    concat2 (CALL1I (file-name-sans-extension, Vload_true_file_name),
+            build_string (".el"));
   if (NILP (Ffile_exists_p (src)))
     {
-      src = concat2 (src, build_pure_c_string (".gz"));
+      src = concat2 (src, build_string (".gz"));
       if (NILP (Ffile_exists_p (src)))
        return;
     }
@@ -5755,48 +5754,48 @@ natively-compiled one.  */);
   /* To be signaled by the compiler.  */
   DEFSYM (Qnative_compiler_error, "native-compiler-error");
   Fput (Qnative_compiler_error, Qerror_conditions,
-       pure_list (Qnative_compiler_error, Qerror));
+       list (Qnative_compiler_error, Qerror));
   Fput (Qnative_compiler_error, Qerror_message,
-        build_pure_c_string ("Native compiler error"));
+        build_string ("Native compiler error"));
 
   DEFSYM (Qnative_ice, "native-ice");
   Fput (Qnative_ice, Qerror_conditions,
-       pure_list (Qnative_ice, Qnative_compiler_error, Qerror));
+       list (Qnative_ice, Qnative_compiler_error, Qerror));
   Fput (Qnative_ice, Qerror_message,
-        build_pure_c_string ("Internal native compiler error"));
+        build_string ("Internal native compiler error"));
 
   /* By the load machinery.  */
   DEFSYM (Qnative_lisp_load_failed, "native-lisp-load-failed");
   Fput (Qnative_lisp_load_failed, Qerror_conditions,
-       pure_list (Qnative_lisp_load_failed, Qerror));
+       list (Qnative_lisp_load_failed, Qerror));
   Fput (Qnative_lisp_load_failed, Qerror_message,
-        build_pure_c_string ("Native elisp load failed"));
+        build_string ("Native elisp load failed"));
 
   DEFSYM (Qnative_lisp_wrong_reloc, "native-lisp-wrong-reloc");
   Fput (Qnative_lisp_wrong_reloc, Qerror_conditions,
-       pure_list (Qnative_lisp_wrong_reloc, Qnative_lisp_load_failed, Qerror));
+       list (Qnative_lisp_wrong_reloc, Qnative_lisp_load_failed, Qerror));
   Fput (Qnative_lisp_wrong_reloc, Qerror_message,
-        build_pure_c_string ("Primitive redefined or wrong relocation"));
+        build_string ("Primitive redefined or wrong relocation"));
 
   DEFSYM (Qwrong_register_subr_call, "wrong-register-subr-call");
   Fput (Qwrong_register_subr_call, Qerror_conditions,
-       pure_list (Qwrong_register_subr_call, Qnative_lisp_load_failed, Qerror));
+       list (Qwrong_register_subr_call, Qnative_lisp_load_failed, Qerror));
   Fput (Qwrong_register_subr_call, Qerror_message,
-        build_pure_c_string ("comp--register-subr can only be called during "
-                           "native lisp load phase."));
+        build_string ("comp--register-subr can only be called during "
+                     "native lisp load phase."));
 
   DEFSYM (Qnative_lisp_file_inconsistent, "native-lisp-file-inconsistent");
   Fput (Qnative_lisp_file_inconsistent, Qerror_conditions,
-       pure_list (Qnative_lisp_file_inconsistent, Qnative_lisp_load_failed, Qerror));
+       list (Qnative_lisp_file_inconsistent, Qnative_lisp_load_failed, Qerror));
   Fput (Qnative_lisp_file_inconsistent, Qerror_message,
-        build_pure_c_string ("eln file inconsistent with current runtime "
-                            "configuration, please recompile"));
+        build_string ("eln file inconsistent with current runtime "
+                     "configuration, please recompile"));
 
   DEFSYM (Qcomp_sanitizer_error, "comp-sanitizer-error");
   Fput (Qcomp_sanitizer_error, Qerror_conditions,
-       pure_list (Qcomp_sanitizer_error, Qerror));
+       list (Qcomp_sanitizer_error, Qerror));
   Fput (Qcomp_sanitizer_error, Qerror_message,
-        build_pure_c_string ("Native code sanitizer runtime error"));
+        build_string ("Native code sanitizer runtime error"));
 
   DEFSYM (Qnative__compile_async, "native--compile-async");
 
index 6df1276e4a3d0483c1dcb5a0acd3ebcf78b61c83..5fcdda1b6e8379b4cf9e06b5b81632c05a012710 100644 (file)
@@ -688,7 +688,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;
 }
@@ -698,7 +697,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;
 }
@@ -996,10 +994,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);
 
@@ -2589,7 +2583,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);
@@ -2607,14 +2600,12 @@ bool-vector.  IDX starts at 0.  */)
     }
   else if (RECORDP (array))
     {
-      CHECK_IMPURE (array, XVECTOR (array));
       if (idxval < 0 || idxval >= PVSIZE (array))
        args_out_of_range (array, idx);
       ASET (array, idxval, newelt);
     }
   else /* STRINGP */
     {
-      CHECK_IMPURE (array, XSTRING (array));
       if (idxval < 0 || idxval >= SCHARS (array))
        args_out_of_range (array, idx);
       CHECK_CHARACTER (newelt);
@@ -4074,7 +4065,7 @@ syms_of_data (void)
   DEFSYM (Qaref, "aref");
   DEFSYM (Qaset, "aset");
 
-  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.  */
@@ -4082,14 +4073,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");
@@ -4118,14 +4109,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");
@@ -4148,10 +4139,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_lisp_nesting, recursion_tail,
             "Lisp nesting exceeds `max-lisp-eval-depth'");
index d98009f68b4523907ea80b274026367acfe34d51..5f89122eaf784f8ef89973ac4e994d2e40fe142d 100644 (file)
@@ -1909,7 +1909,7 @@ syms_of_dbusbind (void)
   Fput (Qdbus_error, Qerror_conditions,
        list2 (Qdbus_error, Qerror));
   Fput (Qdbus_error, Qerror_message,
-       build_pure_c_string ("D-Bus error"));
+       build_string ("D-Bus error"));
   DEFSYM (QD_Bus, "D-Bus");
 
   /* Lisp symbols of the system and session buses.  */
@@ -1959,7 +1959,7 @@ syms_of_dbusbind (void)
               Vdbus_compiled_version,
     doc: /* The version of D-Bus Emacs is compiled against.  */);
 #ifdef DBUS_VERSION_STRING
-  Vdbus_compiled_version = build_pure_c_string (DBUS_VERSION_STRING);
+  Vdbus_compiled_version = build_string (DBUS_VERSION_STRING);
 #else
   Vdbus_compiled_version = Qnil;
 #endif
index 09e099efcdb8cf8df01060915d39cfd07b0ade70..6bc34550d31dcfea9f21b090c279811f38a85ece 100644 (file)
--- a/src/doc.c
+++ b/src/doc.c
@@ -549,7 +549,6 @@ the same file name is found in the `doc-directory'.  */)
       int i = ARRAYELTS (buildobj);
       while (0 <= --i)
        Vbuild_files = Fcons (build_string (buildobj[i]), Vbuild_files);
-      Vbuild_files = Fpurecopy (Vbuild_files);
     }
 
   doc_fd fd = doc_open (name, O_RDONLY, 0);
index 196b8a57754627210b71d8f7b58717f41ee43a0e..18760182a0321954c96f01992f3b10a7b2f11aaf 100644 (file)
@@ -1713,40 +1713,40 @@ syms_of_module (void)
 
   DEFSYM (Qmodule_load_failed, "module-load-failed");
   Fput (Qmodule_load_failed, Qerror_conditions,
-       pure_list (Qmodule_load_failed, Qerror));
+       list (Qmodule_load_failed, Qerror));
   Fput (Qmodule_load_failed, Qerror_message,
-        build_pure_c_string ("Module load failed"));
+        build_string ("Module load failed"));
 
   DEFSYM (Qmodule_open_failed, "module-open-failed");
   Fput (Qmodule_open_failed, Qerror_conditions,
-       pure_list (Qmodule_open_failed, Qmodule_load_failed, Qerror));
+       list (Qmodule_open_failed, Qmodule_load_failed, Qerror));
   Fput (Qmodule_open_failed, Qerror_message,
-        build_pure_c_string ("Module could not be opened"));
+        build_string ("Module could not be opened"));
 
   DEFSYM (Qmodule_not_gpl_compatible, "module-not-gpl-compatible");
   Fput (Qmodule_not_gpl_compatible, Qerror_conditions,
-       pure_list (Qmodule_not_gpl_compatible, Qmodule_load_failed, Qerror));
+       list (Qmodule_not_gpl_compatible, Qmodule_load_failed, Qerror));
   Fput (Qmodule_not_gpl_compatible, Qerror_message,
-        build_pure_c_string ("Module is not GPL compatible"));
+        build_string ("Module is not GPL compatible"));
 
   DEFSYM (Qmissing_module_init_function, "missing-module-init-function");
   Fput (Qmissing_module_init_function, Qerror_conditions,
-       pure_list (Qmissing_module_init_function, Qmodule_load_failed,
-                  Qerror));
+       list (Qmissing_module_init_function, Qmodule_load_failed,
+             Qerror));
   Fput (Qmissing_module_init_function, Qerror_message,
-        build_pure_c_string ("Module does not export an "
+        build_string ("Module does not export an "
                              "initialization function"));
 
   DEFSYM (Qmodule_init_failed, "module-init-failed");
   Fput (Qmodule_init_failed, Qerror_conditions,
-       pure_list (Qmodule_init_failed, Qmodule_load_failed, Qerror));
+       list (Qmodule_init_failed, Qmodule_load_failed, Qerror));
   Fput (Qmodule_init_failed, Qerror_message,
-        build_pure_c_string ("Module initialization failed"));
+        build_string ("Module initialization failed"));
 
   DEFSYM (Qinvalid_arity, "invalid-arity");
-  Fput (Qinvalid_arity, Qerror_conditions, pure_list (Qinvalid_arity, Qerror));
+  Fput (Qinvalid_arity, Qerror_conditions, list (Qinvalid_arity, Qerror));
   Fput (Qinvalid_arity, Qerror_message,
-        build_pure_c_string ("Invalid function arity"));
+        build_string ("Invalid function arity"));
 
   DEFSYM (Qmodule_function_p, "module-function-p");
   DEFSYM (Qunicode_string_p, "unicode-string-p");
index cf05d3baea44e09383066fd2026437be18484328..f724d6d8052de9be982cbc261452fe4138910b13 100644 (file)
@@ -817,8 +817,6 @@ value.  */)
   XSYMBOL (symbol)->u.s.declared_special = true;
   if (!NILP (doc))
     {
-      if (!NILP (Vpurify_flag))
-       doc = Fpurecopy (doc);
       Fput (symbol, Qvariable_documentation, doc);
     }
   LOADHIST_ATTACH (symbol);
@@ -967,8 +965,6 @@ More specifically, behaves like (defconst SYM 'INITVALUE DOCSTRING).  */)
   CHECK_SYMBOL (sym);
   Lisp_Object tem = initvalue;
   Finternal__define_uninitialized_variable (sym, docstring);
-  if (!NILP (Vpurify_flag))
-    tem = Fpurecopy (tem);
   Fset_default (sym, tem);      /* FIXME: set-default-toplevel-value? */
   Fput (sym, Qrisky_local_variable, Qt); /* FIXME: Why?  */
   return sym;
@@ -2004,8 +2000,8 @@ define_error (Lisp_Object name, const char *message, Lisp_Object parent)
   eassert (CONSP (parent_conditions));
   eassert (!NILP (Fmemq (parent, parent_conditions)));
   eassert (NILP (Fmemq (name, parent_conditions)));
-  Fput (name, Qerror_conditions, pure_cons (name, parent_conditions));
-  Fput (name, Qerror_message, build_pure_c_string (message));
+  Fput (name, Qerror_conditions, Fcons (name, parent_conditions));
+  Fput (name, Qerror_message, build_string (message));
 }
 
 /* Use this for arithmetic overflow, e.g., when an integer result is
@@ -4480,7 +4476,7 @@ alist of active lexical bindings.  */);
      also use something like Fcons (Qnil, Qnil), but json.c treats any
      cons cell as error data, so use an uninterned symbol instead.  */
   Qcatch_all_memory_full
-    = Fmake_symbol (build_pure_c_string ("catch-all-memory-full"));
+    = Fmake_symbol (build_string ("catch-all-memory-full"));
 
   staticpro (&list_of_t);
   list_of_t = list1 (Qt);
index d832967bb6b28eca12cecd7466c0e3e69b6a14a2..0c27bb3174ce0295aa96fb71aaccd4bbf821f002 100644 (file)
@@ -6671,39 +6671,39 @@ behaves as if file names were encoded in `utf-8'.  */);
   DEFSYM (Qcar_less_than_car, "car-less-than-car");
 
   Fput (Qfile_error, Qerror_conditions,
-       Fpurecopy (list2 (Qfile_error, Qerror)));
+       list2 (Qfile_error, Qerror));
   Fput (Qfile_error, Qerror_message,
-       build_pure_c_string ("File error"));
+       build_string ("File error"));
 
   Fput (Qfile_already_exists, Qerror_conditions,
-       Fpurecopy (list3 (Qfile_already_exists, Qfile_error, Qerror)));
+       list3 (Qfile_already_exists, Qfile_error, Qerror));
   Fput (Qfile_already_exists, Qerror_message,
-       build_pure_c_string ("File already exists"));
+       build_string ("File already exists"));
 
   Fput (Qfile_date_error, Qerror_conditions,
-       Fpurecopy (list3 (Qfile_date_error, Qfile_error, Qerror)));
+       list3 (Qfile_date_error, Qfile_error, Qerror));
   Fput (Qfile_date_error, Qerror_message,
-       build_pure_c_string ("Cannot set file date"));
+       build_string ("Cannot set file date"));
 
   Fput (Qfile_missing, Qerror_conditions,
-       Fpurecopy (list3 (Qfile_missing, Qfile_error, Qerror)));
+       list3 (Qfile_missing, Qfile_error, Qerror));
   Fput (Qfile_missing, Qerror_message,
-       build_pure_c_string ("File is missing"));
+       build_string ("File is missing"));
 
   Fput (Qpermission_denied, Qerror_conditions,
-       Fpurecopy (list3 (Qpermission_denied, Qfile_error, Qerror)));
+       list3 (Qpermission_denied, Qfile_error, Qerror));
   Fput (Qpermission_denied, Qerror_message,
-       build_pure_c_string ("Cannot access file or directory"));
+       build_string ("Cannot access file or directory"));
 
   Fput (Qfile_notify_error, Qerror_conditions,
-       Fpurecopy (list3 (Qfile_notify_error, Qfile_error, Qerror)));
+       list3 (Qfile_notify_error, Qfile_error, Qerror));
   Fput (Qfile_notify_error, Qerror_message,
-       build_pure_c_string ("File notification error"));
+       build_string ("File notification error"));
 
   Fput (Qremote_file_error, Qerror_conditions,
-       Fpurecopy (list3 (Qremote_file_error, Qfile_error, Qerror)));
+       list3 (Qremote_file_error, Qfile_error, Qerror));
   Fput (Qremote_file_error, Qerror_message,
-       build_pure_c_string ("Remote file error"));
+       build_string ("Remote file error"));
 
   DEFVAR_LISP ("file-name-handler-alist", Vfile_name_handler_alist,
               doc: /* Alist of elements (REGEXP . HANDLER) for file names handled specially.
index 78f1429ddab5f5caa3fbed65f49692e2978b3b62..d62712f24d99c0b297c9cc9a4a3baddb3c324db5 100644 (file)
--- a/src/fns.c
+++ b/src/fns.c
@@ -3274,7 +3274,6 @@ ARRAY is a vector, string, char-table, or bool-vector.  */)
       size = SCHARS (array);
       if (size != 0)
        {
-         CHECK_IMPURE (array, XSTRING (array));
          unsigned char str[MAX_MULTIBYTE_LENGTH];
          int len;
          if (STRING_MULTIBYTE (array))
@@ -3317,7 +3316,6 @@ removes all text properties.  This may change its length.  */)
                        Qnil, string);
   if (len != 0 || STRING_MULTIBYTE (string))
     {
-      CHECK_IMPURE (string, XSTRING (string));
       memset (SDATA (string), 0, len);
       STRING_SET_CHARS (string, len);
       STRING_SET_UNIBYTE (string);
@@ -5136,7 +5134,6 @@ check_mutable_hash_table (Lisp_Object obj, struct Lisp_Hash_Table *h)
 {
   if (!h->mutable)
     signal_error ("hash table test modifies table", obj);
-  eassert (!PURE_P (h));
 }
 
 /* Put an entry into hash table H that associates KEY with VALUE.
index c0086b49257f638adf3dbb194afbec89e208b5a7..f71730d8a2ede02104fc2551771b62c109222b25 100644 (file)
@@ -2174,7 +2174,7 @@ syms_of_fontset (void)
   set_fontset_id (Vdefault_fontset, make_fixnum (0));
   set_fontset_name
     (Vdefault_fontset,
-     build_pure_c_string ("-*-*-*-*-*-*-*-*-*-*-*-*-fontset-default"));
+     build_string ("-*-*-*-*-*-*-*-*-*-*-*-*-fontset-default"));
   ASET (Vfontset_table, 0, Vdefault_fontset);
   next_fontset_id = 1;
   PDUMPER_REMEMBER_SCALAR (next_fontset_id);
@@ -2232,7 +2232,7 @@ alternate fontnames (if any) are tried instead.  */);
               doc: /* Alist of fontset names vs the aliases.  */);
   Vfontset_alias_alist
     = list1 (Fcons (FONTSET_NAME (Vdefault_fontset),
-                   build_pure_c_string ("fontset-default")));
+                   build_string ("fontset-default")));
 
   DEFVAR_LISP ("vertical-centering-font-regexp",
               Vvertical_centering_font_regexp,
index 473254175a2be4411b1afb49b5a055776cfb39e0..511c4d8718daf390d508a9701e128a4a9d1f2170 100644 (file)
@@ -1242,7 +1242,7 @@ make_initial_frame (void)
   Vframe_list = Fcons (frame, Vframe_list);
 
   tty_frame_count = 1;
-  fset_name (f, build_pure_c_string ("F1"));
+  fset_name (f, build_string ("F1"));
 
   SET_FRAME_VISIBLE (f, true);
 
index 22e82048fc4de147176ef14177c9e62ac0de9ebc..6490a22bd019f925c83e4e09c1915c81086e8e87 100644 (file)
@@ -3300,7 +3300,7 @@ invalid color.  */);
     int len = sprintf (cairo_version, "%d.%d.%d",
                       CAIRO_VERSION_MAJOR, CAIRO_VERSION_MINOR,
                        CAIRO_VERSION_MICRO);
-    Vcairo_version_string = make_pure_string (cairo_version, len, len, false);
+    Vcairo_version_string = make_specified_string (cairo_version, len, len, false);
   }
 #endif
 
index 4fb2edf4ba325d39613382cd23e61b7bdfab8069..a6c7d938df7312903c7f8ecd07f7516d6ed80999 100644 (file)
@@ -100,7 +100,6 @@ create_root_interval (Lisp_Object parent)
     }
   else
     {
-      CHECK_IMPURE (parent, XSTRING (parent));
       new->total_length = SCHARS (parent);
       eassert (TOTAL_LENGTH (new) >= 0);
       set_string_intervals (parent, new);
index d35169846912648d2ef6e68f1e64500a16f59556..83e00cc517a7ec2f837127eeb430b95e52c99e17 100644 (file)
@@ -12840,14 +12840,14 @@ syms_of_keyboard (void)
   pending_funcalls = Qnil;
   staticpro (&pending_funcalls);
 
-  Vlispy_mouse_stem = build_pure_c_string ("mouse");
+  Vlispy_mouse_stem = build_string ("mouse");
   staticpro (&Vlispy_mouse_stem);
 
-  regular_top_level_message = build_pure_c_string ("Back to top level");
+  regular_top_level_message = build_string ("Back to top level");
   staticpro (&regular_top_level_message);
 #ifdef HAVE_STACK_OVERFLOW_HANDLING
   recover_top_level_message
-    = build_pure_c_string ("Re-entering top level after C stack overflow");
+    = build_string ("Re-entering top level after C stack overflow");
   staticpro (&recover_top_level_message);
 #endif
   DEFVAR_LISP ("internal--top-level-message", Vinternal__top_level_message,
index 521a8f70d0065169adce5bdd0c36735fb990c093..5691b34c40db6e8523b4d049fd1bf822d69bbfac 100644 (file)
@@ -120,8 +120,6 @@ in case you use it as a menu with `x-popup-menu'.  */)
 {
   if (!NILP (string))
     {
-      if (!NILP (Vpurify_flag))
-       string = Fpurecopy (string);
       return list2 (Qkeymap, string);
     }
   return list1 (Qkeymap);
@@ -300,7 +298,6 @@ Return PARENT.  PARENT should be nil or another keymap.  */)
         If we came to the end, add the parent in PREV.  */
       if (!CONSP (list) || KEYMAPP (list))
        {
-         CHECK_IMPURE (prev, XCONS (prev));
          XSETCDR (prev, parent);
          return parent;
        }
@@ -743,7 +740,7 @@ store_in_keymap (Lisp_Object keymap, register Lisp_Object idx,
 
   /* If we are preparing to dump, and DEF is a menu element
      with a menu item indicator, copy it to ensure it is not pure.  */
-  if (CONSP (def) && PURE_P (XCONS (def))
+  if (CONSP (def)
       && (EQ (XCAR (def), Qmenu_item) || STRINGP (XCAR (def))))
     def = Fcons (XCAR (def), XCDR (def));
 
@@ -787,7 +784,6 @@ store_in_keymap (Lisp_Object keymap, register Lisp_Object idx,
          {
            if (FIXNATP (idx) && XFIXNAT (idx) < ASIZE (elt))
              {
-               CHECK_IMPURE (elt, XVECTOR (elt));
                ASET (elt, XFIXNAT (idx), def);
                return def;
              }
@@ -845,7 +841,6 @@ store_in_keymap (Lisp_Object keymap, register Lisp_Object idx,
              }
            else if (EQ (idx, XCAR (elt)))
              {
-               CHECK_IMPURE (elt, XCONS (elt));
                if (remove)
                  /* Remove the element. */
                  insertion_point = Fdelq (elt, insertion_point);
@@ -900,7 +895,6 @@ store_in_keymap (Lisp_Object keymap, register Lisp_Object idx,
          }
        else
          elt = Fcons (idx, def);
-       CHECK_IMPURE (insertion_point, XCONS (insertion_point));
        XSETCDR (insertion_point, Fcons (elt, XCDR (insertion_point)));
       }
   }
@@ -3356,12 +3350,12 @@ syms_of_keymap (void)
   current_global_map = Qnil;
   staticpro (&current_global_map);
 
-  exclude_keys = pure_list
-    (pure_cons (build_pure_c_string ("DEL"), build_pure_c_string ("\\d")),
-     pure_cons (build_pure_c_string ("TAB"), build_pure_c_string ("\\t")),
-     pure_cons (build_pure_c_string ("RET"), build_pure_c_string ("\\r")),
-     pure_cons (build_pure_c_string ("ESC"), build_pure_c_string ("\\e")),
-     pure_cons (build_pure_c_string ("SPC"), build_pure_c_string (" ")));
+  exclude_keys = list
+    (Fcons (build_string ("DEL"), build_string ("\\d")),
+     Fcons (build_string ("TAB"), build_string ("\\t")),
+     Fcons (build_string ("RET"), build_string ("\\r")),
+     Fcons (build_string ("ESC"), build_string ("\\e")),
+     Fcons (build_string ("SPC"), build_string (" ")));
   staticpro (&exclude_keys);
 
   DEFVAR_LISP ("minibuffer-local-map", Vminibuffer_local_map,
@@ -3423,13 +3417,13 @@ that describe key bindings.  That is why the default is nil.  */);
   DEFSYM (Qmode_line, "mode-line");
 
   staticpro (&Vmouse_events);
-  Vmouse_events = pure_list (Qmenu_bar, Qtab_bar, Qtool_bar,
-                            Qtab_line, Qheader_line, Qmode_line,
-                            intern_c_string ("mouse-1"),
-                            intern_c_string ("mouse-2"),
-                            intern_c_string ("mouse-3"),
-                            intern_c_string ("mouse-4"),
-                            intern_c_string ("mouse-5"));
+  Vmouse_events = list (Qmenu_bar, Qtab_bar, Qtool_bar, Qtab_line,
+                       Qheader_line, Qmode_line,
+                       intern_c_string ("mouse-1"),
+                       intern_c_string ("mouse-2"),
+                       intern_c_string ("mouse-3"),
+                       intern_c_string ("mouse-4"),
+                       intern_c_string ("mouse-5"));
 
   /* Keymap used for minibuffers when doing completion.  */
   /* Keymap used for minibuffers when doing completion and require a match.  */
index 6a694efa80b5df41bff2ef21f840d91a116d0329..8c40130cc4320be214c63599dfc0f45e5e8296a8 100644 (file)
@@ -4578,7 +4578,6 @@ build_string (const char *str)
   return make_string (str, strlen (str));
 }
 
-extern Lisp_Object pure_cons (Lisp_Object, Lisp_Object);
 extern Lisp_Object make_vector (ptrdiff_t, Lisp_Object);
 extern struct Lisp_Vector *allocate_nil_vector (ptrdiff_t)
   ATTRIBUTE_RETURNS_NONNULL;
index de1b0ae2d06de7a6948aa80936b1e6fd73db1634..0e4512be12291374cdf07d3c89ae6c82733d4bbc 100644 (file)
@@ -1673,7 +1673,7 @@ Return t if the file exists and loads successfully.  */)
     }
 
   if (! NILP (Vpurify_flag))
-    Vpreloaded_file_list = Fcons (Fpurecopy (file), Vpreloaded_file_list);
+    Vpreloaded_file_list = Fcons (file, Vpreloaded_file_list);
 
   if (NILP (nomessage) || force_load_messages)
     {
@@ -4431,10 +4431,7 @@ read0 (Lisp_Object readcharfun, bool locate_syms)
        if (uninterned_symbol)
          {
            Lisp_Object name
-             = (!NILP (Vpurify_flag)
-                ? make_pure_string (read_buffer, nchars, nbytes, multibyte)
-                : make_specified_string (read_buffer, nchars, nbytes,
-                                         multibyte));
+             = make_specified_string (read_buffer, nchars, nbytes, multibyte);
            result = Fmake_symbol (name);
          }
        else
@@ -4966,10 +4963,7 @@ intern_c_string_1 (const char *str, ptrdiff_t len)
     {
       Lisp_Object string;
 
-      if (NILP (Vpurify_flag))
-       string = make_string (str, len);
-      else
-       string = make_pure_c_string (str, len);
+      string = make_string (str, len);
 
       tem = intern_driver (string, obarray, tem);
     }
@@ -4992,7 +4986,7 @@ static void
 define_symbol (Lisp_Object sym, char const *str)
 {
   ptrdiff_t len = strlen (str);
-  Lisp_Object string = make_pure_c_string (str, len);
+  Lisp_Object string = make_string (str, len);
   init_symbol (sym, string);
 
   /* Qunbound is uninterned, so that it's not confused with any symbol
@@ -5036,8 +5030,7 @@ it defaults to the value of `obarray'.  */)
          xfree (longhand);
        }
       else
-       tem = intern_driver (NILP (Vpurify_flag) ? string : Fpurecopy (string),
-                            obarray, tem);
+       tem = intern_driver (string, obarray, tem);
     }
   return tem;
 }
@@ -5480,7 +5473,7 @@ defsubr (union Aligned_Lisp_Subr *aname)
   set_symbol_function (sym, tem);
 #ifdef HAVE_NATIVE_COMP
   eassert (NILP (Vcomp_abi_hash));
-  Vcomp_subr_list = Fpurecopy (Fcons (tem, Vcomp_subr_list));
+  Vcomp_subr_list = Fcons (tem, Vcomp_subr_list);
 #endif
 }
 
@@ -5866,19 +5859,19 @@ This list includes suffixes for both compiled and source Emacs Lisp files.
 This list should not include the empty string.
 `load' and related functions try to append these suffixes, in order,
 to the specified file name if a suffix is allowed or required.  */);
-  Vload_suffixes = list2 (build_pure_c_string (".elc"),
-                         build_pure_c_string (".el"));
+  Vload_suffixes = list2 (build_string (".elc"),
+                         build_string (".el"));
 #ifdef HAVE_MODULES
-  Vload_suffixes = Fcons (build_pure_c_string (MODULES_SUFFIX), Vload_suffixes);
+  Vload_suffixes = Fcons (build_string (MODULES_SUFFIX), Vload_suffixes);
 #ifdef MODULES_SECONDARY_SUFFIX
   Vload_suffixes =
-    Fcons (build_pure_c_string (MODULES_SECONDARY_SUFFIX), Vload_suffixes);
+    Fcons (build_string (MODULES_SECONDARY_SUFFIX), Vload_suffixes);
 #endif
 #endif
   DEFVAR_LISP ("module-file-suffix", Vmodule_file_suffix,
               doc: /* Suffix of loadable module file, or nil if modules are not supported.  */);
 #ifdef HAVE_MODULES
-  Vmodule_file_suffix = build_pure_c_string (MODULES_SUFFIX);
+  Vmodule_file_suffix = build_string (MODULES_SUFFIX);
 #else
   Vmodule_file_suffix = Qnil;
 #endif
@@ -5888,9 +5881,9 @@ to the specified file name if a suffix is allowed or required.  */);
 
 #ifndef MSDOS
   Vdynamic_library_suffixes
-    = Fcons (build_pure_c_string (DYNAMIC_LIB_SECONDARY_SUFFIX), Qnil);
+    = Fcons (build_string (DYNAMIC_LIB_SECONDARY_SUFFIX), Qnil);
   Vdynamic_library_suffixes
-    = Fcons (build_pure_c_string (DYNAMIC_LIB_SUFFIX),
+    = Fcons (build_string (DYNAMIC_LIB_SUFFIX),
             Vdynamic_library_suffixes);
 #else
   Vdynamic_library_suffixes = Qnil;
@@ -6042,8 +6035,7 @@ from the file, and matches them against this regular expression.
 When the regular expression matches, the file is considered to be safe
 to load.  */);
   Vbytecomp_version_regexp
-    = build_pure_c_string
-        ("^;;;.\\(?:in Emacs version\\|bytecomp version FSF\\)");
+    = build_string ("^;;;.\\(in Emacs version\\|bytecomp version FSF\\)");
 
   DEFSYM (Qlexical_binding, "lexical-binding");
   DEFVAR_LISP ("lexical-binding", Vlexical_binding,
@@ -6113,7 +6105,7 @@ through `require'.  */);
 #if !IEEE_FLOATING_POINT
   for (int negative = 0; negative < 2; negative++)
     {
-      not_a_number[negative] = build_pure_c_string (&"-0.0e+NaN"[!negative]);
+      not_a_number[negative] = build_string (&"-0.0e+NaN"[!negative]);
       staticpro (&not_a_number[negative]);
     }
 #endif
index 7b1ec229601124243b1dcadabf0ccec2956cc4c7..015c899a704b633597a2169f4e98e69420bc67c0 100644 (file)
@@ -4144,8 +4144,6 @@ types.  */)
   calln (intern_c_string ("load--fixup-all-elns"));
 #endif
 
-  check_pure_size ();
-
   /* Clear out any detritus in memory.  */
   do
     {
index 2c87ba8e3268b6e6f5be66ffc45104fbbd772736..73cd6e5695d09750227d67f02bd4da9b211037f3 100644 (file)
@@ -3881,7 +3881,7 @@ syms_of_pgtkfns (void)
                                 GTK_MAJOR_VERSION, GTK_MINOR_VERSION,
                                 GTK_MICRO_VERSION);
     int len = strlen (ver);
-    Vgtk_version_string = make_pure_string (ver, len, len, false);
+    Vgtk_version_string = make_specified_string (ver, len, len, false);
     g_free (ver);
   }
 
@@ -3895,7 +3895,7 @@ syms_of_pgtkfns (void)
                                 CAIRO_VERSION_MAJOR, CAIRO_VERSION_MINOR,
                                 CAIRO_VERSION_MICRO);
     int len = strlen (ver);
-    Vcairo_version_string = make_pure_string (ver, len, len, false);
+    Vcairo_version_string = make_specified_string (ver, len, len, false);
     g_free (ver);
   }
 
index dd85d622a6257b812ee28a06762de424d63ff551..afaab483d57167eff15df09649ab7a52b3a58618 100644 (file)
@@ -7419,7 +7419,7 @@ syms_of_pgtkterm (void)
   DEFSYM (Qlatin_1, "latin-1");
 
   xg_default_icon_file
-    = build_pure_c_string ("icons/hicolor/scalable/apps/emacs.svg");
+    = build_string ("icons/hicolor/scalable/apps/emacs.svg");
   staticpro (&xg_default_icon_file);
 
   DEFSYM (Qx_gtk_map_stock, "x-gtk-map-stock");
index c7473d3111ffb80d5964db01c2cf3a8bf45988a4..807f06f990b9ea0114b508e32eb741da52e3d8df 100644 (file)
@@ -9007,7 +9007,7 @@ sentinel or a process filter function has an error.  */);
    const struct socket_options *sopt;
 
 #define ADD_SUBFEATURE(key, val) \
-  subfeatures = pure_cons (pure_cons (key, pure_cons (val, Qnil)), subfeatures)
+  subfeatures = Fcons (Fcons (key, Fcons (val, Qnil)), subfeatures)
 
    ADD_SUBFEATURE (QCnowait, Qt);
 #ifdef DATAGRAM_SOCKETS
@@ -9029,7 +9029,7 @@ sentinel or a process filter function has an error.  */);
    ADD_SUBFEATURE (QCserver, Qt);
 
    for (sopt = socket_options; sopt->name; sopt++)
-     subfeatures = pure_cons (intern_c_string (sopt->name), subfeatures);
+     subfeatures = Fcons (intern_c_string (sopt->name), subfeatures);
 
    Fprovide (intern_c_string ("make-network-process"), subfeatures);
  }
index f0672fca151a68add63912e32a24cbc40378cb21..4a1a4868a8200f5e7cbd21fdcdc719e89b8d6b05 100644 (file)
@@ -3454,19 +3454,19 @@ syms_of_search (void)
   DEFSYM (Qinvalid_regexp, "invalid-regexp");
 
   Fput (Qsearch_failed, Qerror_conditions,
-       pure_list (Qsearch_failed, Qerror));
+       list (Qsearch_failed, Qerror));
   Fput (Qsearch_failed, Qerror_message,
-       build_pure_c_string ("Search failed"));
+       build_string ("Search failed"));
 
   Fput (Quser_search_failed, Qerror_conditions,
-       pure_list (Quser_search_failed, Quser_error, Qsearch_failed, Qerror));
+       list (Quser_search_failed, Quser_error, Qsearch_failed, Qerror));
   Fput (Quser_search_failed, Qerror_message,
-        build_pure_c_string ("Search failed"));
+        build_string ("Search failed"));
 
   Fput (Qinvalid_regexp, Qerror_conditions,
-       pure_list (Qinvalid_regexp, Qerror));
+       list (Qinvalid_regexp, Qerror));
   Fput (Qinvalid_regexp, Qerror_message,
-       build_pure_c_string ("Invalid regexp"));
+       build_string ("Invalid regexp"));
 
   re_match_object = Qnil;
   staticpro (&re_match_object);
index ec3f1b54c96773ad8cc8e4d6c3c849a38eb9d56d..0de7488d8fdb176ba1096eae5641ed79c7c66f21 100644 (file)
@@ -899,15 +899,15 @@ syms_of_sqlite (void)
 
   DEFSYM (Qsqlite_error, "sqlite-error");
   Fput (Qsqlite_error, Qerror_conditions,
-       Fpurecopy (list2 (Qsqlite_error, Qerror)));
+       list2 (Qsqlite_error, Qerror));
   Fput (Qsqlite_error, Qerror_message,
-       build_pure_c_string ("Database error"));
+       build_string ("Database error"));
 
   DEFSYM (Qsqlite_locked_error, "sqlite-locked-error");
   Fput (Qsqlite_locked_error, Qerror_conditions,
-       Fpurecopy (list3 (Qsqlite_locked_error, Qsqlite_error, Qerror)));
+       list3 (Qsqlite_locked_error, Qsqlite_error, Qerror));
   Fput (Qsqlite_locked_error, Qerror_message,
-       build_pure_c_string ("Database locked"));
+       build_string ("Database locked"));
 
   DEFSYM (Qsqlitep, "sqlitep");
   DEFSYM (Qfalse, "false");
index 6751989bd3b3ddd41bfc9675102a359885dce7c7..fbb5dffcd22cf61976abee3ec2b0438ef17c4e78 100644 (file)
@@ -3679,9 +3679,9 @@ syms_of_syntax (void)
 
   DEFSYM (Qscan_error, "scan-error");
   Fput (Qscan_error, Qerror_conditions,
-       pure_list (Qscan_error, Qerror));
+       list (Qscan_error, Qerror));
   Fput (Qscan_error, Qerror_message,
-       build_pure_c_string ("Scan error"));
+       build_string ("Scan error"));
 
   DEFVAR_BOOL ("parse-sexp-ignore-comments", parse_sexp_ignore_comments,
               doc: /* Non-nil means `forward-sexp', etc., should treat comments as whitespace.  */);
index 2c14f965c2d29ec740bb06a7afb57255a6fb0e63..62606d99749646648dbba71517cce4dca6d2ca37 100644 (file)
@@ -4481,43 +4481,43 @@ applies to LANGUAGE-A will be redirected to LANGUAGE-B instead.  */);
   Fmake_variable_buffer_local (Qtreesit_language_remap_alist);
 
   staticpro (&Vtreesit_str_libtree_sitter);
-  Vtreesit_str_libtree_sitter = build_pure_c_string ("libtree-sitter-");
+  Vtreesit_str_libtree_sitter = build_string ("libtree-sitter-");
   staticpro (&Vtreesit_str_tree_sitter);
-  Vtreesit_str_tree_sitter = build_pure_c_string ("tree-sitter-");
+  Vtreesit_str_tree_sitter = build_string ("tree-sitter-");
 #ifndef WINDOWSNT
   staticpro (&Vtreesit_str_dot_0);
-  Vtreesit_str_dot_0 = build_pure_c_string (".0");
+  Vtreesit_str_dot_0 = build_string (".0");
 #endif
   staticpro (&Vtreesit_str_dot);
-  Vtreesit_str_dot = build_pure_c_string (".");
+  Vtreesit_str_dot = build_string (".");
   staticpro (&Vtreesit_str_question_mark);
-  Vtreesit_str_question_mark = build_pure_c_string ("?");
+  Vtreesit_str_question_mark = build_string ("?");
   staticpro (&Vtreesit_str_star);
-  Vtreesit_str_star = build_pure_c_string ("*");
+  Vtreesit_str_star = build_string ("*");
   staticpro (&Vtreesit_str_plus);
-  Vtreesit_str_plus = build_pure_c_string ("+");
+  Vtreesit_str_plus = build_string ("+");
   staticpro (&Vtreesit_str_pound_equal);
-  Vtreesit_str_pound_equal = build_pure_c_string ("#equal");
+  Vtreesit_str_pound_equal = build_string ("#equal");
   staticpro (&Vtreesit_str_pound_match);
-  Vtreesit_str_pound_match = build_pure_c_string ("#match");
+  Vtreesit_str_pound_match = build_string ("#match");
   staticpro (&Vtreesit_str_pound_pred);
-  Vtreesit_str_pound_pred = build_pure_c_string ("#pred");
+  Vtreesit_str_pound_pred = build_string ("#pred");
   staticpro (&Vtreesit_str_open_bracket);
-  Vtreesit_str_open_bracket = build_pure_c_string ("[");
+  Vtreesit_str_open_bracket = build_string ("[");
   staticpro (&Vtreesit_str_close_bracket);
-  Vtreesit_str_close_bracket = build_pure_c_string ("]");
+  Vtreesit_str_close_bracket = build_string ("]");
   staticpro (&Vtreesit_str_open_paren);
-  Vtreesit_str_open_paren = build_pure_c_string ("(");
+  Vtreesit_str_open_paren = build_string ("(");
   staticpro (&Vtreesit_str_close_paren);
-  Vtreesit_str_close_paren = build_pure_c_string (")");
+  Vtreesit_str_close_paren = build_string (")");
   staticpro (&Vtreesit_str_space);
-  Vtreesit_str_space = build_pure_c_string (" ");
+  Vtreesit_str_space = build_string (" ");
   staticpro (&Vtreesit_str_equal);
-  Vtreesit_str_equal = build_pure_c_string ("equal");
+  Vtreesit_str_equal = build_string ("equal");
   staticpro (&Vtreesit_str_match);
-  Vtreesit_str_match = build_pure_c_string ("match");
+  Vtreesit_str_match = build_string ("match");
   staticpro (&Vtreesit_str_pred);
-  Vtreesit_str_pred = build_pure_c_string ("pred");
+  Vtreesit_str_pred = build_string ("pred");
 
   defsubr (&Streesit_language_available_p);
   defsubr (&Streesit_library_abi_version);
index 225a3a0999e330864686f247d389f5dd5f72113a..89a4d46240aea59c5d69f7b1ff109d9ba11c9326 100644 (file)
@@ -11064,9 +11064,9 @@ syms_of_w32fns (void)
   DEFSYM (Qjson, "json");
 
   Fput (Qundefined_color, Qerror_conditions,
-       pure_list (Qundefined_color, Qerror));
+       list (Qundefined_color, Qerror));
   Fput (Qundefined_color, Qerror_message,
-       build_pure_c_string ("Undefined color"));
+       build_string ("Undefined color"));
 
   staticpro (&w32_grabbed_keys);
   w32_grabbed_keys = Qnil;
index bbb21c2e061001ce25485382005931992b2e8ec1..738ffa274422c519dae7adc9f4d7ff55583f4324 100644 (file)
@@ -37675,7 +37675,7 @@ See also `overlay-arrow-string'.  */);
   DEFVAR_LISP ("overlay-arrow-string", Voverlay_arrow_string,
     doc: /* String to display as an arrow in text-mode frames.
 See also `overlay-arrow-position'.  */);
-  Voverlay_arrow_string = build_pure_c_string ("=>");
+  Voverlay_arrow_string = build_string ("=>");
 
   DEFVAR_LISP ("overlay-arrow-variable-list", Voverlay_arrow_variable_list,
     doc: /* List of variables (symbols) which hold markers for overlay arrows.
@@ -37808,17 +37808,17 @@ as `mode-line-format' (which see), and is used only on frames
 for which no explicit name has been set \(see `modify-frame-parameters').
 If the value is t, that means use `frame-title-format' for
 iconified frames.  */);
-  /* Do not nest calls to pure_list.  This works around a bug in
+  /* Do not nest calls to list.  This works around a bug in
      Oracle Developer Studio 12.6.  */
   Lisp_Object icon_title_name_format
-    = pure_list (empty_unibyte_string,
-                build_pure_c_string ("%b - GNU Emacs at "),
-                intern_c_string ("system-name"));
+    = list (empty_unibyte_string,
+           build_string ("%b - GNU Emacs at "),
+           intern_c_string ("system-name"));
   Vicon_title_format
     = Vframe_title_format
-    = pure_list (intern_c_string ("multiple-frames"),
-                build_pure_c_string ("%b"),
-                icon_title_name_format);
+    = list (intern_c_string ("multiple-frames"),
+           build_string ("%b"),
+           icon_title_name_format);
 
   DEFVAR_LISP ("message-log-max", Vmessage_log_max,
     doc: /* Maximum number of lines to keep in the message log buffer.
index e9500b98524b7896fb802270f9f985bdcdc46f9c..602f551252e89a4b33ee087a160f81ef2216ecf5 100644 (file)
@@ -7544,7 +7544,7 @@ only for this purpose.  */);
 This stipple pattern is used on monochrome displays
 instead of shades of gray for a face background color.
 See `set-face-stipple' for possible values for this variable.  */);
-  Vface_default_stipple = build_pure_c_string ("gray3");
+  Vface_default_stipple = build_string ("gray3");
 
   DEFVAR_LISP ("tty-defined-color-alist", Vtty_defined_color_alist,
    doc: /* An alist of defined terminal colors and their RGB values.
index f0207ebbceefdab257c4372aa70ff9eb3a2d7021..ec7d54180e4c67732c8fa76fb37ddc48af76dd80 100644 (file)
@@ -10253,9 +10253,9 @@ syms_of_xfns (void)
   DEFSYM (QXdndActionPrivate, "XdndActionPrivate");
 
   Fput (Qundefined_color, Qerror_conditions,
-       pure_list (Qundefined_color, Qerror));
+       list (Qundefined_color, Qerror));
   Fput (Qundefined_color, Qerror_message,
-       build_pure_c_string ("Undefined color"));
+       build_string ("Undefined color"));
 
   DEFVAR_LISP ("x-pointer-shape", Vx_pointer_shape,
     doc: /* The shape of the pointer when over text.
@@ -10482,7 +10482,7 @@ eliminated in future versions of Emacs.  */);
     char gtk_version[sizeof ".." + 3 * INT_STRLEN_BOUND (int)];
     int len = sprintf (gtk_version, "%d.%d.%d",
                       GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION);
-    Vgtk_version_string = make_pure_string (gtk_version, len, len, false);
+    Vgtk_version_string = make_specified_string (gtk_version, len, len, false);
   }
 #endif /* USE_GTK */
 
@@ -10496,7 +10496,8 @@ eliminated in future versions of Emacs.  */);
     int len = sprintf (cairo_version, "%d.%d.%d",
                       CAIRO_VERSION_MAJOR, CAIRO_VERSION_MINOR,
                        CAIRO_VERSION_MICRO);
-    Vcairo_version_string = make_pure_string (cairo_version, len, len, false);
+    Vcairo_version_string = make_specified_string (cairo_version, len, len,
+                                                  false);
   }
 #endif
 
index 459c5158d80fbe65707f7fbf4fd1a3ea4993f4fb..d18106d99367ca4c082586eae6960818c253ad8e 100644 (file)
@@ -810,7 +810,7 @@ do not actually have glyphs with colors that can cause Xft crashes.
 
 The font families in this list will not be ignored when
 `xft-ignore-color-fonts' is non-nil.  */);
-  Vxft_color_font_whitelist = list1 (build_pure_c_string ("Source Code Pro"));
+  Vxft_color_font_whitelist = list1 (build_string ("Source Code Pro"));
 
   pdumper_do_now_and_after_load (syms_of_xftfont_for_pdumper);
 }
index e024b36daf517641d14f9ea6bb3ae79926da31b4..5159aed495cbea3c8e78411fae7cb96ad2895764 100644 (file)
@@ -32587,7 +32587,7 @@ syms_of_xterm (void)
   DEFSYM (Qwheel_right, "wheel-right");
 
 #ifdef USE_GTK
-  xg_default_icon_file = build_pure_c_string ("icons/hicolor/scalable/apps/emacs.svg");
+  xg_default_icon_file = build_string ("icons/hicolor/scalable/apps/emacs.svg");
   staticpro (&xg_default_icon_file);
 
   DEFSYM (Qx_gtk_map_stock, "x-gtk-map-stock");