1. 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
  2. 30 Aug, 2018 8 commits
  3. 29 Aug, 2018 6 commits
  4. 28 Aug, 2018 17 commits
    • Glenn Morris's avatar
      admin.el: respect environment settings for makeinfo etc · 3b71befd
      Glenn Morris authored
      * admin/admin.el (manual-makeinfo, manual-texi2pdf, manual-texi2dvi):
      New variables.
      (manual-html-mono, manual-html-node, manual-pdf, manual-ps): Use them.
      3b71befd
    • Glenn Morris's avatar
    • Paul Eggert's avatar
      Improve (format "%g" bignum) precision · d4586b7a
      Paul Eggert authored
      * src/editfns.c (styled_format): When formatting bignums with
      floating-point conversions like %g, use long double if that
      would lose less information than double, which is what the
      code was already doing for fixnums.  On Fedora 28 x86-64, for
      example, (format "%.100g" (1- (ash 1 64))) now yields
      "18446744073709551615" instead of the numerically incorrect
      "18446744073709549568".  Also, fix a stray INTEGERP that
      can just be FIXNUMP, since bignums are not possible there.
      d4586b7a
    • Paul Eggert's avatar
      Fix Fnatnump typos · 5cb057a8
      Paul Eggert authored
      Problem reported by Glenn Morris in:
      https://lists.gnu.org/r/emacs-devel/2018-08/msg00946.html
      * src/floatfns.c (Fexpt):
      * src/xselect.c (cons_to_x_long):
      Don't assume Lisp_Object values are scalars.
      5cb057a8
    • Eli Zaretskii's avatar
      Fix a recent change · c39ca701
      Eli Zaretskii authored
      * src/dispnew.c (sit_for): Don;t treat nil as zero.  Reported
      by Glenn Morris <rgm@gnu.org>.
      c39ca701
    • Michael Albinus's avatar
      Add bignum support in Tramp · adcf904b
      Michael Albinus authored
      * lisp/net/tramp-adb.el (tramp-adb-handle-file-system-info):
      * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-file-system-info):
      * lisp/net/tramp-sh.el (tramp-do-file-attributes-with-stat)
      (tramp-do-directory-files-and-attributes-with-stat)
      (tramp-sh-handle-file-system-info):
      * lisp/net/tramp-smb.el (tramp-smb-handle-file-system-info): Do
      not add "e0" to integers.
      
      * lisp/net/tramp-sh.el (tramp-perl-file-attributes)
      (tramp-convert-file-attributes): Do not use a consp for the inode
      if there is bignum support.
      adcf904b
    • Noam Postavsky's avatar
      Index profiler commands in elisp manual · 9d613444
      Noam Postavsky authored
      * doc/lispref/debugging.texi (Profiling): Add index entries for
      profiler-start, profiler-report, profiler-stop.
      9d613444
    • Noam Postavsky's avatar
      Fix math-imaginary-i check · f0888179
      Noam Postavsky authored
      Reported by Bastian Erdnüß at
      <https://lists.gnu.org/archive/html/emacs-devel/2018-08/msg00300.html>.
      * lisp/calc/calc-cplx.el (math-imaginary-i): Check for a value
      of (polar 1 <quarter-circle>).
      f0888179
    • Noam Postavsky's avatar
      ; Let pre-commit git hook check merged in changes (Bug#29197) · fca935e4
      Noam Postavsky authored
      * build-aux/git-hooks/pre-commit: If GIT_MERGE_CHECK_OTHER is 'true',
      check changes against the merge target, rather than the current
      branch.  Include file name when giving error message about
      non-standard characters.
      fca935e4
    • Eli Zaretskii's avatar
      Avoid infinite hscrolling loops when line numbers are displayed · fe06fcc5
      Eli Zaretskii authored
      * src/xdisp.c (maybe_produce_line_number): Don't produce line
      numbers if we don't have enough screen estate.  (Bug#32351)
      fe06fcc5
    • Eli Zaretskii's avatar
      Avoid crashes in malformed defvar · 63e59c8c
      Eli Zaretskii authored
      * src/eval.c (Fdefvar): Don't call XSYMBOL on something that
      might not be a symbol.  This avoids crashes due to malformed
      'defvar' forms.  (Bug#32552)
      63e59c8c
    • Paul Eggert's avatar
      Improve bignum support for system types · d77d01d2
      Paul Eggert authored
      Use bignums when Emacs converts to and from system types like
      off_t for file sizes whose values can exceed fixnum range.
      Formerly, Emacs sometimes generted floats and sometimes ad-hoc
      conses of integers.  Emacs still accepts floats and conses for
      these system types, in case some stray Lisp code is generating
      them, though this usage is obsolescent.
      * doc/lispref/files.texi (File Attributes):
      * doc/lispref/hash.texi (Defining Hash):
      * doc/lispref/nonascii.texi (Character Sets):
      * doc/lispref/os.texi (User Identification):
      * doc/lispref/processes.texi (System Processes):
      * etc/NEWS:
      Document changes.
      * src/bignum.c (mpz_set_uintmax, make_biguint)
      (mpz_set_uintmax_slow, bignum_to_intmax, bignum_to_uintmax):
      New functions.
      (mpz_set_intmax_slow): Implement via mpz_limbs_write,
      to avoid the need for an extra pass through a negative number.
      * src/charset.c (Fencode_char):
      * src/composite.h (LGLYPH_SET_CODE):
      * src/dired.c (file_attributes):
      * src/dosfns.c, src/w32.c (list_system_processes)
      (system_process_attributes):
      * src/editfns.c (init_editfns, Fuser_uid, Fuser_real_uid)
      (Fgroup_gid, Fgroup_real_gid, Femacs_pid):
      * src/emacs-module.c (check_vec_index):
      * src/fns.c (Fsafe_length):
      * src/process.c (record_deleted_pid, Fprocess_id):
      * src/sysdep.c (list_system_processes, system_process_attributes):
      * src/xselect.c (x_own_selection, selection_data_to_lisp_data):
      * src/xterm.c (set_wm_state):
      * src/inotify.c (inotifyevent_to_event, add_watch)
      (inotify_callback):
      If an integer is out of fixnum range, use a bignum
      instead of converting it to a float or a cons of integers.
      * src/coding.c (Fdefine_coding_system_internal):
      * src/frame.c (frame_windows_min_size)
      (x_set_frame_parameters):
      * src/fringe.c (Fdefine_fringe_bitmap):
      * src/nsterm.m (mouseDown:):
      * src/syntax.c (find_defun_start):
      * src/w32fns.c (x_set_undecorated, w32_createwindow)
      (w32_wnd_proc, Fx_create_frame, Fx_show_tip)
      (w32_console_toggle_lock_key):
      * src/w32inevt.c (key_event):
      * src/w32proc.c (Fw32_get_locale_info):
      Do not mishandle floats by treating their addresses as their
      values.
      * src/data.c (store_symval_forwarding):
      * src/gnutls.c (Fgnutls_error_fatalp, Fgnutls_error_string):
      * src/keyboard.c (command_loop_1, make_lispy_event):
      * src/lread.c (read_filtered_event, read1)
      (substitute_object_recurse):
      * src/window.c (Fcoordinates_in_window_p, Fwindow_at)
      (window_resize_apply, Fset_window_vscroll):
      * src/xdisp.c (handle_single_display_spec, try_scrolling)
      (redisplay_window, calc_pixel_width_or_height)
      (calc_line_height_property, on_hot_spot_p):
      * src/xfaces.c (check_lface_attrs):
      * src/xselect.c (x_get_local_selection, cons_to_x_long)
      (lisp_data_to_selection_data, clean_local_selection_data)
      (x_check_property_data, x_fill_property_data):
      (x_send_client_event):
      Do not reject bignums.
      * src/data.c (INTBIG_TO_LISP, intbig_to_lisp)
      (uintbig_to_lisp):
      Remove.  All uses removed.
      * src/data.c (cons_to_unsigned, cons_to_signed):
      * src/dbusbind.c (xd_signature, xd_extract_signed)
      (xd_extract_unsigned):
      * src/dispnew.c (sit_for):
      * src/dosfns.c, src/w32.c (system_process_attributes):
      * src/editfns.c (Fuser_full_name):
      * src/fileio.c (file_offset):
      * src/fileio.c (write_region):
      * src/font.c (font_unparse_xlfd, font_open_for_lface, Fopen_font):
      * src/frame.c (x_set_screen_gamma):
      * src/frame.h (NUMVAL, FRAME_PIXEL_X_FROM_CANON_X)
      (FRAME_PIXEL_Y_FROM_CANON_Y):
      * src/image.c (parse_image_spec, x_edge_detection)
      (compute_image_size):
      * src/json.c (json_to_lisp):
      * src/lcms.c (PARSE_LAB_LIST_FIELD, Flcms_cie_de2000)
      (PARSE_XYZ_LIST_FIELD, PARSE_JCH_LIST_FIELD)
      (PARSE_JAB_LIST_FIELD, PARSE_VIEW_CONDITION_FLOAT)
      (Flcms_temp_to_white_point):
      * src/nsimage.m (ns_load_image, setSizeFromSpec):
      * src/process.c (Fsignal_process, handle_child_signal):
      * src/sysdep.c (system_process_attributes):
      * src/xdisp.c (calc_line_height_property):
      Handle bignums.
      * src/data.c (Fnumber_to_string): Use proper predicate name in
      signal if the argument is not a number.
      * src/lisp.h (make_uint): New function.
      (INT_TO_INTEGER): New macro.
      (FIXED_OR_FLOATP, CHECK_FIXNUM_OR_FLOAT)
      (CHECK_FIXNUM_OR_FLOAT_COERCE_MARKER, INTEGER_TO_CONS)
      (make_fixnum_or_float): Remove; no longer used.
      * src/nsfns.m, src/w32fns.c, src/xfns.c (Fx_create_frame):
      Reject floating-point min-width or min-height.
      * src/process.c (handle_child_signal): Do not worry
      about floating-point pids, as they are no longer generated.
      d77d01d2
    • Paul Eggert's avatar
      Modularize bignums better · 9abaf5f3
      Paul Eggert authored
      * src/bignum.c, src/bignum.h: New files.  Only modules that
      need to know how bignums are implemented should include
      bignum.h.  Currently these are alloc.c, bignum.c (of course),
      data.c, emacs.c, emacs-module.c, floatfns.c, fns.c, print.c.
      * src/Makefile.in (base_obj): Add bignum.o.
      * src/alloc.c (make_bignum_str): Move to bignum.c.
      (make_number): Remove; replaced by bignum.c’s make_integer.
      All callers changed.
      * src/conf_post.h (ARG_NONNULL): New macro.
      * src/json.c (json_to_lisp): Use it.
      * src/data.c (Fnatnump):
      Move NATNUMP’s implementation here from lisp.h.
      * src/data.c (Fnumber_to_string):
      * src/editfns.c (styled_format):
      Move conversion of string to bignum to bignum_to_string, and
      call it here.
      * src/emacs-module.c (module_make_integer):
      * src/floatfns.c (Fabs):
      Simplify by using make_int.
      * src/emacs.c: Include bignum.h, to expand its inline fns.
      * src/floatfns.c (Ffloat): Simplify by using XFLOATINT.
      (rounding_driver): Simplify by using double_to_bignum.
      (rounddiv_q): Clarify use of temporaries.
      * src/lisp.h: Move decls that need to know bignum internals to
      bignum.h.  Do not include gmp.h or mini-gmp.h; that is now
      bignum.h’s job.
      (GMP_NUM_BITS, struct Lisp_Bignum, XBIGNUM, mpz_set_intmax):
      Move to bignum.h.
      (make_int): New function.
      (NATNUMP): Remove; all callers changed to use Fnatnump.
      (XFLOATINT): If arg is a bignum, use bignum_to_double, so that
      bignum internals are not exposed here.
      * src/print.c (print_vectorlike): Use SAFE_ALLOCA to avoid the
      need for a record_unwind_protect_ptr.
      9abaf5f3
    • Glenn Morris's avatar
    • Karl Otness's avatar
      Support ImageMagick version 7 (bug#25967) · 57294869
      Karl Otness authored
      * configure.ac, src/image.c: Add support for ImageMagick version 7.
      
      Copyright-paperwork-exempt: yes
      57294869
    • Paul Eggert's avatar
      Update from Gnulib · f1acdff5
      Paul Eggert authored
      * build-aux/config.sub, lib/intprops.h, lib/regex_internal.c:
      * lib/regex_internal.h, lib/unistd.in.h, m4/limits-h.m4:
      * m4/stdint.m4, m4/unistd_h.m4:
      Copy from Gnulib.
      * lib/gnulib.mk.in: Regenerate.
      f1acdff5
    • Glenn Morris's avatar