comparison src/lread.c @ 105877:21bdda3ded62

* xterm.c (syms_of_xterm): * xselect.c (syms_of_xselect): * xmenu.c (syms_of_xmenu): * xfns.c (syms_of_xfns): * xfaces.c (syms_of_xfaces): * xdisp.c (syms_of_xdisp): * window.c (syms_of_window): * w32fns.c (syms_of_w32fns): * undo.c (syms_of_undo): * textprop.c (syms_of_textprop): * terminal.c (syms_of_terminal): * syntax.c (syms_of_syntax): * sound.c (syms_of_sound): * search.c (syms_of_search): * print.c (syms_of_print): * minibuf.c (syms_of_minibuf): * macros.c (syms_of_macros): * keymap.c (syms_of_keymap, initial_define_key) (initial_define_lispy_key): * keyboard.c (syms_of_keyboard): * insdel.c (syms_of_insdel): * image.c (syms_of_image): * fringe.c (syms_of_fringe): * frame.c (syms_of_frame): * fontset.c (syms_of_fontset): * fns.c (syms_of_fns): * fns.c (syms_of_fns): * fileio.c (syms_of_fileio): * fileio.c (syms_of_fileio): * eval.c (syms_of_eval): * doc.c (syms_of_doc): * dispnew.c (syms_of_display): * dired.c (syms_of_dired): * dbusbind.c (syms_of_dbusbind): * data.c (syms_of_data): * composite.c (syms_of_composite): * coding.c (syms_of_coding): * cmds.c (syms_of_cmds): * charset.c (define_charset_internal, syms_of_character): * ccl.c (syms_of_ccl): * category.c (syms_of_category, init_category_once): * casetab.c (syms_of_casetab): * casefiddle.c (syms_of_casefiddle): * callint.c (syms_of_callint): * bytecode.c (syms_of_bytecode): * buffer.c (keys_of_buffer, syms_of_buffer): * alloc.c (syms_of_alloc): * process.c (syms_of_process, init_process): * lread.c (syms_of_lread, init_obarray): * font.c (build_style_table): * emacs.c (syms_of_emacs, main): Replace calls to intern with intern_c_string, calls to make_pure_string with make_pure_c_string. Use pure_cons instead of Fcons. * process.c (socket_options): Make it const. (set_socket_option, init_process): Use a const pointer. * lread.c (intern_c_string): New function. (defvar_kboard, defvar_lisp, defvar_lisp_nopro, defvar_bool) (defvar_int): Uset it. Make the name const char*. * font.c (struct table_entry): Remove unused member. Make NAMES constant. (weight_table, slant_table, width_table): Make constant. * emacs.c (struct standard_args): Make name and longname constant.
author Dan Nicolaescu <dann@ics.uci.edu>
date Fri, 06 Nov 2009 06:50:52 +0000
parents 89183b6f6e9d
children 5fc80e6b5b7c
comparison
equal deleted inserted replaced
105876:c5c76c2da5ee 105877:21bdda3ded62
3915 int hash; 3915 int hash;
3916 Lisp_Object *tem; 3916 Lisp_Object *tem;
3917 3917
3918 XSETFASTINT (oblength, OBARRAY_SIZE); 3918 XSETFASTINT (oblength, OBARRAY_SIZE);
3919 3919
3920 Qnil = Fmake_symbol (make_pure_string ("nil", 3, 3, 0)); 3920 Qnil = Fmake_symbol (make_pure_c_string ("nil"));
3921 Vobarray = Fmake_vector (oblength, make_number (0)); 3921 Vobarray = Fmake_vector (oblength, make_number (0));
3922 initial_obarray = Vobarray; 3922 initial_obarray = Vobarray;
3923 staticpro (&initial_obarray); 3923 staticpro (&initial_obarray);
3924 /* Intern nil in the obarray */ 3924 /* Intern nil in the obarray */
3925 XSYMBOL (Qnil)->interned = SYMBOL_INTERNED_IN_INITIAL_OBARRAY; 3925 XSYMBOL (Qnil)->interned = SYMBOL_INTERNED_IN_INITIAL_OBARRAY;
3930 /* Separate statement here to avoid VAXC bug. */ 3930 /* Separate statement here to avoid VAXC bug. */
3931 hash %= OBARRAY_SIZE; 3931 hash %= OBARRAY_SIZE;
3932 tem = &XVECTOR (Vobarray)->contents[hash]; 3932 tem = &XVECTOR (Vobarray)->contents[hash];
3933 *tem = Qnil; 3933 *tem = Qnil;
3934 3934
3935 Qunbound = Fmake_symbol (make_pure_string ("unbound", 7, 7, 0)); 3935 Qunbound = Fmake_symbol (make_pure_c_string ("unbound"));
3936 XSYMBOL (Qnil)->function = Qunbound; 3936 XSYMBOL (Qnil)->function = Qunbound;
3937 XSYMBOL (Qunbound)->value = Qunbound; 3937 XSYMBOL (Qunbound)->value = Qunbound;
3938 XSYMBOL (Qunbound)->function = Qunbound; 3938 XSYMBOL (Qunbound)->function = Qunbound;
3939 3939
3940 Qt = intern ("t"); 3940 Qt = intern_c_string ("t");
3941 XSYMBOL (Qnil)->value = Qnil; 3941 XSYMBOL (Qnil)->value = Qnil;
3942 XSYMBOL (Qnil)->plist = Qnil; 3942 XSYMBOL (Qnil)->plist = Qnil;
3943 XSYMBOL (Qt)->value = Qt; 3943 XSYMBOL (Qt)->value = Qt;
3944 XSYMBOL (Qt)->constant = 1; 3944 XSYMBOL (Qt)->constant = 1;
3945 3945
3946 /* Qt is correct even if CANNOT_DUMP. loadup.el will set to nil at end. */ 3946 /* Qt is correct even if CANNOT_DUMP. loadup.el will set to nil at end. */
3947 Vpurify_flag = Qt; 3947 Vpurify_flag = Qt;
3948 3948
3949 Qvariable_documentation = intern ("variable-documentation"); 3949 Qvariable_documentation = intern_c_string ("variable-documentation");
3950 staticpro (&Qvariable_documentation); 3950 staticpro (&Qvariable_documentation);
3951 3951
3952 read_buffer_size = 100 + MAX_MULTIBYTE_LENGTH; 3952 read_buffer_size = 100 + MAX_MULTIBYTE_LENGTH;
3953 read_buffer = (char *) xmalloc (read_buffer_size); 3953 read_buffer = (char *) xmalloc (read_buffer_size);
3954 } 3954 }
3956 void 3956 void
3957 defsubr (sname) 3957 defsubr (sname)
3958 struct Lisp_Subr *sname; 3958 struct Lisp_Subr *sname;
3959 { 3959 {
3960 Lisp_Object sym; 3960 Lisp_Object sym;
3961 sym = intern (sname->symbol_name); 3961 sym = intern_c_string (sname->symbol_name);
3962 XSETPVECTYPE (sname, PVEC_SUBR); 3962 XSETPVECTYPE (sname, PVEC_SUBR);
3963 XSETSUBR (XSYMBOL (sym)->function, sname); 3963 XSETSUBR (XSYMBOL (sym)->function, sname);
3964 } 3964 }
3965 3965
3966 #ifdef NOTDEF /* use fset in subr.el now */ 3966 #ifdef NOTDEF /* use fset in subr.el now */
4347 customize `jka-compr-load-suffixes' rather than the present variable. */); 4347 customize `jka-compr-load-suffixes' rather than the present variable. */);
4348 Vload_file_rep_suffixes = Fcons (empty_unibyte_string, Qnil); 4348 Vload_file_rep_suffixes = Fcons (empty_unibyte_string, Qnil);
4349 4349
4350 DEFVAR_BOOL ("load-in-progress", &load_in_progress, 4350 DEFVAR_BOOL ("load-in-progress", &load_in_progress,
4351 doc: /* Non-nil if inside of `load'. */); 4351 doc: /* Non-nil if inside of `load'. */);
4352 Qload_in_progress = intern ("load-in-progress"); 4352 Qload_in_progress = intern_c_string ("load-in-progress");
4353 staticpro (&Qload_in_progress); 4353 staticpro (&Qload_in_progress);
4354 4354
4355 DEFVAR_LISP ("after-load-alist", &Vafter_load_alist, 4355 DEFVAR_LISP ("after-load-alist", &Vafter_load_alist,
4356 doc: /* An alist of expressions to be evalled when particular files are loaded. 4356 doc: /* An alist of expressions to be evalled when particular files are loaded.
4357 Each element looks like (REGEXP-OR-FEATURE FORMS...). 4357 Each element looks like (REGEXP-OR-FEATURE FORMS...).
4461 When Emacs loads a compiled Lisp file, it reads the first 512 bytes 4461 When Emacs loads a compiled Lisp file, it reads the first 512 bytes
4462 from the file, and matches them against this regular expression. 4462 from the file, and matches them against this regular expression.
4463 When the regular expression matches, the file is considered to be safe 4463 When the regular expression matches, the file is considered to be safe
4464 to load. See also `load-dangerous-libraries'. */); 4464 to load. See also `load-dangerous-libraries'. */);
4465 Vbytecomp_version_regexp 4465 Vbytecomp_version_regexp
4466 = build_string ("^;;;.\\(in Emacs version\\|bytecomp version FSF\\)"); 4466 = make_pure_c_string ("^;;;.\\(in Emacs version\\|bytecomp version FSF\\)");
4467 4467
4468 DEFVAR_LISP ("eval-buffer-list", &Veval_buffer_list, 4468 DEFVAR_LISP ("eval-buffer-list", &Veval_buffer_list,
4469 doc: /* List of buffers being read from by calls to `eval-buffer' and `eval-region'. */); 4469 doc: /* List of buffers being read from by calls to `eval-buffer' and `eval-region'. */);
4470 Veval_buffer_list = Qnil; 4470 Veval_buffer_list = Qnil;
4471 4471
4472 DEFVAR_LISP ("old-style-backquotes", &Vold_style_backquotes, 4472 DEFVAR_LISP ("old-style-backquotes", &Vold_style_backquotes,
4473 doc: /* Set to non-nil when `read' encounters an old-style backquote. */); 4473 doc: /* Set to non-nil when `read' encounters an old-style backquote. */);
4474 Vold_style_backquotes = Qnil; 4474 Vold_style_backquotes = Qnil;
4475 Qold_style_backquotes = intern ("old-style-backquotes"); 4475 Qold_style_backquotes = intern_c_string ("old-style-backquotes");
4476 staticpro (&Qold_style_backquotes); 4476 staticpro (&Qold_style_backquotes);
4477 4477
4478 /* Vsource_directory was initialized in init_lread. */ 4478 /* Vsource_directory was initialized in init_lread. */
4479 4479
4480 load_descriptor_list = Qnil; 4480 load_descriptor_list = Qnil;
4481 staticpro (&load_descriptor_list); 4481 staticpro (&load_descriptor_list);
4482 4482
4483 Qcurrent_load_list = intern ("current-load-list"); 4483 Qcurrent_load_list = intern_c_string ("current-load-list");
4484 staticpro (&Qcurrent_load_list); 4484 staticpro (&Qcurrent_load_list);
4485 4485
4486 Qstandard_input = intern ("standard-input"); 4486 Qstandard_input = intern_c_string ("standard-input");
4487 staticpro (&Qstandard_input); 4487 staticpro (&Qstandard_input);
4488 4488
4489 Qread_char = intern ("read-char"); 4489 Qread_char = intern_c_string ("read-char");
4490 staticpro (&Qread_char); 4490 staticpro (&Qread_char);
4491 4491
4492 Qget_file_char = intern ("get-file-char"); 4492 Qget_file_char = intern_c_string ("get-file-char");
4493 staticpro (&Qget_file_char); 4493 staticpro (&Qget_file_char);
4494 4494
4495 Qget_emacs_mule_file_char = intern ("get-emacs-mule-file-char"); 4495 Qget_emacs_mule_file_char = intern_c_string ("get-emacs-mule-file-char");
4496 staticpro (&Qget_emacs_mule_file_char); 4496 staticpro (&Qget_emacs_mule_file_char);
4497 4497
4498 Qload_force_doc_strings = intern ("load-force-doc-strings"); 4498 Qload_force_doc_strings = intern_c_string ("load-force-doc-strings");
4499 staticpro (&Qload_force_doc_strings); 4499 staticpro (&Qload_force_doc_strings);
4500 4500
4501 Qbackquote = intern ("`"); 4501 Qbackquote = intern_c_string ("`");
4502 staticpro (&Qbackquote); 4502 staticpro (&Qbackquote);
4503 Qcomma = intern (","); 4503 Qcomma = intern_c_string (",");
4504 staticpro (&Qcomma); 4504 staticpro (&Qcomma);
4505 Qcomma_at = intern (",@"); 4505 Qcomma_at = intern_c_string (",@");
4506 staticpro (&Qcomma_at); 4506 staticpro (&Qcomma_at);
4507 Qcomma_dot = intern (",."); 4507 Qcomma_dot = intern_c_string (",.");
4508 staticpro (&Qcomma_dot); 4508 staticpro (&Qcomma_dot);
4509 4509
4510 Qinhibit_file_name_operation = intern ("inhibit-file-name-operation"); 4510 Qinhibit_file_name_operation = intern_c_string ("inhibit-file-name-operation");
4511 staticpro (&Qinhibit_file_name_operation); 4511 staticpro (&Qinhibit_file_name_operation);
4512 4512
4513 Qascii_character = intern ("ascii-character"); 4513 Qascii_character = intern_c_string ("ascii-character");
4514 staticpro (&Qascii_character); 4514 staticpro (&Qascii_character);
4515 4515
4516 Qfunction = intern ("function"); 4516 Qfunction = intern_c_string ("function");
4517 staticpro (&Qfunction); 4517 staticpro (&Qfunction);
4518 4518
4519 Qload = intern ("load"); 4519 Qload = intern_c_string ("load");
4520 staticpro (&Qload); 4520 staticpro (&Qload);
4521 4521
4522 Qload_file_name = intern ("load-file-name"); 4522 Qload_file_name = intern_c_string ("load-file-name");
4523 staticpro (&Qload_file_name); 4523 staticpro (&Qload_file_name);
4524 4524
4525 Qeval_buffer_list = intern ("eval-buffer-list"); 4525 Qeval_buffer_list = intern_c_string ("eval-buffer-list");
4526 staticpro (&Qeval_buffer_list); 4526 staticpro (&Qeval_buffer_list);
4527 4527
4528 Qfile_truename = intern ("file-truename"); 4528 Qfile_truename = intern_c_string ("file-truename");
4529 staticpro (&Qfile_truename) ; 4529 staticpro (&Qfile_truename) ;
4530 4530
4531 Qdo_after_load_evaluation = intern ("do-after-load-evaluation"); 4531 Qdo_after_load_evaluation = intern_c_string ("do-after-load-evaluation");
4532 staticpro (&Qdo_after_load_evaluation) ; 4532 staticpro (&Qdo_after_load_evaluation) ;
4533 4533
4534 staticpro (&dump_path); 4534 staticpro (&dump_path);
4535 4535
4536 staticpro (&read_objects); 4536 staticpro (&read_objects);
4539 seen_list = Qnil; 4539 seen_list = Qnil;
4540 4540
4541 Vloads_in_progress = Qnil; 4541 Vloads_in_progress = Qnil;
4542 staticpro (&Vloads_in_progress); 4542 staticpro (&Vloads_in_progress);
4543 4543
4544 Qhash_table = intern ("hash-table"); 4544 Qhash_table = intern_c_string ("hash-table");
4545 staticpro (&Qhash_table); 4545 staticpro (&Qhash_table);
4546 Qdata = intern ("data"); 4546 Qdata = intern_c_string ("data");
4547 staticpro (&Qdata); 4547 staticpro (&Qdata);
4548 Qtest = intern ("test"); 4548 Qtest = intern_c_string ("test");
4549 staticpro (&Qtest); 4549 staticpro (&Qtest);
4550 Qsize = intern ("size"); 4550 Qsize = intern_c_string ("size");
4551 staticpro (&Qsize); 4551 staticpro (&Qsize);
4552 Qweakness = intern ("weakness"); 4552 Qweakness = intern_c_string ("weakness");
4553 staticpro (&Qweakness); 4553 staticpro (&Qweakness);
4554 Qrehash_size = intern ("rehash-size"); 4554 Qrehash_size = intern_c_string ("rehash-size");
4555 staticpro (&Qrehash_size); 4555 staticpro (&Qrehash_size);
4556 Qrehash_threshold = intern ("rehash-threshold"); 4556 Qrehash_threshold = intern_c_string ("rehash-threshold");
4557 staticpro (&Qrehash_threshold); 4557 staticpro (&Qrehash_threshold);
4558 } 4558 }
4559 4559
4560 /* arch-tag: a0d02733-0f96-4844-a659-9fd53c4f414d 4560 /* arch-tag: a0d02733-0f96-4844-a659-9fd53c4f414d
4561 (do not change this comment) */ 4561 (do not change this comment) */