Mercurial > emacs
comparison src/fileio.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 | b2666b729b94 |
children | ba3ffbd9c422 |
comparison
equal
deleted
inserted
replaced
105876:c5c76c2da5ee | 105877:21bdda3ded62 |
---|---|
5459 | 5459 |
5460 | 5460 |
5461 void | 5461 void |
5462 syms_of_fileio () | 5462 syms_of_fileio () |
5463 { | 5463 { |
5464 Qoperations = intern ("operations"); | 5464 Qoperations = intern_c_string ("operations"); |
5465 Qexpand_file_name = intern ("expand-file-name"); | 5465 Qexpand_file_name = intern_c_string ("expand-file-name"); |
5466 Qsubstitute_in_file_name = intern ("substitute-in-file-name"); | 5466 Qsubstitute_in_file_name = intern_c_string ("substitute-in-file-name"); |
5467 Qdirectory_file_name = intern ("directory-file-name"); | 5467 Qdirectory_file_name = intern_c_string ("directory-file-name"); |
5468 Qfile_name_directory = intern ("file-name-directory"); | 5468 Qfile_name_directory = intern_c_string ("file-name-directory"); |
5469 Qfile_name_nondirectory = intern ("file-name-nondirectory"); | 5469 Qfile_name_nondirectory = intern_c_string ("file-name-nondirectory"); |
5470 Qunhandled_file_name_directory = intern ("unhandled-file-name-directory"); | 5470 Qunhandled_file_name_directory = intern_c_string ("unhandled-file-name-directory"); |
5471 Qfile_name_as_directory = intern ("file-name-as-directory"); | 5471 Qfile_name_as_directory = intern_c_string ("file-name-as-directory"); |
5472 Qcopy_file = intern ("copy-file"); | 5472 Qcopy_file = intern_c_string ("copy-file"); |
5473 Qmake_directory_internal = intern ("make-directory-internal"); | 5473 Qmake_directory_internal = intern_c_string ("make-directory-internal"); |
5474 Qmake_directory = intern ("make-directory"); | 5474 Qmake_directory = intern_c_string ("make-directory"); |
5475 Qdelete_directory_internal = intern ("delete-directory-internal"); | 5475 Qdelete_directory_internal = intern_c_string ("delete-directory-internal"); |
5476 Qdelete_file = intern ("delete-file"); | 5476 Qdelete_file = intern_c_string ("delete-file"); |
5477 Qrename_file = intern ("rename-file"); | 5477 Qrename_file = intern_c_string ("rename-file"); |
5478 Qadd_name_to_file = intern ("add-name-to-file"); | 5478 Qadd_name_to_file = intern_c_string ("add-name-to-file"); |
5479 Qmake_symbolic_link = intern ("make-symbolic-link"); | 5479 Qmake_symbolic_link = intern_c_string ("make-symbolic-link"); |
5480 Qfile_exists_p = intern ("file-exists-p"); | 5480 Qfile_exists_p = intern_c_string ("file-exists-p"); |
5481 Qfile_executable_p = intern ("file-executable-p"); | 5481 Qfile_executable_p = intern_c_string ("file-executable-p"); |
5482 Qfile_readable_p = intern ("file-readable-p"); | 5482 Qfile_readable_p = intern_c_string ("file-readable-p"); |
5483 Qfile_writable_p = intern ("file-writable-p"); | 5483 Qfile_writable_p = intern_c_string ("file-writable-p"); |
5484 Qfile_symlink_p = intern ("file-symlink-p"); | 5484 Qfile_symlink_p = intern_c_string ("file-symlink-p"); |
5485 Qaccess_file = intern ("access-file"); | 5485 Qaccess_file = intern_c_string ("access-file"); |
5486 Qfile_directory_p = intern ("file-directory-p"); | 5486 Qfile_directory_p = intern_c_string ("file-directory-p"); |
5487 Qfile_regular_p = intern ("file-regular-p"); | 5487 Qfile_regular_p = intern_c_string ("file-regular-p"); |
5488 Qfile_accessible_directory_p = intern ("file-accessible-directory-p"); | 5488 Qfile_accessible_directory_p = intern_c_string ("file-accessible-directory-p"); |
5489 Qfile_modes = intern ("file-modes"); | 5489 Qfile_modes = intern_c_string ("file-modes"); |
5490 Qset_file_modes = intern ("set-file-modes"); | 5490 Qset_file_modes = intern_c_string ("set-file-modes"); |
5491 Qset_file_times = intern ("set-file-times"); | 5491 Qset_file_times = intern_c_string ("set-file-times"); |
5492 Qfile_newer_than_file_p = intern ("file-newer-than-file-p"); | 5492 Qfile_newer_than_file_p = intern_c_string ("file-newer-than-file-p"); |
5493 Qinsert_file_contents = intern ("insert-file-contents"); | 5493 Qinsert_file_contents = intern_c_string ("insert-file-contents"); |
5494 Qwrite_region = intern ("write-region"); | 5494 Qwrite_region = intern_c_string ("write-region"); |
5495 Qverify_visited_file_modtime = intern ("verify-visited-file-modtime"); | 5495 Qverify_visited_file_modtime = intern_c_string ("verify-visited-file-modtime"); |
5496 Qset_visited_file_modtime = intern ("set-visited-file-modtime"); | 5496 Qset_visited_file_modtime = intern_c_string ("set-visited-file-modtime"); |
5497 Qauto_save_coding = intern ("auto-save-coding"); | 5497 Qauto_save_coding = intern_c_string ("auto-save-coding"); |
5498 | 5498 |
5499 staticpro (&Qoperations); | 5499 staticpro (&Qoperations); |
5500 staticpro (&Qexpand_file_name); | 5500 staticpro (&Qexpand_file_name); |
5501 staticpro (&Qsubstitute_in_file_name); | 5501 staticpro (&Qsubstitute_in_file_name); |
5502 staticpro (&Qdirectory_file_name); | 5502 staticpro (&Qdirectory_file_name); |
5529 staticpro (&Qwrite_region); | 5529 staticpro (&Qwrite_region); |
5530 staticpro (&Qverify_visited_file_modtime); | 5530 staticpro (&Qverify_visited_file_modtime); |
5531 staticpro (&Qset_visited_file_modtime); | 5531 staticpro (&Qset_visited_file_modtime); |
5532 staticpro (&Qauto_save_coding); | 5532 staticpro (&Qauto_save_coding); |
5533 | 5533 |
5534 Qfile_name_history = intern ("file-name-history"); | 5534 Qfile_name_history = intern_c_string ("file-name-history"); |
5535 Fset (Qfile_name_history, Qnil); | 5535 Fset (Qfile_name_history, Qnil); |
5536 staticpro (&Qfile_name_history); | 5536 staticpro (&Qfile_name_history); |
5537 | 5537 |
5538 Qfile_error = intern ("file-error"); | 5538 Qfile_error = intern_c_string ("file-error"); |
5539 staticpro (&Qfile_error); | 5539 staticpro (&Qfile_error); |
5540 Qfile_already_exists = intern ("file-already-exists"); | 5540 Qfile_already_exists = intern_c_string ("file-already-exists"); |
5541 staticpro (&Qfile_already_exists); | 5541 staticpro (&Qfile_already_exists); |
5542 Qfile_date_error = intern ("file-date-error"); | 5542 Qfile_date_error = intern_c_string ("file-date-error"); |
5543 staticpro (&Qfile_date_error); | 5543 staticpro (&Qfile_date_error); |
5544 Qexcl = intern ("excl"); | 5544 Qexcl = intern_c_string ("excl"); |
5545 staticpro (&Qexcl); | 5545 staticpro (&Qexcl); |
5546 | 5546 |
5547 #ifdef DOS_NT | 5547 #ifdef DOS_NT |
5548 Qfind_buffer_file_type = intern ("find-buffer-file-type"); | 5548 Qfind_buffer_file_type = intern_c_string ("find-buffer-file-type"); |
5549 staticpro (&Qfind_buffer_file_type); | 5549 staticpro (&Qfind_buffer_file_type); |
5550 #endif /* DOS_NT */ | 5550 #endif /* DOS_NT */ |
5551 | 5551 |
5552 DEFVAR_LISP ("file-name-coding-system", &Vfile_name_coding_system, | 5552 DEFVAR_LISP ("file-name-coding-system", &Vfile_name_coding_system, |
5553 doc: /* *Coding system for encoding file names. | 5553 doc: /* *Coding system for encoding file names. |
5563 User should not set this variable manually, | 5563 User should not set this variable manually, |
5564 instead use `file-name-coding-system' to get a constant encoding | 5564 instead use `file-name-coding-system' to get a constant encoding |
5565 of file names regardless of the current language environment. */); | 5565 of file names regardless of the current language environment. */); |
5566 Vdefault_file_name_coding_system = Qnil; | 5566 Vdefault_file_name_coding_system = Qnil; |
5567 | 5567 |
5568 Qformat_decode = intern ("format-decode"); | 5568 Qformat_decode = intern_c_string ("format-decode"); |
5569 staticpro (&Qformat_decode); | 5569 staticpro (&Qformat_decode); |
5570 Qformat_annotate_function = intern ("format-annotate-function"); | 5570 Qformat_annotate_function = intern_c_string ("format-annotate-function"); |
5571 staticpro (&Qformat_annotate_function); | 5571 staticpro (&Qformat_annotate_function); |
5572 Qafter_insert_file_set_coding = intern ("after-insert-file-set-coding"); | 5572 Qafter_insert_file_set_coding = intern_c_string ("after-insert-file-set-coding"); |
5573 staticpro (&Qafter_insert_file_set_coding); | 5573 staticpro (&Qafter_insert_file_set_coding); |
5574 | 5574 |
5575 Qcar_less_than_car = intern ("car-less-than-car"); | 5575 Qcar_less_than_car = intern_c_string ("car-less-than-car"); |
5576 staticpro (&Qcar_less_than_car); | 5576 staticpro (&Qcar_less_than_car); |
5577 | 5577 |
5578 Fput (Qfile_error, Qerror_conditions, | 5578 Fput (Qfile_error, Qerror_conditions, |
5579 list2 (Qfile_error, Qerror)); | 5579 Fpurecopy (list2 (Qfile_error, Qerror))); |
5580 Fput (Qfile_error, Qerror_message, | 5580 Fput (Qfile_error, Qerror_message, |
5581 build_string ("File error")); | 5581 make_pure_c_string ("File error")); |
5582 | 5582 |
5583 Fput (Qfile_already_exists, Qerror_conditions, | 5583 Fput (Qfile_already_exists, Qerror_conditions, |
5584 list3 (Qfile_already_exists, Qfile_error, Qerror)); | 5584 Fpurecopy (list3 (Qfile_already_exists, Qfile_error, Qerror))); |
5585 Fput (Qfile_already_exists, Qerror_message, | 5585 Fput (Qfile_already_exists, Qerror_message, |
5586 build_string ("File already exists")); | 5586 make_pure_c_string ("File already exists")); |
5587 | 5587 |
5588 Fput (Qfile_date_error, Qerror_conditions, | 5588 Fput (Qfile_date_error, Qerror_conditions, |
5589 list3 (Qfile_date_error, Qfile_error, Qerror)); | 5589 Fpurecopy (list3 (Qfile_date_error, Qfile_error, Qerror))); |
5590 Fput (Qfile_date_error, Qerror_message, | 5590 Fput (Qfile_date_error, Qerror_message, |
5591 build_string ("Cannot set file date")); | 5591 make_pure_c_string ("Cannot set file date")); |
5592 | 5592 |
5593 DEFVAR_LISP ("directory-sep-char", &Vdirectory_sep_char, | 5593 DEFVAR_LISP ("directory-sep-char", &Vdirectory_sep_char, |
5594 doc: /* Directory separator character for built-in functions that return file names. | 5594 doc: /* Directory separator character for built-in functions that return file names. |
5595 The value is always ?/. Don't use this variable, just use `/'. */); | 5595 The value is always ?/. Don't use this variable, just use `/'. */); |
5596 XSETFASTINT (Vdirectory_sep_char, '/'); | 5596 XSETFASTINT (Vdirectory_sep_char, '/'); |
5657 current when building the annotations (i.e., at least once), with that | 5657 current when building the annotations (i.e., at least once), with that |
5658 buffer current. */); | 5658 buffer current. */); |
5659 Vwrite_region_annotate_functions = Qnil; | 5659 Vwrite_region_annotate_functions = Qnil; |
5660 staticpro (&Qwrite_region_annotate_functions); | 5660 staticpro (&Qwrite_region_annotate_functions); |
5661 Qwrite_region_annotate_functions | 5661 Qwrite_region_annotate_functions |
5662 = intern ("write-region-annotate-functions"); | 5662 = intern_c_string ("write-region-annotate-functions"); |
5663 | 5663 |
5664 DEFVAR_LISP ("write-region-post-annotation-function", | 5664 DEFVAR_LISP ("write-region-post-annotation-function", |
5665 &Vwrite_region_post_annotation_function, | 5665 &Vwrite_region_post_annotation_function, |
5666 doc: /* Function to call after `write-region' completes. | 5666 doc: /* Function to call after `write-region' completes. |
5667 The function is called with no arguments. If one or more of the | 5667 The function is called with no arguments. If one or more of the |
5718 DEFVAR_BOOL ("delete-by-moving-to-trash", &delete_by_moving_to_trash, | 5718 DEFVAR_BOOL ("delete-by-moving-to-trash", &delete_by_moving_to_trash, |
5719 doc: /* Specifies whether to use the system's trash can. | 5719 doc: /* Specifies whether to use the system's trash can. |
5720 When non-nil, the function `move-file-to-trash' will be used by | 5720 When non-nil, the function `move-file-to-trash' will be used by |
5721 `delete-file' and `delete-directory'. */); | 5721 `delete-file' and `delete-directory'. */); |
5722 delete_by_moving_to_trash = 0; | 5722 delete_by_moving_to_trash = 0; |
5723 Qdelete_by_moving_to_trash = intern ("delete-by-moving-to-trash"); | 5723 Qdelete_by_moving_to_trash = intern_c_string ("delete-by-moving-to-trash"); |
5724 Qmove_file_to_trash = intern ("move-file-to-trash"); | 5724 Qmove_file_to_trash = intern_c_string ("move-file-to-trash"); |
5725 staticpro (&Qmove_file_to_trash); | 5725 staticpro (&Qmove_file_to_trash); |
5726 | 5726 |
5727 defsubr (&Sfind_file_name_handler); | 5727 defsubr (&Sfind_file_name_handler); |
5728 defsubr (&Sfile_name_directory); | 5728 defsubr (&Sfile_name_directory); |
5729 defsubr (&Sfile_name_nondirectory); | 5729 defsubr (&Sfile_name_nondirectory); |