1. 08 Apr, 2019 1 commit
  2. 01 Jan, 2019 1 commit
  3. 07 Sep, 2018 1 commit
    • Paul Eggert's avatar
      Shrink pseudovectors a bit · 2c8520e1
      Paul Eggert authored
      sizeof (struct Lisp_Marker) was 32 on x86, where 24 would do.
      Problem noted by Stefan Monnier in:
      https://lists.gnu.org/r/emacs-devel/2018-09/msg00165.html
      * src/bignum.h (struct Lisp_Bignum):
      * src/frame.h (struct frame):
      * src/lisp.h (struct Lisp_Vector, struct Lisp_Bool_Vector)
      (struct Lisp_Char_Table, struct Lisp_Hash_Table)
      (struct Lisp_Marker, struct Lisp_Overlay)
      (struct Lisp_Misc_Ptr, struct Lisp_User_Ptr)
      (struct Lisp_Finalizer, struct Lisp_Float)
      (struct Lisp_Module_Function):
      * src/process.h (struct Lisp_Process):
      * src/termhooks.h (struct terminal):
      * src/thread.h (struct thread_state, struct Lisp_Mutex)
      (struct Lisp_CondVar):
      * src/window.c (struct save_window_data):
      * src/window.h (struct window):
      * src/xterm.h (struct scroll_bar):
      * src/xwidget.h (struct xwidget, struct xwidget_view):
      Add GCALIGNED_STRUCT attribute.
      * src/lisp.h (GCALIGNED_UNION_MEMBER): Renamed from GCALIGNED_UNION.
      All uses changed.
      (GCALIGNED_STRUCT_MEMBER, GCALIGNED_STRUCT, GCALIGNED): New macros.
      All uses of open-coded GCALIGNED changed to use GCALIGNED.
      (union vectorlike_header): No longer GC-aligned.
      (PSEUDOVECSIZE): Yield 0 for pseudovectors without Lisp
      objects that place a member before where the first Lisp object
      member would be.
      2c8520e1
  4. 10 Jun, 2018 1 commit
    • Paul Eggert's avatar
      Use native alignment to access Lisp object data · 0303fab3
      Paul Eggert authored
      Instead of using __builtin_assume_aligned (P, GCALIGNMENT) to
      tell GCC that P has alignment 8, use (T *) P where T is the
      type of the pointed-to object, to tell GCC that P has native
      alignment.  This is simpler, matches the intent better, and
      should help simplify future improvements.  Some of these
      changes are to pacify gcc -Wnull-dereference, since GCC is
      smarter about pointers now that Emacs no longer uses
      __builtin_assume_aligned; these minor changes should improve
      code efficiency slightly.  On Fedora 28 x86-64 with default
      optimization this patch shrinks the size of the Emacs text
      segment by 0.36%.
      * src/conf_post.h (__has_builtin, __builtin_assume_aligned):
      Remove; no longer used.
      * src/dbusbind.c (XD_OBJECT_TO_DBUS_TYPE):
      Pacify -Wnull-dereference by using XCAR instead of CAR_SAFE
      and XCDR instead of CDR_SAFE when this is safe.
      * src/fileio.c (Fexpand_file_name):
      * src/font.c (clear_font_cache):
      Pacify -Wnull-dereference by removing unnecessary NILP test.
      * src/keyboard.c (xevent_start): New function.
      (read_char, read_key_sequence): Pacify -Wnull-dereference by
      using xevent_start instead of EVENT_START.
      * src/lisp.h (lisp_h_XUNTAG): Remove; XUNTAG is always a macro
      now, since it can no longer be implemented as a function.
      (XUNTAG): New third argument CTYPE.  All uses changed.
      Cast result to CTYPE * instead of using __builtin_assume_aligned.
      Simplify by using LISP_WORD_TAG.
      (LISP_WORD_TAG): New macro.
      (TAG_PTR): Use it.
      * src/menu.c (x_popup_menu_1):
      Pacify -Wnull-dereference by using XCAR instead of Fcar and
      XCDR instead of Fcdr where this is safe.
      0303fab3
  5. 21 May, 2018 1 commit
    • Andreas Schwab's avatar
      Make xwidget-webkit-execute-script safe against GC (Bug#31545) · 8811c240
      Andreas Schwab authored
      * src/xwidget.h (struct xwidget): Add script_callbacks.
      * src/xwidget.c (save_script_callback): New function.
      (Fxwidget_webkit_execute_script): Use it.  Encode script
      before passing to execution engine.  Always use a callback.
      (webkit_javascript_finished_cb): Deallocate script.
      (kill_buffer_xwidgets): Deallocate remaining scripts.
      (Fxwidget_webkit_zoom): Doc fix.
      (Fxwidget_resize): Doc fix.
      8811c240
  6. 01 Jan, 2018 1 commit
  7. 13 Nov, 2017 1 commit
    • Paul Eggert's avatar
      Change vectorlike from struct to union · 5d68dc9a
      Paul Eggert authored
      * src/lisp.h (vectorlike_headed): Change from struct to union.
      All uses changed.  Since it has only one member, this does not
      change semantics.  This is designed to simplify future changes
      needed to fix bugs like Bug#29040.  All uses changed.
      5d68dc9a
  8. 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.
      bc511a64
  9. 01 Jan, 2017 1 commit
  10. 26 Oct, 2016 1 commit
    • 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.
      7ee870e8
  11. 10 Mar, 2016 1 commit
    • Paul Eggert's avatar
      Rework C source files to avoid ^( · 7352c6c6
      Paul Eggert authored
      Work around Bug#22884 by rewording comments and strings to avoid ‘(’
      at the start of a line unless it starts a function.  This change
      is a short-term hack; in the longer run we plan to fix cc-mode’s
      performance for C files that have ‘(’ at the start of a line in a
      comment or string.
      7352c6c6
  12. 22 Jan, 2016 1 commit
    • Paul Eggert's avatar
      xwidgets style cleanup · 7c3d742c
      Paul Eggert authored
      Adjust the newly-added Xwidgets code so that it uses a more-typical
      Emacs style.  This should not affect behavior, except that in
      a few places it adds runtime checks that Lisp arguments are of
      the proper type, and in one place it uses more-precise arithmetic.
      * src/buffer.c, src/dispnew.c, src/emacs.c, src/emacsgtkfixed.c:
      * src/emacs.c, src/print.c, src/window.c, src/xdisp.c, src/xterm.c:
      Include xwidget.h unconditionally.
      * src/buffer.c (Fkill_buffer):
      * src/dispnew.c (update_window):
      * src/emacs.c (main):
      * src/print.c (print_object):
      * src/window.c (Fdelete_window_internal):
      * src/xdisp.c (handle_single_display_spec, push_it, pop_it)
      (get_next_element, set_iterator_to_next, next_element_from_xwidget)
      (dump_glyph, calc_pixel_width_or_height, BUILD_GLYPH_STRINGS_XW)
      (BUILD_GLYPH_STRINGS, x_produce_glyphs, get_window_cursor_type):
      * src/xterm.c (x_draw_glyph_string, x_draw_bar_cursor):
      Call xwidget functions and macros without worrying about
      HAVE_XWIDGETS when the code is a no-op on non-xwidget
      platforms.
      * src/dispextern.h (XWIDGET_GLYPH, struct glyph_string.xwidget)
      (IT_XWIDGET, GET_FROM_XWIDGET, struct it.u.xwidget)
      (struct it.xwidget):
      * src/lisp.h (PVEC_XWIDGET, PVEC_XWIDGET_VIEW):
      Always define.
      * src/emacsgtkfixed.h: Omit unnecessary comment.
      * src/keyboard.c: Fix spacing.
      * src/xdisp.c (BUILD_XWIDGET_GLYPH_STRING, produce_xwidget_glyph):
      Define to be a no-op if not HAVE_XWIDGETS.
      * src/xwidget.c: Include xwidget.h first (after config.h)
      to make sure that it can stand by itself.
      (Fmake_xwidget, Fxwidget_webkit_execute_script):
      Fix typo in doc string.
      (Fmake_xwidget): Check type of args.
      (Fmake_xwidget, offscreen_damage_event)
      (webkit_document_load_finished_cb, webkit_download_cb)
      (webkit_new_window_policy_decision_requested_cb)
      (webkit_navigation_policy_decision_requested_cb)
      (xwidget_osr_draw_cb, xwidget_osr_event_forward)
      (xwidget_osr_event_set_embedder, xwidget_init_view):
      Omit unnecessary casts.
      * src/xwidget.c (Fmake_xwidget, xwidget_hidden)
      (xwidget_show_view, xwidget_hide_view)
      (x_draw_xwidget_glyph_string, xwidget_start_redisplay, xwidget_touch)
      (xwidget_touched):
      * src/xwidget.h (struct xwidget.kill_without_query)
      (struct xwidget_view.redisplayed, struct xwidget_view.hidden):
      Use bool for boolean.
      * src/xwidget.c (store_xwidget_event_string, Fxwidget_size_request):
      Simplify by using list functions.
      (WEBKIT_FN_INIT): Omit unnecessary test for nil.
      (Fxwidget_resize): Check type of integer args
      before doing any work.  Check that they are nonnegative.
      (Fxwidget_set_adjustment): Check type of integer arg.
      Avoid redundant call to gtk_scrolled_window_get_vadjustment.
      Simplify.  Use double, not float.
      (Fxwidget_info, Fxwidget_view_info): Simplify by using CALLN.
      (valid_xwidget_spec_p): Simplify.
      (xwidget_spec_value): Omit unused arg FOUND.  All callers changed.
      * src/xwidget.h: Include lisp.h first, so that includers do
      not need to worry about doing that before including this file.
      Make this .h file safe to include even on non-HAVE_XWIDGETS
      configurations, to simplify the includers.
      (x_draw_xwidget_glyph_string, syms_of_xwidget, valid_xwidget_spec_p)
      (xwidget_end_redisplay, lookup_xwidget)
      (xwidget_view_delete_all_in_window, kill_buffer_xwidgets):
      Now a no-op if !HAVE_XWIDGETS, to simplify callers.
      (struct glyph_matrix, struct glyph_string, struct xwidget)
      (struct xwidget_view, struct window):
      New forward or incomplete decls, so that includers need not
      assume the corresponding .h files are already included, or that
      HAVE_XWIDGETS is defined.
      (struct xwidget_type, xwidget_from_id): Remove; unused.
      7c3d742c
  13. 20 Jan, 2016 1 commit
    • Paul Eggert's avatar
      Don’t export C symbols not used elsewhere · 9d7265ba
      Paul Eggert authored
      These were recently added, mostly as part of xwidget code.
      * src/emacsgtkfixed.c (emacs_fixed_get_type): Now static.
      (EMACS_FIXED, EMACS_FIXED_GET_CLASS):
      Now static functions here, not macros in emacsgtkfixed.h.
      * src/emacsgtkfixed.h (EMACS_TYPE_FIXED):
      Remove.  All uses replaced by definiens.
      (EMACS_FIXED, EMACS_FIXED_GET_CLASS):
      Remove; these are now static functions in emacsgtkfixed.c.
      (EMACS_FIXED_CLASS, EMACS_IS_FIXED, EMACS_IS_FIXED_CLASS):
      Remove; unused.
      (emacs_fixed_get_type): Remove decl; no longer extern.
      * src/xwidget.c (offscreen_damage_event)
      (webkit_mime_type_policy_typedecision_requested_cb)
      (webkit_new_window_policy_decision_requested_cb)
      (webkit_navigation_policy_decision_requested_cb)
      (xwidget_spec_value, xwidget_view_lookup)
      (xwidget_start_redisplay, xwidget_touch):
      Now static.
      * src/xwidget.h (xwidget_start_redisplay, xwidget_touch):
      Remove decls.
      9d7265ba
  14. 19 Jan, 2016 2 commits
    • Glenn Morris's avatar
      ; Add 2016 to copyright years of new files. · c7441cd7
      Glenn Morris authored
      c7441cd7
    • Joakim Verona's avatar
      Support for the new Xwidget feature. · 7c1f66a9
      Joakim Verona authored
      * configure.ac:
      (HAVE_XWIDGETS, WIDGET_OBJ, EMACS_CONFIG_FEATURES):
      * xterm.c (x_draw_glyph_string, x_draw_bar_cursor):
      * xdisp.c:
      (handle_display_spec, handle_single_display_spec, push_it)
      (pop_it, set_iterator_to_next, dump_glyph)
      (calc_pixel_width_or_height, fill_xwidget_glyph_string)
      (BUILD_XWIDGET_GLYPH_STRING, BUILD_GLYPH_STRINGS)
      (produce_xwidget_glyph, x_produce_glyphs)
      (get_window_cursor_type):
      * window.c (Fdelete_window_internal):
      * termhooks.h (e):
      * print.c (print_object):
      * lisp.h (ptrdiff_t):
      * keyboard.c (kbd_buffer_get_event, make_lispy_event)
      (syms_of_keyboard):
      * emacs.c (main):
      * dispnew.c (update_window, scrolling_window):
      * dispextern.h (g, i):
      * Makefile.in (XWIDGETS_OBJ, WEBKIT_CFLAGS, WEBKIT_LIBS)
      (GIR_LIBS, ALL_CFLAGS, base_obj, LIBES):
      * keyboard.c (kbd_buffer_get_event):
      * emacsgtkfixed.c (emacs_fixed_gtk_widget_size_allocate)
      (emacs_fixed_class_init): Add case for an xwidget view.
      
      * xwidget.c, xwidget.h, xwidget.el: New files for xwidgets
      Co-authored-by: default avatarGrégoire Jadi  <daimrod@gmail.com>
      
      Various improvements to the Xwidget feature.
      * xwidgets.c:
      * emacsgtkfixed.c:
      * xwidget.el:
      7c1f66a9
  15. 01 Feb, 2015 1 commit
  16. 19 Jan, 2015 1 commit
  17. 11 Jan, 2015 1 commit
  18. 01 Jan, 2009 1 commit
  19. 25 Jul, 2013 1 commit
    • Grégoire Jadi's avatar
      Always store GTK Widget as GtkWidget*. · 5677ff6c
      Grégoire Jadi authored
      * src/xwidget.h (struct xwidget): GtkContainer -> GtkWidget for
      widgetwindow_osr.
      (struct xwidget_view): GtkContainer -> GtkWidget for widgetwindow and
      emacswindow.
      5677ff6c
  20. 18 Jul, 2013 1 commit
  21. 16 Jul, 2013 2 commits
    • Grégoire Jadi's avatar
      * src/xwidget.c: Add a `query-on-exit' flag to determine whether we can · b849935e
      Grégoire Jadi authored
      kill xwidget when the buffer is killed without confirmation.
      (Fset_xwidget_query_on_exit_flag): New function to set the `query-on-exit'
      flag.
      (Fxwidget_query_on_exit_flag): New function to retrieve the value of the
      `query-on-exit' flag.
      (Fmake_xwidget): Set the `query-on-exit' flag to t by default.
      * src/xwidget.h (xwidget): Add new field `kill_without_query'.
      * lisp/xwidget.el (xwidget-kill-buffer-query-function): Ask for
      confirmation before killing the buffer if a xwidget is present only if its
      `query-on-exit' flag is enabled.
      b849935e
    • Grégoire Jadi's avatar
      * src/xwidget.h src/xwidget.c (valid_xwidget_spec_p): Renamed · 54eb6c10
      Grégoire Jadi authored
      `valid_xwidget_p' to `valid_xwidget_p'.
      (XWIDGETP): Rename `XXWIDGETP' to `XWIDGETP' and `XXWIDGET_VIEW_P' to
      `XWIDGET_VIEW_P'. The old `XWIDGETP' is now implemented solely in
      `valid_xwidget_spec_p'.
      (CHECK_XWIDGET): New macro to check whether the argument is a xwidget.
      (CHECK_XWIDGET_VIEW): New macro to check whether the argument is a
      xwidget_view.
      * src/print.c src/xdisp.c: Take into account the new names.
      54eb6c10
  22. 28 Jun, 2013 4 commits
  23. 24 Jun, 2013 2 commits
  24. 04 Jun, 2013 1 commit
  25. 08 Aug, 2011 1 commit
  26. 18 Jul, 2011 1 commit
  27. 17 Jul, 2011 1 commit
  28. 14 Jul, 2011 2 commits
  29. 12 Jul, 2011 1 commit
  30. 05 Jul, 2011 1 commit
  31. 04 Jul, 2011 2 commits
  32. 01 Jul, 2011 1 commit