1. 10 May, 2017 1 commit
    • Perry E. Metzger's avatar
      Implement 1-based column numbering in mode line · 7df07779
      Perry E. Metzger authored
      * src/xdisp.c (decode_mode_spec): Implement the %C construct.
      
      * lisp/bindings.el (column-number-indicator-zero-based): New
      defcustom.
      (mode-line-position): Use %C when
      column-number-indicator-zero-based is nil.
      
      * src/xdisp.c (syms_of_xdisp) <frame-title-format>:
      * src/buffer.c (syms_of_buffer) <mode-line-format>:
      * doc/lispref/modes.texi (%-Constructs):
      * doc/lispref/frames.texi (Frame Titles): Document the %C
      construct.
      
      * doc/emacs/display.texi (Optional Mode Line): Document
      'column-number-indicator-zero-based'.
      
      * etc/NEWS: Mention 'column-number-indicator-zero-based' and the
      %C construct.
      7df07779
  2. 31 Mar, 2017 1 commit
  3. 26 Jan, 2017 1 commit
    • Paul Eggert's avatar
      Replace QUIT with maybe_quit · b3a3ed52
      Paul Eggert authored
      There’s no longer need to have QUIT stand for a slug of C statements.
      Use the more-obvious function-call syntax instead.
      Also, use true and false when setting immediate_quit.
      These changes should not affect the generated machine code.
      * src/lisp.h (QUIT): Remove.  All uses replaced by maybe_quit.
      b3a3ed52
  4. 16 Jan, 2017 1 commit
    • Eli Zaretskii's avatar
      ; Spelling fixes · 5569e644
      Eli Zaretskii authored
      * src/buffer.c (delete_all_overlays, Fkill_buffer): Fix typos in
      comments.
      5569e644
  5. 01 Jan, 2017 1 commit
  6. 25 Dec, 2016 1 commit
    • Paul Eggert's avatar
      Reorder lisp.h to declare types before using them · f5b9c1e5
      Paul Eggert authored
      This puts basic functions for types to be after the corresponding
      type definitions.  This is a more-common programming style in C,
      and will make it easier to port Emacs to gcc
      -fcheck-pointer-bounds, since the functions now have access to the
      corresponding types' sizes.  This patch does not change the code;
      it just moves declarations and definitions and removes
      no-longer-needed forward declarations (Bug#25128).
      * src/buffer.c, src/data.c, src/image.c:
      Include process.h, for PROCESSP.
      * src/buffer.h (BUFFERP, CHECK_BUFFER, XBUFFER):
      * src/process.h (PROCESSP, CHECK_PROCESS, XPROCESS):
      * src/termhooks.h (TERMINALP, XTERMINAL):
      * src/window.h (WINDOWP, CHECK_WINDOW, XWINDOW):
      * src/thread.h (THREADP, CHECK_THREAD, XTHREAD, MUTEXP, CHECK_MUTEX)
      (XMUTEX, CONDVARP, CHECK_CONDVAR, XCONDVAR):
      Move here from lisp.h.
      * src/intervals.h: Include buffer.h, for BUFFERP.
      Include lisp.h, for Lisp_Object.
      * src/lisp.h: Reorder declarations and definitions as described
      above.  Move thread includes to be later, so that they can use the
      reordered definitions.  Move some symbols to other headers (noted
      elsewhere).  Remove forward decls that are no longer needed.
      * src/thread.h: Include systhread.h here, not in lisp.h,
      since lisp.h itself does not need systhread.h.
      f5b9c1e5
  7. 12 Dec, 2016 1 commit
    • Eli Zaretskii's avatar
      Fix point motion in cloned buffers · a416e1d6
      Eli Zaretskii authored
      * src/thread.c (post_acquire_global_lock): Call
      set_buffer_internal_2 instead of tricking set_buffer_internal_1
      into resetting the current buffer even if it didn't change.  This
      avoids bug#25165, caused by failing to record the modified values
      of point and mark, because current_buffer was set to NULL.  Also,
      don't bother re-setting the buffer if there was no thread switch,
      as that just wastes cycles.
      * src/buffer.c (set_buffer_internal_2): New function, with most of
      the body of set_buffer_internal_1, but without the test for B
      being identical to the current buffer.
      (set_buffer_internal_1): Call set_buffer_internal_2 if B is not
      identical to the current buffer.
      * src/buffer.h (set_buffer_internal_2): Add prototype.
      
      * test/src/thread-tests.el (thread-sticky-point): New test.
      a416e1d6
  8. 03 Dec, 2016 1 commit
    • Noam Postavsky's avatar
      Add lisp watchpoints · 22721316
      Noam Postavsky authored
      This allows calling a function whenever a symbol-value is changed.
      
      * src/lisp.h (lisp_h_SYMBOL_TRAPPED_WRITE_P):
      (SYMBOL_TRAPPED_WRITE_P): New function/macro.
      (lisp_h_SYMBOL_CONSTANT_P): Check for SYMBOL_NOWRITE specifically.
      (enum symbol_trapped_write): New enumeration.
      (struct Lisp_Symbol): Rename field constant to trapped_write.
      (make_symbol_constant): New function.
      
      * src/data.c (Fadd_variable_watcher, Fremove_variable_watcher):
      (set_symbol_trapped_write, restore_symbol_trapped_write):
      (harmonize_variable_watchers, notify_variable_watchers): New functions.
      
      * src/data.c (Fset_default): Call `notify_variable_watchers' for trapped
      symbols.
      (set_internal): Change bool argument BIND to 3-value enum and call
      `notify_variable_watchers' for trapped symbols.
      
      * src/data.c (syms_of_data):
      * src/data.c (syms_of_data):
      * src/font.c (syms_of_font):
      * src/lread.c (intern_sym, init_obarray):
      * src/buffer.c (syms_of_buffer): Use make_symbol_constant.
      
      * src/alloc.c (init_symbol):
      * src/bytecode.c (exec_byte_code): Use SYMBOL_TRAPPED_WRITE_P.
      * src/data.c (Fmake_variable_buffer_local, Fmake_local_variable):
      (Fmake_variable_frame_local):
      * src/eval.c (Fdefvaralias, specbind): Refer to Lisp_Symbol's
      trapped_write instead of constant.
      (Ffuncall): Move subr calling code into separate function.
      (funcall_subr): New function.
      22721316
  9. 08 Nov, 2016 1 commit
    • Mark Oteiza's avatar
      Remove obsolete default-FOO variables · 73d47d22
      Mark Oteiza authored
      * etc/NEWS: Indicate the removed variables.
      * lisp/emacs-lisp/edebug.el (edebug-outside-mark): Fix comment.
      * lisp/subr.el (default-mode-line-format, default-header-line-format):
      (default-line-spacing, default-abbrev-mode, default-ctl-arrow):
      (default-truncate-lines, default-left-margin, default-tab-width):
      (default-case-fold-search, default-left-margin-width):
      (default-right-margin-width, default-left-fringe-width):
      (default-right-fringe-width, default-fringes-outside-margins):
      (default-scroll-bar-width, default-vertical-scroll-bar):
      (default-indicate-empty-lines, default-indicate-buffer-boundaries):
      (default-fringe-indicator-alist, default-fringe-cursor-alist):
      (default-scroll-up-aggressively, default-scroll-down-aggressively):
      (default-fill-column, default-cursor-type):
      (default-cursor-in-non-selected-windows):
      (default-buffer-file-coding-system, default-major-mode):
      (default-enable-multibyte-characters): Remove obsolete declarations.
      * src/buffer.c (default-mode-line-format, default-header-line-format):
      (default-line-spacing, default-abbrev-mode, default-ctl-arrow):
      (default-truncate-lines, default-left-margin, default-tab-width):
      (default-case-fold-search, default-left-margin-width):
      (default-right-margin-width, default-left-fringe-width):
      (default-right-fringe-width, default-fringes-outside-margins):
      (default-scroll-bar-width, default-vertical-scroll-bar):
      (default-indicate-empty-lines, default-indicate-buffer-boundaries):
      (default-fringe-indicator-alist, default-fringe-cursor-alist):
      (default-scroll-up-aggressively, default-scroll-down-aggressively):
      (default-fill-column, default-cursor-type):
      (default-cursor-in-non-selected-windows):
      (default-buffer-file-coding-system, default-major-mode):
      (default-enable-multibyte-characters): Remove.
      * src/fileio.c (choose_write_coding_system): Fix comment.
      * src/lisp.h (DEFVAR_BUFFER_DEFAULTS): Remove.
      73d47d22
  10. 30 Sep, 2016 1 commit
    • Paul Eggert's avatar
      Limit <config.h>’s includes · f4eb8900
      Paul Eggert authored
      This follows up on recent problems with the fact that config.h
      includes stdlib.h etc.; some files need to include stdlib.h later.
      config.h generally should limit itself to includes that are
      universally safe; outside of MS-Windows, only stdbool.h makes
      the cut among the files currently included.  So, move the
      other includes to just the files that need them (Bug#24506).
      * configure.ac (config_opsysfile): Remove, as this generic hook
      is no longer needed.
      * lib-src/etags.c, src/unexmacosx.c, src/w32.c, src/w32notify.c:
      * src/w32proc.c (_GNU_SOURCE):
      Remove, as it’s OK for config.h to do this now.
      * src/conf_post.h: Include <ms-w32.h>, instead of the generic
      config_opsysfile, for simplicity as this old way of configuring is
      now done only for the MS-Windows port.  Do not include <ms-w32.h>
      if DEFER_MS_W32_H, for the benefit of the few files that want its
      effects later.  Do not include <alloca.h>, <string.h>, or
      <stdlib.h>.  Other files modified to include these headers as
      needed, or to not include headers that are no longer needed.
      * src/lisp.h: Include <alloca.h> and <string.h> here, since
      some of the inline functions need them.
      * src/regex.c: Include <alloca.h> if not emacs.  (If emacs,
      we can rely on SAFE_ALLOCA.)  There is no longer any need to
      worry about HAVE_ALLOCA_H.
      * src/unexmacosx.c: Rely on config.h not including stdlib.h.
      * src/w32.c, src/w32notify.c, src/w32proc.c (DEFER_MS_W32_H):
      Define before including <config.h> first, and include <ms-w32.h>
      after the troublesome headers.
      f4eb8900
  11. 15 Jul, 2016 1 commit
  12. 24 Jun, 2016 1 commit
  13. 12 Jun, 2016 1 commit
    • Paul Eggert's avatar
      emacs_strerror cleanups · 5932ffcd
      Paul Eggert authored
      * src/buffer.c, src/emacs.c, src/lread.c: Don’t include coding.h;
      no longer needed, now that emacs_strerror is declared by lisp.h.
      * src/coding.c (emacs_strerror): Remove; moved to emacs.c.
      * src/coding.h (emacs_strerror) [emacs]: Remove decl; moved
      to lisp.h.
      * src/emacs.c (emacs_strerror): Move here from coding.c.  Do not
      convert result string; this is now the caller’s responsibility,
      as some need conversion and others don’t.
      * src/fileio.c (report_file_errno, report_file_notify_error):
      Use emacs_strerror rather than rolling it ourselves.
      * src/lisp.h (emacs_strerror): Move decl here from coding.h.
      * src/lread.c (dir_warning): Just call emacs_strerror rather than
      both strerror and emacs_strerror.  Convert its result from
      locale-coding-system, since it no longer does that conversion.
      * src/sound.c (sound_perror):
      * src/sysdep.c (emacs_perror, str_collate):
      Use emacs_strerror, not strerror.
      5932ffcd
  14. 08 Jun, 2016 1 commit
  15. 30 May, 2016 1 commit
    • Paul Eggert's avatar
      Omit IF_LINT code that no longer seems needed · 237244bb
      Paul Eggert authored
      Nowadays GCC is smarter, or the Emacs code has mutated, or both,
      and now is as good a time as any to remove uses of IF_LINT that
      now seem to be unnecessary.
      * lib-src/emacsclient.c (set_local_socket):
      * lib-src/movemail.c (main) [MAIL_USE_MAILLOCK && HAVE_TOUCHLOCK]:
      * src/buffer.c (fix_start_end_in_overlays, fix_overlays_before):
      * src/casefiddle.c (casify_region):
      * src/charset.c (load_charset_map):
      * src/coding.c (decode_coding_object, encode_coding_object):
      * src/data.c (Fmake_variable_buffer_local, Fmake_local_variable)
      (cons_to_unsigned, cons_to_signed):
      * src/frame.c (make_frame, x_set_frame_parameters):
      * src/keyboard.c (read_event_from_main_queue):
      * src/regex.c (regex_compile):
      * src/syntax.c (back_comment):
      * src/window.c (Frecenter):
      * src/xfaces.c (Fx_list_fonts):
      Remove IF_LINT that no longer seems necessary.
      * src/image.c (png_load_body, jpeg_load_body): Simplify use of IF_LINT.
      * src/keyboard.c (read_char): Use IF_LINT (volatile) rather than
      a pragma dance to pacify GCC -Wclobbered.
      * src/xdisp.c (x_produce_glyphs): Rewrite to avoid need for IF_LINT.
      
      * src/xterm.c (x_connection_closed): Now _Noreturn, which should
      mean we do not need IF_LINT any more.
      (x_io_error_quitter): Now _Noreturn.  Put an 'assume (false)’
      at the end, to forestall warnings from older compilers.
      237244bb
  16. 01 May, 2016 2 commits
  17. 30 Apr, 2016 2 commits
    • Paul Eggert's avatar
      Fix generate-new-buffer-name increment typo · 4b488a29
      Paul Eggert authored
      Problem reported by Chaitanya Koparkar (Bug#23394).
      * src/buffer.c (Fgenerate_new_buffer_name): Increment count when
      generating a new buffer.  This fixes a typo I introduced in
      2014-04-05T00:04:58Z!eggert@cs.ucla.edu.
      4b488a29
    • Lars Ingebrigtsen's avatar
      cursor-type doc fix · 77c5f455
      Lars Ingebrigtsen authored
      * src/buffer.c (syms_of_buffer): Mention that cursor-type's
      WIDHT/HEIGHT can't exceed the frame char size (bug#19215).
      77c5f455
  18. 05 Apr, 2016 1 commit
    • Paul Eggert's avatar
      Prefer AUTO_STRING_WITH_LEN to make_formatted_string · b4c7869e
      Paul Eggert authored
      * src/buffer.c (Fgenerate_new_buffer_name):
      * src/filelock.c (get_boot_time):
      * src/minibuf.c (get_minibuffer):
      * src/process.c (make_process):
      * src/xdisp.c (ensure_echo_area_buffers):
      Prefer AUTO_STRING_WITH_LEN + sprintf to make_formatted_string
      when either will do.
      b4c7869e
  19. 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
  20. 01 Feb, 2016 1 commit
    • Martin Rudalics's avatar
      Some corrections in Elisp manual · e639e10a
      Martin Rudalics authored
      * doc/lispref/buffers.texi (Read Only Buffers): Describe optional
      argument POSITION.
      * doc/lispref/debugging.texi (Error Debugging): `debug-on-signal'
      is an option.
      * doc/lispref/display.texi (Refresh Screen): Describe optional
      argument FRAME of `redraw-frame'.
      (Attribute Functions): Describe optional argument CHARACTER of
      `face-font'.
      (Defining Images): `image-load-path' is an option.
      (Beeping): `ring-bell-function' is an option.
      * doc/lispref/frames.texi (Size and Position): The PIXELWISE
      argument of `set-frame-size' is optional.
      (Raising and Lowering): The TERMINAL argument of `tty-top-frame'
      is optional.
      * doc/lispref/keymaps.texi (Controlling Active Maps): Fix doc of
      `set-transient-map'.
      * doc/lispref/minibuf.texi (Text from Minibuffer):
      `read-regexp-defaults-function' is an option.
      (Minibuffer Contents): `delete-minibuffer-contents' is a command.
      * doc/lispref/modes.texi (Mode Line Variables):
      `mode-line-position' and `mode-line-modes' are variables, not
      options.
      * doc/lispref/strings.texi (Creating Strings): The START argument
      of `substring' is optional.
      * doc/lispref/text.texi (Buffer Contents): Describe optional
      argument NO-PROPERTIES of `thing-at-point'.
      (User-Level Deletion): Both arguments of
      `delete-trailing-whitespace' are optional.
      (Margins): Use @key{RET} instead of @kbd{RET}.
      * doc/lispref/windows.texi (Display Action Functions): Write
      non-@code{nil} instead of non-nil.
      (Choosing Window Options): The WINDOW arg of
      `split-window-sensibly' is optional.
      (Choosing Window Options): Write non-@code{nil} instead of
      non-nil.
      (Window Start and End): Both args of `window-group-end' are
      optional.
      
      * src/buffer.c (Fbarf_if_buffer_read_only): Rename argument POS
      to POSITION to keep consisteny with doc-string.
      e639e10a
  21. 30 Jan, 2016 1 commit
    • Paul Eggert's avatar
      Pacify --enable-gcc-warnings when HYBRID_MALLOC · e1a9f209
      Paul Eggert authored
      * src/buffer.c (init_buffer):
      * src/emacs.c (main):
      * src/xsmfns.c (smc_save_yourself_CB, x_session_initialize):
      Use emacs_get_current_dir_name, not get_current_dir_name.
      * src/conf_post.h (aligned_alloc) [HYBRID_MALLOC && emacs]: New macro.
      (HYBRID_GET_CURRENT_DIR_NAME, get_current_dir_name): Remove.
      * src/emacs.c: Include "sheap.h".
      (report_sheap_usage): Remove decl.
      (Fdump_emacs) [HYBRID_MALLOC]: Report usage directly.
      Don't assume ptrdiff_t can be printed as int.
      * src/gmalloc.c [HYBRID_MALLOC]:
      Include "sheap.h" rather than declaring its contents by hand.
      (get_current_dir_name, gget_current_dir_name)
      (hybrid_get_current_dir_name): Remove.
      (emacs_abort): Remove duplicate decl.
      (aligned_alloc): Undef, like malloc etc.
      (ALLOCATED_BEFORE_DUMPING): Now a static function, not a macro.
      Make it a bit more efficient.
      (malloc_find_object_address): Remove unused decl.
      (enum mcheck_status, mcheck, mprobe, mtrace, muntrace, struct mstats)
      (mstats, memory_warnings): Declare only if GC_MCHECK.
      * src/lisp.h (emacs_get_current_dir_name):
      New decl, replacing get_current_dir_name.
      * src/sheap.c: Include sheap.h first.
      (STATIC_HEAP_SIZE): Remove; now in sheap.h.
      (debug_sheap): Now static.
      (bss_sbrk_buffer_end): Remove; no longer used.
      (bss_sbrk_ptr): Now static and private.
      (bss_sbrk_did_unexec): Now bool.
      (BLOCKSIZE): Remove, to avoid GCC warning about its not being used.
      (bss_sbrk): Don't treat request_size 0 as special, since the code
      works without this being a special case.
      Avoid overflow if request size exceeds INT_MAX.
      (report_sheap_usage): Remove; now done in emacs.c.
      * src/sheap.h: New file.
      * src/sysdep.c (get_current_dir_name): Remove macro.
      Include "sheap.h".
      (emacs_get_current_dir_name): Rename function from
      get_current_dir_name.  Handle HYBRID_MALLOC here;
      this is simpler.
      (Bug#22086)
      e1a9f209
  22. 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
  23. 19 Jan, 2016 1 commit
    • 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
  24. 13 Jan, 2016 2 commits
  25. 05 Jan, 2016 3 commits
  26. 04 Jan, 2016 1 commit
  27. 01 Jan, 2016 1 commit
  28. 09 Nov, 2015 1 commit
    • Paul Eggert's avatar
      Use INT_ADD_WRAPV etc. to check integer overflow · 10873055
      Paul Eggert authored
      * src/alloc.c (xnmalloc, xnrealloc, xpalloc, Fmake_string):
      * src/buffer.c (record_overlay_string, overlay_strings):
      * src/casefiddle.c (casify_object):
      * src/ccl.c (Fccl_execute_on_string):
      * src/character.c (char_width, c_string_width, lisp_string_width)
      (count_size_as_multibyte, string_escape_byte8):
      * src/coding.c (coding_alloc_by_realloc, produce_chars):
      * src/data.c (arith_driver):
      * src/dispnew.c (realloc_glyph_pool, init_display):
      * src/editfns.c (styled_format):
      * src/fns.c (Ffillarray):
      * src/ftfont.c (ftfont_shape_by_flt):
      * src/gnutls.c (gnutls_hex_string):
      * src/gtkutil.c (get_utf8_string):
      * src/image.c (x_to_xcolors, x_detect_edges, png_load_body):
      * src/keymap.c (Fkey_description):
      * src/lisp.h (SAFE_ALLOCA_LISP):
      * src/term.c (encode_terminal_code):
      * src/tparam.c (tparam1):
      * src/xselect.c (x_property_data_to_lisp):
      * src/xsmfns.c (smc_save_yourself_CB):
      * src/xterm.c (x_term_init):
      When checking for integer overflow, prefer INT_MULTIPLY_WRAPV to
      more-complicated code involving division and/or
      INT_MULTIPLY_OVERFLOW, and similarly for INT_ADD_WRAPV and
      subtraction and/or INT_ADD_OVERFLOW.
      * src/casefiddle.c (casify_object): Simplify multibyte size check.
      * src/character.c: Remove some obsolete ‘#ifdef emacs’s.
      * src/data.c (arith_driver): Also check for division overflow,
      as that’s now possible given that the accumulator can now contain
      any Emacs integer.
      * src/lisp.h (lisp_word_count): Remove; no longer used.
      10873055
  29. 06 Nov, 2015 1 commit
    • Eli Zaretskii's avatar
      Don't invoke overlay modification hooks in wrong buffer · 564d8117
      Eli Zaretskii authored
      * src/buffer.c (report_overlay_modification): When called with
      AFTER non-zero, don't invoke overlay modification hooks if the
      buffer recorded in last_overlay_modification_hooks is different
      from the current buffer.  (Bug#21824)
      564d8117
  30. 29 Oct, 2015 1 commit
  31. 24 Oct, 2015 2 commits
    • Eli Zaretskii's avatar
      An even better fix for bug#21739 · 7a6968b4
      Eli Zaretskii authored
      * src/window.c (set_window_buffer): If the window is the frame's
      selected window, set update_mode_lines, not the window's
      update_mode_line flag.  (Bug#21739)
      * src/buffer.c (Fkill_buffer): Undo last change.
      (set_update_modelines_for_buf): Function deleted.
      7a6968b4
    • Eli Zaretskii's avatar
      A better fix for bug#21739 · bc0b340d
      Eli Zaretskii authored
      * src/buffer.c (set_update_modelines_for_buf): New function.
      (Fkill_buffer): Use it to set the global variable
      update_mode_lines if the killed buffer was displayed in some
      window.  Don't set windows_or_buffers_changed.  This is a better
      fix for bug#21739 than the previous fix, since it will cause only
      redisplay of mode lines, not of entire windows, but will still
      catch attention of x_consider_frame_title in xdisp.c, which
      redraws the frame title.
      bc0b340d
  32. 23 Oct, 2015 1 commit
  33. 21 Oct, 2015 1 commit
    • Paul Eggert's avatar
      Include-file cleanup for src directory · 63cfb75f
      Paul Eggert authored
      Omit ‘#include "foo.h"’ unless the file needs foo.h (Bug#21707).
      In a few cases, add ‘#include "foo.h"’ if the file needs foo.h
      but does not include it directly.  As a general rule, a source
      file should include foo.h if it needs the interfaces that foo.h
      defines.
      * src/alloc.c: Don’t include process.h.  Include dispextern.h,
      systime.h.
      * src/atimer.c: Don’t include blockinput.h.
      * src/buffer.c: Include coding.h, systime.h.  Don’t include
      keyboard.h, coding.h.
      * src/callint.c: Don’t include commands.h, keymap.h.
      * src/callproc.c: Don’t include character.h, ccl.h, composite.h,
      systty.h, termhooks.h.
      * src/casetab.c: Don’t include character.h.
      * src/category.c: Don’t include charset.h, keymap.h.
      * src/ccl.h: Don’t include character.h.
      * src/character.c: Don’t include charset.h.
      * src/charset.c: Don’t include disptab.h.
      * src/chartab.c: Don’t include ccl.h.
      * src/cm.c: Don’t include frame.h, termhooks.h.
      * src/cmds.c: Don’t include window.h, dispextern.h.
      * src/coding.c: Don’t include window.h, frame.h.
      * src/composite.c: Include composite.h.  Don’t include window.h,
      font.h.
      * src/data.c: Don’t include syssignal.h, termhooks.h, font.h.
      * src/dbusbind.c: Don’t include frame.h.
      * src/decompress.c: Don’t include character.h.
      * src/dired.c: Don’t include character.h, commands.h, charset.h.
      * src/dispnew.c: Don’t include character.h, indent.h, intervals.h,
      process.h, timespec.h.  Include systime.h.
      * src/doc.c: Include coding.h.  Don’t include keyboard.h.
      * src/editfns.c: Include composite.h.  Don’t include frame.h.
      * src/emacs.c: Include fcntl.h, coding.h.  Don’t include
      commands.h, systty.h..
      * src/fileio.c: Don’t include intervals.h, dispextern.h.
      Include composite.h.
      * src/filelock.c: Don’t include character.h, systime.h.
      * src/fns.c: Don’t include time.h, commands.h, keyboard.h,
      keymap.h, frame.h, blockinput.h, xterm.h.  Include composite.h.
      * src/font.c: Include termhooks.h.
      * src/font.h: Don’t include ccl.h, frame.h.  Add forward decls of
      struct composition_it, struct face, struct glyph_string.
      * src/fontset.c: Don’t include buffer.h, ccl.h, keyboard.h,
      intervals.h, window.h, termhooks.h.
      * src/frame.c: Don’t include character.h, commands.h, font.h.
      * src/frame.h: Don’t include dispextern.h.
      * src/fringe.c: Don’t include character.h.
      * src/ftcrfont.c: Don’t include dispextern.h, frame.h,
      character.h, charset.h, fontset.h.
      * src/ftfont.c: Don’t include frame.h, blockinput.h, coding.h,
      fontset.h.
      * src/ftxfont.c: Don’t include dispextern.h, character.h,
      charset.h, fontset.h.
      * src/gfilenotify.c: Don’t include frame.h, process.h.
      * src/gtkutil.c: Include dispextern.h, frame.h, systime.h.
      Don’t include syssignal.h, buffer.h, charset.h, font.h.
      * src/gtkutil.h: Don’t include frame.h.
      * src/image.c: Include fcntl.h and stdio.h instead of sysstdio.h.
      Don’t include character.h.
      * src/indent.c: Don’t include keyboard.h, termchar.h.
      * src/inotify.c: Don’t include character.h, frame.h.
      * src/insdel.c: Include composite.h.  Don’t include blockinput.h.
      * src/intervals.c: Don’t include character.h, keyboard.h.
      * src/intervals.h: Don’t include dispextern.h, composite.h.
      * src/keyboard.c: Don’t include sysstdio.h, disptab.h, puresize.h.
      Include coding.h.
      * src/keyboard.h: Don’t incldue systime.h.
      * src/keymap.c: Don’t include charset.h, frame.h.
      * src/lread.c: Include dispextern.h and systime.h.
      Don’t include frame.h.  Include systime.h.
      * src/macros.c: Don’t include commands.h, character.h, buffer.h.
      * src/menu.c: Include character.h, coding.h.  Don’t include
      dispextern.h.
      * src/menu.h: Don’t include systime.h.
      * src/minibuf.c: Don’t include commands.h, dispextern.h, syntax.h,
      intervals.h, termhooks.h.
      * src/print.c: Include coding.h.  Don’t include keyboard.h,
      window.h, dispextern.h, termchar.h, termhooks.h, font.h.
      Add forward decl of struct terminal.
      * src/process.c: Don’t include termhooks.h, commands.h,
      dispextern.h, composite.h.
      * src/region-cache.c: Don’t include character.h.
      * src/scroll.c: Don’t include keyboard.h, window.h.
      * src/search.c: Don’t include category.h, commands.h.
      * src/sound.c: Don’t include dispextern.h.
      * src/syntax.c: Don’t include command.h, keymap.h.
      * src/sysdep.c: Don’t include window.h, dispextern.h.
      * src/systime.h: Use ‘#ifdef emacs’, not ‘#ifdef EMACS_LISP_H’,
      * src/term.c: Don’t include systty.h, intervals.h, xterm.h.
      * src/terminal.c: Include character.h.
      Don’t include charset.h, coding.h.
      * src/textprop.c: Don’t include character.h.
      * src/undo.c: Don’t include character.h, commands.h, window.h.
      * src/unexsol.c: Don’t include character.h, charset.h.
      * src/widget.c: Include widget.h.  Don’t include keyboard.h,
      window.h, dispextern.h, blockinput.h, character.h, font.h.
      * src/widgetprv.h: Don’t include widget.h.
      * src/window.c: Don’t include character.h, menu.h, intervals.h.
      * src/xdisp.c: Include composite.h, systime.h.  Don’t include
      macros.h, process.h.
      * src/xfaces.c: Don’t include charset.h, keyboard.h, termhooks.h,
      intervals.h.
      * src/xfns.c: Don’t include menu.h, character.h, intervals.h,
      epaths.h, fontset.h, systime.h, atimer.h, termchar.h.
      * src/xfont.c: Don’t include dispextern.h, fontset.h, ccl.h.
      * src/xftfont.c: Don’t include dispextern.h, character.h, fontset.h.
      * src/xgselect.c: Don’t include timespec.h, frame.h.
      Include systime.h.
      * src/xgselect.h: Don’t include time.h.
      Use a forward decl to struct timespec instead.
      * src/xmenu.c: Don’t include keymap.h, character.h, charset.h,
      dispextern.h.  Include systime.h.
      * src/xml.c: Don’t include character.h.
      * src/xrdb.c [USE_MOTIF]: Don’t include keyboard.h.
      * src/xselect.c: Don’t include dispextern.h, character.h,
      buffer.h, process.h.
      * src/xsmfns.c: Don’t include systime.h, sysselect.h.
      * src/xterm.c: Don’t include syssignal.h, charset.h, disptab.h,
      intervals.h process.h, keymap.h, xgselect.h.  Include composite.h.
      63cfb75f
  34. 05 Oct, 2015 1 commit