1. 12 Apr, 2020 1 commit
  2. 13 Feb, 2020 1 commit
  3. 27 Jan, 2020 1 commit
  4. 22 Jan, 2020 1 commit
    • Alan Mackenzie's avatar
      Make call_process call signal_after_change. This fixes bug #38691. · 224e8d14
      Alan Mackenzie authored
      Now, functions such as call-proess-region invoke after-change-functions
      correctly.
      
      * src/callproc.c (call_process): Call prepare_to_modify_buffer in a single
      place, no longer delegating the task to insert_1_both, etc.  Call
      signal_after_change in each of two code branches, such that
      before-change-functions and after-change-functions are always called in
      balanced pairs.
      224e8d14
  5. 01 Jan, 2020 1 commit
  6. 02 Nov, 2019 1 commit
  7. 21 Sep, 2019 1 commit
    • Paul Eggert's avatar
      Revert too-picky file-access tests · d49d6ea9
      Paul Eggert authored
      Problem reported by Andreas Schwab (Bug#37475).
      * doc/lispref/files.texi (Writing to Files)
      (Testing Accessibility, Kinds of Files):
      Document that accessibility and file-type predicates return nil
      if there is trouble determining accessibility or type.
      * etc/NEWS: Adjust, and list the affected primitives.
      * src/callproc.c (init_callproc): Go back to Ffile_exists_p.
      * src/fileio.c (PICKY_EACCES, file_test_errno):
      Remove.  All uses removed.
      (Ffile_name_case_insensitive_p, Ffile_exists_p, Ffile_symlink_p)
      (Ffile_directory_p, Ffile_regular_p): Document that these
      functions return nil if there is trouble.
      (Ffile_name_case_insensitive_p, check_file_access)
      (Ffile_writable_p, Ffile_symlink_p, Ffile_directory_p)
      (Ffile_accessible_directory_p, Ffile_regular_p)
      * src/lread.c (Fload):
      Go back to treating trouble in determining the answer as if the
      file were missing.
      * src/fileio.c (Ffile_newer_than_file_p): Use file_attribute_errno
      not file_test_errno, since returning nil is not appropriate when
      there are two files to test; e.g., in the rare cases where both
      file timestamps have overflowed then neither t nor nil is correct.
      d49d6ea9
  8. 18 Sep, 2019 1 commit
  9. 16 Sep, 2019 2 commits
    • Eli Zaretskii's avatar
      Fix initialization of shared-game-score-directory on MS-Windows · 169d04b8
      Eli Zaretskii authored
      * src/callproc.c (init_callproc) [WINDOWSNT]: Run PATH_GAME
      through w32_relocate, to expand %emacs_dir%.
      [DOS_NT]: Accept EACCES as not "unusual" errno value.
      Reported by Richard Copley <rcopley@gmail.com>.
      169d04b8
    • Paul Eggert's avatar
      Improve directory-access diagnostics · de3daf06
      Paul Eggert authored
      * src/callproc.c (init_callproc): Diagnose I/O errors,
      access errors, etc. for the game directory.
      * src/charset.c (init_charset): Improve quality of diagnostic
      when the charsets directory has I/O errors, access errors, etc.
      de3daf06
  10. 11 Sep, 2019 1 commit
    • Paul Eggert's avatar
      Omit duplicate test of current directory · ef926ce3
      Paul Eggert authored
      * src/callproc.c (encode_current_directory): Remove redundant
      call to Ffile_accessible_directory_p.  The code checks the
      encoded name with file_accessible_directory_p anyway.
      ef926ce3
  11. 10 Aug, 2019 1 commit
  12. 09 Jul, 2019 2 commits
  13. 18 Apr, 2019 1 commit
    • Paul Eggert's avatar
      Mark _Noreturn error functions as cold · 6d6c55db
      Paul Eggert authored
      On my platform this made ‘make compile-always’ 1.3% faster.
      Suggested by Alex Gramiak in:
      https://lists.gnu.org/r/emacs-devel/2019-04/msg00684.html
      * configure.ac (nw): Don’t use -Wsuggest-attribute=cold.
      * lib-src/make-docfile.c (write_globals):
      Mark noreturn functions as cold.
      * src/callproc.c (exec_failed):
      * src/data.c (wrong_length_argument, wrong_type_argument):
      * src/emacs-module.c (module_abort):
      * src/emacs.c (terminate_due_to_signal):
      * src/eval.c (unwind_to_catch):
      * src/image.c (my_png_error, my_error_exit):
      * src/json.c (json_out_of_memory, json_parse_error):
      * src/keyboard.c (quit_throw_to_read_char, user_error):
      * src/lisp.h (die, wrong_type_argument, wrong_choice)
      (args_out_of_range, args_out_of_range_3, circular_list)
      (buffer_overflow, memory_full, buffer_memory_full)
      (string_overflow, xsignal, xsignal0, xsignal1, xsignal2)
      (xsignal3, signal_error, overflow_error, error, verror)
      (nsberror, report_file_errno, report_file_error)
      (report_file_notify_error, terminate_due_to_signal)
      (emacs_abort, fatal):
      * src/lread.c (load_error_old_style_backquotes)
      (end_of_file_error, invalid_syntax):
      * src/pdumper.c (error_unsupported_dump_object):
      * src/puresize.h (pure_write_error):
      * src/search.c (matcher_overflow):
      * src/sound.c (sound_perror, alsa_sound_perror):
      * src/sysdep.c (handle_arith_signal):
      * src/systime.h (time_overflow):
      * src/term.c (maybe_fatal, vfatal):
      * src/textprop.c (text_read_only):
      * src/timefns.c (invalid_time_zone_specification)
      (time_error, invalid_hz):
      * src/xterm.c (x_connection_closed):
      Use AVOID instead of _Noreturn void, so that it’s marked cold.
      * src/conf_post.h (__has_attribute_cold) [!__has_attribute]:
      New macro.
      (ATTRIBUTE_COLD): New macro.
      * src/frame.h (WINDOW_SYSTEM_RETURN): Add ATTRIBUTE_COLD.
      * src/lisp.h (AVOID): New macro.
      * src/xterm.c: Omit unnecessary static decls, so that we needn’t
      worry about which functions should be marked cold.
      (x_io_error_quitter): Mark as cold.
      6d6c55db
  14. 15 Apr, 2019 1 commit
    • Noam Postavsky's avatar
      Let debugger handle process spawn errors on w32 (Bug#33016) · 9800df69
      Noam Postavsky authored
      Since child_setup() is called between block_input()...unblock_input(),
      when an error is signaled the Lisp debugger is prevented from
      starting.  Therefore, let the callers signal the error instead (which
      they already do for non-w32 platforms, just the error message needs an
      update).
      * src/callproc.c (child_setup) [WINDOWSNT]: Don't call
      report_file_error here.
      (call_process) [WINDOWNT]:
      * src/process.c (create_process) [WINDOWSNT]: Call report_file_errno
      here instead, after the unblock_input() call, same as for !WINDOWSNT.
      * src/lisp.h (CHILD_SETUP_ERROR_DESC): New preprocessor define.  Flip
      the containing ifndef DOS_NT branches so that it's ifdef DOS_NT.
      * src/eval.c (when_entered_debugger): Remove.
      (syms_of_eval) <internal-when-entered-debugger>: Define it as a Lisp
      integer variable instead.
      (maybe_call_debugger): Update comment.
      * test/src/process-tests.el (make-process-w32-debug-spawn-error):
      * test/src/callproc-tests.el (call-process-w32-debug-spawn-error): New
      tests.
      9800df69
  15. 08 Feb, 2019 1 commit
  16. 15 Jan, 2019 1 commit
    • Daniel Colascione's avatar
      Add portable dumper · d12e5d00
      Daniel Colascione authored
      Add a new portable dumper as an alternative to unexec.  Use it by default.
      
      * src/dmpstruct.awk: New file.
      * src/doc.c (get_doc_string): use will_dump_p().
      * src/editfns.c (styled_format): silence compiler warning
      with UNINIT.
      * src/emacs-module.c (syms_of_module): staticpro ltv_mark.
      * src/emacs.c (gflags): new variable.
      (init_cmdargs): unwrap
      (string_starts_with_p, find_argument, dump_error_to_string)
      (load_pdump): new functions.
      (main): detect pdumper and --temacs invocation; actually load
      portable dump when detected; set gflags as appropriate; changes to
      init functions throughout to avoid passing explicit
      'initialized' argument.
      * src/eval.c (inhibit_lisp_code): remove unused variable.
      (init_eval_once_for_pdumper): new function.
      (init_eval_once): call it.
      * src/filelock.c: CANNOT_DUMP -> will_dump_p()
      * src/fingerprint-dummy.c: new file
      * src/fingerprint.h: new file
      * src/fns.c: CANNOT_DUMP -> will_dump_p(), etc.
      (weak_hash_tables): remove
      (hashfn_equal, hashfn_eql): un-staticify
      (make_hash_table): set new 'next_weak' hash table field; drop
      global weak_hash_tables logic.
      (copy_hash_table): drop global weak_hash_tables logic.
      (hash_table_rehash): new function.
      (hash_lookup, hash_put, hash_remove_from_table, hash_clear):
      rehash if needed.
      (sweep_weak_table): un-staticify; explain logic; bool-ify.
      (sweep_weak_hash_tables): remove function.
      * src/font.c (syms_of_font): remember pdumper stuff.
      * src/fontset.c (syms_of_fontset): remember pdumper stuff.
      * src/frame.c (make_initial_frame): don't reset Vframe_list.
      (init_frame_once_for_pdumper, init_frame_once): new functions.
      (syms_of_frame): remove redundant staticpro.
      * src/fringe.c (init_fringe_once_for_pdumper): new functin.
      (init_fringe_once): call it.
      * src/ftcrfont.c (syms_of_ftcrfont_for_pdumper): new function.
      (syms_of_ftcrfont): call it.
      * src/ftfont.c (syms_of_ftfont_for_pdumper): new function.
      (syms_of_ftfont): call it.
      * src/ftxont.c (syms_of_ftxfont_for_pdumper): new function.
      (syms_of_ftxfont): call it.
      * src/gmalloc.c: adjust for pdumper througout
      (DUMPED): remove weird custom dumped indicator.
      * src/gnutls.c (syms_of_gnutls): pdumper note for
      gnutls_global_initialized.
      * src/image.c (syms_of_image): add pdumper comment,
      initializer note.
      * src/insdel.c (prepare_to_modify_buffer_1): account
      for buffer contents possibly being in dump image.
      * src/keyboard.c (syms_of_keyboard_for_pdumper): new function.
      (syms_of_keyboard): staticpro more; call pdumper syms function.
      * src/lisp.h: add comments throughout
      (gflags): declare.
      (will_dump_p, will_bootstrap_p, will_dump_with_pdumper_p)
      (dumped_with_pdumper_p, will_dump_with_unexec_p)
      (dumped_with_unexec_p, definitely_will_not_unexec_p): new
      functions.
      (POWER_OF_2, ROUNDUP): move macros.
      (PSEUDOVECTOR_TYPE, PSEUDOVECTOR_TYPEP): take vectorlike header
      pointer instead of vector; constify.
      (Lisp_Hash_Table): add comment about need to rehash on access; add
      comment for next_weak.
      (HASH_KEY, HASH_VALUE, HASH_HASH, HASH_TABLE_SIZE): const-ify.
      (hash_table_rehash): declare.
      (hash_rehash_needed_p, hash_rehash_if_needed): new functions.
      (finalizers, doomed_finalizers): declare extern.
      (SUBR_SECTION_ATTRIBUTE): new macro.
      (staticvec, staticidx): un-static-ify.
      (sweep_weak_hash_tables): remove declaration.
      (sweep_weak_table): declare.
      (hashfn_eql, hashfn_equal): declare.
      (number_finalizers_run): new variable.
      (Vdead): externify when ENABLE_CHECKING.
      (gc_root_type): new enumeration.
      (gc_root_visitor): new struct.
      (visit_static_gc_roots): declare.
      (vectorlike_nbytes): declare.
      (vector_nbytes): define as trivial inline function wrapper for
      vectorlike_nbytes.
      (init_obarray_once): change signature.
      (primary_thread): extern-ify.
      (init_buffer): change signature.
      (init_frame_once): declare.
      * src/lread.c (readevalloop): adjust for new dumped predicates.
      (init_obarray_once): new function.
      (ndefsubr): new variable.
      (defsubr): increment it.
      (load_path_check): adjust for pdumper.
      (load_path_default): use pdumper functions; adjust for
      dump search.
      * src/macfont.m (macfont_init_font_change_handler): avoid
      shadowing global.
      (syms_of_macfont_for_pdumper): new function.
      (syms_of_macfont): call it.
      * src/menu.c (syms_of_menu): staticpro more stuff.
      * src/minibuf.c (Ftry_completion): rehash if needed.
      (init_minibuf_once_for_pdumper): new function.
      (init_minibuf_once): call it.
      * src/nsfont.m (syms_of_nsfns): staticpro more.
      * src/nsfont.m (syms_of_nsfont_for_pdumper): new function.
      (syms_of_nsfont): call it.
      * src/nsterm.m (syms_of_nsfont): remember pdumper stuff.
      * src/pdumper.c: new file.
      * src/pdumper.h: new file.
      * src/process.c (init_process_emacs): use new pdumper functions
      instead of CANNOT_DUMP.
      * src/profiler.c (syms_of_profiler_for_pdumper): new function.
      (syms_of_profiler_for_pdumper): call it.
      * src/search.c (syms_of_search_for_pdumper): new function.
      (syms_of_search_for_pdumper): call it.
      * src/sheap.c (bss_sbrk_did_unexec): remove.
      * src/sheap.h (bss_sbrk_did_unexec): remove.
      * src/syntax.c (syms_of_syntax): don't redundantly staticpro
      re_match_object.
      * src/sysdep.c: use will_dump_with_unexec_p() instead of bss
      hack thing.
      * src/syssignals.h (init_sigsegv): declare.
      * src/systime.h (init_timefns): remove bool from signature.
      * src/textprop.c (syms_of_textprop): move staticpro.
      * src/thread.c (main_thread_p): constify.
      * src/thread.h (main_thread_p): constify.
      * src/timefns.c (init_timefns): remove bool from signature.
      (syms_of_timefns_for_pdumper): new function.
      (syms_of_timefns): call it.
      * src/w32.c: rearrange code.
      * src/w32.h (w32_relocate): declare.
      * src/w32fns.c (syms_of_w32fns): add pdumper note.
      * src/w32font.c (syms_of_w32font_for_pdumper): new function.
      (syms_of_w32font): call it.
      * src/w32heap.c (using_dynamic_heap): new variable.
      (init_heap): use it.
      * src/w32menu.c (syms_of_w32menu): add pdumper note.
      * src/w32proc.c
      (ctrl_c_handler, mainCRTStartup, _start, open_input_file)
      (rva_to_section, close_file_data): move here.
      * src/w32uniscribe.c (syms_of_w32uniscribe_for_pdumper):
      new function.
      (syms_of_w32uniscribe): call it.
      * src/window.c (init_window_once_for_pdumper): new function.
      (init_window_once): call it; staticpro more stuff.
      * src/xfont.c (syms_of_xfont_for_pdumper): new function.
      (syms_of_xfont): call it.
      * src/xftfont.c (syms_of_xftfont_for_pdumper): new function.
      (syms_of_xftfont): call it.
      * src/xmenu.c (syms_of_xmenu_for_pdumper): new function.
      (syms_of_xmenu): call it.
      * src/xselect.c (syms_of_xselect_for_pdumper): new function.
      (syms_of_xselect): call it.
      * src/xsettings.c (syms_of_xsettings): add more pdumper notes.
      * src/term.c (syms_of_xterm): add pdumper note.
      
      * src/dispnew.c (init_faces_initial): new function.
      (init_display_interactive): rename from init_display; use
      will_dump_p instead of !initialized.  Initialize faces early for
      pdumper if needed.
      (init_display): new function.
      (syms_of_display_for_pdumper): new function.
      (syms_of_display): call it.
      
      * src/dbusbind.c (syms_of_dbusbind): Add TODO for bus reset
      on pdumper load.
      
      * src/data.c (Fdefalias): Use will_dump_p
      instead of Vpurify_flag.
      (Fmake_variable_buffer_local): silence compiler warning with -Og
      by making valcontents UNINIT.
      (arith_driver): silence compiler warning with UNINIT.
      
      * src/conf_post.h (ATTRIBUTE_SECTION): new macro.
      
      * src/composite.c (composition_gstring_put_cache): rehash hash
      table if needed.
      
      * src/coding.c (init_coding_once, syms_of_coding): remember
      pdumper stuff.
      
      * src/charset.h (charset_table_size, charset_table_user): declare.
      
      * src/charset.c (charset_table_used, charset_table_size): un-static.
      (init_charset_oncem, syms_of_charset): remember pdumper stuff.
      
      * src/category.c (category_table_version): remove obsolete
      variable.
      
      * src/callint.c (syms_of_callint): staticpro 'preserved_fns'
      (init_callproc): use will_dump_p instead of !CANNOT_DUMP.
      
      * src/bytecode.c (exec_byte_code): rehash table tables if needed
      
      * src/buffer.c (alloc_buffer_text, free_buffer_text): account for
      pdumper
      (init_buffer_once): add TODO; remember stuff for pdumper.
      (init_buffer): don't take initialized argument; adjust
      for pdumper.
      
      * src/atimer.c (init_atimer): initialize subr only if
      !initialized.
      
      * src/alloc.c: (vector_marked_p, set_vector_marked)
      (vectorlike_marked_p, set_vectorlike_marked, cons_marked_p)
      (set_cons_marked, string_marked_p, set_string_marked)
      (symbol_marked_p, set_symbol_marked, interval_marked_p)
      (set_interval_marked): new accessor routines.  Use them
      instead of raw GC access throughout.
      (Vdead): make non-static when ENABLE_CHECKING.
      (vectorlike_nbytes): rename of 'vector_nbytes'; take a vectorlike
      header as input instead of a vector.
      (number_finalizers_run): new internal C variable.
      (mark_maybe_object): check for pdumper objects.
      (valid_pointer_p): don't be gratuitously inefficient under rr(1).
      (make_pure_c_string): add support for size_byte = -2 mode
      indicating that string data points into Emacs image rodata.
      (visit_vectorlike_root): visits GC roots embedded in
      vectorlike objects.
      (visit_buffer_root): visits GC roots embedded in
      our totally-not-a-buffer buffer global objects.
      (visit_static_gc_roots): visit GC roots in the Emacs data section.
      (mark_object_root_visitor): root callback used for conventional GC
      marking
      (weak_hash_tables): new internal variable for tracking found weak
      hash tables during GC.
      (mark_and_sweep_weak_table_contents): new weak hash table marking.
      (garbage_collect_1): use new GC root visitor machinery.
      (mark_vectorlike): accept a vectorlike_header instead of a
      Lisp_Vector.
      (mark_frame, mark_window, mark_hash_table): new functions.
      (mark_object): initialize 'm'; check for pdumper objects and use
      new mark-bit accessors throughout.  Remove some object-specific
      marking code and move to helper functions above.
      (survives_gc_p): check for pdumper objects.
      (gc-sweep): clear pdumper mark bits.
      (init_alloc_once_for_pdumper): new helper function for early init
      called both during normal init and pdumper load.
      (init_alloc_once): pdumper integration.
      
      * src/Makefile.in: Rewrite dumping for pdumper; add pdumper.o;
      invoke temacs with --temacs command line option; build dmpstruct.h
      from dmpstruct.awk; stop relying on CANNOT_DUMP; clean up pdumper
      intermediate files during build.
      
      * nextstep/Makefile.in: build emacs.pdmp into NS packages
      
      * lisp/startup.el: account for new '--temacs' and '--dump-file'
      command line option.
      
      * lisp/loadup.el: rewrite early init to account for pdumper; use
      injected 'dump-mode' variable (set via the new '--temacs' option)
      instead of parsing command line.
      
      * lisp/cus-start.el: Check 'dump-mode' instead of 'purify-flag',
      since the new 'dump-mode'
      
      * lib-src/make-fingerprint.c: new program
      
      * lib-src/Makefile.in: built make-fingerprint utility program
      
      * configure.ac: Add --with-pdumper toggle to control pdumper
      support; add --with-unexec toggle to control unexec support.
      Add --with-dumping option to control which dumping strategy we use
      by default.  Adjust for pdumper throughout.  Check for
      posix_madvise.
      
      * Makefile.in: Add @DUMPING@ substitution; add pdumper mode.
      
      * .gitignore: Add make-fingerprint, temacs.in, fingerprint.c,
      dmpstruct.h, and pdumper dump files.
      d12e5d00
  17. 01 Jan, 2019 1 commit
  18. 10 Nov, 2018 1 commit
    • Paul Eggert's avatar
      Dissociate controlling tty better on Darwin · 9cd23a29
      Paul Eggert authored
      * src/process.c (dissociate_controlling_tty): New function.
      (create_process): Use it to dissociate controlling tty if setsid
      fails, which happens on Darwin after a vfork (Bug#33154).
      Do this on all platforms, not just on Darwin, as a similar
      problem is plausible elsewhere.
      * src/callproc.c (call_process): Use the new function here, too,
      for consistency and to avoid duplicate code.
      9cd23a29
  19. 30 Oct, 2018 1 commit
  20. 08 Aug, 2018 1 commit
    • Tom Tromey's avatar
      More macro renamings for bignum · d1ec3a0a
      Tom Tromey authored
      * src/alloc.c, src/bidi.c, src/buffer.c, src/buffer.h, src/bytecode.c,
      src/callint.c, src/callproc.c, src/casefiddle.c, src/casetab.c,
      src/category.c, src/ccl.c, src/character.c, src/character.h,
      src/charset.c, src/charset.h, src/chartab.c, src/cmds.c, src/coding.c,
      src/composite.c, src/composite.h, src/data.c, src/dbusbind.c,
      src/decompress.c, src/dired.c, src/dispextern.h, src/dispnew.c,
      src/disptab.h, src/doc.c, src/dosfns.c, src/editfns.c,
      src/emacs-module.c, src/emacs.c, src/eval.c, src/fileio.c,
      src/floatfns.c, src/fns.c, src/font.c, src/font.h, src/fontset.c,
      src/frame.c, src/frame.h, src/fringe.c, src/ftcrfont.c, src/ftfont.c,
      src/gfilenotify.c, src/gnutls.c, src/gtkutil.c, src/image.c,
      src/indent.c, src/insdel.c, src/intervals.c, src/json.c,
      src/keyboard.c, src/keymap.c, src/kqueue.c, src/lcms.c, src/lisp.h,
      src/lread.c, src/macros.c, src/marker.c, src/menu.c, src/minibuf.c,
      src/msdos.c, src/print.c, src/process.c, src/profiler.c, src/search.c,
      src/sound.c, src/syntax.c, src/syntax.h, src/sysdep.c, src/term.c,
      src/termhooks.h, src/textprop.c, src/undo.c, src/w32.c,
      src/w32console.c, src/w32fns.c, src/w32font.c, src/w32inevt.c,
      src/w32proc.c, src/w32select.c, src/w32term.c, src/w32term.h,
      src/w32uniscribe.c, src/window.c, src/xdisp.c, src/xfaces.c,
      src/xfns.c, src/xfont.c, src/xftfont.c, src/xmenu.c, src/xml.c,
      src/xrdb.c, src/xselect.c, src/xsettings.c, src/xterm.c, src/xwidget.c
      Rename XINT->XFIXNUM, XFASTINT->XFIXNAT, XUINT->XUFIXNUM.
      d1ec3a0a
  21. 13 Jul, 2018 1 commit
    • Tom Tromey's avatar
      Rename integerp->fixnum, etc, in preparation for bignums · 42fe787b
      Tom Tromey authored
      * src/json.c, src/keyboard.c, src/keyboard.h, src/keymap.c,
      src/kqueue.c, src/lcms.c, src/lisp.h, src/lread.c, src/macros.c,
      src/marker.c, src/menu.c, src/minibuf.c, src/msdos.c, src/print.c,
      src/process.c, src/profiler.c, src/search.c, src/sound.c,
      src/syntax.c, src/sysdep.c, src/term.c, src/terminal.c,
      src/textprop.c, src/undo.c, src/w16select.c, src/w32.c,
      src/w32console.c, src/w32cygwinx.c, src/w32fns.c, src/w32font.c,
      src/w32inevt.c, src/w32proc.c, src/w32select.c, src/w32term.c,
      src/w32uniscribe.c, src/widget.c, src/window.c, src/xdisp.c,
      src/xfaces.c, src/xfns.c, src/xfont.c, src/xftfont.c, src/xmenu.c,
      src/xrdb.c, src/xselect.c, src/xterm.c, src/xwidget.c: Rename
      INTEGERP->FIXNUM, make_number->make_fixnum, CHECK_NUMBER->CHECK_FIXNUM,
      make_natnum->make_fixed_natum, NUMBERP->FIXED_OR_FLOATP,
      NATNUMP->FIXNATP, CHECK_NATNUM->CHECK_FIXNAT.
      42fe787b
  22. 28 Jun, 2018 1 commit
    • Paul Eggert's avatar
      Tune SAFE_FREE · 76eda952
      Paul Eggert authored
      On my platform (Fedora 28 x86-64, AMD Phenom II X4 910e) this sped
      up a SAFE_FREE-using microbenchmark (string-distance "abc" "abc")
      by about 18%, and shrank the Emacs text size by about 0.1%.
      * src/callint.c (Fcall_interactively):
      * src/callproc.c (call_process):
      * src/doc.c (get_doc_string, Fsnarf_documentation):
      * src/editfns.c (Freplace_buffer_contents):
      * src/emacs-module.c (funcall_module):
      * src/eval.c (Flet):
      * src/process.c (Fmake_process):
      * src/term.c (tty_menu_show):
      * src/xdisp.c (safe__call):
      * src/xmenu.c (x_menu_show):
      Use SAFE_FREE_UNBIND_TO.
      * src/data.c (wrong_choice): No need to call SAFE_FREE here.
      * src/lisp.h (USE_SAFE_ALLOCA):
      * src/regex.c (REGEX_USE_SAFE_ALLOCA):
      Do not declare sa_must_free local; no longer needed.
      All uses removed.
      (SAFE_FREE): Rewrite in terms of safe_free.
      (safe_free): New function, optimized to use xfree.
      (SAFE_FREE_UNBIND_TO): New macro.
      (safe_free_unbind_to): New function.
      76eda952
  23. 01 Jan, 2018 1 commit
  24. 26 Nov, 2017 1 commit
  25. 02 Oct, 2017 1 commit
    • Paul Eggert's avatar
      Prefer HTTPS to HTTP for gnu.org · 5172fa02
      Paul Eggert authored
      This fixes some URLs I omitted from my previous pass,
      notably those in lists.gnu.org.  Although lists.gnu.org
      does not yet support TLS 1.1, TLS 1.0 is better than nothing.
      * lisp/erc/erc.el (erc-official-location):
      * lisp/mail/emacsbug.el (report-emacs-bug):
      Use https:, not http:.
      5172fa02
  26. 13 Sep, 2017 1 commit
    • Paul Eggert's avatar
      Prefer HTTPS to FTP and HTTP in documentation · bc511a64
      Paul Eggert authored
      Most of this change is to boilerplate commentary such as license URLs.
      This change was prompted by ftp://ftp.gnu.org's going-away party,
      planned for November.  Change these FTP URLs to https://ftp.gnu.org
      instead.  Make similar changes for URLs to other organizations moving
      away from FTP.  Also, change HTTP to HTTPS for URLs to gnu.org and
      fsf.org when this works, as this will further help defend against
      man-in-the-middle attacks (for this part I omitted the MS-DOS and
      MS-Windows sources and the test tarballs to keep the workload down).
      HTTPS is not fully working to lists.gnu.org so I left those URLs alone
      for now.
      bc511a64
  27. 25 Aug, 2017 1 commit
    • Paul Eggert's avatar
      Simplify expand_and_dir_to_file · 9a223dab
      Paul Eggert authored
      * src/fileio.c (expand_and_dir_to_file): Simplify by omitting 2nd
      argument, since in practice it always has the default value.  All
      callers changed.  Prefer C99 style decls in nearby code.
      9a223dab
  28. 21 May, 2017 1 commit
  29. 19 May, 2017 1 commit
  30. 18 Apr, 2017 1 commit
  31. 06 Apr, 2017 1 commit
    • Noam Postavsky's avatar
      Mention that processes start in default-directory (Bug#18515) · c7ed57ea
      Noam Postavsky authored
      * doc/lispref/processes.texi (Synchronous Processes):
      (Asynchronous Processes):
      * lisp/subr.el (start-process):
      * src/callproc.c (call-process): Mention that the subprocess starts in
      `default-directory' when local, suggest `start-file-process' and
      `process-file' otherwise.
      c7ed57ea
  32. 12 Mar, 2017 1 commit
    • Paul Eggert's avatar
      Install update-game-score only on request · 995be66f
      Paul Eggert authored
      Most distributions do not install update-game-score properly
      due to setuid/setgid complications, so install it only when
      the installer specifies a user or group (Bug#25895).
      * .gitattributes: Remove lib-src/update-game-score.exe.manifest.
      * Makefile.in (gameuser, gamegroup, use_gamedir, PATH_GAME):
      New vars.
      (epaths-force): Use PATH_GAME.
      (uninstall): Remove snake-scores and tetris-scores only if shared.
      * configure.ac: Default --with-gameuser to 'no'.
      (UPDATE_MANIFEST): Remove.
      * etc/NEWS: Mention this.
      * lib-src/Makefile.in (UPDATE_MANIFEST): Remove.
      (use_gamedir): New macro.
      (UTILITIES): Remove update-game-score unless use_gamedir.
      (SCRIPTS): Remove $(UPDATE_MANIFEST).
      ($(DESTDIR)${archlibdir}): Install game directory program and data
      only if use_gamedir.
      * lib-src/update-game-score.exe.manifest: Remove, as
      update-game-score is no longer installed on MS-Windows.
      * lisp/play/gamegrid.el (gamegrid-add-score-with-update-game-score):
      Use auxiliary program only if setuid or setgid.
      * make-dist: Do not distribute update-game-score.exe.manifest.
      * src/callproc.c (init_callproc):
      Set Vshared_game_score_directory based on PATH_GAME, not DOS_NT.
      (syms_of_callproc): Remove unnecessary initialization of
      Vshared_game_score_directory.
      995be66f
  33. 19 Feb, 2017 1 commit
  34. 01 Feb, 2017 3 commits
    • Paul Eggert's avatar
      Fix quitting bug when buffers are frozen · b4c9f912
      Paul Eggert authored
      Problem noted by Eli Zaretskii in:
      http://lists.gnu.org/archive/html/emacs-devel/2017-01/msg00721.html
      This patch also fixes some other issues in that report.
      * src/lisp.h (incr_rarely_quit): Remove.
      All callers changed to use rarely_quit directly.
      * src/search.c (freeze_buffer_relocation)
      (thaw_buffer_relocation): New functions.
      (looking_at_1, fast_looking_at, search_buffer):
      Use them to fix bug when quitting when buffers are frozen.
      * src/sysdep.c (emacs_intr_read): Rename from emacs_nointr_read.
      All uses changed.
      b4c9f912
    • Paul Eggert's avatar
      Revamp quitting and fix infloops · b01ac672
      Paul Eggert authored
      This fixes some infinite loops that cannot be quitted out of,
      e.g., (defun foo () (nth most-positive-fixnum '#1=(1 . #1#)))
      when byte-compiled and when run under X.  See:
      http://lists.gnu.org/archive/html/emacs-devel/2017-01/msg00577.html
      This also attempts to keep the performance improvements I recently
      added, as much as possible under the constraint that the infloops
      must be caught.  In some cases this fixes infloop bugs recently
      introduced when I removed immediate_quit.
      * src/alloc.c (Fmake_list):
      Use rarely_quit, not maybe_quit, for speed in the usual case.
      * src/bytecode.c (exec_byte_code):
      * src/editfns.c (Fcompare_buffer_substrings):
      * src/fns.c (Fnthcdr):
      * src/syntax.c (scan_words, skip_chars, skip_syntaxes)
      (Fbackward_prefix_chars):
      Use rarely_quit so that users can C-g out of long loops.
      * src/callproc.c (call_process_cleanup, call_process):
      * src/fileio.c (read_non_regular, Finsert_file_contents):
      * src/indent.c (compute_motion):
      * src/syntax.c (scan_words, Fforward_comment):
      Remove now-unnecessary maybe_quit calls.
      * src/callproc.c (call_process):
      * src/doc.c (get_doc_string, Fsnarf_documentation):
      * src/fileio.c (Fcopy_file, read_non_regular, Finsert_file_contents):
      * src/lread.c (safe_to_load_version):
      * src/sysdep.c (system_process_attributes) [GNU_LINUX]:
      Use emacs_read_quit instead of emacs_read in places where
      C-g handling is safe.
      * src/eval.c (maybe_quit): Move comment here from lisp.h.
      * src/fileio.c (Fcopy_file, e_write):
      Use emacs_write_quit instead of emacs_write_sig in places where
      C-g handling is safe.
      * src/filelock.c (create_lock_file): Use emacs_write, not
      plain write, as emacs_write no longer has a problem.
      (read_lock_data): Use emacs_read, not read, as emacs_read
      no longer has a problem.
      * src/fns.c (rarely_quit): Move to lisp.h and rename to
      incr_rarely_quit.  All uses changed..
      * src/fns.c (Fmemq, Fmemql, Fassq, Frassq, Fplist_put, Fplist_member):
      * src/indent.c (compute_motion):
      * src/syntax.c (find_defun_start, back_comment, forw_comment)
      (Fforward_comment, scan_lists, scan_sexps_forward):
      Use incr_rarely_quit so that users can C-g out of long loops.
      * src/fns.c (Fnconc): Move incr_rarely_quit call to within
      inner loop, so that it catches C-g there too.
      * src/keyboard.c (tty_read_avail_input): Remove commented-out
      and now-obsolete code dealing with interrupts.
      * src/lisp.h (rarely_quit, incr_rarely_quit): New functions,
      the latter moved here from fns.c and renamed from rarely_quit.
      (emacs_read_quit, emacs_write_quit): New decls.
      * src/search.c (find_newline, search_buffer, find_newline1):
      Add maybe_quit to catch C-g.
      * src/sysdep.c (get_child_status): Always invoke maybe_quit
      if interruptible, so that the caller need not bother.
      (emacs_nointr_read, emacs_read_quit, emacs_write_quit):
      New functions.
      (emacs_read): Rewrite in terms of emacs_nointr_read.
      Do not handle C-g or signals; that is now for emacs_read_quit.
      (emacs_full_write): Replace PROCESS_SIGNALS two-way arg
      with INTERRUPTIBLE three-way arg.  All uses changed.
      b01ac672
    • Paul Eggert's avatar
      Remove immediate_quit. · 33be5003
      Paul Eggert authored
      The old code that sets and clears immediate_quit was
      ineffective except when Emacs is running in terminal mode, and
      has problematic race conditions anyway, so remove it.  This
      will introduce some hangs when Emacs runs in terminal mode,
      and these hangs should be fixed in followup patches.
      * src/keyboard.c (immediate_quit): Remove.  All uses removed.
      33be5003
  35. 26 Jan, 2017 1 commit
    • Paul Eggert's avatar
      Replace QUIT with maybe_quit · b3a3ed52
      Paul Eggert authored
      There’s no longer need to have QUIT stand for a slug of C statements.
      Use the more-obvious function-call syntax instead.
      Also, use true and false when setting immediate_quit.
      These changes should not affect the generated machine code.
      * src/lisp.h (QUIT): Remove.  All uses replaced by maybe_quit.
      b3a3ed52
  36. 01 Jan, 2017 1 commit