1. 26 Jul, 2018 1 commit
    • Lucas Werkmeister's avatar
      Notify systemd in daemon-initialized and kill-emacs (Bug#31498) · 19f5f7b1
      Lucas Werkmeister authored
      With --[bg-]daemon and Type=forking, systemd will only consider the
      daemon to have fully started up once the original process exits, and
      will wait until then to start units depending on the Emacs service.  To
      get the same functionality with --fg-daemon, use Type=notify instead of
      Type=simple and explicitly send a readiness notification to systemd at
      the point where the forked process would in --bg-daemon mode notify its
      parent process and cause it to exit.  Similarly, notify systemd at the
      beginning of the shutdown process as well.  (Both of these calls are
      successful no-ops if emacs was not started by systemd.)
      * etc/emacs.service: Update Type.
      * src/emacs.c (daemon-initialized) [HAVE_LIBSYSTEMD]:
      * src/emacs.c (kill-emacs) [HAVE_LIBSYSTEMD]: Call sd_notify().
      19f5f7b1
  2. 08 Jul, 2018 1 commit
  3. 26 May, 2018 1 commit
  4. 04 Apr, 2018 1 commit
    • Paul Eggert's avatar
      Pacify GCC when --enable-profiling · 9b0e8a4c
      Paul Eggert authored
      * src/conf_post.h (PROFILING): Undef if not on a platform that
      supports it.  Simplify uses accordingly.
      * src/emacs.c (etext) [PROFILING]:
      Declare at top level to avoid GCC warning.
      9b0e8a4c
  5. 12 Feb, 2018 2 commits
    • Paul Eggert's avatar
      Minor cleanups for server-name fix (Bug#24218) · d43a724f
      Paul Eggert authored
      * lisp/server.el (server--external-socket-initialized): Rename
      from server-external-socket-initialised, since it should be
      private and Emacs uses American spelling.  All uses changed.
      * src/emacs.c, src/lisp.h: Revert previous changes, as the
      initialization is now done in src/process.c, which already
      includes the relevant files.
      * src/process.c (union u_sockaddr): Move decl to top level.
      (external_sock_name, Fget_external_sockname): Remove, replacing
      with Vinternal__external_sockname.  All uses changed.
      (init_process_emacs): Deduce socket name ourselves rather than
      have main.c do it.  Use conv_sockaddr_to_lisp instead of doing
      it by hand.  Conditionalize it on HAVE_GETSOCKNAME.
      d43a724f
    • Matthew Leach's avatar
      Fix `server-name' and `server-socket-dir' for (Bug#24218) · e1ca0ea8
      Matthew Leach authored
      * lisp/server.el: (server-external-socket-initialised): New
      (server-name): Compute server name from `get-external-sockname'.
      (server-socket-dir): Compute socket dir from
      `get-external-sockname'.
      (server-start): Don't check for existing server when an
      uninitialised external socket has been passed to Emacs.
      * src/emacs.c: (main): Obtain socket name via getsockname and pass
      to `init_process_emacs'.
      * src/lisp.h: (init_process_emacs): Add second parameter.
      * src/process.c: (external_sock_name): New.
      (get-external-sockname): New.
      (init_process_emacs): Set `external_sock_name' to `sockname'
      parameter.
      e1ca0ea8
  6. 24 Jan, 2018 1 commit
  7. 13 Jan, 2018 1 commit
    • Ken Brown's avatar
      Add battery support to all Cygwin builds · 5af5df1f
      Ken Brown authored
      It already exists in the Cygwin-w32 build.
      * src/w32fns.c (Fw32_battery_status): Move to...
      * src/w32cygwinx: New file, to be used for functions common to
      the MS Windows and Cygwin builds.
      (syms_of_w32cygwinx): New function.
      * src/lisp.h: Add prototype of syms_of_w32cygwinx.
      * src/emacs.c (main) [HAVE_NTGUI or CYGWIN]: Call syms_of_w32cygwinx.
      * src/Makefile.in (SOME_MACHINE_OBJECTS):
      * configure.ac (W32_OBJ) [HAVE_W32]: Add w32cygwinx.o.
      (W32_LIBS) [CYGWIN]: Set equal to "-lkernel32" in non-w32 build.
      (W32_OBJ) [CYGWIN]: Set equal to "w32cygwinx.o" in non-w32 build.
      * etc/NEWS: Document the new battery support.
      5af5df1f
  8. 01 Jan, 2018 1 commit
  9. 12 Dec, 2017 1 commit
    • Paul Eggert's avatar
      Narrow pointer bounds when appropriate · 4295050e
      Paul Eggert authored
      This typically occurs in a storage manager, where the caller
      is expected to access only the newly-allocated object,
      instead of using the returned value to access unrelated
      parts of the heap.
      * src/alloc.c (allocate_string, allocate_string_data)
      (compact_small_strings, find_string_data_in_pure)
      (sweep_strings, setup_on_free_list, allocate_vectorlike
      (pure_alloc):
      * src/bytecode.c (exec_byte_code):
      * src/callint.c (Fcall_interactively):
      * src/dispnew.c (scrolling):
      * src/editfns.c (styled_format):
      * src/frame.c (xrdb_get_resource, x_get_resource_string):
      * src/fringe.c (Fdefine_fringe_bitmap):
      * src/gmalloc.c (malloc, realloc, aligned_alloc):
      Narrow pointer bounds when appropriate.
      * src/alloc.c (SDATA_OF_STRING):
      * src/lisp.h (make_lisp_symbol) [__CHKP__]:
      Widen bounds here, though.
      * src/bytecode.c, src/callint.c, src/dispnew.c, src/editfns.c:
      * src/emacs.c, src/frame.c, src/fringe.c:
      Include ptr-bounds.h.
      * src/ptr-bounds.h (ptr_bounds_clip): New function.
      4295050e
  10. 10 Dec, 2017 2 commits
    • Eli Zaretskii's avatar
      Support dynamic loading of libjansson on MS-Windows · 2b8a1b76
      Eli Zaretskii authored
      * src/json.c [WINDOWSNT]: Define fn_* function pointers to jansson
      functions.
      (json_delete) [WINDOWSNT]: A wrapper around fn_json_delete, needed
      by json_decref.
      (init_json_functions) [WINDOWSNT]: New function.
      (Fjson_serialize, Fjson_insert, Fjson_parse_string)
      (Fjson_parse_buffer) [WINDOWSNT]: Call init_json_functions if
      needed, and record JSON in Vlibrary_cache.
      * src/emacs.c (main): Don't call init_json on WINDOWSNT.
      * src/w32fns.c (syms_of_w32fns): DEFSYM "json".
      
      * lisp/term/w32-win.el (dynamic-library-alist): Add JSON DLL to
      the list.
      
      * configure.ac (HAVE_JSON): Empty JSON_LIBS for MinGW.
      
      * nt/INSTALL.W64:
      * nt/INSTALL: Add information about libjansson.
      2b8a1b76
    • Philipp Stephani's avatar
      Implement native JSON support using Jansson · ab203e36
      Philipp Stephani authored
      * configure.ac: New option --with-json.
      
      * src/json.c (Fjson_serialize, Fjson_insert, Fjson_parse_string)
      (Fjson_parse_buffer): New defuns.
      (json_malloc, json_free, json_has_prefix, json_has_suffix)
      (json_make_string, json_build_string, json_encode)
      (json_out_of_memory, json_parse_error)
      (json_release_object, check_string_without_embedded_nulls, json_check)
      (lisp_to_json, lisp_to_json_toplevel, lisp_to_json_toplevel_1)
      (json_insert, json_insert_callback, json_to_lisp)
      (json_read_buffer_callback, Fjson_parse_buffer, define_error): New
      helper functions.
      (init_json, syms_of_json): New file.
      
      * src/lisp.h: Declaration for init_json and syms_of_json.
      
      * src/emacs.c (main): Enable JSON functions.
      
      * src/eval.c (internal_catch_all, internal_catch_all_1): New helper
      functions to catch all signals.
      (syms_of_eval): Add uninterned symbol to signify out of memory.
      
      * src/Makefile.in (JSON_LIBS, JSON_CFLAGS, JSON_OBJ, EMACS_CFLAGS)
      (base_obj, LIBES): Compile json.c if --with-json is enabled.
      
      * test/src/json-tests.el (json-serialize/roundtrip)
      (json-serialize/object, json-parse-string/object)
      (json-parse-string/string, json-serialize/string)
      (json-parse-string/incomplete, json-parse-string/trailing)
      (json-parse-buffer/incomplete, json-parse-buffer/trailing): New unit
      tests.
      
      * doc/lispref/text.texi (Parsing JSON): New manual section.
      ab203e36
  11. 03 Nov, 2017 1 commit
    • Robert Pluim's avatar
      New function 'libxml-available-p' · 620247ac
      Robert Pluim authored
      * src/emacs.c (main): Call syms_of_xml unconditionally.
      * src/lisp.h: Provide syms_of_xml prototype even when
      HAVE_LIBXML2 is not defined.
      * src/xml.c (Flibxml_available_p): New function, cloned from
      Fgnutls_available_p.
      (syms_of_xml): Provide Slibxml_available_p.
      
      * doc/lispref/text.texi (Parsing HTML/XML): Document libxml-available-p.
      (GnuTLS Cryptography, Format of GnuTLS Cryptography Inputs)
      (Document Object Model): Fix indentation of the first paragraph.
      
      * etc/NEWS (libxml-available-p): Mention libxml-available-p.
      620247ac
  12. 19 Sep, 2017 1 commit
  13. 18 Sep, 2017 2 commits
    • Philipp Stephani's avatar
      Revert "Implement native JSON support using Jansson" · 0925a20e
      Philipp Stephani authored
      This reverts commit cb99cf5a.
      0925a20e
    • Philipp Stephani's avatar
      Implement native JSON support using Jansson · cb99cf5a
      Philipp Stephani authored
      * configure.ac: New option --with-json.
      
      * src/json.c (Fjson_serialize, Fjson_insert, Fjson_parse_string)
      (Fjson_parse_buffer): New defuns.
      (json_out_of_memory, json_parse_error, json_release_object)
      (check_string_without_embedded_nulls, json_check, lisp_to_json)
      (json_insert, json_insert_callback, json_to_lisp)
      (json_read_buffer_callback, Fjson_parse_buffer, define_error): New
      helper function.
      (syms_of_json): New file.
      
      * src/lisp.h: Declaration for syms_of_json.
      
      * src/emacs.c (main): Enable JSON functions.
      
      * src/Makefile.in (JSON_LIBS, JSON_CFLAGS, JSON_OBJ, EMACS_CFLAGS)
      (base_obj, LIBES): Compile json.c if --with-json is enabled.
      
      * test/src/json-tests.el (json-serialize/roundtrip)
      (json-serialize/object, json-parse-string/object): New unit tests.
      cb99cf5a
  14. 13 Sep, 2017 2 commits
    • 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
    • Mark Oteiza's avatar
      Add lcms2 interface · 5d4c539b
      Mark Oteiza authored
      configure.ac: Add boilerplate for configuring and detecting liblcms2.
      etc/NEWS: Mention new configure option and color-distance change.
      src/Makefile.in: Add references to lcms.c and liblcms.
      src/emacs.c: Define lcms2 symbols.
      src/lcms.c: New file.
      src/lisp.h: Add declaration for lcms2.
      src/xfaces.c: Add optional METRIC argument.
      5d4c539b
  15. 29 Aug, 2017 1 commit
    • Paul Eggert's avatar
      Align stack bottom properly. · f1fdb5bc
      Paul Eggert authored
      This is needed for gcc -Os -flto on x86-64 (Bug#28213).
      * src/emacs.c (main): Align stack-bottom variable as a pointer,
      since mark_memory requires this.
      f1fdb5bc
  16. 22 Jun, 2017 1 commit
    • Paul Eggert's avatar
      Use unlocked stdio more systematically · f6ef15cf
      Paul Eggert authored
      This can improve performance significantly on stdio-bottlenecked code.
      E.g., make-docfile is 3x faster on my Fedora 25 x86-64 desktop.
      * admin/merge-gnulib (GNULIB_MODULES): Add unlocked-io.
      * lib-src/ebrowse.c, lib-src/emacsclient.c, lib-src/etags.c:
      * lib-src/hexl.c, lib-src/make-docfile.c, lib-src/movemail.c:
      * lib-src/profile.c, lib-src/update-game-score.c:
      Include unlocked-io.h instead of stdio.h, since these programs are
      single-threaded.
      * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
      * lib/unlocked-io.h, m4/unlocked-io.m4: New files, copied from Gnulib.
      * src/charset.c, src/cm.c, src/emacs.c, src/image.c, src/keyboard.c:
      * src/lread.c, src/term.c:
      Include sysstdio.h, possibly instead of stdio.h, to define
      the unlocked functions if the system does not provide them.
      * src/charset.c, src/lread.c (getc_unlocked):
      Remove, since sysstdio.h now defines it if needed.
      * 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/fileio.c (Fdo_auto_save, Fset_binary_mode):
      * 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_file):
      * src/minibuf.c (read_minibuf_noninteractive):
      * src/print.c (printchar_to_stream, strout)
      (Fredirect_debugging_output):
      * src/sysdep.c (reset_sys_modes, 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):
      Use unlocked stdio when it should be safe.
      * src/sysstdio.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_unloced): Provide substitutes if not declared.
      f6ef15cf
  17. 15 Jun, 2017 1 commit
    • Paul Eggert's avatar
      Pacify clang without munging C source · 21d10e59
      Paul Eggert authored
      * configure.ac (WARN_CFLAGS): With Clang, use
      -Wno-tautological-compare regardless of --enable-gcc-warnings.
      (WERROR_CFLAGS): Simplify assignments, and guarantee it’s always set.
      * lib/strftime.c: Copy from gnulib, reverting Clang-specific
      change which I hope is no longer needed.
      * src/emacs.c (main): Revert rlim_t change, as rlim_t is signed on
      some older non-POSIX hosts.
      21d10e59
  18. 14 Jun, 2017 2 commits
  19. 12 Jun, 2017 1 commit
    • Philipp Stephani's avatar
      Implement module assertions for users · cf971327
      Philipp Stephani authored
      Add a new command-line option '-module-assertions' that users can
      enable developing or debugging a module.  If this option is present,
      Emacs performs additional checks to verify that modules fulfill their
      requirements.  These checks are expensive and crash Emacs if modules
      are invalid, so disable them by default.
      
      This is a command-line option instead of an ordinary variable because
      changing it while Emacs is running would cause data structure
      imbalances.
      
      * src/emacs.c (main): New command line option '-module-assertions'.
      
      * src/emacs-module.c (module_assert_main_thread)
      (module_assert_runtime, module_assert_env, module_assert_value):
      New functions to assert module requirements.
      (syms_of_module): New uninterned variable 'module-runtimes'.
      (init_module_assertions, in_main_thread, module_abort): New helper
      functions.
      (initialize_environment): Initialize value list.  If assertions are
      enabled, use a heap-allocated environment object.
      (finalize_environment): Add assertion that environment list is never
      empty.
      (finalize_runtime_unwind): Pop module runtime object stack.
      (value_to_lisp): Assert that the value is valid.
      (lisp_to_value): Record new value if assertions are enabled.
      (mark_modules): Mark allocated object list.
      (MODULE_FUNCTION_BEGIN_NO_CATCH)
      (module_non_local_exit_check, module_non_local_exit_clear)
      (module_non_local_exit_get, module_non_local_exit_signal)
      (module_non_local_exit_throw): Assert thread and environment.
      (module_get_environment): Assert thread and runtime.
      (module_make_function, module_funcall, module_intern)
      (module_funcall, module_make_integer, module_make_float)
      (module_make_string, module_make_user_ptr, module_vec_get)
      (funcall_module, Fmodule_load): Adapt callers.
      (module_make_global_ref): If assertions are enabled, use the global
      environment to store global values.
      (module_free_global_ref): Remove value from global value list.
      
      * test/Makefile.in (EMACSOPT): Enable module assertions when testing
      modules.
      
      * test/data/emacs-module/mod-test.c (Fmod_test_invalid_store)
      (Fmod_test_invalid_load): New functions to test module assertions.
      (emacs_module_init): Bind the new functions.
      
      * test/src/emacs-module-tests.el (mod-test-emacs): New constant for
      the Emacs binary file.
      (mod-test-file): New constant for the test module file name.
      (module--test-assertions): New unit test.
      cf971327
  20. 01 Jun, 2017 1 commit
  21. 30 May, 2017 1 commit
  22. 21 May, 2017 1 commit
  23. 16 May, 2017 1 commit
  24. 06 Apr, 2017 2 commits
    • Ken Raeburn's avatar
      In CANNOT_DUMP builds, don't prepare for unexec. · 8ca2bd1c
      Ken Raeburn authored
      Having a command-line argument of "dump" or "bootstrap" would trigger
      behavior like not installing signal handlers.  In CANNOT_DUMP modes,
      we should get signal handlers installed regardless of whatever funny
      file names we decide to edit.
      
      src/emacs.c (main) [CANNOT_DUMP]: Don't enable the "dumping"
      alterations to initialization that prepares the process for unexec.
      8ca2bd1c
    • Ken Raeburn's avatar
      Fix CANNOT_DUMP build on Darwin/macOS. · d15719d3
      Ken Raeburn authored
      * src/conf_post.h (malloc, realloc, free) [DARWIN_OS && emacs &&
      CANNOT_DUMP]: Don't define as unexec_malloc, etc.
      * src/emacs.c (main): Don't call unexec_init_emacs_zone.
      d15719d3
  25. 07 Mar, 2017 1 commit
    • Phillip Lord's avatar
      Revert "Replace ldefs-boot with a much smaller file" · 542a7632
      Phillip Lord authored
      This reverts commit c27b6459.
      
      This commit has been reverted because the new mechanism was too
      sensitive to changes in the lisp source, generation of new ldefs-boot
      files was platform specific and resulted in warnings about undefined
      variables.
      
      See also 11436e2890d.
      542a7632
  26. 23 Feb, 2017 1 commit
    • Paul Eggert's avatar
      Merge from gnulib · 7204577b
      Paul Eggert authored
      This incorporates:
      2017-02-16 xbinary-io: rename from xsetmode
      2017-02-15 xsetmode: new module
      * lib-src/etags.c (main):
      * lib-src/hexl.c (main):
      * src/emacs.c (main) [MSDOS]:
      Prefer set_binary_mode to the obsolescent SET_BINARY.
      * lib/binary-io.c, lib/binary-io.h: Copy from gnulib.
      7204577b
  27. 18 Feb, 2017 1 commit
    • Glenn Morris's avatar
      Remove the build number from emacs-version variable · 22b22074
      Glenn Morris authored
      It's a largely internal detail that can confuse users.  (Bug#25590)
      * lisp/version.el (emacs-build-number): New constant.
      (emacs-version): Use emacs-build-number.
      * lisp/loadup.el (top-level): When dumping, increment
      emacs-build-number rather than emacs-version.
      * src/emacs.c (emacs-version): Doc fix.
      * doc/lispref/intro.texi (Version Info): Update emacs-version details.
      Mention emacs-build-number.
      * lisp/gnus/gnus-util.el (gnus-emacs-version):
      * lisp/mail/emacsbug.el (report-emacs-bug):
      * admin/admin.el (set-version): Update for emacs-version change.
      ; * etc/NEWS: Mention this.
      22b22074
  28. 02 Feb, 2017 1 commit
  29. 08 Jan, 2017 1 commit
    • Noam Postavsky's avatar
      Use expanded stack during regex matches · 13c6f1d1
      Noam Postavsky authored
      While the stack is increased in main(), to allow the regex stack
      allocation to use alloca we also need to modify regex.c to actually take
      advantage of the increased stack, and not limit stack allocations to
      SAFE_ALLOCA bytes.
      
      * src/regex.c (MATCH_MAY_ALLOCATE): Remove obsolete comment about
      allocations in signal handlers which no longer happens and correct
      description about when and why MATCH_MAY_ALLOCATE should be defined.
      (emacs_re_safe_alloca): New variable.
      (REGEX_USE_SAFE_ALLOCA): Use it as the limit of stack allocation instead
      of MAX_ALLOCA.
      (emacs_re_max_failures): Rename from `re_max_failures' to avoid
      confusion with glibc's `re_max_failures'.
      * src/emacs.c (main): Increase the amount of fixed 'extra' bytes we add
      to the stack.  Instead of changing emacs_re_max_failures based on the
      new stack size, just change emacs_re_safe_alloca; emacs_re_max_failures
      remains constant regardless, since if we run out stack space SAFE_ALLOCA
      will fall back to heap allocation.
      Co-authored-by: default avatarEli Zaretskii <eliz@gnu.org>
      13c6f1d1
  30. 01 Jan, 2017 1 commit
  31. 30 Dec, 2016 1 commit
    • Paul Eggert's avatar
      Rename main_thread to main_thread_id and simplify · 966d5159
      Paul Eggert authored
      * src/emacs-module.c: Include syssignal.h, for main_thread_id.
      [HAVE_PTHREAD]: Do not include pthread.h.
      (main_thread): Remove.  All uses replaced by main_thread_id,
      or by dwMainThreadId on NT.  Since the HAVE_PTHREAD code is now using
      the main_thread_id established by sysdep.c, there is no need for a
      separate copy of the main thread ID here.
      (module_init): Remove.  All uses removed.
      * src/sysdep.c (main_thread_id) [HAVE_PTHREAD]:
      Rename from main_thread.  All uses changed.  Now extern.
      966d5159
  32. 25 Dec, 2016 1 commit
    • Paul Eggert's avatar
      regex.h now includes sys/types.h · 615cec1d
      Paul Eggert authored
      * src/dired.c, src/emacs.c, src/search.c, src/syntax.c, src/thread.h:
      Do not include sys/types.h; no longer needed.
      * src/regex.h: Include <sys/types.h>, as that's what Gnulib and
      glibc regex.h does, and POSIX has blessed this since 2008.
      615cec1d
  33. 13 Dec, 2016 1 commit
    • Phillip Lord's avatar
      Replace ldefs-boot with a much smaller file · c27b6459
      Phillip Lord authored
       * Makefile.in (bootstrap-build,generate-ldefs-boot): New targets.
         (bootstrap): Depend on bootstrap-build.
       * admin/ldefs-clean.el: New file.
       * lisp/Makefile.in (compile-first): Depend on loaddefs.el
       * lisp/ldefs-boot.el: Remove.
       * lisp/ldefs-boot-auto.el: New file.
       * lisp/ldefs-boot-manual.el: New file.
       * lisp/loadup.el: Load ldefs-boot-manual.el.
       * src/emacs.c (generating_ldefs_boot): New variable.
         (main): Check whether we are generating ldefs.
       * src/eval.c (autoload-do-load): Dump autoload forms to stderr when
         requested.
       * src/lisp.h (generating_ldefs_boot): New variable.
       * admin/gitmerge.el, admin/make-tarball.txt, admin/notes/copyright,
         lisp/Makefile.in, lisp/cus-dep.el, lisp/emacs-lisp/elint.el,
         lisp/finder.el, lisp/loadup.el, msdos/mainmake.v2: Update reference to
         ldefs-boot.
       * admin/update_autogen: Alter mechanism for ldefs-boot generation.
      c27b6459
  34. 28 Nov, 2016 1 commit
    • Eli Zaretskii's avatar
      Fix 'expand-file-name' during startup on MS-Windows · 5878abf8
      Eli Zaretskii authored
      * src/w32.c (w32_init_file_name_codepage): New function, resets
      file_name_codepage and w32_ansi_code_page to undo the values
      recorded during dumping.
      (codepage_for_filenames): Fix an embarrassing typo.  Ignore the
      cached value of file-name encoding if it is nil, i.e. not
      initialized yet.  Actually cache the last used file-name encoding
      to avoid calling APIs when not necessary.
      
      * src/w32.h (w32_init_file_name_codepage): Add prototype.
      
      * src/w32term.c (syms_of_w32term): Set the value of
      w32_unicode_filenames according to the OS version.  This avoids
      resetting it during startup, which then causes temacs to run with
      the incorrect value.
      
      * src/emacs.c (main): Call w32_init_file_name_codepage early
      during the startup.
      
      * src/fileio.c (Fexpand_file_name) [WINDOWSNT]: Update 'newdir'
      after converting $HOME to a UTF-8 string, so that 'newdirlim' is
      consistent with it.  (Bug#25038)
      
      * lisp/international/mule-cmds.el (set-locale-environment): Set
      'default-file-name-coding-system' to the ANSI codepage even in
      non-interactive sessions.
      
      * lisp/files.el (directory-abbrev-alist, abbreviated-home-dir):
      Doc fix.
      (abbreviate-file-name): Decode 'abbreviated-home-dir' if it is a
      unibyte string.
      
      * doc/lispref/files.texi (Directory Names): Index
      'directory-abbrev-alist'.
      5878abf8