1. 21 May, 2020 1 commit
    • Paul Eggert's avatar
      Redo RCS Id for pdumper · 62a5e890
      Paul Eggert authored
      * lisp/version.el: Don’t put an RCS Id style string into the
      executable via purecopy, as this does not work with the pdumper.
      * src/emacs.c (RCS_Id): New constant, for 'ident'.
      
      (cherry picked from commit 3d1bcfba)
      62a5e890
  2. 01 Jan, 2020 1 commit
  3. 14 Dec, 2019 1 commit
    • Paul Eggert's avatar
      Fix typo that broke GNU/Linux unexec build · c6e655c7
      Paul Eggert authored
      * src/emacs.c (Fdump_emacs): Remove stray closing brace that
      breaks the build when configured with --with-dumping=unexec on
      GNU/Linux.  (Apparently everybody is using pdumper now.)
      I introduced the bug in 2019-07-09T00:50:39Z!eggert@cs.ucla.edu.
      c6e655c7
  4. 20 Nov, 2019 1 commit
  5. 23 Sep, 2019 1 commit
    • Paul Eggert's avatar
      Update some URLs · 946a56a1
      Paul Eggert authored
      This mostly changes http: to https: in URLs.  It also updates
      some URLs that have moved, removes some URLs that no longer
      work, recommends against using procmail (procmail.org no
      longer works), and removes some mentions of the
      no-longer-existing Gmane, LPF and VTW.
      It doesn't update all URLs, just the ones I had time for.
      * GNUmakefile (help):
      * admin/admin.el (manual-doctype-string):
      * admin/charsets/Makefile.in (${charsetdir}/ALTERNATIVNYJ.map):
      * admin/charsets/mapconv:
      * lisp/net/soap-client.el (soap-create-envelope):
      * lisp/org/org.el (org-doi-server-url):
      * lisp/textmodes/bibtex.el (bibtex-generate-url-list):
      Prefer https: to http: un URLs.
      946a56a1
  6. 19 Sep, 2019 1 commit
    • Paul Eggert's avatar
      Omit some overenthusiastic file-truename calls · dff4f9c7
      Paul Eggert authored
      Problem reported by Tino Calancha (Bug#37445).
      * src/emacs.c (init_cmdargs): Call file-truename only if
      needed, i.e., if invocation-directory ends in "/i386/" on
      WINDOWSNT.
      * src/lread.c (readevalloop): If the sourcename is not
      absolute, make it absolute.  There is no need to convert
      non-absolute files into truenames, since absolute files are
      not converted into truenames.
      (init_lread): Do not convert source-directory into a truename
      at startup.  There is no need to do so in a dumped Emacs since
      an absolute file name suffices.  The source directory might
      not even exist any more, or might have been replaced by an
      interloper who takes advantage of the truename calculation.
      (syms_of_lread): Remove Qfile_truename; no longer needed.
      dff4f9c7
  7. 18 Sep, 2019 1 commit
    • Paul Eggert's avatar
      Improve reporting of I/O, access errors · 9dc306b1
      Paul Eggert authored
      Signal an error for file-oriented errors that are not tame
      errors like ENOENT and ENOTDIR (Bug#37389).
      Do this for primitives exposed to Lisp; the lower
      level internal C API merely makes errno values available
      to higher-level C code.
      * doc/lispref/files.texi (Testing Accessibility)
      (File Attributes, Extended Attributes): Do not say that the
      functions return nil when the return value cannot be determined.
      * etc/NEWS: Mention the change.
      * src/dired.c (Ffile_attributes): Fix doc string confusion
      about opening a file vs getting its attributes.
      (file_attributes): Signal serious errors.
      * src/fileio.c (check_existing, check_executable)
      (check_writable): Remove.  All callers changed to use
      check_file_access or file_access_p.
      (file_access_p, file_metadata_errno, file_attribute_errno)
      (file_test_errno, check_file_access, check_emacs_readlinkat):
      New functions.
      * src/fileio.c (Ffile_executable_p, Ffile_readable_p)
      (Ffile_name_case_insensitive_p, Frename_file, Ffile_exists_p):
      (Ffile_symlink_p, Ffile_directory_p)
      (Ffile_accessible_directory_p, Ffile_regular_p)
      (Ffile_selinux_context, Ffile_acl, Ffile_modes)
      (Ffile_newer_than_file_p, Fset_visited_file_modtime)
      (Ffile_system_info):
      * src/filelock.c (unlock_file, Ffile_locked_p):
      * src/lread.c (Fload):
      Signal serious errors.
      * src/fileio.c (Ffile_writable_p): Remove unnecessary CHECK_STRING.
      (emacs_readlinkat): Now static.
      * src/filelock.c (current_lock_owner, lock_if_free): Return a
      positive errno on error, and the negative of the old old value
      on success.  All callers changed.
      * src/lread.c (openp): Propagate serious errno values to caller.
      9dc306b1
  8. 16 Sep, 2019 1 commit
    • Paul Eggert's avatar
      Remove obsolete Lint directives · 2c2f0eb9
      Paul Eggert authored
      Most of the directives were wrong anyway.  Apparently
      traditional lint hasn’t been used to check Emacs for years.
      * src/callint.c (Finteractive):
      * src/cm.c (evalcost):
      * src/emacs.c (main):
      * src/eval.c (call1, call2, call3, call4, call5, call6, call7, call8):
      * src/fns.c (concat2, concat3, nconc2):
      * src/term.c (calculate_ins_del_char_costs):
      Omit ARGSUSED comments.
      * src/eval.c (call1): Omit VARARGS comment.
      2c2f0eb9
  9. 11 Sep, 2019 1 commit
    • Paul Eggert's avatar
      Improve checking of pdump load failures · 5fafa40d
      Paul Eggert authored
      * src/alloc.c (memory_full): Just report "memory exhausted" if
      failure occurs during initialization, since fancier recovery
      schemes are not likely to work when not initialized.
      * src/emacs.c (dump_error_to_string): Accept int, not enum
      pdumper_load_result, since the result might not fit in the
      enum.  Use strerror if it was derived from errno.  This is for
      better diagnostics of pdump load failures.
      (load_pdump_find_executable): Return char *, not enum.  2nd
      arg is now pointer to buffer size, rather than pointer to
      pointer to buffer.  All callers changed.  Use Emacs allocator
      since they should now be OK even during early startup.
      Use check_executable instead access, to use effective rather
      than real permissions.
      (load_pdump): Return void since callers ignore result.
      Use int where enum could be too narrow.  Use heap rather
      than stack for possibly-long string.  Prefer ptrdiff_t to
      size_t.
      * src/fileio.c (check_executable): Now extern.
      * src/pdumper.c (pdumper_load): Return int that may have
      errno added to it, for better diagnostics when loads fail.
      5fafa40d
  10. 31 Aug, 2019 1 commit
    • Paul Eggert's avatar
      Check instead of relying on NOTREACHED · 77910055
      Paul Eggert authored
      NOTREACHED was designed for traditional lint decades ago,
      and _Noreturn now normally subsumes its function.
      In the one case in Emacs where NORETURN might help and _Noreturn does
      not, check for NOTREACHED instead of assuming it.
      * lib-src/etags.c (main):
      * src/xterm.c (x_connection_closed):
      Remove NOTREACHED after a call to a _Noreturn function, as NOTREACHED
      is no longer needed there.  Also, one of the NOTREACHEDs was
      misplaced, which defeated traditional lint checking anyway.
      * lib-src/pop.c (pop_getline): Redo so as to not need NOTREACHED.
      * src/emacs.c (main): Use eassume (false) rather than NOTREACHED,
      so that running with ENABLE_CHECKING catches any internal error
      causing the toplevel Frecursive_edit to return.
      77910055
  11. 23 Jul, 2019 1 commit
    • Paul Eggert's avatar
      Improve pdumper doc; say unexec is deprecated · 8dd5b6ea
      Paul Eggert authored
      Say that pdumping cannot redump unless -batch is used.  Say that
      the traditional unexec dumping method is by default not available,
      and is deprecated.  Don't call dump files "portable", as dump files
      are not any more portable than the Emacs executables themselves.
      Just call them "dump files".  Similar, prefer "portable dumper"
      (since the dumper code is portable) to "portable dumping" (since
      the dump file is not).  Be more systematic about calling them
      "dump files" instead of "dumped images" or whatnot.
      8dd5b6ea
  12. 13 Jul, 2019 1 commit
    • Paul Eggert's avatar
      Avoid interleaving stderr lines when shutting down · 34810ab4
      Paul Eggert authored
      * src/emacs.c (shut_down_emacs) [!DOS_NT]: Avoid interleaving
      to stderr in the usual case, by using a single write and by
      appending a newline.
      * src/sysdep.c (emacs_backtrace) [HAVE_BACKTRACE_SYMBOLS_FD]:
      Omit newline since shut_down_emacs now does that.
      34810ab4
  13. 09 Jul, 2019 1 commit
    • Paul Eggert's avatar
      Use fewer locks when accessing stdio · f8ab9083
      Paul Eggert authored
      * src/alloc.c, src/bidi.c, src/emacs-module.c, src/pdumper.c:
      * src/regex-emacs.c, src/unexhp9k800.c, src/unexmacosx.c:
      * src/widget.c, src/xdisp.c, src/xselect.c, src/xterm.c:
      Include sysstdio.h instead of stdio.h, to avoid locking
      stdio streams in many cases.
      * src/alloc.c (test_setjmp):
      * src/bidi.c (bidi_dump_cached_states):
      * src/cm.c (calccost):
      * src/dispnew.c (init_display_interactive):
      * src/emacs.c (main):
      * src/image.c (convert_mono_to_color_image):
      * src/minibuf.c (read_minibuf_noninteractive):
      * src/nsfont.m (ns_descriptor_to_entity)
      (ns_dump_glyphstring):
      * src/nsterm.h (NSTRACE_MSG_NO_DASHES):
      * src/nsterm.m (ns_mouse_position)
      (sendEvent:, keyDown:, performDragOperation:):
      * src/pdumper.c (dump_fingerprint, print_paths_to_root_1):
      * src/print.c (debug_print):
      * src/regex-emacs.c (debug_putchar, print_fastmap)
      (print_partial_compiled_pattern, print_compiled_pattern)
      (print_double_string, regex_compile):
      * src/term.c (vfatal):
      * src/unexhp9k800.c (read_header):
      * src/unexmacosx.c (unexec_error):
      * src/widget.c (EmacsFrameInitialize):
      * src/xdisp.c (message_to_stderr, vmessage, dump_glyph_row)
      (Fdump_glyph_matrix, Fdump_frame_glyph_matrix, dump_glyph_string):
      * src/xfaces.c (Fdump_colors, Fdump_face):
      * src/xselect.c (x_clipboard_manager_error_2):
      * src/xterm.c (x_initialize):
      * src/xwidget.c (WEBKIT_FN_INIT):
      Prefer unlocked calls like fputs to locked calls like fprintf.
      * src/charset.c (read_hex):
      * src/cm.c (cmputc, cmcheckmagic):
      * src/dispnew.c (update_frame, update_frame_with_menu)
      (update_frame_1, Fsend_string_to_terminal, Fding)
      (bitch_at_user):
      * src/emacs.c (main, Fdump_emacs):
      * src/emacs-module.c (module_abort):
      * src/fileio.c (Fdo_auto_save):
      * src/image.c (slurp_file)
      (png_read_from_file, png_load_body, our_stdio_fill_input_buffer):
      * src/keyboard.c (record_char, kbd_buffer_get_event)
      (handle_interrupt):
      * src/lread.c (readbyte_from_stdio, read1):
      * src/minibuf.c (read_minibuf_noninteractive):
      * src/print.c (printchar_to_stream, strout)
      (Fredirect_debugging_output):
      * src/sysdep.c (reset_sys_modes, close_output_streams)
      (procfs_ttyname, procfs_get_total_memory):
      * src/term.c (tty_ring_bell, tty_send_additional_strings)
      (tty_set_terminal_modes, tty_reset_terminal_modes)
      (tty_update_end, tty_clear_end_of_line, tty_write_glyphs)
      (tty_write_glyphs_with_face, tty_insert_glyphs)
      (tty_menu_activate):
      * src/xfaces.c (Fx_load_color_file):
      Simplify by using ordinary calls like putc to explicitly-unlocked
      calls like putc_unlocked, since the ordinary calls are now
      unlocked anyway.
      * src/emacs.c (main, Fdump_emacs):
      * src/pdumper.c (Fdump_emacs_portable):
      Coalesce adjacent printfs.
      * src/nsterm.h: Include sysstdio.h as this file’s macros rely on it.
      * src/regex-emacs.c (print_compiled_pattern):
      Omit redundant fflush.
      * src/sysstdio.h: Include unlocked-io.h.
      (clearerr_unlocked, feof_unlocked, ferror_unlocked)
      (fflush_unlocked, fgets_unlocked, fputc_unlocked)
      (fputs_unlocked, fread_unlocked, fwrite_unlocked)
      (getc_unlocked, getchar_unlocked, putc_unlocked)
      (putchar_unlocked): Remove these macros; now done by unlocked-io.h.
      * src/xwidget.c: Include sysstdio.h.
      f8ab9083
  14. 07 Jul, 2019 2 commits
    • Paul Eggert's avatar
      Remove printmax_t etc. · 8f522efe
      Paul Eggert authored
      printmax_t etc. were needed only for platforms that lacked
      support for printing intmax_t.  These platforms are now so
      obsolete that they are no longer practical porting targets.
      * src/image.c (gs_load): Fix unlikely buffer overrun
      discovered while making these changes.  It was introduced in
      2011-07-17T00:34:43!eggert@cs.ucla.edu.
      * src/lisp.h (printmax_t, uprintmax_t, pMd, pMu, pMx):
      Remove.  All uses replaced by their standard counterparts
      intmax_t, uintmax_t, PRIdMAX, PRIuMAX, PRIxMAX.
      8f522efe
    • Paul Eggert's avatar
      Don’t ignore stderr failure when ADDRESS_SANITIZER · b39f5e6c
      Paul Eggert authored
      * src/emacs.c (close_output_streams): Move from here ...
      * src/sysdep.c: ... to here, where it really belongs anyway.
      When ADDRESS_SANITIZER, fflush stderr and check for ferror,
      to catch stderr output errors even in this case.
      b39f5e6c
  15. 27 Jun, 2019 1 commit
  16. 26 Jun, 2019 1 commit
    • Eli Zaretskii's avatar
      Support invoking Emacs via a symlink on MS-Windows · e35708b4
      Eli Zaretskii authored
      * src/w32.c (w32_my_exename): Resolve symlinks in the
      executable name, to support searching for the pdumper file
      when the executable is found via a symlink.
      * src/emacs.c (load_pdump): Add a comment about symlink
      resolution on Windows.
      e35708b4
  17. 25 Jun, 2019 1 commit
    • Paul Eggert's avatar
      Avoid some strlen work, primarily via strnlen · d7c68362
      Paul Eggert authored
      * admin/merge-gnulib (GNULIB_MODULES): Add strnlen.
      * lib-src/etags.c (find_entries):
      * src/emacs.c (main):
      * src/nsmenu.m (parseKeyEquiv:):
      * src/nsterm.m (ns_xlfd_to_fontname):
      * src/term.c (vfatal):
      Prefer !*X to !strlen (X).
      * lib-src/etags.c (pfnote, add_regex):
      * lib-src/pop.c (pop_open):
      * lib-src/update-game-score.c (main):
      * lwlib/lwlib.c (lw_separator_p):
      * src/doprnt.c (doprnt):
      * src/emacs.c (main):
      * src/inotify.c (inotifyevent_to_event):
      * src/keyboard.c (menu_separator_name_p, parse_tool_bar_item):
      * src/sysdep.c (get_current_dir_name_or_unreachable):
      * src/xdisp.c (store_mode_line_string):
      Use strnlen to avoid unnecessary work with strlen.
      * lib-src/etags.c (Prolog_functions, prolog_pr)
      (Erlang_functions, erlang_func):
      Prefer ptrdiff_t to size_t when either will do.
      (prolog_pr, erlang_func): New arg LASTLEN, to avoid
      unnecessary strlen call. All callers changed.
      * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
      * lib/strnlen.c, m4/strnlen.m4: New files, copied from Gnulib.
      * lwlib/lwlib.c (lw_separator_p):
      * src/json.c (json_has_prefix):
      Use strncmp to avoid unecessary work with strlen + memcmp.
      * src/process.c (set_socket_option): Use SBYTES instead of strlen.
      d7c68362
  18. 24 Jun, 2019 3 commits
    • Eli Zaretskii's avatar
      Fix MS-Windows build as followup to pdumper executable lookup · 9f5f5ae6
      Eli Zaretskii authored
      * src/w32.c (w32_my_exename): New function.
      * src/w32.h (w32_my_exename): Add prototype.
      * src/emacs.c (load_pdump_find_executable) [WINDOWSNT]: Find
      the actual file name of the program without looking along
      PATH, by calling w32_my_exename.
      
      * nt/mingw-cfg.site (ac_cv_func_canonicalize_file_name)
      (ac_cv_func_realpath, gl_cv_func_realpath_works): Disable
      testing.
      * nt/gnulib-cfg.mk (OMIT_GNULIB_MODULE_canonicalize-lgpl): Set
      to true.
      9f5f5ae6
    • Daniel Colascione's avatar
      Fix pdumper executable-finding code · 65d45def
      Daniel Colascione authored
      * src/emacs.c:
      (load_pdump_find_executable): New function.
      (load_pdump): Use it.
      65d45def
    • Daniel Colascione's avatar
      Fix locating pdump by symlink · b9ac4f81
      Daniel Colascione authored
      * admin/merge-gnulib (GNULIB_MODULES): Add canonicalize-lgpl module
      * build-aux/config.guess, build-aux/gitlog-to-changelog,
      build-aux/update-copyright, lib/canonicalize-lgpl.c,
      lib/gnulib.mk.in, lib/malloca.c, lib/malloca.h, lib/pathmax.h,
      m4/canonicalize.m4, m4/double-slash-root.m4, m4/gnulib-comp.m4,
      m4/malloca.m4, my/pathmax.4: copy from GNUlib or regenerate from
      update
      * src/emacs.c: find dump by canonical path
      b9ac4f81
  19. 18 May, 2019 1 commit
    • Paul Eggert's avatar
      Clean up and simplify image-type setup · 41bf8653
      Paul Eggert authored
      This also fixes an unlikely hang involving a circular image
      description.
      * src/dispextern.h (struct image.type): Now pointer-to-const.
      * src/image.c (struct image_type.init) [!WINDOWSNT]: Omit.
      (IMAGE_TYPE_INIT): New macro.
      (image_types): Now a small array-of-const, not a pointer.
      (CACHE_IMAGE_TYPE): Remove; the code’s simpler without it.
      (ADD_IMAGE_TYPE): Remove this macro, replacing with ...
      (add_image_type): ... this equivalent function.  All uses changed.
      (define_image_type): Remove.  All uses removed.
      (valid_image_p): Use FOR_EACH_TAIL_SAFE to avoid Emacs hanging
      if the user creates a circular description of an image.
      (xbm_type, xpm_type, pbm_type, png_type, jpeg_type, tiff_type)
      (gif_type, imagemagick_type, svg_type, gs_type):
      Remove; now done by image_types.
      (init_imagemagick_functions): Remove decl of nonexistent function.
      (gs_clear_image): Remove; all uses replaced by image_clear_image.
      (initialize_image_type): New function, which captures a lot
      of the previously-scattered WINDOWSNT ifdefs.
      (lookup_image_type): Use it.
      (reset_image_types): Remove.  All uses removed.
      (syms_of_image): Don’t worry about ignoring image_types for
      pdumper, since it’s a constant now.
      41bf8653
  20. 24 Apr, 2019 1 commit
    • Paul Eggert's avatar
      Simplify thread initialization and GC · 4c90369d
      Paul Eggert authored
      * src/lisp.h (PVECHEADERSIZE): New macro.
      (XSETPVECTYPESIZE): Use it.
      * src/search.c (syms_of_search): No need to initialize or
      staticpro last_thing_searched or saved_last_thing_searched, as
      the thread code arranges for initialization and GC.
      * src/thread.c (main_thread): Initialize statically.
      (Fmake_mutex, Fmake_condition_variable, Fmake_thread):
      Use ALLOCATE_ZEROED_PSEUDOVECTOR rather than zeroing by hand.
      (mark_one_thread): No need to mark Lisp_Object members.
      (init_main_thread, init_threads_once): Remove.  All uses removed.
      4c90369d
  21. 19 Apr, 2019 1 commit
  22. 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
  23. 11 Apr, 2019 1 commit
  24. 22 Mar, 2019 1 commit
    • Stefan Monnier's avatar
      Fix misuses of NULL when talking about the NUL character · 76fea1eb
      Stefan Monnier authored
      * lisp/subr.el (inhibit-null-byte-detection): Make it an obsolete alias.
      
      * src/coding.c (setup_coding_system): Use new name.
      (detect_coding): Rename null_byte_found => nul_byte_found.
      (detect_coding_system): Use new name.
      Rename null_byte_found => nul_byte_found.
      (Fdefine_coding_system_internal): Use new name.
      (syms_of_coding): Rename inhibit-null-byte-detection to
      inhibit-nul-byte-detection.
      * src/w16select.c (get_clipboard_data): null_char => nul_char.
      * src/json.c (check_string_without_embedded_nuls): Rename from
      check_string_without_embedded_nulls.
      (Fjson_parse_string): Adjust accordingly.
      * src/coding.h (enum define_coding_undecided_arg_index)
      (enum coding_attr_index): ...null_byte... => ...nul_byte....
      * lisp/info.el (info-insert-file-contents, Info-insert-dir):
      * lisp/international/mule.el (define-coding-system):
      * lisp/vc/vc-git.el (vc-git--call):
      * doc/lispref/nonascii.texi (Lisp and Coding Systems): Use the new name.
      76fea1eb
  25. 10 Feb, 2019 1 commit
    • Eli Zaretskii's avatar
      Unbreak the Cygw32 build · 24695e89
      Eli Zaretskii authored
      * src/emacs.c (main) [HAVE_NTGUI]: Remove code that is only
      for WINDOWSNT or condition it on WINDOWSNT.  (Bug#34409)
      24695e89
  26. 07 Feb, 2019 3 commits
  27. 06 Feb, 2019 1 commit
  28. 02 Feb, 2019 1 commit
  29. 01 Feb, 2019 1 commit
    • Paul Eggert's avatar
      Rename CANNOT_DUMP to HAVE_UNEXEC · 3b69e02a
      Paul Eggert authored
      * configure.ac (CANNOT_DUMP): Remove.  All uses removed,
      or changed to the negative of with_unexec.
      (HAVE_UNEXEC): New macro.  All uses of CANNOT_DUMP changed
      to the negative of this macro.
      3b69e02a
  30. 28 Jan, 2019 1 commit
    • Eli Zaretskii's avatar
      Fix bug with face-id after restoring from pdump · cd06d173
      Eli Zaretskii authored
      * src/xfaces.c (init_xfaces): New function.
      * src/emacs.c (main) [HAVE_PDUMPER]: If dumped with pdumper,
      call init_xfaces.  (Bug#34226)
      * src/lisp.h (init_xfaces) [HAVE_PDUMPER]: Add prototype.
      
      * test/lisp/faces-tests.el (faces--test-face-id): New test for
      bug#34226.
      cd06d173
  31. 27 Jan, 2019 1 commit
  32. 26 Jan, 2019 2 commits
    • Eli Zaretskii's avatar
      4eb78a47
    • Eli Zaretskii's avatar
      Improve pdump file search and 'pdumper-stats' · a7974933
      Eli Zaretskii authored
      * src/pdumper.c (pdumper_record_wd): New function.
      (pdumper_load): Use xstrdup instead of strdup, as on
      MS-Windows the latter uses the wrong heap.  Don't free a
      NULL pointer.
      * src/emacs.c (load_pdump): Support the use case where the
      Emacs binary was renamed: look in exec-directory for the
      pdump file whose base name is derived from the Emacs binary,
      in addition to just emacs.pdmp.
      (main): Call pdumper_record_wd to prepend CWD to the pdump
      file name.
      * src/fileio.c (file_name_absolute_p): Now extern.
      * src/lisp.h (file_name_absolute_p): Add prototype.
      * src/pdumper.h (pdumper_record_wd): Add prototype.
      
      * doc/emacs/cmdargs.texi (Initial Options): Update the
      documentation of where Emacs looks for the dump file.
      a7974933
  33. 23 Jan, 2019 1 commit
  34. 18 Jan, 2019 1 commit
    • Eli Zaretskii's avatar
      Clean up memory allocation and unexec support on MS-Windows · 5e3b0f52
      Eli Zaretskii authored
      * src/w32heap.c (report_temacs_memory_usage): Condition on
      !CANNOT_DUMP, in addition to ENABLE_CHECKING.
      (init_heap): Accept an argument, which tells us what heap
      allocation method to use.
      (DUMPED_HEAP_SIZE) [CANNOT_DUMP]: Define to a small value, as
      we don't use dumped_data[] in this case.
      * src/w32heap.h (init_heap): Adjust prototype.
      <using_dynamic_heap>: Remove declaration.
      * src/emacs.c (main) [WINDOWSNT]: Determine heap allocation
      method based on whether we are in temacs and whether unexec
      will be used to dump Emacs.  Pass the heap allocation method
      to init_heap, which is now called after parsing the
      --temacs=METHOD option.
      * src/unexw32.c (unexec): Don't fiddle with using_dynamic_heap.
      <using_dynamic_heap>: Remove definition.
      * src/w32proc.c (malloc_before_init, realloc_before_init)
      (free_before_init): New functions, to catch memory allocation
      before heap allocation method is set up.
      5e3b0f52