1. 17 Jan, 2019 11 commits
  2. 16 Jan, 2019 11 commits
    • Paul Eggert's avatar
      27f53bd6
    • Daniel Colascione's avatar
      3fd369be
    • Daniel Colascione's avatar
      Fix crash in charset detection after pdumper load · ece563e8
      Daniel Colascione authored
      * src/coding.c:
      (reset_coding_after_pdumper_load): new function re-init character
      classes after pdumper load.
      (syms_of_coding): Call it.
      ece563e8
    • Andy Moreton's avatar
      Avoid compilation warnings in MS-Windows build · 8bf51c38
      Andy Moreton authored
      * src/pdumper.c (dump_cold_bignum):
      * src/emacs.c(load_pdump) [WINDOWSNT]: Avoid compiler warnings
      due to 64-bit vs 32-bit data type mismatches.
      8bf51c38
    • Eli Zaretskii's avatar
      Improve documentation of pdumper; minor code cleanup · ebd174e2
      Eli Zaretskii authored
      * src/emacs.c (usage_message): Add the --dump-file option.
      (string_starts_with_p, find_argument): Functions removed; use
      'argmatch' instead.
      (PDUMP_FILE_ARG): Macro removed; use literal strings instead,
      as with other command-line options.  Use HAVE_PDUMPER for cpp
      conditionals which used PDUMP_FILE_ARG.
      (load_pdump, main): Use 'argmatch' for "--dump-file" and
      "--temacs" arguments, thus supporting the "-dump-file" and
      "-temacs" variants, for consistency with other options.
      (main): Remove the extra fatal error for using --dump-file in
      unexec'ed Emacs: load_pdump does that anyway.
      (standard_args): Add --dump-file and --temacs, with
      appropriate priorities.
      
      * etc/NEWS: Expand on the pdumper support.
      
      * doc/emacs/cmdargs.texi (Initial Options): Document the
      '--dump-file' command-line option.
      ebd174e2
    • Eli Zaretskii's avatar
      Fix minor glitch with producing 'emacs' executable · e96a54eb
      Eli Zaretskii authored
      * src/Makefile.in (LC_ALL) [!DUMPING]: Don't overwrite
      previous emacs-X.Y.Z executables with new ones.
      e96a54eb
    • Michael Albinus's avatar
      8832de4f
    • Michael Albinus's avatar
      Some accept-process-output cleanups in Tramp · b2497ef6
      Michael Albinus authored
      * lisp/net/tramp.el (tramp-action-out-of-band): Read process
      output in a loop.
      (tramp-accept-process-output): Return result.
      (tramp-interrupt-process):
      * lisp/net/tramp-adb.el (tramp-adb-parse-device-names):
      * lisp/net/tramp-rclone.el (tramp-rclone-parse-device-names):
      Remove FIXME.
      
      * lisp/net/tramp-sh.el (tramp-local-coding-commands): Fix docstring.
      
      * lisp/net/tramp-smb.el (tramp-smb-wait-for-output): Adapt docstring.
      Simplify code.
      
      * lisp/net/tramp-sudoedit.el (tramp-sudoedit-action-sudo):
      Adapt docstring.  Read process output in a loop.
      
      * test/lisp/net/tramp-tests.el (tramp-test43-asynchronous-requests):
      Remove :unstable tag on emba.
      b2497ef6
    • Glenn Morris's avatar
      ; Copyright fixes for pdumper files · 655badc3
      Glenn Morris authored
      I wonder if the copyright years for lib-src/make-fingerprint.c are correct.
      655badc3
    • Glenn Morris's avatar
      * make-dist: Include src/dmpstruct.awk. · 021f34be
      Glenn Morris authored
      021f34be
    • Paul Eggert's avatar
      Fix unlikely races with GnuTLS, datagrams · e87e6a24
      Paul Eggert authored
      Retry some calls if interrupted at inopportune times.
      These were found by code inspection.
      * src/gnutls.c (gnutls_try_handshake): Simplify by using
      new emacs_gnutls_handle_error API.
      (emacs_gnutls_write): Remove GNUTLS_E_AGAIN hack since
      emacs_gnutls_handle_error now does that.
      Use emacs_gnutls_handle_error only on errors.
      (emacs_gnutls_read): Retry if gnutls_record_recv returns
      GNUTLS_E_INTERRUPTED, to be consistent with emacs_read.
      (emacs_gnutls_handle_error): Return 0 on fatal errors,
      -1 (setting errno) on ordinary errors, to simplify callers.
      Assume that ERR is negative, since it always is now.
      Map non-fatal GnuTLS errors to errno values as best we can.
      * src/process.c (read_process_output) [DATAGRAM_SOCKETS]:
      Retry recvfrom if it is interrupted, to be consistent with
      how things are handled when not a datagram channel.
      (send_process) [DATAGRAM_SOCEKTS]: If sendto is interrupted,
      process pending signals and retry it, to be consistent with
      how things are handled when not a datagram channel.
      e87e6a24
  3. 15 Jan, 2019 7 commits
    • Daniel Colascione's avatar
      Make sure dump-mode is nil after dump · 6b9fa880
      Daniel Colascione authored
      * lisp/loadup.el (dump-mode): Bind dump-mode to nil before dumping
      6b9fa880
    • Daniel Colascione's avatar
      Add NEWS for pdumper · 02976d67
      Daniel Colascione authored
      02976d67
    • 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
      (...
      d12e5d00
    • Paul Eggert's avatar
      Avoid using obsolete accept-process-output arg · 2a3bd679
      Paul Eggert authored
      * lisp/gnus/nnheader.el (nnheader-accept-process-output):
      * lisp/net/dns.el (dns-query):
      * lisp/net/imap.el (imap-wait-for-tag):
      * lisp/net/network-stream.el (network-stream-get-response):
      * lisp/net/pop3.el (pop3-accept-process-output):
      * lisp/obsolete/starttls.el (starttls-negotiate-gnutls)
      (starttls-open-stream-gnutls):
      * lisp/server.el (server-eval-at):
      * lisp/textmodes/ispell.el (ispell-accept-output):
      Do not depend on the obsolete milliseconds argument of
      accept-process-output.
      2a3bd679
    • Paul Eggert's avatar
      Fix accept-process-output/process-live-p confusion · 9fc02ff5
      Paul Eggert authored
      * doc/lispref/processes.texi (Accepting Output):
      Document the issue.
      * lisp/net/tramp-adb.el (tramp-adb-parse-device-names):
      * lisp/net/tramp-rclone.el (tramp-rclone-parse-device-names):
      * lisp/net/tramp-smb.el (tramp-smb-wait-for-output):
      * lisp/net/tramp.el (tramp-interrupt-process):
      * test/src/process-tests.el (make-process/mix-stderr):
      Fix code that uses accept-process-output and process-live-p.
      Add FIXME comments as necessary.
      * lisp/net/tramp-sudoedit.el (tramp-sudoedit-action-sudo):
      * lisp/net/tramp.el (tramp-action-out-of-band):
      Add FIXME comments as necessary.
      9fc02ff5
    • Alan Mackenzie's avatar
      Make CC Mode and electric-pair-mode work together. This fixes bug #33794 · 223e7b87
      Alan Mackenzie authored
      * lisp/progmodes/cc-cmds.el (c-electric-pound, c-electric-slash)
      (c-electric-star, c-electric-semi&comma, c-electric-colon, c-electric-lt-gt):
      Bind post-self-insert-hook to nil around calls to self-insert-command to
      protect against arbitrary functionality confusing CC Mode.
      (c-do-brace-electrics): New function, extracted from c-electric-brace and
      enhanced.
      (c-electric-brace): Bind post-self-insert-hook to nil around the call to
      self-insert-command.  When electric-pair-mode is configured, call
      electric-pair-post-self-insert-function.  Handle any deletion done by this
      function.  Call c-do-brace-electrics for the inserted brace, and perhaps for a
      brace inserted by electric-pair-self-insert-function.
      (c-electric-paren): Bind post-self-insert-hook to nil around the call to
      self-insert-command.  When electric-pair-mode is configured, call
      electric-pair-post-self-insert-function.
      223e7b87
    • Philipp Stephani's avatar
      Disable electric quotes for most files in the Emacs codebase. · 9530108f
      Philipp Stephani authored
      * .dir-locals.el: Disable electric quotes in comments and strings for
      C, Emacs Lisp, and Texinfo, as the Emacs codebase doesn't use them.
      9530108f
  4. 14 Jan, 2019 5 commits
  5. 13 Jan, 2019 2 commits
    • Paul Eggert's avatar
      Fix translation-region bug with MAX_CHAR · 1a722e88
      Paul Eggert authored
      Also, clean up the code a bit.
      Actually I discovered the bug while cleaning up the code.
      * src/editfns.c (Fsubst_char_in_region)
      (Ftranslate_region_internal): Use bool for booleans.
      (Ftranslate_region_internal): Fix off-by-1 bug when a
      translation table translates the maximum char.  Assume C99
      decl-after-statement, similar minor cleanups.
      * test/src/editfns-tests.el (test-translate-region-internal):
      New test.
      1a722e88
    • Paul Eggert's avatar
      Minor overflow fix in translate-region-internal · 800d3815
      Paul Eggert authored
      * src/editfns.c (Ftranslate_region_internal):
      Use ptrdiff_t, not int, for a count that might exceed INT_MAX.
      800d3815
  6. 12 Jan, 2019 1 commit
  7. 11 Jan, 2019 3 commits
    • Glenn Morris's avatar
      Remove some obsolete stub files from etc/ · 8fe21b03
      Glenn Morris authored
      * etc/CENSORSHIP, etc/FTP, etc/GNU, etc/LINUX-GNU, etc/MORE.STUFF:
      * etc/ORDERS, etc/THE-GNU-PROJECT, etc/WHY-FREE:
      Remove stub files that were marked obsolete 5 years ago.
      8fe21b03
    • Martin Rudalics's avatar
      Run window change functions during redisplay · e567ac14
      Martin Rudalics authored
      * doc/lispref/windows.texi (Window Sizes): Move (and rename)
      descriptions of 'window-pixel-height-before-size-change' and
      'window-pixel-width-before-size-change' to Window Hooks
      section.
      (Window Configurations): Remove warning against use of
      'save-window-excursion' in 'window-size-change-functions'.
      (Window Hooks): Rewrite section according to redesign of
      window change functions.
      * lisp/erc/erc-track.el (erc-window-configuration-change)
      (erc-modified-channels-update): Call latter directly from
      'window-configuration-change-hook' instead via
      'post-command-hook'.
      * lisp/frame.el (frame-size-changed-p): Change nomenclature
      in let bindings.
      * lisp/net/rcirc.el (rcirc-window-configuration-change)
      (rcirc-window-configuration-change-1): Call latter directly
      from 'window-configuration-change-hook' instead via
      'post-command-hook'.
      * lisp/window.el (window-pixel-width-before-size-change)
      (window-pixel-height-before-size-change): Defalias.
      (window--resize-mini-window, window-resize)
      (adjust-window-trailing-edge, delete-window)
      (delete-other-windows, balance-windows): Don't run
      'window-configuration-change-hook' any more from here.
      (split-window): Don't run 'window-configuration-change-hook'
      from here.  'run-window-scroll-functions' from here.
      (window--adjust-process-windows): Run from
      'window-configuration-change-hook' only.
      * src/frame.c (old_selected_frame): New Lisp variable.
      (make_frame): Initialize frame's change_stamp slot.
      (Fold_selected_frame): New function.
      * src/frame.h (struct frame): New slots old_selected_window,
      window_change, change_stamp and number_of_windows.
      (fset_old_selected_window): New inlined function.
      (FRAME_WINDOW_CHANGE, FRAME_OLD_SELECTED_WINDOW): New macros.
      * src/window.c (old_selected_window): New Lisp variable.
      (wset_old_buffer): New inlined function.
      (Fframe_old_selected_window, Fold_selected_window)
      (Fwindow_old_buffer): New functions.
      (Fwindow_old_pixel_width, Fwindow_old_pixel_height): Rename
      from Fwindow_pixel_width_before_size_change and
      Fwindow_pixel_height_before_size_change.  Update doc-strings.
      (Fwindow_old_body_pixel_width, Fwindow_old_body_pixel_height):
      New functions.
      (Fdelete_other_windows_internal): Set frame's window_change
      slot instead of running 'window-configuration-change-hook'.
      (Frun_window_configuration_change_hook): In doc-string tell
      that this function is no more needed.
      (Frun_window_scroll_functions): Amend doc-string.  Run with
      window's buffer current.
      (window_sub_list, window_change_record_windows)
      (window_change_record_frame, window_change_record)
      (run_window_change_functions_1, run_window_change_functions):
      New functions.
      (set_window_buffer): Set frame's window_change slot instead of
      running 'window-configuration-change-hook'.
      (make_window): Don't initialize pixel_width_before_size_change
      and pixel_height_before_size_change slots.
      (window_resize_apply, Fdelete_window_internal): Set frame's
      window_change slot.
      (Fsplit_window_internal): Set frame's window_change slot.
      Don't run 'window-scroll-functions' from here.
      * src/window.h (struct window): New slots old_buffer,
      change_stamp, old_pixel_width (renamed from
      pixel_width_before_size_change), old_pixel_height (renamed
      from pixel_height_before_size_change), old_body_pixel_width
      and old_body_pixel_height.
      * src/xdisp.c (init_iterator): Set frame's window_change slot
      when the body height or width changes.
      (prepare_menu_bars): Don't run_window_size_change_functions.
      (redisplay_internal): Don't run_window_size_change_functions,
      run_window_change_functions instead.
      e567ac14
    • Paul Eggert's avatar
      List lengths are always fixnums now · 470082de
      Paul Eggert authored
      Without this patch, it was theoretically possible for a list
      length to be a bignum, which means that safe-length could
      signal an error (due to generating a too-large bignum) contrary
      to its documentation.  Fix things to remove the theoretical
      possibility, so that list lengths are always fixnums (and so
      that list lenghts are always ptrdiff_t values too, since that
      is assumed internally anyway).
      * src/alloc.c (Fcons): Do not allocate so many conses that
      a list length won’t fit into ptrdiff_t or into fixnum.
      This matters only on weird platforms; on typical platforms,
      list lengths always fit anyway.
      * src/fns.c (list_length, Fsafe_length, proper-list-p):
      Remove integer overflow checks that are no longer needed.
      470082de