1. 08 Apr, 2019 1 commit
  2. 04 Mar, 2019 1 commit
    • Paul Eggert's avatar
      Simplify list creation in C code · 5c2563a5
      Paul Eggert authored
      The main new thing here is that C code can now say
      ‘list (a, b, c, d, e, f)’ instead of
      ‘listn (CONSTYPE_HEAP, 6, a, b, c, d, e, f)’,
      thus relieving callers of the responsibility of counting
      arguments (plus, the code feels more like Lisp).  The old
      list1 ... list5 functions remain, as they’re probably a bit
      faster for small lists.
      * src/alloc.c (cons_listn, pure_listn): New functions.
      (listn): Omit enum argument.
      All callers changed to use either new ‘list’ or ‘pure_list’ macros.
      * src/charset.c (Fdefine_charset_internal):
      * src/coding.c (detect_coding_system)
      * src/frame.c (frame_size_history_add, adjust_frame_size):
      * src/gtkutil.c (xg_frame_set_char_size):
      * src/keyboard.c (command_loop_1):
      * src/nsfns.m (frame_geometry):
      * src/widget.c (set_frame_size):
      * src/xfaces.c (Fcolor_distance):
      * src/xfns.c (frame_geometry):
      * src/xterm.c (x_set_window_size_1):
      * src/xwidget.c (Fxwidget_size_request):
      Prefer list1i, list2i, etc. to open-coding them.
      * src/charset.c (Fset_charset_priority):
      * src/nsterm.m (append2):
      * src/window.c (window_list):
      * src/xfaces.c (Fx_list_fonts):
      Use nconc2 instead of open-coding it.
      * src/eval.c (eval_sub, backtrace_frame_apply):
      * src/kqueue.c (kqueue_generate_event):
      * src/nsterm.m (performDragOperation:):
      * src/pdumper.c (Fpdumper_stats):
      * src/w32.c (init_environment):
      Prefer list1, list2, etc. to open-coding them.
      * src/font.c (font_list_entities):
      Parenthesize to avoid expanding new ‘list’ macro.
      * src/gtkutil.c (GETSETUP): Rename from MAKE_FLOAT_PAGE_SETUP
      to get lines to fit.  Move outside the ‘list’ call, since it’s
      now a macro.
      * src/keymap.c (Fmake_keymap): Simplify.
      * src/lisp.h (list, pure_list): New macros.
      (list1i): New function.
  3. 01 Jan, 2019 1 commit
  4. 09 Dec, 2018 3 commits
    • Paul Eggert's avatar
      Add make_vector and make_nil_vector · d79bb756
      Paul Eggert authored
      This makes the callers a bit easier to read, and doubtless
      improves efficiency very slightly.  It also simplifies
      possible future changes to allow bignum indexes to buffers.
      * src/alloc.c (allocate_vectorlike):
      Prefer ptrdiff_t to size_t when either will do.
      (make_vector): New function.
      (Fmake_vector): Use it.
      * src/buffer.c (syms_of_buffer):
      * src/bytecode.c (syms_of_bytecode):
      * src/category.c (Fmake_category_table, init_category_once):
      * src/ccl.c (syms_of_ccl):
      * src/character.c (syms_of_character):
      * src/charset.c (Fdefine_charset_internal)
      (Ffind_charset_region, Ffind_charset_string):
      * src/chartab.c (copy_char_table):
      * src/coding.c (Fdefine_coding_system_internal, syms_of_coding):
      * src/composite.c (get_composition_id, Fcomposition_get_gstring):
      * src/composite.h (LGLYPH_NEW):
      * src/fns.c (concat, Flocale_info, make_hash_table):
      * src/font.c (font_otf_ValueRecord, font_otf_anchor)
      (build_style_table, syms_of_font):
      * src/fontset.c (RFONT_DEF_NEW, fontset_find_font)
      (dump_fontset, syms_of_fontset):
      * src/image.c (xpm_make_color_table_v):
      * src/keyboard.c (modify_event_symbol, menu_bar_items)
      (parse_menu_item, parse_tool_bar_item, init_tool_bar_items)
      * src/keymap.c (Fdefine_key, describe_map, describe_vector):
      * src/lread.c (read_vector):
      * src/macfont.m (macfont_shape):
      * src/menu.c (init_menu_items):
      * src/nsfns.m (ns_make_monitor_attribute_list):
      * src/process.c (conv_sockaddr_to_lisp, network_interface_info):
      * src/profiler.c (make_log):
      * src/window.c (Fcurrent_window_configuration):
      * src/xdisp.c (with_echo_area_buffer_unwind_data)
      * src/xfaces.c (Finternal_make_lisp_face)
      * src/xfns.c (x_make_monitor_attribute_list)
      * src/xfont.c (syms_of_xfont):
      * src/xselect.c (x_handle_dnd_message):
      * src/xwidget.c (save_script_callback):
      Prefer make_nil_vector (N) to Fmake_vector (make_fixnum (N), Qnil).
      * src/callint.c (Fcall_interactively):
      * src/charset.c (load_charset_map):
      * src/chartab.c (Fmake_char_table, uniprop_encode_value_numeric):
      * src/composite.c (get_composition_id)
      * src/dispnew.c (Fframe_or_buffer_changed_p)
      * src/fns.c (make_hash_table, maybe_resize_hash_table):
      * src/font.c (font_style_to_value):
      * src/fontset.c (FONTSET_ADD, fontset_add):
      * src/json.c (json_to_lisp):
      * src/keymap.c (syms_of_keymap):
      * src/lread.c (init_obarray):
      * src/profiler.c (make_log, Fprofiler_cpu_log):
      * src/term.c (term_get_fkeys_1):
      Prefer make_vector (N, V) to Fmake_vector (make_fixnum (N), V).
      * src/font.c (build_style_table):
      * src/macfont.m (macfont_shape):
      * src/process.c (conv_sockaddr_to_lisp, network_interface_info):
      Prefer make_uninit_vector if the vector will be initialized soon.
      * src/lisp.h (make_nil_vector): New function.
    • Paul Eggert's avatar
      Streamline and fix vector-size checks · 7bcea8f8
      Paul Eggert authored
      * src/alloc.c (VECTOR_ELTS_MAX): New constant.
      (allocate_vectorlike): LEN now must be positive.  Assume LEN
      is in range.  All callers changed.
      (allocate_vector): Arg is now ptrdiff_t, not EMACS_INT.
      All callers changed.  Return zero vector here, not in
      * src/lisp.h (make_uninit_vector): Simplify.
      * src/xwidget.c (webkit_js_to_lisp):
      Check for overflow in ptrdiff_t calculations.
    • Paul Eggert's avatar
      Suppress WebKitGTK+ 2.21.1 diagnostics · a9732737
      Paul Eggert authored
      * src/xwidget.c: Suppress deprecation warnings (Bug#33679).
  5. 27 Nov, 2018 1 commit
    • Robert Pluim's avatar
      Don't call xwidget functions until GTK has been initialized · a291f624
      Robert Pluim authored
      Follow up fix to Bug#33294.
      * src/gtkutil.c: Define xg_gtk_initialized.
      (xg_initialize): Set it when GTK has finished initializing.
      * src/gtkutil.h: Declare xg_gtk_initialized.
      * src/xwidget.c (Fmake_xwidget): Error out if GTK has not been
      (xwidget_init_view): Likewise.
  6. 09 Nov, 2018 1 commit
  7. 08 Aug, 2018 1 commit
    • Tom Tromey's avatar
      More macro renamings for bignum · d1ec3a0a
      Tom Tromey authored
      * src/alloc.c, src/bidi.c, src/buffer.c, src/buffer.h, src/bytecode.c,
      src/callint.c, src/callproc.c, src/casefiddle.c, src/casetab.c,
      src/category.c, src/ccl.c, src/character.c, src/character.h,
      src/charset.c, src/charset.h, src/chartab.c, src/cmds.c, src/coding.c,
      src/composite.c, src/composite.h, src/data.c, src/dbusbind.c,
      src/decompress.c, src/dired.c, src/dispextern.h, src/dispnew.c,
      src/disptab.h, src/doc.c, src/dosfns.c, src/editfns.c,
      src/emacs-module.c, src/emacs.c, src/eval.c, src/fileio.c,
      src/floatfns.c, src/fns.c, src/font.c, src/font.h, src/fontset.c,
      src/frame.c, src/frame.h, src/fringe.c, src/ftcrfont.c, src/ftfont.c,
      src/gfilenotify.c, src/gnutls.c, src/gtkutil.c, src/image.c,
      src/indent.c, src/insdel.c, src/intervals.c, src/json.c,
      src/keyboard.c, src/keymap.c, src/kqueue.c, src/lcms.c, src/lisp.h,
      src/lread.c, src/macros.c, src/marker.c, src/menu.c, src/minibuf.c,
      src/msdos.c, src/print.c, src/process.c, src/profiler.c, src/search.c,
      src/sound.c, src/syntax.c, src/syntax.h, src/sysdep.c, src/term.c,
      src/termhooks.h, src/textprop.c, src/undo.c, src/w32.c,
      src/w32console.c, src/w32fns.c, src/w32font.c, src/w32inevt.c,
      src/w32proc.c, src/w32select.c, src/w32term.c, src/w32term.h,
      src/w32uniscribe.c, src/window.c, src/xdisp.c, src/xfaces.c,
      src/xfns.c, src/xfont.c, src/xftfont.c, src/xmenu.c, src/xml.c,
      src/xrdb.c, src/xselect.c, src/xsettings.c, src/xterm.c, src/xwidget.c
  8. 20 Jul, 2018 1 commit
    • Paul Eggert's avatar
      Prefer NILP (x) to EQ (x, Qnil) · fb24ce37
      Paul Eggert authored
      This simplifies the code a bit, and also simplifies some
      potential future changes slightly (e.g., altering eq vs eql).
      * src/alloc.c (mark_object):
      * src/callint.c (fix_command):
      * src/chartab.c (Fchar_table_range, Fset_char_table_range):
      * src/dbusbind.c (XD_OBJECT_TO_DBUS_TYPE, xd_signature):
      * src/dired.c (Fsystem_users):
      * src/fileio.c (Fdo_auto_save):
      * src/fns.c (concat):
      * src/frame.c (get_frame_param, frame_inhibit_resize)
      (store_in_alist, store_frame_param, x_set_autoraise)
      (x_set_autolower, x_get_arg):
      * src/image.c (Fclear_image_cache):
      * src/intervals.c (intervals_equal):
      * src/intervals.h (DEFAULT_INTERVAL_P):
      * src/lread.c (substitute_object_recurse):
      * src/menu.c (digest_single_submenu)
      * src/nsfns.m (x_set_icon_name, Fx_create_frame):
      * src/nsmenu.m (ns_menu_show):
      * src/nsselect.m (ns_string_to_pasteboard_internal)
      (Fns_selection_exists_p, Fns_selection_owner_p):
      * src/process.c (Faccept_process_output)
      * src/terminal.c (store_terminal_param):
      * src/textprop.c (verify_interval_modification):
      * src/xdisp.c (next_element_from_buffer):
      * src/xfaces.c (Finternal_set_lisp_face_attribute):
      * src/xfns.c (x_set_icon_type, Fx_synchronize):
      * src/xmenu.c (x_menu_show):
      * src/xselect.c (Fx_selection_owner_p)
      * src/xwidget.c (xwidget_view_lookup):
      Prefer NILP (x) to EQ (x, Qnil).
  9. 13 Jul, 2018 1 commit
    • Tom Tromey's avatar
      Rename integerp->fixnum, etc, in preparation for bignums · 42fe787b
      Tom Tromey authored
      * src/json.c, src/keyboard.c, src/keyboard.h, src/keymap.c,
      src/kqueue.c, src/lcms.c, src/lisp.h, src/lread.c, src/macros.c,
      src/marker.c, src/menu.c, src/minibuf.c, src/msdos.c, src/print.c,
      src/process.c, src/profiler.c, src/search.c, src/sound.c,
      src/syntax.c, src/sysdep.c, src/term.c, src/terminal.c,
      src/textprop.c, src/undo.c, src/w16select.c, src/w32.c,
      src/w32console.c, src/w32cygwinx.c, src/w32fns.c, src/w32font.c,
      src/w32inevt.c, src/w32proc.c, src/w32select.c, src/w32term.c,
      src/w32uniscribe.c, src/widget.c, src/window.c, src/xdisp.c,
      src/xfaces.c, src/xfns.c, src/xfont.c, src/xftfont.c, src/xmenu.c,
      src/xrdb.c, src/xselect.c, src/xterm.c, src/xwidget.c: Rename
      INTEGERP->FIXNUM, make_number->make_fixnum, CHECK_NUMBER->CHECK_FIXNUM,
      make_natnum->make_fixed_natum, NUMBERP->FIXED_OR_FLOATP,
  10. 15 Jun, 2018 1 commit
    • Paul Eggert's avatar
      New mint_ptr representation for C pointers · 30d393f9
      Paul Eggert authored
      * src/lisp.h (make_mint_ptr, mint_ptrp, xmint_pointer): New functions.
      * src/dbusbind.c (xd_lisp_dbus_to_dbus, Fdbus__init_bus):
      * src/emacs-module.c (module_free_global_ref, Fmodule_load)
      (module_assert_runtime, module_assert_env, value_to_lisp)
      (lisp_to_value, initialize_environment)
      (finalize_environment, finalize_runtime_unwind)
      * src/font.c (otf_open, font_put_frame_data)
      * src/macfont.m (macfont_invalidate_family_cache)
      * src/nsterm.h (XNS_SCROLL_BAR):
      * src/nsterm.m (ns_set_vertical_scroll_bar)
      * src/w32fns.c (w32_monitor_enum)
      * src/xterm.c (x_cr_destroy, x_cr_export_frames):
      * src/xwidget.c (webkit_javascript_finished_cb)
      (save_script_callback, Fxwidget_webkit_execute_script)
      Use mint pointers instead of merely save pointers.
  11. 08 Jun, 2018 1 commit
  12. 22 May, 2018 1 commit
    • Paul Eggert's avatar
      Minor tweaks to recent fix for Bug#31545 · a5172528
      Paul Eggert authored
      * src/xwidget.c (webkit_javascript_finished_cb)
      (Fxwidget_webkit_execute_script): Use intptr_t to avoid warnings
      in the (unlikely) event that ptrdiff_t and void * differ in width.
      (save_script_callback): Simplify by using xlispdstrdup and
  13. 21 May, 2018 2 commits
  14. 19 Jan, 2018 1 commit
  15. 01 Jan, 2018 1 commit
  16. 12 Dec, 2017 1 commit
    • Paul Eggert's avatar
      Reimplement Lisp_Object as pointer-to-incomplete · 244346c7
      Paul Eggert authored
      This makes Lisp_Object values opaque pointers instead of integers,
      which helps avoid the same sort of typos that
      CHECK_LISP_OBJECT_TYPE helps to avoid, without having to wrap
      pointers inside structures.  This also looks forward to supporting
      * etc/DEBUG:
      * src/.gdbinit (Lisp_Object_Printer.to_string):
      Lisp_Object can be a pointer type now.
      * src/alloc.c (macro_XPNTR, XPNTR):
      * src/emacs-module.c (value_to_lisp_bits, lisp_to_value_bits):
      * src/lisp.h (lisp_h_XLI, lisp_h_XIL):
      (lisp_h_XUNTAG) [USE_LSB_TAG]:
      (XUNTAG) [!USE_LSB_TAG]:
      (Lisp_Object, TAG_PTR, make_lisp_symbol):
      Support new Lisp_Object implementation as a pointer to an
      incomplete type.  Keep pointers pointers, as much as possible.
      Remove.  All uses replaced by plain XPNTR.
      * src/emacs-module.c: Work around GCC bug 83162.
      * src/lisp.h (LISP_WORDS_ARE_POINTERS, lisp_h_XLP, lisp_h_XPL):
      New macros.
      (Lisp_Word, untagged_ptr, Lisp_Word_tag): New types.
      (XLP, XPL): New inline functions.
      (TAG_PTR): Now expands to an initializer, not an expression.
      All uses changed.
      (TAG_SYMOFFSET, XLI_BUILTIN_LISPSYM): Remove.  All uses removed.
      (LISPSYM_INITIALLY): Redo in terms of the new TAG_PTR.
      (NIL_IS_ZERO): Redo without XLI_BUILTIN_LISPSYM.
      * src/xwidget.c (webkit_javascript_finished_cb): Use XPL
      instead of XIL with a non-EMACS_INT arg.
      (Fxwidget_webkit_execute_script): Use XLP instead of XLI
      followed by two conversions.
  17. 24 Nov, 2017 1 commit
  18. 13 Sep, 2017 1 commit
    • 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.
  19. 20 Feb, 2017 2 commits
    • Paul Eggert's avatar
      Verify xwidget USE_LSB_TAG assumption · 57a8346e
      Paul Eggert authored
      * src/xwidget.c (Fxwidget_webkit_execute_script):
      Add verification.  Problem reported by Andreas Schwab (Bug#25816#8).
    • Paul Eggert's avatar
      Port xwidget to -DCHECK_LISP_OBJECT_TYPE · a6e76fc7
      Paul Eggert authored
      * src/xwidget.c (webkit_javascript_finished_cb)
      (Fxwidget_webkit_execute_script): Don't assume Lisp_Object is an
      integer.  This fix is just a hack; I’ll file a bug report about
      the underlying problem.
  20. 10 Feb, 2017 1 commit
    • Paul Eggert's avatar
      Fix a few integer-overflow glitches · abcba32c
      Paul Eggert authored
      * src/composite.c (composition_compute_stop_pos, composition_reseat_it):
      * src/dispextern.h (struct composition_it.rule_idx):
      * src/keyboard.c (Fset__this_command_keys):
      * src/xwidget.c (webkit_js_to_lisp):
      Don’t assume object sizes fit in ‘int’.
      * src/xwidget.c (Fxwidget_resize):
      Don’t assume Emacs integers fit in ‘int’.
  21. 01 Jan, 2017 1 commit
  22. 07 Dec, 2016 1 commit
    • Paul Eggert's avatar
      Simplify FUNCTIONP implementation · f0870da2
      Paul Eggert authored
      * src/bytecode.c (exec_byte_code):
      * src/image.c (parse_image_spec):
      Prefer FUNCTIONP (x) to !NILP (Ffunctionp (x)).
      * src/eval.c (FUNCTIONP): Move here ...
      * src/lisp.h: ... from here.  No longer inline, as that
      bloats the text and does not help speed (at least on my platform).
      (functionp): Remove this name, since callers use FUNCTIONP.
  23. 06 Nov, 2016 1 commit
  24. 27 Oct, 2016 1 commit
  25. 26 Oct, 2016 6 commits
    • Paul Eggert's avatar
    • Ricardo Wurmus's avatar
      Implement zoom for WebKit widget. · e443eab6
      Ricardo Wurmus authored
      * src/xwidget.c (xwidget-webkit-zoom): New procedure.
      * lisp/xwidget.el: Bind "+" and "-" to zoom in and out, respectively.
      (xwidget-webkit-zoom): Declare procedure.
      (xwidget-webkit-zoom-in, xwidget-webkit-zoom-out): New procedures.
    • Ricardo Wurmus's avatar
      xwidget: Remove title hack. · 67e03311
      Ricardo Wurmus authored
      * src/xwidget.c (xwidget-webkit-get-title): Remove procedure.
      * lisp/xwidget.el (xwidget-webkit-get-title,
      xwidget-webkit-execute-script-rv): Remove procedures.
    • Ricardo Wurmus's avatar
      Remove scrolled window container around WebKit widget · 7ee870e8
      Ricardo Wurmus authored
      The WebKit widget can scroll on its own and does not need to wrapped
      with a scrolled window container.
      * src/xwidget.h: Remove struct member widgetscrolledwindow_osr.
      * src/xwidget.c: Remove widgetscrolledwindow_osr.
      (xwidget-set-adjustment): Remove.
      (xwidget-resize): Resize Webkit widget last.
      * lisp/xwidget.el (xwidget-set-adjustment): Remove.
      (xwidget-webkit-scroll-up, xwidget-webkit-scroll-down,
      xwidget-webkit-scroll-forward, xwidget-webkit-scroll-backward):
      Implement scrolling via JavaScript.
    • Ricardo Wurmus's avatar
      xwidget: Pass JavaScript return value to optional callback procedure · 623deaf4
      Ricardo Wurmus authored
      * lisp/xwidget.el (xwidget-webkit-execute-script): Accept optional
      callback argument.
      (xwidget-webkit-callback): Handle "javascript-callback" event type.
      * src/xwidget.c (xwidget-webkit-execute-script): Accept optional
      argument FUN, a Lisp procedure to execute on the JavaScript return
      (store_xwidget_js_callback_event, webkit_javascript_finished_cb,
      webkit_js_to_lisp): New procedures.
    • Ricardo Wurmus's avatar
      xwidget: Use WebKit2 API · d7816628
      Ricardo Wurmus authored
      * configure.ac: Check for webkit2gtk-4.0.
      * src/xwidget.c: Adjust to use WebKit2 API.
      * lisp/xwidget.el (xwidget-webkit-callback): Adjust matches for
  26. 13 Jul, 2016 2 commits
  27. 13 Apr, 2016 1 commit
  28. 09 Apr, 2016 1 commit
    • Joakim Verona's avatar
      Fix clipping of xwidgets · 97211f36
      Joakim Verona authored
      * src/xwidget.c (x_draw_xwidget_glyph_string): Use window_box
      instead of calculating the clipping borders manually.  Suggested
      by YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>.
  29. 03 Apr, 2016 2 commits
    • Paul Eggert's avatar
      make-xwidget unused arg cleanup · 13c8f29c
      Paul Eggert authored
      * doc/lispref/display.texi (Xwidgets): Remove stray refs.
      * src/xwidget.c (syms_of_xwidget): Qwebkit, not Qwebkit_osr.
    • Joakim Verona's avatar
      Remove unused arguments from make-xwidget · 36e05f0b
      Joakim Verona authored
      The arguments BEG and END were unused, and are now removed.
      * display.texi (Xwidgets): Document the change
      * xwidget.el (make-xwidget, xwidget-insert)
      (xwidget-webkit-new-session): Reflect changed arguments
      * xwidget.c (Fmake_xwidget, syms_of_xwidget): Reflect changed arguments