aboutsummaryrefslogtreecommitdiffstats
path: root/src/fileio.c
Commit message (Collapse)AuthorAgeFilesLines
* (Fmake_directory_internal, Fdelete_directory)Kim F. Storm2006-08-251-37/+6
| | | | | | (Fdelete_file): Simplify; use list1. (Frename_file, Fadd_name_to_file, Fmake_symbolic_link): Simplify; remove NO_ARG_ARRAY stuff, use list2.
* (choose_write_coding_system): Use LF for end-of-lineKenichi Handa2006-08-161-0/+2
| | | | in auto-saving.
* (report_file_error): Use xsignal.Kim F. Storm2006-07-181-28/+20
| | | | | | (barf_or_query_if_file_exists, Fcopy_file, Fdelete_file) (Finsert_file_contents): Use xsignal2. (syms_of_fileio): Use list2, list3.
* Include blockinput.h.YAMAMOTO Mitsuharu2006-07-121-3/+9
| | | | | | (Fexpand_file_name, search_embedded_absfilename): Add BLOCK_INPUT around getpwnam. (search_embedded_absfilename): Remove spurious xfree.
* (Fdo_auto_save): Update/simplify sit_for calls.Kim F. Storm2006-07-111-1/+1
|
* fileio.c (do_auto_save_make_dir): Make the auto-save-list-fileStephen Gildea2006-07-081-1/+5
| | | | directory unreadable for better user privacy.
* (Frename_file) [DOS_NT]: Don't try to move directory to itself on DOS_NTEli Zaretskii2006-06-231-1/+7
| | | | platforms, if the old and new names are identical but for the letter-case.
* * fileio.c (Fcopy_file): Delete argument MUSTBENEW. IncorporateChong Yidong2006-05-261-21/+17
| | | | | | the exclusive file-opening functionality into the behavior when OK-IF-ALREADY-EXISTS is nil. (Frename_file): Call Fcopy_file without MUSTBENEW argument.
* (Finsert_file_contents): Fix for the case of IO errorKenichi Handa2006-05-111-5/+2
| | | | while handling replace operation.
* (choose_write_coding_system): Use system_eol_type forKenichi Handa2006-05-081-0/+2
| | | | encoding if eol_type is not yet decided.
* (Fwrite_region): Set visit_file to Qnil before GCPROKenichi Handa2006-03-201-0/+1
| | | | it.
* (Finsert_file_contents): When a text is replacedKenichi Handa2006-02-241-0/+2
| | | | partially, be sure to set point before the inserted characters.
* (Fexpand_file_name): Remove redundant tests. Fix elimination of // so thatStefan Monnier2006-01-101-12/+6
| | | | it doesn't prevent elimination of an immediately following /. or /..
* (Finsert_file_contents): Set Vdeactivate_mark when we change the buffer.Richard M. Stallman2005-12-111-0/+2
|
* (internal_delete_file, Fread_file_name_internal): Avoid dangerous side ↵Ken Raeburn2005-12-061-4/+10
| | | | effects in NILP argument.
* (file-regular-p): Doc fix.Lars Hansen2005-11-101-2/+4
|
* (auto_save_error): Call SAFE_FREE.Kim F. Storm2005-10-201-0/+1
|
* (syms_of_fileio): Clarify docstring of `write-region-inhibit-fsync'.Romain Francoise2005-09-161-2/+3
|
* (write_region_inhibit_fsync): New variable.Romain Francoise2005-09-141-1/+13
| | | | | (Fwrite_region): Use it to skip call to fsync. (syms_of_fileio): Initialize it.
* (Fexpand_file_name): Check multibyteness ofKenichi Handa2005-09-141-10/+8
| | | | default_directory.
* (auto_save_error): Pass copy of lisp string to message2.Kim F. Storm2005-09-121-2/+6
|
* Update years in copyright notice; nfc.Thien-Thi Nguyen2005-08-071-2/+3
|
* (Fdo_auto_save, do_auto_save_unwind):Kim F. Storm2005-07-201-23/+8
| | | | Use make_save_value to unwind protect stream.
* Update FSF's address.Lute Kamstra2005-07-041-2/+2
|
* (Fcopy_file): Rearrange the code that calls fchown andEli Zaretskii2005-07-021-17/+20
| | | | | fchmod so that chmod doesn't get called on MSDOS before the file is closed.
* (Fcopy_file): New arg PRESERVE_UID_GID.Richard M. Stallman2005-06-251-25/+32
| | | | | | Use fchmod to copy the file modes. (Frename_file): Don't copy UID and GID here; instead, specify t for PRESERVE_UID_GID when calling Fcopy_file.
* (Frename_file): Undo last change: no need to ifdef awayEli Zaretskii2005-06-241-2/+0
| | | | chown on DOS_NT platforms.
* (Frename_file)[!DOS_NT]: Don't call chown on MSDOS/Windows.Juanma Barranquero2005-06-241-0/+2
|
* (Frename_file): Preserve owner and group, if possible.Richard M. Stallman2005-06-231-0/+6
|
* (Finsert_file_contents): Lisp_Object/int mixup.Stefan Monnier2005-05-311-1/+1
|
* (Fexpand_file_name) [DOS_NT]: Don't try to support "superroot"Eli Zaretskii2005-05-211-1/+9
| | | | on DOS_NT systems.
* (Finsert_file_contents): Fix previous change.Richard M. Stallman2005-05-131-0/+2
|
* (Ffind_file_name_handler): Handle lambda-exp as handler.Richard M. Stallman2005-05-131-8/+41
| | | | | | | (Finsert_file_contents): If we read 0 bytes from a special file, unlock the visited file if we locked it. (Fmake_symbolic_link, Frecent_auto_save_p): Doc fixes. (Ffile_exists_p, Ffile_symlink_p): Doc fixes.
* (Fexpand_file_name, Frename_file, Fadd_name_to_file, Fmake_symbolic_link,Juanma Barranquero2005-05-081-6/+6
| | | | Faccess_file, Frecent_auto_save_p): Doc fixes.
* (Ffind_file_name_handler): Handle the `operations'Richard M. Stallman2005-04-301-4/+13
| | | | | | property of the file name handler. (Qoperations): New variable. (syms_of_fileio): Initialize and staticpro it.
* (Fcopy_file): Doc fix.Eli Zaretskii2005-04-241-9/+10
| | | | | [MSDOS]: Fix call to emacs_open: buffer_file_type not defined and not needed.
* (Fcopy_file): New arg MUSTBENEW.Richard M. Stallman2005-04-231-7/+25
| | | | (Frename_file): Pass new arg to Fcopy_file.
* Remove reference to defunct vms-pwd.h.Thien-Thi Nguyen2005-04-201-3/+1
| | | | For pwd.h, use HAVE_PWD_H, not !VMS.
* (search_embedded_absfilename): Fix last change.Stefan Monnier2005-03-301-1/+1
|
* (Fexpand_file_name): Use IS_DEVICE_SEP.Stefan Monnier2005-03-281-91/+88
| | | | | | | | | (file_name_absolute_p): New fun, extracted from Ffile_name_absolute_p. (Ffile_name_absolute_p): Use it. (search_embedded_absfilename): New fun, extracted from Fsubstitute_in_file_name. Use file_name_absolute_p. Free the pw data after use. (Fsubstitute_in_file_name): Use it. After cutting a prefix, re-check file-name-handler.
* (Fcopy_file, Frename_file, Fadd_name_to_file)Richard M. Stallman2005-03-171-4/+4
| | | | (Fmake_symbolic_link): Use G to read the new file name.
* (Fmake_symbolic_link): Fix last change.Stefan Monnier2005-03-121-2/+2
|
* (Frename_file, Fadd_name_to_file)Richard M. Stallman2005-03-111-3/+15
| | | | | (Fmake_symbolic_link): If NEWNAME or LINKNAME is a directory, expand the basename of FILE relative to it.
* (Finsert_file_contents): Call Fcheck_coding_systemKenichi Handa2005-03-111-4/+3
| | | | | before calling setup_coding_system so that autoloading of a coding system work.
* (Fexpand_file_name) [VMS]:Thien-Thi Nguyen2005-03-041-8/+8
| | | | Use NO_HYPHENS_IN_FILENAMES, not VMS4_4.
* (Fexpand_file_name) [VMS]: Don't upcase the nameThien-Thi Nguyen2005-03-041-4/+0
| | | | "manually"; this is now handled generally via FILE_SYSTEM_CASE.
* (FILE_SYSTEM_CASE): Define macro if not already defined.Thien-Thi Nguyen2005-03-031-6/+5
| | | | | (Ffile_name_directory): Use FILE_SYSTEM_CASE unconditionally. (Fexpand_file_name): Likewise.
* (Fcopy_file): Doc fix.Richard M. Stallman2005-01-211-3/+3
|
* (Finsert_file_contents): Don't useKenichi Handa2004-12-301-5/+2
| | | | | | current_buffer->buffer_file_coding_system even if REPLACE is non-nil. Call Qafter_insert_file_set_coding with the second arg VISIT.
* * dispextern.h: Change HAVE_CARBON to MAC_OS.Steven Tamm2004-12-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (struct glyph_string): Likewise. * emacs.c (main) [MAC_OS8]: Call mac_term_init instead of mac_initialize. * fileio.c (Fnext_read_file_uses_dialog_p, Fread_file_name): Change TARGET_API_MAC_CARBON to HAVE_CARBON. * fns.c (vector): Change MAC_OSX to MAC_OS. * frame.c (x_set_frame_parameters, x_report_frame_params) (x_set_fullscreen): Remove #ifndef HAVE_CARBON. (x_set_border_width, Vdefault_frame_scroll_bars): Change HAVE_CARBON to MAC_OS. * image.c [MAC_OS]: Include sys/stat.h. [MAC_OS && !MAC_OSX]: Include sys/param.h, ImageCompression.h, and QuickTimeComponents.h. * mac.c [!MAC_OSX] (mac_wait_next_event): Add extern. [!MAC_OSX] (select): Use mac_wait_next_event. [!MAC_OSX] (run_mac_command): Change EXEC_SUFFIXES to Vexec_suffixes. [!MAC_OSX] (select, run_mac_command): Change `#ifdef TARGET_API_MAC_CARBON' to `#if TARGET_API_MAC_CARBON'. (mac_clear_font_name_table): Add extern. (Fmac_clear_font_name_table): New defun. (syms_of_mac): Defsubr it. [MAC_OSX] (SELECT_POLLING_PERIOD_USEC): New define. [MAC_OSX] (select_and_poll_event): New function. [MAC_OSX] (sys_select): Use it. [MAC_OSX && SELECT_USE_CFSOCKET] (socket_callback): New function. [MAC_OSX && SELECT_USE_CFSOCKET] (SELECT_TIMEOUT_THRESHOLD_RUNLOOP, EVENT_CLASS_SOCK): New defines. [MAC_OSX] (sys_select) [SELECT_USE_CFSOCKET]: Use CFSocket and RunLoop for simultaneously monitoring two kinds of inputs, window events and process outputs, without periodically polling. * macfns.c (mac_initialized): Remove extern. (stricmp): Put in #if 0. All callers changed to use xstricmp in xfaces.c. (strnicmp): Decrement `n' at the end of each loop, not the beginning. (check_mac): Use the term "Mac native windows" instead of "Mac OS". (check_x_display_info, x_display_info_for_name): Sync with xfns.c. (mac_get_rdb_resource): New function (from w32reg.c). (x_get_string_resource): Use it. (install_window_handler): Add extern. (mac_window): New function. (Fx_create_frame): Use it instead of make_mac_frame. Set parameter for Qfullscreen. Call x_wm_set_size_hint. (Fx_open_connection, Fx_close_connection): New defuns. (syms_of_macfns): Defsubr them. (x_create_tip_frame) [TARGET_API_MAC_CARBON]: Add kWindowNoUpdatesAttribute to the window attribute. (x_create_tip_frame) [!TARGET_API_MAC_CARBON]: Use NewCWindow. (x_create_tip_frame): Don't call ShowWindow. (Fx_show_tip): Call ShowWindow. (Fx_file_dialog): Change `#ifdef TARGET_API_MAC_CARBON' to `#if TARGET_API_MAC_CARBON'. (mac_frame_parm_handlers): Set handlers for Qfullscreen. (syms_of_macfns) [MAC_OSX]: Initialize mac_in_use to 0. * macgui.h [!MAC_OSX]: Don't include Controls.h. Include Windows.h. (Window): Typedef to WindowPtr and move outside `#if TARGET_API_MAC_CARBON'. (XSizeHints): New struct. * macterm.c (x_update_begin, x_update_end) [TARGET_API_MAC_CARBON]: Disable screen updates during update of a frame. (x_draw_glyph_string_background, x_draw_glyph_string_foreground) [MAC_OS8]: Use XDrawImageString/XDrawImageString16. (construct_mouse_click): Put in #if 0. (x_check_fullscreen, x_check_fullscreen_move): Remove decls. (x_scroll_bar_create, x_scroll_bar_handle_click): Change `#ifdef TARGET_API_MAC_CARBON' to `#if TARGET_API_MAC_CARBON'. (activate_scroll_bars, deactivate_scroll_bars) [!TARGET_API_MAC_CARBON]: Use ActivateControl/DeactivateControl. (x_make_frame_visible) [TARGET_API_MAC_CARBON]: Reposition window if the position is neither user-specified nor program-specified. (x_free_frame_resources): Free size_hints. (x_wm_set_size_hint): Allocate size_hints if needed. Set size_hints. (mac_clear_font_name_table): New function. (mac_do_list_fonts): Initialize font_name_table if needed. (x_list_fonts): Don't initialize font_name_table. Add BLOCK_INPUT around mac_do_list_fonts. (mac_unload_font): New function. (x_load_font): Add BLOCK_INPUT around XLoadQueryFont. (init_mac_drag_n_drop, mac_do_receive_drag): Enclose declarations and definitions with #if TARGET_API_MAC_CARBON. [USE_CARBON_EVENTS] (mac_handle_window_event): Add decl. (install_window_handler): Add decl. (do_window_update): Add BeginUpdate/EndUpdate for the tooltip window. Use UpdateControls. Get the rectangle that should be updated and restrict the target of expose_frame to it. (do_grow_window): Set minimum height/width according to size_hints. (do_grow_window) [TARGET_API_MAC_CARBON]: Use ResizeWindow. (do_zoom_window): Don't use x_set_window_size. [USE_CARBON_EVENTS] (mac_handle_window_event): New function. (install_window_handler): New function. [!USE_CARBON_EVENTS] (mouse_region): New variable. [!USE_CARBON_EVENTS] (mac_wait_next_event): New function. (XTread_socket) [USE_CARBON_EVENTS]: Move call to GetEventDispatcherTarget inside BLOCK_INPUT. (XTread_socket) [!USE_CARBON_EVENTS]: Use mac_wait_next_event. Update mouse_region when mouse is moved. (make_mac_frame): Remove. (make_mac_terminal_frame): Put in #ifdef MAC_OS8. Initialize mouse pointer shapes. Change values of f->left_pos and f->top_pos. Don't use make_mac_frame. Use NewCWindow. Don't call ShowWindow. (mac_initialize_display_info) [MAC_OSX]: Create mac_id_name from Vinvocation_name and Vsystem_name. (mac_make_rdb): New function (from w32term.c). (mac_term_init): Use it. Add BLOCK_INPUT. Error if display has already been opened. Don't pass argument to mac_initialize_display_info. Don't set dpyinfo->height/width. Add entries to x_display_list and x_display_name_list. (x_delete_display): New function. (mac_initialize): Don't call mac_initialize_display_info. (syms_of_macterm) [!MAC_OSX]: Don't call Fprovide. * macterm.h (check_mac): Add extern. (struct mac_output): New member size_hints. (FRAME_SIZE_HINTS): New macro. (mac_unload_font): Add extern. * xdisp.c (expose_window, expose_frame): Remove kludges for Mac. * xfaces.c (clear_font_table) [MAC_OS]: call mac_unload_font.