1. 06 Sep, 2018 2 commits
    • Michael Albinus's avatar
      Fix Bug#31704 · bca35315
      Michael Albinus authored
      * lisp/eshell/esh-proc.el (eshell-gather-process-output): Do not
      let `expand-file-name' prefix remote file names with MS Windows
      volume letter.
      
      * lisp/net/tramp.el (tramp-eshell-directory-change):
      Use `path-separator' as it does eshell.  (Bug#31704)
      bca35315
    • Michael Albinus's avatar
      * test/lisp/autorevert-tests.el · 79d7138c
      Michael Albinus authored
      (auto-revert-test02-auto-revert-deleted-file): Extend test.
      79d7138c
  2. 05 Sep, 2018 5 commits
    • Paul Eggert's avatar
      Fix timer.el minor rounding error · 67475a59
      Paul Eggert authored
      * lisp/emacs-lisp/timer.el (timer-next-integral-multiple-of-time):
      Fix rounding error by using integers rather than floats.
      * test/lisp/emacs-lisp/timer-tests.el (timer-test-multiple-of-time):
      New test.
      67475a59
    • Stephen Gildea's avatar
      Do not call mh-next-msg from mh-junk-process-* fns · e9323956
      Stephen Gildea authored
      * mh-junk.el (mh-junk-process-blacklist, mh-junk-process-whitelist): Do
      not call mh-next-msg.  Now that these functions are called from
      mh-execute-commands, they should not change the current message pointer.
      The calls to mh-next-msg are probably left over from when blacklist and
      whitelist message processing was done immediately.
      e9323956
    • Paul Eggert's avatar
      Improve (round FIXNUM FIXNUM) performance · baa6ae87
      Paul Eggert authored
      * src/floatfns.c (rounding_driver):
      New arg fixnum_divide.  All callers changed.
      (ceiling2, floor2, truncate2, round2): New functions.
      Not that new, actually; these are essentially taken from Emacs 26.
      (Fceiling, Ffloor, Fround, Ftruncate): Use them.
      baa6ae87
    • Paul Eggert's avatar
      Fix format-time-string bignum bug · ccb3891f
      Paul Eggert authored
      The problem can occur on 32-bit platforms with current timestamps.
      * src/editfns.c (disassemble_lisp_time, decode_time_components):
      Support seconds counts that are bignums.
      * test/src/editfns-tests.el (editfns-tests--have-leap-seconds):
      New function.
      (format-time-string-with-bignum-on-32-bit): New test.
      ccb3891f
    • Paul Eggert's avatar
      Simplify bignum->intmax conversion · ecb985c1
      Paul Eggert authored
      * src/lisp.h (integer_to_intmax, integer_to_uintmax): New functions.
      * src/data.c (cons_to_unsigned, cons_to_signed)
      (arith_driver):
      * src/dbusbind.c (xd_extract_signed, xd_extract_unsigned):
      * src/dispnew.c (sit_for):
      * src/editfns.c (styled_format):
      * src/emacs-module.c (module_extract_integer):
      * src/fileio.c (file_offset):
      * src/font.c (font_unparse_xlfd, Fopen_font):
      * src/xdisp.c (calc_line_height_property):
      * src/process.c (handle_child_signal):
      ecb985c1
  3. 04 Sep, 2018 7 commits
    • Federico Tedin's avatar
      Add variable vc-git-grep-template · e3661f8c
      Federico Tedin authored
      * lisp/vc/vc-git.el (vc-git-grep-template): New variable, allows
      changing the default arguments passed to git-grep when using
      'vc-git-grep'.
      * etc/NEWS: Mention 'vc-git-grep-template'.  (Bug#32549)
      e3661f8c
    • Noam Postavsky's avatar
      Handle non-error signals in emacsclient --eval (Bug#10989) · c0f68880
      Noam Postavsky authored
      * lisp/server.el (server-process-filter): Handle any signal, not just
      errors.
      c0f68880
    • Noam Postavsky's avatar
      Allow t as a catch-all condition-case handler (Bug#24618) · 425c2811
      Noam Postavsky authored
      * src/eval.c (find_handler_clause): Accept a handler of t as always
      matching.
      (Fcondition_case):
      * doc/lispref/control.texi (Handling Errors): Document this.
      * etc/NEWS: Announce it.
      425c2811
    • Paul Eggert's avatar
      Fix (round FLOAT BIGNUM) bug · 21637d5e
      Paul Eggert authored
      * src/floatfns.c (rounding_driver): Fix bug when one
      argument is a float and the other is a bignum.
      * test/src/floatfns-tests.el (bignum-round): Test for the bug.
      21637d5e
    • Paul Eggert's avatar
      Tweak nthcdr for bignum efficiency · 628f6a2c
      Paul Eggert authored
      * src/fns.c (Fnthcdr): Use mpz_tdiv_ui and mpz_tdiv_r
      instead of mpz_mod_ui and mpz_mod, as they are more efficient.
      Suggested by Pip Cet in:
      https://lists.gnu.org/r/emacs-devel/2018-09/msg00073.html
      628f6a2c
    • Paul Eggert's avatar
      Fix bignum initialization · 1d84e652
      Paul Eggert authored
      Problem reported by Andy Moreton in:
      https://lists.gnu.org/r/emacs-devel/2018-09/msg00072.html
      and crystal-ball diagnosis by Eli Zaretskii in:
      https://lists.gnu.org/r/emacs-devel/2018-09/msg00075.html
      * src/alloc.c (xrealloc_for_gmp, xfree_for_gmp): Move to bignum.c.
      (init_alloc): Move bignum initialization to init_bignum.
      * src/bignum.c (init_bignum): Rename from init_bignum_once.
      All users changed.
      * src/emacs.c (main): Call init_bignum after init_alloc,
      instead of calling init_bignum_once after init_bignum.
      1d84e652
    • Paul Eggert's avatar
      Speed up (+ 2 2) by a factor of 10 · fe042e9d
      Paul Eggert authored
      Improve arithmetic performance by avoiding bignums until needed.
      Also, simplify bignum memory management, fixing some unlikely leaks.
      This patch improved the performance of (+ 2 2) by a factor of ten
      on a simple microbenchmark computing (+ x 2), byte-compiled,
      with x a local variable initialized to 2 via means the byte
      compiler could not predict: performance improved from 135 to 13 ns.
      The platform was Fedora 28 x86-64, AMD Phenom II X4 910e.
      Performance also improved 0.6% on ‘make compile-always’.
      * src/bignum.c (init_bignum_once): New function.
      * src/emacs.c (main): Use it.
      * src/bignum.c (mpz): New global var.
      (make_integer_mpz): Rename from make_integer.  All uses changed.
      * src/bignum.c (double_to_bignum, make_bignum_bits)
      (make_bignum, make_bigint, make_biguint, make_integer_mpz):
      * src/data.c (bignum_arith_driver, Frem, Flogcount, Fash)
      (expt_integer, Fadd1, Fsub1, Flognot):
      * src/floatfns.c (Fabs, rounding_driver, rounddiv_q):
      * src/fns.c (Fnthcdr):
      Use mpz rather than mpz_initting and mpz_clearing private
      temporaries.
      * src/bignum.h (bignum_integer): New function.
      * src/data.c (Frem, Fmod, Fash, expt_integer):
      * src/floatfns.c (rounding_driver):
      Use it to simplify code.
      * src/data.c (FIXNUMS_FIT_IN_LONG, free_mpz_value):
      Remove.  All uses removed.
      (floating_point_op): New function.
      (floatop_arith_driver): New function, with much of the guts
      of the old float_arith_driver.
      (float_arith_driver): Use it.
      (floatop_arith_driver, arith_driver):
      Simplify by assuming NARGS is at least 2.
      All callers changed.
      (float_arith_driver):
      New arg, containing the partly converted value of the next arg.
      Reorder args for consistency.  All uses changed.
      (bignum_arith_driver): New function.
      (arith_driver): Use it.  Do fixnum-only integer calculations
      in intmax_t instead of mpz_t, when they fit.
      Break out mpz_t calculations into bignum_arith_driver.
      (Fquo): Use floatop_arith_driver instead of float_arith_driver,
      since the op is known to be valid.
      (Flogcount, Fash): Simplify by coalescing bignum and fixnum code.
      (Fadd1, Fsub1): Simplify by using make_int.
      fe042e9d
  4. 03 Sep, 2018 1 commit
    • Stephen Berman's avatar
      Make todo-show work when adding and deleting a new todo file · 40f8ade7
      Stephen Berman authored
      * lisp/calendar/todo-mode.el (todo-add-file): Since
      todo-current-todo-file must be set before calling todo-show, but
      the buffer is not yet in todo-mode, which makes it buffer local,
      explicitly set it buffer locally (bug#32627).
      
      * test/lisp/calendar/todo-mode-tests.el (todo-test--add-file)
      (todo-test--delete-file): New functions.
      (todo-test-add-and-delete-file): New test.
      40f8ade7
  5. 01 Sep, 2018 3 commits
  6. 31 Aug, 2018 9 commits
    • Paul Eggert's avatar
      Rename Emacs-specific INFINITY constants · 222b5970
      Paul Eggert authored
      Although these constants were not erroneous, as they were
      used only in modules that did not include <math.h>, it's
      less confusing to names that cannot be confused with
      the now-standard INFINITY macro.
      * src/dispextern.h (SCROLL_INFINITY): New constant.
      * src/dispnew.c, src/scroll.c (INFINITY):
      Remove.  All uses replaced with SCROLL_INFINITY.
      * src/process.c (wait_reading_process_output):
      Rename private constant.
      222b5970
    • Paul Eggert's avatar
      Port better to non-IEEE platforms · ab871981
      Paul Eggert authored
      * src/lread.c (string_to_number) [!IEEE_FLOATING_POINT]:
      Do not use the INFINITY macro, since the C standard requires
      it to provoke a compile-time error on platforms that do not
      support infinities.
      ab871981
    • Michael Albinus's avatar
      Mark thread-alive-p as obsolete · ee2509bd
      Michael Albinus authored
      * etc/NEWS (thread-alive-p):
      * lisp/emacs-lisp/thread.el (thread-alive-p): Mark it as obsolete.
      
      * test/src/thread-tests.el (threads-join-error)
      (threads-signal-main-thread): Use `thread-live-p'.
      ee2509bd
    • Michael Albinus's avatar
      Merge from origin/emacs-26 · 6f3cf12e
      Michael Albinus authored
      ac7936cb Rename thread-alive-p to thread-live-p
      3d09d533 rcirc: Document /reconnect as a built-in command (Bug#29656)
      a1e61561 * test/lisp/calc/calc-tests.el (calc-imaginary-i): New test.
      6f3cf12e
    • Michael Albinus's avatar
      Rename thread-alive-p to thread-live-p · ac7936cb
      Michael Albinus authored
      * doc/lispref/threads.texi (Basic Thread Functions): Use thread-live-p.
      
      * etc/NEWS: 'thread-alive-p' has been renamed to 'thread-live-p'.
      
      * src/thread.c (thread_live_p): Rename from thread_alive_p.  Adapt
      all callees.
      (Fthread_live_p): Rename from Fthread_alive_p.
      (syms_of_threads): Make thread-alive-p an alias of thread-live-p.
      
      * test/src/thread-tests.el (all): Replace `thread-alive-p' by
      `thread-live-p'.
      (threads-live): Rename from `threads-alive'.
      ac7936cb
    • Paul Eggert's avatar
      Several fixes for formatting bignums · db2fed3b
      Paul Eggert authored
      * src/bignum.c: Include stdlib.h, for abs.
      (bignum_bufsize, bignum_to_c_string): New functions.
      * src/bignum.c (bignum_to_string):
      * src/print.c (print_vectorlike): Use them.
      * src/editfns.c (styled_format): Instead of having a separate
      buffer for sprintf (which does not work for bignums), just append
      to the main buffer.  When formatting bignums, add support for the
      standard integer flags -, #, 0, + and space.  Fix some comments.
      Capitalize properly when formatting bignums with %X.  Use
      functions like c_isdigit rather than reinventing the wheel.
      Simplify computation of excess precision.
      * src/print.c: Do not include bignum.h; no longer needed.
      (print_vectorlike): Avoid recalculating string length.
      * test/src/editfns-tests.el (format-bignum):
      Test some of the above fixes.
      db2fed3b
    • Paul Eggert's avatar
      * src/alloc.c (sweep_vectors): Simplify. · a451c6ec
      Paul Eggert authored
      a451c6ec
    • Michael Albinus's avatar
      Construct a thread_event only if THREADS_ENABLED · 76978462
      Michael Albinus authored
      * src/thread.c (Fthread_signal): Construct a thread_event only if
      THREADS_ENABLED.
      76978462
    • Paul Eggert's avatar
      Fix bignum FIXME in emacs-module.c · 7c0675af
      Paul Eggert authored
      * src/emacs-module.c: Do not include bignum.h; no longer needed.
      (module_extract_integer): Use bignum_to_intmax to avoid
      incorrectly signaling overflow on platforms where intmax_t
      is wider than long int.
      7c0675af
  7. 30 Aug, 2018 8 commits
  8. 29 Aug, 2018 5 commits