aboutsummaryrefslogtreecommitdiffstats
path: root/src/fileio.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Merge from origin/emacs-30Eli Zaretskii2025-02-081-0/+4
|\ | | | | | | | | | | | | ed9dd4705c7 ; * admin/authors.el (authors-aliases): Add aliases. 223ee56aae7 ; Avoid passive tense in Emacs manual be4cf26c167 Fix gnus-score-find-score-files-function :type 143f1096daa Improve documentation of 'file-name-concat'
| * Improve documentation of 'file-name-concat'Eli Zaretskii2025-02-061-0/+4
| | | | | | | | | | | | * doc/lispref/files.texi (Directory Names): * src/fileio.c (Ffile_name_concat): Advise not to use 'file-name-concat' unless necessary. (Bug#76023)
* | Merge remote-tracking branch 'origin/emacs-30'Stefan Monnier2025-02-051-1/+3
|\ \ | |/
| * * src/fileio.c (Fsubstitute_in_file_name): Doc fix (bug#76023).Eli Zaretskii2025-02-041-1/+3
| |
| * Update copyright year to 2025Stefan Kangas2025-01-021-1/+1
| | | | | | | | Run "TZ=UTC0 admin/update-copyright".
* | Merge branch 'scratch/no-purespace' into 'master'Stefan Kangas2025-02-011-14/+14
|\ \
| * | Pure storage removal: Replace calls to removed functionsPip Cet2024-12-121-14/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* | | Avoid stack overflow on MS-Windows due to 'make-temp-name'Eli Zaretskii2025-01-311-6/+6
| | | | | | | | | | | | | | | * src/fileio.c (Fexpand_file_name) [DOS_NT]: Use 'SAFE_ALLOCA' instead of 'alloca'. (Bug#75938)
* | | Replace call[1-8] with callnStefan Kangas2025-01-191-56/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since the introduction of the 'calln' macro, the 'call1', 'call2', ..., 'call8' macros are just aliases for the former. This is slightly misleading and potentially unhelpful. The number of arguments N can also easily go out-of-synch with the used alias callN. There is no reason not to replace these aliases with using 'calln' directly. To reduce the risk for mistakes, the tool Coccinelle was used to make these changes. See <https://coccinelle.gitlabpages.inria.fr/website/>. * src/alloc.c, src/androidvfs.c, src/androidfns.c, src/buffer.c: * src/callint.c, src/callproc.c, src/casefiddle.c, src/charset.c: * src/chartab.c, src/cmds.c, src/coding.c, src/composite.c: * src/data.c, src/dbusbind.c, src/dired.c, src/doc.c: * src/emacs.c, src/eval.c, src/fileio.c, src/filelock.c: * src/fns.c, src/frame.c, src/gtkutil.c, src/haikufns.c: * src/haikumenu.c, src/image.c, src/insdel.c, src/intervals.c: * src/keyboard.c, src/keymap.c, src/lisp.h, src/lread.c: * src/minibuf.c, src/nsfns.m, src/nsselect.m, src/pgtkfns.c: * src/pgtkselect.c, src/print.c, src/process.c, src/sort.c: * src/syntax.c, src/textconv.c, src/textprop.c, src/undo.c: * src/w32fns.c, src/window.c, src/xfaces.c, src/xfns.c: * src/xmenu.c, src/xselect.c, src/xterm.c: Replace all uses of 'call1', 'call2', ..., 'call8' with 'calln'.
* | | * src/fileio.c (Finsert_file_contents): Fix last change.Eli Zaretskii2025-01-191-0/+5
| | |
* | | Fix visiting files in /proc/ directoryEli Zaretskii2025-01-191-2/+3
| | | | | | | | | | | | | | | * src/fileio.c (Finsert_file_contents): Treat regular files whose size is reported as zero as if they were special files. (Bug#75569)
* | | Update copyright year to 2025Paul Eggert2025-01-011-1/+1
|/ / | | | | | | Run "TZ=UTC0 admin/update-copyright".
* | Merge from origin/emacs-30Michael Albinus2024-10-181-2/+2
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 78e6328fafd ; (select-safe-coding-system-interactively): Say "safely ... c5eba443ae7 ; * lisp/icomplete.el (icomplete-in-buffer): Doc fix (bug... 569186c36e3 ; * doc/lispref/display.texi (Face Attributes): Fix typo ... d5723fc4f03 * lisp/progmodes/c-ts-mode.el (treesit-node-eq): Declare ... 0085e48f917 * admin/notes/emba: Docker builds do not run in a worktree. 3d30905b022 * lisp/calc/calc-ext.el (math-approx-sqrt-e): Doc fix (bu... 94d0e9c4018 : Revert a mistaken change 4d90a1d8209 ; * doc/emacs/search.texi (Word Search): Spelling fixes. c154047c46a Fix c-ts-mode--anchor-prev-sibling (bug#73661) b87fda63dd4 Fix formatting of long keyboard macros by 'list-keyboard-... ae75ea62324 ; * src/fileio.c (Ffile_newer_than_file_p): Fix wording (... b1203978685 Merge branch 'emacs-30' of git.sv.gnu.org:/srv/git/emacs ... de54d922b5c * doc/emacs/mini.texi (Passwords): Mention password visib... 0f8f0773183 ; * doc/emacs/search.texi (Word Search): Document 'dictio... fb155bcfb6f ; * lisp/emacs-lisp/chart.el (chart-bar-quickie): Doc fix. 6dbe4e99ac4 ; * lisp/emacs-lisp/chart.el (chart-bar-quickie): Improve... d664227f81a ; More accurate documentation of 'file-newer-than-file-p' e49b479f869 Fix c-ts-mode indentation for initializer lists (bug#73661) f520008744b Avoid segfaults in Rmail-MIME 6a5c2edd84f Eglot: use :immediate t when resolving completions (bug#7... cd36e070c24 Eglot: minor changes to doc and docstrings 1ea0d9b891b Revert "Set treesit-primary-parser for tree-sitter modes" 52746ceb625 Remove duplicate indent rules in elixir-ts-mode ed57faafc74 Set treesit-primary-parser for tree-sitter modes 37a6c859b04 ; * lisp/emacs-lisp/cl-macs.el (cl-once-only): Fix capita... 2d4d6dc43a4 Delete XIE X extension from TODO b68b9f291cc ; * lisp/progmodes/csharp-mode.el (treesit-query-compile)... 688201ef18d ; * lisp/window.el (switch-to-prev-buffer-skip-regexp): D... ba44fc9a447 Restore comment/string check for 'electric-layout-mode' 5a462948e13 Update Arni Magnusson's email address 6b1271b169a Fix python-ts-mode-map docstring aaaafddc945 Normalize "Commentary" section in eudc.el d656be9794d Expand email abbrevs in X-Debbugs-Cc header. e9dcf0c57dd Fix 'list-tags' when invoked from a non-file buffer 51ef05f684c count-windows: Fix reference to walk-windows 5eaf0c784bf * lisp/info-look.el (mapc): Add use-package manual's index. 705a5a1a9e6 ; * ChangeLog.4: Fix attribution of one change. bf26ff0dc8d Update csharp-ts-mode font-lock (bug#73369) 4c866abab96 ; * doc/lispref/variables.texi (Creating Buffer-Local): F... d42d7d474fe ; * lisp/doc-view.el (doc-view-svg-face): Copy-edit docst... f46f476bb8f ; * admin/MAINTAINERS: Take VC subsystem, add note about ... d68e6d2689d ; rcirc-update-activity-string: Justify some existing beh... e6a37869c8d Fix inconsistency in value of rcirc-activity-string 108b3179bd4 Revert "; Minor clarification in variables.texi" 44156c21407 ; Minor clarification in variables.texi 63058e1153a Tag interactive commands in 'lua-ts-mode' 84bea20eba2 ; * lisp/info-look.el: Add two more links. 96b87ad5363 Mention LSP acronym in eglot defgroup docstring 9c904e8ceae Change :group of 'eglot' defgroup to 'tools' fd1a1b07805 Remove out-of-date documentation from python.el 11e3e0cadd4 Fix executing commands in Eshell using "env" with no loca... c0ef8a9a1b3 Fix a typo in the calendar manual 36ff7138feb ; Fix a thinko in sieve-manage.el 7abecbcd633 ; * nt/INSTALL: Update MinGW notes URL. (Bug#73528) e2b01d164cd ; Fix last changes in php-ts-mode.el e8830015b07 Require ert-x for use by 'ert-font-lock-deftest-file' a1841b4d8e7 ; * admin/authors.el (authors-aliases): Don't ignore "one... 69d8f9d1b70 Fix php-ts-mode font-lock for latest PHP grammar (bug#73516) 68f53e43488 eieio.texi: Fix bug#73505 53c887fdf6d ; cperl-mode.el: Fix an invalid face specification f5cd5585f46 ; Recommend GNU Find for 'find-dired' 65e589698e6 ; * lisp/filesets.el (filesets-homepage): Fix URL. 1f243a97806 Delete duplicated line in Viper refcard
| * ; * src/fileio.c (Ffile_newer_than_file_p): Fix wording (bug#73709).Eli Zaretskii2024-10-131-2/+2
| |
* | Merge from origin/emacs-30Eli Zaretskii2024-10-121-1/+2
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 0f8f0773183 ; * doc/emacs/search.texi (Word Search): Document 'dictio... fb155bcfb6f ; * lisp/emacs-lisp/chart.el (chart-bar-quickie): Doc fix. 6dbe4e99ac4 ; * lisp/emacs-lisp/chart.el (chart-bar-quickie): Improve... d664227f81a ; More accurate documentation of 'file-newer-than-file-p' e49b479f869 Fix c-ts-mode indentation for initializer lists (bug#73661) f520008744b Avoid segfaults in Rmail-MIME 6a5c2edd84f Eglot: use :immediate t when resolving completions (bug#7... cd36e070c24 Eglot: minor changes to doc and docstrings 1ea0d9b891b Revert "Set treesit-primary-parser for tree-sitter modes" 52746ceb625 Remove duplicate indent rules in elixir-ts-mode ed57faafc74 Set treesit-primary-parser for tree-sitter modes 37a6c859b04 ; * lisp/emacs-lisp/cl-macs.el (cl-once-only): Fix capita... 2d4d6dc43a4 Delete XIE X extension from TODO
| * ; More accurate documentation of 'file-newer-than-file-p'Eli Zaretskii2024-10-101-1/+2
| | | | | | | | | | | | * doc/lispref/files.texi (File Attributes): * src/fileio.c (Ffile_newer_than_file_p): Say the comparison uses the last-modification times. (Bug#73709)
* | Prefer static_assert to verifyStefan Kangas2024-08-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Although static_assert is C11-specific, and Emacs remains on C99, it has been backported to older compilers by Gnulib. Gnulib has already changed to prefer static_assert, and we can do the same. * lib-src/asset-directory-tool.c (main_2): * src/alloc.c (BLOCK_ALIGN, aligned_alloc, lisp_align_malloc) (vectorlike_nbytes, allocate_pseudovector): * src/android.c (android_globalize_reference, android_set_dashes): * src/android.h: * src/androidfont.c (androidfont_draw, androidfont_text_extents): * src/androidvfs.c: * src/bidi.c (BIDI_CACHE_MAX_ELTS_PER_SLOT, bidi_find_bracket_pairs): * src/buffer.c (init_buffer_once): * src/casefiddle.c (do_casify_multibyte_string): * src/dispnew.c (scrolling_window, scrolling): * src/editfns.c (styled_format): * src/emacs-module.c (module_extract_big_integer): * src/fileio.c (Fdo_auto_save): * src/fns.c (next_almost_prime, hash_string): * src/fringe.c (init_fringe): * src/keyboard.h (kbd_buffer_store_event_hold): * src/keymap.c: * src/lisp.h (memclear, reduce_emacs_uint_to_hash_hash, modiff_incr): * src/lread.c (skip_lazy_string): * src/pdumper.c (dump_bignum, Fdump_emacs_portable) (dump_do_dump_relocation, pdumper_load): * src/process.c (make_process, Fmake_process, connect_network_socket): * src/regex-emacs.c: * src/sort.c (tim_sort): * src/sysdep.c (init_random, SSIZE_MAX): * src/thread.c: * src/timefns.c (trillion_factor): * src/unexelf.c: * src/xterm.c (x_send_scroll_bar_event): Prefer static_assert to Gnulib verify. Remove import of verify.h, except when used for other reasons.
* | Simplify and speed up numeric comparisonsMattias Engdegård2024-07-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | This makes comparison functions (=, /=, <, <=, >, >=, min, max) quite a bit faster (10-20 %). Bytecode ops on fixnums are not affected, nor is `value<`. * src/data.c (arithcompare): Simplify the code to reduce the number of branches. Remove the comparison code argument; instead, return the relation encoded as bits, which can be tested cheaply. All callers adapted. * src/lisp.h (enum Arith_Comparison): Remove. (Cmp_Bit_*, cmp_bits_t): New.
* | Use cheaper string constructorsMattias Engdegård2024-07-091-1/+1
|/ | | | | | | | | * src/coding.c (make_string_from_utf8): * src/fileio.c (file_name_directory): * src/lread.c (Fintern): * src/gnutls.c (Fgnutls_format_certificate): Use `make_multibyte_string` and `make_unibyte_string` instead of more expensive `make_specified_string` and `make_string_from_bytes`.
* Disable Ffile_system_info for Android special directoriesPo Lu2024-06-231-1/+12
| | | | | * src/fileio.c (Ffile_system_info): Return Qnil if FILENAME refers to a special directory.
* Fix error message from 'insert-file-contents'Eli Zaretskii2024-05-291-1/+1
| | | | | * src/fileio.c (Finsert_file_contents): Consider directories to be "regular" files. (Bug#71258)
* Replace calls to intern with a constant string with DEFSYMsPo Lu2024-05-091-7/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/alloc.c (display_malloc_warning, syms_of_alloc): * src/buffer.c (Fmake_indirect_buffer, Fbuffer_local_variables) (Frename_buffer, Fkill_buffer, Fset_buffer_major_mode) (Fset_buffer_multibyte, syms_of_buffer): * src/callint.c (read_file_name, Fcall_interactively) (syms_of_callint): * src/callproc.c (call_process, create_temp_file) (syms_of_callproc): * src/charset.c (Fdefine_charset_internal, syms_of_charset): * src/cmds.c (internal_self_insert, syms_of_cmds): * src/coding.c (record_conversion_result) (Fdefine_coding_system_internal, syms_of_coding): * src/dbusbind.c (xd_signature, Fdbus_message_internal) (syms_of_dbusbind): * src/dispnew.c (init_faces_initial): * src/doc.c (Fsnarf_documentation, syms_of_doc): * src/dosfns.c (system_process_attributes, syms_of_dosfns): * src/emacs.c (init_cmdargs, Fdump_emacs, decode_env_path) (syms_of_emacs): * src/eval.c (call_debugger, Fdefvaralias, syms_of_eval): * src/fileio.c (barf_or_query_if_file_exists) (Finsert_file_contents, auto_save_error, Fdo_auto_save) (syms_of_fileio): * src/filelock.c (lock_file_1, syms_of_filelock): * src/fontset.c (fontset_from_font, syms_of_fontset): * src/frame.c (make_frame_without_minibuffer, syms_of_frame): * src/gnutls.c (emacs_gnutls_certificate_details) (Fgnutls_peer_status_warning_describe, Fgnutls_peer_status) (gnutls_verify_boot, syms_of_gnutls): * src/gtkutil.c (style_changed_cb, find_rtl_image): * src/image.c (imagemagick_filename_hint, gs_load) (syms_of_image): * src/keyboard.c (command_loop_1, read_char, timer_start_idle) (read_char_minibuf_menu_prompt, Fsuspend_emacs) (syms_of_keyboard): * src/keymap.c (Fmap_keymap, Flookup_key, Fdescribe_vector) (describe_vector, syms_of_keymap): * src/lread.c (Fread, Fread_positioning_symbols, syms_of_lread): * src/minibuf.c (Fabort_minibuffers, Fread_buffer) (Fcompleting_read, syms_of_minibuf): * src/msdos.c (XMenuActivate, run_msdos_command, syms_of_msdos): * src/nsfns.m (Fx_display_backing_store, Fx_display_visual_class) (Fns_hide_emacs, Fsystem_move_file_to_trash, ns_create_tip_frame) (x_hide_tip, Fx_show_tip, syms_of_nsfns): * src/nsfont.m (ns_spec_to_descriptor, ns_descriptor_to_entity) (syms_of_nsfont): * src/pdumper.c (Fdump_emacs_portable): * src/pgtkfns.c (Fx_display_visual_class, x_create_tip_frame) (Fx_show_tip, syms_of_pgtkfns): * src/pgtkterm.c (syms_of_pgtkterm, pgtk_cr_export_frames): * src/term.c (term_get_fkeys_1, set_tty_color_mode, Fsuspend_tty) (Fresume_tty, tty_menu_activate, syms_of_term): * src/terminal.c (create_terminal, syms_of_terminal): * src/w32fns.c (Fx_display_backing_store) (Fx_display_visual_class, Fset_message_beep, Fx_open_connection) (Fx_show_tip, Fx_file_dialog, Fsystem_move_file_to_trash) (Fw32_toggle_lock_key, syms_of_w32fns): * src/w32font.c (w32_enumfont_pattern_entity, syms_of_w32font): * src/w32term.c (w32_bitmap_icon, syms_of_w32term): * src/xdisp.c (message_dolog, define_frame_cursor1) (syms_of_xdisp): * src/xfaces.c (tty_lookup_color, syms_of_xfaces): * src/xml.c (make_dom, syms_of_xml): * src/xterm.c (syms_of_xterm): * src/xwidget.c (store_xwidget_download_callback_event) (store_xwidget_js_callback_event, syms_of_xwidget): Define symbols for symbols interned with `intern' from a constant string, delete duplicate DEFSYM directives, and substitute them for such calls to intern. This excludes only those symbols which are interned and referenced only once during Emacs's initialization, the timing of whose interning is inconsequential, and symbols in w32.c, which would need to be transferred to a new syms_of_w32 function that I cannot test.
* Merge from origin/emacs-29Eli Zaretskii2024-03-161-1/+1
|\ | | | | | | | | | | | | | | | | | | 3b791ebbe17 ; Fix 'usage:' keyword in Ffile_name_concat doc. ed48b0d657c ; * CONTRIBUTE: Ask not to use non-ASCII unless necessary. b708e639d63 ; * src/lread.c (maybe_swap_for_eln): Clarify warning mes... db027a06976 ; Fix bibtex-biblatex-field-alist docstring typo. a9be5c7ea92 ; * doc/lispref/control.texi (Conditionals): Add missing ... db5915f30ba Fix 'with-sqlite-transaction' fe491173e8f ; * doc/emacs/files.texi (Image Mode): Fix typo (bug#69671).
| * ; Fix 'usage:' keyword in Ffile_name_concat doc.Basil L. Contovounesios2024-03-161-1/+1
| |
* | Properly record mtime after insert-file-contents on AndroidPo Lu2024-02-171-1/+9
| | | | | | | | | | * src/fileio.c (write_region): Do not verify file identity after retreiving file status for the second time if st_ino is 0.
* | Merge from savannah/emacs-29Po Lu2024-01-021-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dc4e6b13296 ; Update copyright years in more files 64b37776318 ; Run set-copyright from admin.el 8e1c56ae467 ; Add 2024 to copyright years # Conflicts: # doc/misc/modus-themes.org # doc/misc/texinfo.tex # etc/NEWS # etc/refcards/ru-refcard.tex # etc/themes/modus-operandi-theme.el # etc/themes/modus-themes.el # etc/themes/modus-vivendi-theme.el # lib/alloca.in.h # lib/binary-io.h # lib/c-ctype.h # lib/c-strcasecmp.c # lib/c-strncasecmp.c # lib/careadlinkat.c # lib/cloexec.c # lib/close-stream.c # lib/diffseq.h # lib/dup2.c # lib/filemode.h # lib/fpending.c # lib/fpending.h # lib/fsusage.c # lib/getgroups.c # lib/getloadavg.c # lib/gettext.h # lib/gettime.c # lib/gettimeofday.c # lib/group-member.c # lib/malloc.c # lib/md5-stream.c # lib/md5.c # lib/md5.h # lib/memmem.c # lib/memrchr.c # lib/nanosleep.c # lib/save-cwd.h # lib/sha1.c # lib/sig2str.c # lib/stdlib.in.h # lib/strtoimax.c # lib/strtol.c # lib/strtoll.c # lib/time_r.c # lib/xalloc-oversized.h # lisp/auth-source-pass.el # lisp/emacs-lisp/lisp-mnt.el # lisp/emacs-lisp/timer.el # lisp/info-look.el # lisp/jit-lock.el # lisp/loadhist.el # lisp/mail/rmail.el # lisp/net/ntlm.el # lisp/net/webjump.el # lisp/progmodes/asm-mode.el # lisp/progmodes/project.el # lisp/progmodes/sh-script.el # lisp/textmodes/flyspell.el # lisp/textmodes/reftex-toc.el # lisp/textmodes/reftex.el # lisp/textmodes/tex-mode.el # lisp/url/url-gw.el # m4/alloca.m4 # m4/clock_time.m4 # m4/d-type.m4 # m4/dirent_h.m4 # m4/dup2.m4 # m4/euidaccess.m4 # m4/fchmodat.m4 # m4/filemode.m4 # m4/fsusage.m4 # m4/getgroups.m4 # m4/getloadavg.m4 # m4/getrandom.m4 # m4/gettime.m4 # m4/gettimeofday.m4 # m4/gnulib-common.m4 # m4/group-member.m4 # m4/inttypes.m4 # m4/malloc.m4 # m4/manywarnings.m4 # m4/mempcpy.m4 # m4/memrchr.m4 # m4/mkostemp.m4 # m4/mktime.m4 # m4/nproc.m4 # m4/nstrftime.m4 # m4/pathmax.m4 # m4/pipe2.m4 # m4/pselect.m4 # m4/pthread_sigmask.m4 # m4/readlink.m4 # m4/realloc.m4 # m4/sig2str.m4 # m4/ssize_t.m4 # m4/stat-time.m4 # m4/stddef_h.m4 # m4/stdint.m4 # m4/stdio_h.m4 # m4/stdlib_h.m4 # m4/stpcpy.m4 # m4/strnlen.m4 # m4/strtoimax.m4 # m4/strtoll.m4 # m4/time_h.m4 # m4/timegm.m4 # m4/timer_time.m4 # m4/timespec.m4 # m4/unistd_h.m4 # m4/warnings.m4 # nt/configure.bat # nt/preprep.c # test/lisp/register-tests.el
| * ; Add 2024 to copyright yearsPo Lu2024-01-021-1/+1
| |
| * ; Fix typosStefan Kangas2023-12-031-1/+1
| |
| * Better fix for bug#65156Po Lu2023-08-091-3/+3
| | | | | | | | | | * src/fileio.c (Finsert_file_contents): Correct seek-ability test, since lseek returns -1 upon failure. (Bug#65156)
| * Fix insert-file-contents with pipes and /dev/stdinEli Zaretskii2023-08-081-2/+2
| | | | | | | | | | * src/fileio.c (Finsert_file_contents): Restore logic of non-regular but seekable files. (Bug#65156)
* | ; Fix typosStefan Kangas2023-12-101-1/+1
| |
* | Use BASE_EQ instead of EQ for some uninterned symbolsMattias Engdegård2023-11-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | * src/editfns.c (labeled_restrictions_pop, Fwiden): * src/eval.c (lexbound_p, Fbacktrace__locals): * src/fileio.c (Finsert_file_contents): * src/fns.c (Fyes_or_no_p): * src/keyboard.c (command_loop_1): Use BASE_EQ for comparing with Qoutermost_restriction, Qinternal_interpreter_environment and Qunbound as uninterned symbols won't be EQ to a symbol-with-pos.
* | Fix revert-buffer when some decoding is involvedEli Zaretskii2023-08-301-1/+1
| | | | | | | | | | * src/fileio.c (Finsert_file_contents): Fix the amount of text read from the file when reverting. (Bug#65609)
* | Demote errors from utimensat copying directoriesPo Lu2023-08-261-2/+2
| | | | | | | | | | | | | | * lisp/files.el (copy-directory): Wrap set-file-times within with-demoted-errors. * src/fileio.c (Fcopy_file): Adjust commentary.
* | Fix libselinux object leaksPo Lu2023-08-201-5/+5
| | | | | | | | | | * src/fileio.c (Fcopy_file, Fset_file_selinux_context): Call freecon prior to signaling file errors.
* | ; * src/fileio.c (Fset_file_acl): Don't leak memory.Eli Zaretskii2023-08-191-1/+1
| |
* | Make some file I/O operations more robust on AndroidPo Lu2023-08-191-5/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/android.h (android_readlinkat): New prototype. * src/androidvfs.c (struct android_vops): New function pointer `readlink'. (unix_vfs_ops, android_unix_readlink, afs_vfs_ops) (android_afs_readlink, content_vfs_ops, android_content_mkdir) (android_content_chmod, authority_vfs_ops) (android_authority_readlink, saf_root_vfs_ops) (android_saf_root_readlink, saf_tree_vfs_ops) (android_saf_tree_readlink, saf_file_vfs_ops, saf_new_vfs_ops) (android_saf_new_readlink, root_vfs_ops): Implement new `readlink' vops for each vnode type. (android_readlinkat): New function. * src/fileio.c (Fcopy_file): Be more flexible about SELinux errors under Android. (emacs_readlinkat): Use `android_readlink' when built as libemacs.so.
* | * src/fileio.c (Ffile_name_concat): Improve docstring.Dmitry Gutov2023-08-171-2/+2
| |
* | Fix 'insert-file-contents' with non-regular filesEli Zaretskii2023-08-121-16/+19
| | | | | | | | | | | | * src/fileio.c (Finsert_file_contents): Fix the doc string. Erase only the accessible portion of the buffer, not the entire buffer. (Bug#65156)
* | Remove a DEFSYM that no longer needs to be in the C core.Eric S. Raymond2023-08-091-3/+0
| | | | | | | | * src/fileio.c (syms_of_fileio): Remove Qmove_file_to_trash.
* | Add a string check to delete-file-internal.Eric S. Raymond2023-08-091-0/+1
| | | | | | | | * src/fileio.c (delete-file-internal): Argument should be a string.
* | Repair test failures stemming from Android mergePo Lu2023-08-081-2/+9
| | | | | | | | | | | | | | | | | | | | | | * lisp/kmacro.el (kmacro-step-edit-query) (kmacro-step-edit-pre-command): Use `dummy-event' instead of [nil] to continue a kbd macro; this is because nil now has a function key map. * src/androidfns.c (Fx_hide_tip): Allow calling this as a stub. * src/fileio.c (Finsert_file_contents): In adherence to the documentation, forbid supplying a BEG offset even for seekable files, i.e. /dev/urandom on Linux kernel based systems.
* | ; * src/fileio.c (Ffile_selinux_context): Avoid unused variable.Po Lu2023-08-081-1/+3
| |
* | Minor improvements to write-region heuristicPo Lu2023-08-081-33/+35
| | | | | | | | | | | | | | | | * src/androidvfs.c (android_saf_stat): Set STATB->st_dev. (android_fstat): Likewise. (NATIVE_NAME): Seek to start of file after truncation. * src/fileio.c (write_region): Use stat instead of open+fstat to obtain updated mtime.
* | Enable visiting FIFOs as filesPo Lu2023-08-081-43/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/lispref/files.texi (Reading from Files): Document new `if-regular' value of REPLACE. * etc/NEWS: Announce the new value. * lisp/files.el (basic-save-buffer-2): Demote errors saving backup files, since FIFOs cannot be copied. (revert-buffer-insert-file-contents--default-function): Supply `if-regular' instead of t as REPLACE. * src/fileio.c (selinux_enabled_p): New function. (Fcopy_file, Ffile_selinux_context, Fset_file_selinux_context): Call that function to ascertain if SELinux applies to a file. (read_non_regular): Don't assume `emacs_fd_read' always returns int. (Finsert_file_contents): If REPLACE is if-regular and FILENAME is a special non-seekable file, fall back to erasing the buffer before inserting the contents of that file. (syms_of_fileio) <Qif_regular>: New symbol.
* | ; * src/fileio.c (internal_delete_file): Call internal_condition_case_1.Eli Zaretskii2023-08-071-1/+1
| |
* | Merge remote-tracking branch 'origin/master' into feature/androidPo Lu2023-08-071-2/+4
|\ \
| * | Fix last change of 'delete-file'Eli Zaretskii2023-08-061-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/fileio.c (Fdelete_file_internal): Expand file name here, as all primitives must. (internal_delete_file): Adjust to the fact that Fdelete_file was renamed. * lisp/files.el (delete-file): Don't expand-file-name here, as the called primitives already do. Fix typo in doc string.
* | | Merge remote-tracking branch 'origin/master' into feature/androidPo Lu2023-08-061-31/+9
|\ \ \ | |/ /
| * | Separate filename-deletion mechanism from policy.Eric S. Raymond2023-08-061-31/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | src/fileio.c: (delete-file-internal) Renamed from delete-file, parallel to delete-directory-internal; policy code moved to Lisp. src/files.el: (delete-file) New function, holds policy logic. calls delete-file-internal. This is a pure refactoring step, delete-file's behavior is unchanged. But the C core is a little simpler now.