1. 26 Apr, 2019 1 commit
    • Alexander Gramiak's avatar
      Rename generic x_* identifiers · a411517f
      Alexander Gramiak authored
      * src/image.c: Rename x_* procedures to image_*.
      
      * src/frame.c: Rename x_* procedures to gui_*. Rename
      xrdb_get_resource to gui_display_get_resource. Rename x_get_arg to
      gui_display_get arg.
      
      * src/frame.h: Rename can_x_set_window_size to can_set_window_size.
      
      * src/xfaces.c: Rename realize_x_face to realize_gui_face. Rename
      x_supports_face_attributes_p to gui_supports_face_attributes_p.
      
      * src/keyboard.c:
      * src/lisp.h:
      * src/nsterm.m:
      * src/w32term.c:
      * src/xterm.c: Rename x_get_keysym_name to get_keysym_name.
      
      * src/nsfns.c:
      * src/nsterm.m: Rename x_* procedures to ns_*.
      
      * src/w32fns.c:
      * src/w32term.c: Rename x_* procedures to w32_*.
      
      * src/termhooks.h (query_colors, get_focus_frame, focus_frame_hook)
      (frame_visible_invisible_hook, iconify_frame_hook)
      (set_window_size_hook, set_frame_offset_hook, set_frame_alpha_hook)
      (set_new_font_hook, set_bitmap_icon_hook, implicit_set_name_hook)
      (activate_menubar_hook, change_tool_bar_height_hook)
      (set_scroll_bar_default_width_hook)
      (set_scroll_bar_default_height_hook, get_string_resource_hook): New
      terminal hooks to replace backend-specific x_* procedures.
      
      * src/dispextern.h (clear_under_internal_border): New RIF procedure.
      
      * src/alloc.c:
      * src/frame.c:
      * src/xdisp.c: Use FRAME_OUTPUT_DATA instead of FRAME_X_OUTPUT.
      
      * src/frame.c:
      * src/w32term.c:
      * src/w32fns.c: Use FRAME_NATIVE_WINDOW instead of FRAME_X_WINDOW.
      a411517f
  2. 16 Mar, 2019 1 commit
  3. 01 Jan, 2019 1 commit
  4. 01 May, 2018 1 commit
    • Paul Eggert's avatar
      Port --enable-gcc-warnings to GCC 8 · 65ac2778
      Paul Eggert authored
      Backport from master.
      * lib-src/emacsclient.c (fail):
      Do not dereference a null pointer.
      * src/frame.c (delete_frame):
      Add a decl with UNINIT to work around GCC bug 85563.
      * src/menu.h (finish_menu_items):
      Do not use attribute const.
      * src/regex.c (analyze_first): Use FALLTHROUGH, not a comment.
      65ac2778
  5. 28 Apr, 2018 1 commit
    • Paul Eggert's avatar
      Port --enable-gcc-warnings to GCC 8 · 8c3215e7
      Paul Eggert authored
      * configure.ac: Do not use GCC 8’s new -Wcast-align flag.
      * lib-src/ebrowse.c (xmalloc):
      * lib-src/emacsclient.c (xmalloc, xstrdup):
      * lib-src/etags.c (xmalloc):
      * lib-src/make-docfile.c (xmalloc):
      * lib-src/movemail.c (xmalloc):
      * src/dispnew.c (new_glyph_pool):
      * src/regex.c (xmalloc):
      * src/term.c (tty_menu_create):
      * src/tparam.h (tparam):
      Use ATTRIBUTE_MALLOC.  Also see GCC bug 85562.
      * lib-src/emacsclient.c (fail):
      Do not dereference a null pointer.
      * src/frame.c (delete_frame):
      Add a decl with UNINIT to work around GCC bug 85563.
      * src/menu.h (finish_menu_items):
      Do not use attribute const.
      * src/regex.c (analyze_first): Use FALLTHROUGH, not a comment.
      8c3215e7
  6. 01 Jan, 2018 1 commit
  7. 02 Dec, 2017 1 commit
    • Alan Mackenzie's avatar
      For help commands, ensure all keys of a mouse sequence are reported. · bc092fca
      Alan Mackenzie authored
      This solves the problem where read_key_sequence initializes and uses a global
      buffer raw_keybuf, yet is called recusrsively.  The initialization is now done
      elsewhere, avoiding the reinitialization of that global buffer.
      
      * src/keyboard.c (command_loop_1, read_key_sequence_vs): Initialize
      raw_event_count before calling read_key_sequence.
      (read_char_x_menu_prompt): Call x_popup_menu_1 in place of Fx_popup_menu.
      (init_raw_keybuf_count): New function.
      (read_key_sequence): Remove initialization of raw_event_count.  Add a missing
      GROW_RAW_KEYBUF invocation.
      
      * src/keyboard.h: (init_raw_keybuf_count): New declaration.
      
      * src/menu.c: (x_popup_menu_1): New function with the functionality of the
      former Fx_popup_menu.
      (Fx_popup_menu): Replace with function which initializes raw_event_count then
      calls x_popup_menu_1.
      
      * src/menu.h: (x_popup_menu_1): New declaration.
      bc092fca
  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. 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
  11. 01 Jan, 2016 1 commit
  12. 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
  13. 05 Jan, 2015 1 commit
    • Paul Eggert's avatar
      Compute C decls for DEFSYMs automatically · 58f2d6ef
      Paul Eggert authored
      Fixes Bug#15880.
      This patch also makes Q constants (e.g., Qnil) constant addresses
      from the C point of view.
      * make-docfile.c: Revamp to generate table of symbols, too.
      Include <stdbool.h>.
      (xstrdup): New function.
      (main): Don't process the same file twice.
      (SYMBOL): New constant in enum global_type.
      (struct symbol): Turn 'value' member into a union, either v.value
      for int or v.svalue for string.  All uses changed.
      (add_global): New arg svalue, which overrides value, so that globals
      can have a string value.
      (close_emacs_global): New arg num_symbols; all uses changed.
      Output lispsym decl.
      (write_globals): Output symbol globals too.  Output more
      ATTRIBUTE_CONST, now that Qnil etc. are C constants.
      Output defsym_name table.
      (scan_c_file): Move most of guts into ...
      (scan_c_stream): ... new function.  Scan for DEFSYMs and
      record symbols found.  Don't read past EOF if file doesn't
      end in newline.
      * alloc.c, bidi.c, buffer.c, bytecode.c, callint.c, casefiddle:
      * casetab.c, category.c, ccl.c, charset.c, chartab.c, cmds.c, coding.c:
      * composite.c, data.c, dbusbind.c, decompress.c, dired.c, dispnew.c:
      * doc.c, editfns.c, emacs.c, eval.c, fileio.c, fns.c, font.c, fontset.c:
      * frame.c, fringe.c, ftfont.c, ftxfont.c, gfilenotify.c, gnutls.c:
      * image.c, inotify.c, insdel.c, keyboard.c, keymap.c, lread.c:
      * macfont.m, macros.c, minibuf.c, nsfns.m, nsfont.m, nsimage.m:
      * nsmenu.m, nsselect.m, nsterm.m, print.c, process.c, profiler.c:
      * search.c, sound.c, syntax.c, term.c, terminal.c, textprop.c, undo.c:
      * window.c, xdisp.c, xfaces.c, xfns.c, xftfont.c, xmenu.c, xml.c:
      * xselect.c, xsettings.c, xterm.c:
      Remove Q vars that represent symbols (e.g., Qnil, Qt, Qemacs).
      These names are now defined automatically by make-docfile.
      * alloc.c (init_symbol): New function.
      (Fmake_symbol): Use it.
      (c_symbol_p): New function.
      (valid_lisp_object_p, purecopy): Use it.
      * alloc.c (marked_pinned_symbols):
      Use make_lisp_symbol instead of make_lisp_ptr.
      (garbage_collect_1): Mark lispsym symbols.
      (CHECK_ALLOCATED_AND_LIVE_SYMBOL): New macro.
      (mark_object): Use it.
      (sweep_symbols): Sweep lispsym symbols.
      (symbol_uses_obj): New function.
      (which_symbols): Use it.  Work for lispsym symbols, too.
      (init_alloc_once): Initialize Vpurify_flag here; no need to wait,
      since Qt's address is already known now.
      (syms_of_alloc): Add lispsym count to symbols_consed.
      * buffer.c (init_buffer_once): Compare to Qnil, not to make_number (0),
      when testing whether storage is all bits zero.
      * dispextern (struct image_type):
      * font.c (font_property_table):
      * frame.c (struct frame_parm_table, frame_parms):
      * keyboard.c (scroll_bar_parts, struct event_head):
      * xdisp.c (struct props):
      Use XSYMBOL_INIT (Qfoo) and struct Lisp_Symbol * rather than &Qfoo and
      Lisp_Object *, since Qfoo is no longer an object whose address can be
      taken.  All uses changed.
      * eval.c (run_hook): New function.  Most uses of Frun_hooks changed to
      use it, so that they no longer need to take the address of a Lisp sym.
      (syms_of_eval): Don't use DEFSYM on Vrun_hooks, as it's a variable.
      * frame.c (syms_of_frame): Add defsyms for the frame_parms table.
      * keyboard.c (syms_of_keyboard): Don't DEFSYM Qmenu_bar here.
      DEFSYM Qdeactivate_mark before the corresponding var.
      * keymap.c (syms_of_keymap): Use DEFSYM for Qmenu_bar and Qmode_line
      instead of interning their symbols; this avoids duplicates.
      (LISP_INITIALLY, TAG_PTR)
      (DEFINE_LISP_SYMBOL_BEGIN, DEFINE_LISP_SYMBOL_END, XSYMBOL_INIT):
      New macros.
      (LISP_INITIALLY_ZERO): Use it.
      (enum symbol_interned, enum symbol_redirect, struct Lisp_Symbol)
      (EXFUN, DEFUN_ARGS_MANY, DEFUN_ARGS_UNEVALLED, DEFUN_ARGS_*):
      Move decls up, to avoid forward uses.  Include globals.h earlier, too.
      (make_lisp_symbol): New function.
      (XSETSYMBOL): Use it.
      (DEFSYM): Now just a placeholder for make-docfile.
      * lread.c (DEFINE_SYMBOLS): Define, for globals.h.
      (intern_sym): New function, with body taken from old intern_driver.
      (intern_driver): Use it.  Last arg is now Lisp integer, not ptrdiff_t.
      All uses changed.
      (define_symbol): New function.
      (init_obarray): Define the C symbols taken from lispsym.
      Use plain DEFSYM for Qt and Qnil.
      * syntax.c (init_syntax_once): No need to worry about
      Qchar_table_extra_slots.
      58f2d6ef
  14. 01 Jan, 2015 2 commits
  15. 01 Aug, 2014 1 commit
  16. 22 Jun, 2014 1 commit
    • Dmitry Antipov's avatar
      * xmenu.c (mouse_position_for_popup): · b0358ef8
      Dmitry Antipov authored
      * xselect.c (mouse_position_for_drop): Do not duplicate ...
      * xfns.c (x_relative_mouse_position): ... and prefer this function.
      * menu.c (Fx_popup_menu):
      * xselect.c (x_handle_dnd_message): Adjust users.
      * menu.h (mouse_position_for_popup): Remove prototype.
      * xterm.h (x_relative_mouse_position): Add prototype.
      * xterm.c (x_find_topmost_parent): Break from the loop and do not
      call XFree if XQueryTree returns zero.
      b0358ef8
  17. 08 Jun, 2014 1 commit
    • Paul Eggert's avatar
      If a C name must be extern on some platforms, make it extern on all. · ff2d0e83
      Paul Eggert authored
      * dispextern.h (set_vertical_scroll_bar, erase_phys_cursor)
      (load_color):
      * font.h (ftxfont_driver) [HAVE_XFT]:
      * keyboard.h (menu_items_inuse, ignore_mouse_drag_p, make_ctrl_char):
      * lisp.h (get_frame_param):
      * menu.h (tty_menu_show):
      * process.h (conv_sockaddr_to_lisp, catch_child_signal):
      * termhooks.h (encode_terminal_code):
      * xterm.h (x_menu_wait_for_event):
      Always declare.
      * frame.c (get_frame_param):
      * fringe.c (max_used_fringe_bitmap):
      * ftxfont.c (ftxfont_driver):
      * keyboard.c (ignore_mouse_drag_p, make_ctrl_char):
      * menu.c (menu_items_inuse):
      * process.c (conv_sockaddr_to_lisp, catch_child_signal):
      * term.c (encode_terminal_code, tty_menu_show):
      * xdisp.c (set_vertical_scroll_bar, erase_phys_cursor):
      * xfaces.c (load_color):
      * xmenu.c (x_menu_wait_for_event):
      Now always extern.
      ff2d0e83
  18. 07 Jun, 2014 1 commit
    • Eli Zaretskii's avatar
      Fix last commit. · 3f2f9b6a
      Eli Zaretskii authored
       src/term.c (tty_menu_show) [WINDOWSNT]: Make tty_menu_show extern
       only for WINDOWSNT.
       src/menu.h (tty_menu_show) [WINDOWSNT]: Declare extern only for WINDOWSNT.
      3f2f9b6a
  19. 06 Jun, 2014 1 commit
  20. 04 Jun, 2014 1 commit
    • Dmitry Antipov's avatar
      Use terminal-specific hooks to display menus. · cfd794af
      Dmitry Antipov authored
      * termhooks.h (struct terminal): New field menu_show_hook.
      * menu.h (<anonymous enum>): Bit flags for menu hooks.
      (x_menu_show, w32_menu_show, ns_menu_show, tty_menu_show):
      Adjust prototypes.
      * menu.c (Fx_popup_menu): Use bit flags and menu_show_hook.
      * nsmenu.m (ns_menu_show):
      * w32menu.c (w32_menu_show):
      * xmenu.c (x_menu_show):
      * term.c (tty_menu_show): Adjust to use bit flags.
      (set_tty_hooks): Set menu_show_hook.
      * xterm.c (x_create_terminal):
      * nsterm.m (ns_create_terminal):
      * msdos.c (initialize_msdos_display):
      * w32term.c (w32_create_terminal): Likewise.
      cfd794af
  21. 03 Jun, 2014 2 commits
    • Paul Eggert's avatar
      Do not require libXt-devel when building with gtk. · 181f08a7
      Paul Eggert authored
      * lwlib/lwlib-widget.h: New file, with contents taken from lwlib.h.
      (widget_value) [HAVE_NTGUI]: New member 'title'.
      * lwlib/lwlib.h: Include lwlib-widget.h.
      (change_type, enum button_type, widget_value):
      Move to lwlib-widget.h.
      * src/gtkutil.h, src/menu.h: Include lwlib-widget.h, not lwlib-h, to avoid
      dependency on libXt-devel.
      * src/menu.h [HAVE_NTGUI]: Include lwlib-widget.h in this case too.
      (enum button_type, widget_value) [HAVE_NTGUI]: Remove, as
      lwlib-widget.h now does this.
      * src/nsmenu.m (ns_menu_show): "enabled" -> "enable" to fix typo.
      181f08a7
    • Eli Zaretskii's avatar
      Fix MS-Windows build broken by menu changes on 2014-06-02. · 0031c953
      Eli Zaretskii authored
       src/w32menu.c (w32_menu_show): Fix a typo that broke compilation.
       src/menu.h (enum button_type, struct _widget_value) [HAVE_NTGUI]:
       Define instead of including ../lwlib/lwlib.h, which causes
       compilation errors due to missing X11 headers.
      0031c953
  22. 02 Jun, 2014 1 commit
    • Dmitry Antipov's avatar
      Use common memory management functions for lwlib and refactor users. · 5668fb88
      Dmitry Antipov authored
      * lwlib/lwlib.h (widget_value): Do not maintain a free list any more.
      (malloc_widget_value, free_widget_value): Remove prototypes.
      * lwlib/lwlib.c (malloc_widget_value, free_widget_value):
      (widget_value_free_list, malloc_cpt): Remove.
      (free_widget_value_tree, copy_widget_value_tree): Adjust users.
      * src/menu.h (xmalloc_widget_value): Replaced by ...
      (make_widget_value): ... new prototype.
      * src/menu.c (xmalloc_widget_value): Replaced by ...
      (make_widget_value): ... new function.
      (free_menubar_widget_value_tree, digest_single_submenu): Adjust users.
      * src/gtkutil.c (malloc_widget_value, free_widget_value):
      (widget_value_free_list, malloc_cpt): Remove old lwlib-compatible code.
      * src/keyboard.h (enum button_type, struct _widget_value):
      * src/gtkutil.h, src/nsgui.h, src/w32gui.h (malloc_widget_value):
      (free_widget_value): Likewise.
      * src/nsmenu.m (ns_update_menubar, ns_menu_show):
      * src/w32menu.c (set_frame_menubar, w32_menu_show, w32_dialog_show):
      * src/xmenu.c (set_frame_menubar, xmenu_show, x_dialog_show): Adjust users.
      * src/xterm.h (XtParent) [USE_GTK]: Remove unused macro.
      5668fb88
  23. 04 Feb, 2014 1 commit
    • Eli Zaretskii's avatar
      Fix bug #16636 with simple dialogs on MS-Windows. · e139a33c
      Eli Zaretskii authored
       src/w32menu.c (w32_popup_dialog): Don't condition the whole function
       on HAVE_DIALOGS.  If the dialog is "simple", pop up a message box
       to show it; otherwise return 'unsupported--w32-dialog' to signal
       to the caller that emulation with menus is necessary.  This
       resurrects code inadvertently deleted by the 2013-10-08 commit.
       (syms_of_w32menu): DEFSYM Qunsupported__w32_dialog.
       src/w32term.h (w32_popup_dialog): Prototype is no longer conditioned
       by HAVE_DIALOGS.
       src/menu.c (Fx_popup_dialog): Don't condition the call to
       w32_popup_dialog on HAVE_DIALOGS.  If w32_popup_dialog returns a
       special symbol 'unsupported--w32-dialog', emulate the dialog with
       a menu by calling x-popup-menu.
       src/menu.h (Qunsupported__w32_dialog): New extern variable.
      e139a33c
  24. 01 Jan, 2014 1 commit
  25. 06 Nov, 2013 1 commit
    • Paul Eggert's avatar
      Integer-related fixes for term.c etc. · 798aef02
      Paul Eggert authored
      * dispextern.h (face_tty_specified_color): New function.
      * term.c (turn_on_face): Don't rely on undefined behavior when
      assigning an out-of-range value to 'long'.  Simplify
      test for toggling highlight.
      (tty_capable_p): Omit last two (unused) args.  All callers changed.
      * term.c (tty_capable_p, tty_menu_display, tty_menu_add_selection)
      (read_menu_input, tty_menu_activate, tty_menu_show):
      * xfaces.c (x_supports_face_attributes_p)
      (tty_supports_face_attributes_p):
      Use bool for boolean.  All callers changed.
      (tty_supports_face_attributes_p): Omit defaults for color indices;
      no longer needed.  Simplify tail call.
      798aef02
  26. 10 Oct, 2013 1 commit
    • Dmitry Antipov's avatar
      * keyboard.c (last_event_timestamp): Remove. For X selection and · 6bbe6da8
      Dmitry Antipov authored
      GTK popup menus, it may be obtained from per-frame X display info.
      (kbd_buffer_store_event_hold, kbd_buffer_get_event)
      (process_special_events): Adjust users.
      * keyboard.h (last_event_timestamp): Remove declaration.
      * xmenu.c (xmenu_show, create_and_show_popup_menu): Lost last arg.
      Use FRAME_DISPLAY_INFO (f)->last_user_time for gtk_menu_popup.
      * menu.h (xmenu_show): Adjust prototype.
      * menu.c (Fx_popup_menu): Adjust user.
      * xselect.c (x_own_selection, x_get_foreign_selection)
      (Fx_disown_selection_internal): Use dpyinfo->last_user_time.
      6bbe6da8
  27. 08 Oct, 2013 2 commits
    • Paul Eggert's avatar
      Fix minor problems found by static checking. · 3b158d11
      Paul Eggert authored
      * dispnew.c (save_current_matrix): Omit unnecessary casts.
      * dispnew.c (update_frame_with_menu): Mark debug local as used.
      * keyboard.c, keyboard.h (Qmouse_movement): Now static.
      * keyboard.c (read_menu_command): Remove unused local.
      * lisp.h (read_menu_command): New decl.
      * menu.c, menu.h (menu_item_width): Arg is now unsigned char *, for
      benefit of STRING_CHAR_AND_LENGTH.  All uses changed.
      Return ptrdiff_t, not int.
      * term.c (tty_menu_struct): 'allocated' member is now ptrdiff_t,
      not int, for benefit of xpalloc.
      (tty_menu_create, tty_menu_make_room): Simplify by using xzalloc
      and xpalloc.
      (have_menus_p): Remove; unused.
      (tty_menu_add_pane, tty_menu_add_selection): Change signedness of
      local char * pointer to pacify STRING_CHAR_AND_LENGTH.
      (tty_menu_add_selection, tty_menu_locate, tty_meny_destroy):
      Now static.
      (save_and_enable_current_matrix): Omit unnecessary casts.
      (read_menu_input): Omit local extern decl (now in lisp.h).
      Don't access uninitialized storage if mouse_get_xy fails.
      (tty_menu_activate): Mark local as initialized, for lint.
      (tty_menu_activate, tty_meny_show): Remove unused locals.
      3b158d11
    • Eli Zaretskii's avatar
      Horizontal keys in TTY menus work. · 4a48e94d
      Eli Zaretskii authored
      4a48e94d
  28. 05 Sep, 2013 1 commit
  29. 03 Aug, 2013 1 commit
    • Dmitry Antipov's avatar
      Drop FRAME_PTR typedef. · a10c8269
      Dmitry Antipov authored
      * composite.c, font.c, font.h, fontset.c, fontset.h, frame.c, frame.h:
      * ftfont.c, ftxfont.c, gtkutil.c, gtkutil.h, image.c, keyboard.c:
      * menu.c, menu.h, msdos.c, nsfns.m, nsfont.m, nsmenu.m, nsterm.h:
      * nsterm.m, scroll.c, term.c, w32fns.c, w32font.c, w32font.h:
      * w32inevt.c, w32inevt.h, w32menu.c, w32notify.c, w32term.c, w32term.h:
      * w32uniscribe.c, w32xfns.c, widget.c, window.c, xdisp.c, xfaces.c:
      * xfns.c, xfont.c, xftfont.c, xmenu.c, xselect.c, xterm.c:
      All related users changed.
      a10c8269
  30. 01 Jan, 2013 1 commit
  31. 11 Oct, 2012 1 commit
    • Paul Eggert's avatar
      lread.c, macros.c, marker.c, menu.c, minibuf.c: Use bool for booleans. · 7cded46f
      Paul Eggert authored
      * lread.c (load_each_byte, new_backquote_flag, readchar)
      (read_filtered_event, lisp_file_lexically_bound_p)
      (safe_to_load_version, Fload, complete_filename_p, openp)
      (build_load_history, readevalloop, read_escape, read1)
      (string_to_number, read_vector, read_list):
      * macros.c (Fstart_kbd_macro):
      * marker.c (CONSIDER):
      * menu.c (parse_single_submenu, digest_single_submenu)
      (find_and_return_menu_selection, Fx_popup_menu):
      * minibuf.c (read_minibuf_noninteractive, read_minibuf)
      (Ftry_completion):
      * nsmenu.m (ns_update_menubar, runMenuAt:forFrame:keymaps:):
      (ns_menu_show):
      * xmenu.c (set_frame_menubar, create_and_show_popup_menu)
      (xmenu_show, xdialog_show):
      Use bool for booleans.
      * lread.c (safe_to_load_version): Rename from safe_to_load_p,
      as it's not a predicate.  All uses changed.  Omit unnecessary
      buffer termination.
      7cded46f
  32. 09 Jul, 2012 1 commit
  33. 02 Jun, 2012 1 commit
  34. 11 Jan, 2012 1 commit
  35. 05 Jan, 2012 1 commit
  36. 12 May, 2011 1 commit
    • Paul Eggert's avatar
      Be more systematic about user-interface timestamps. · 08dc5ae6
      Paul Eggert authored
      Before, the code sometimes used 'Time', sometimes 'unsigned long',
      and sometimes 'EMACS_UINT', to represent these timestamps.  This
      change causes it to use 'Time' uniformly, as that's what X uses.
      This makes the code easier to follow, and makes it easier to catch
      integer overflow bugs such as Bug#8664.
      * frame.c (Fmouse_position, Fmouse_pixel_position):
      Use Time, not unsigned long, for user-interface timestamps.
      * keyboard.c (last_event_timestamp, kbd_buffer_get_event): Likewise.
      (button_down_time, make_lispy_position, make_lispy_movement): Likewise.
      * keyboard.h (last_event_timestamp): Likewise.
      * menu.c (Fx_popup_menu) [!HAVE_X_WINDOWS]: Likewise.
      * menu.h (xmenu_show): Likewise.
      * term.c (term_mouse_position): Likewise.
      * termhooks.h (struct input_event.timestamp): Likewise.
      (struct terminal.mouse_position_hook): Likewise.
      * xmenu.c (create_and_show_popup_menu, xmenu_show): Likewise.
      * xterm.c (XTmouse_position, x_scroll_bar_report_motion): Likewise.
      * systime.h (Time): New decl.  Pull it in from <X11/X.h> if
      HAVE_X_WINDOWS, otherwise define it as unsigned long, which is
      what it was before.
      * menu.h, termhooks.h: Include "systime.h", for Time.
      08dc5ae6
  37. 25 Jan, 2011 1 commit