1. 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
  2. 07 Mar, 2018 1 commit
    • Glenn Morris's avatar
      Replace some obsolete aliases in documentation · 19afff31
      Glenn Morris authored
      * doc/emacs/text.texi (Nroff Mode):
      * doc/misc/efaq.texi (How to add fonts):
      * lisp/gnus/nnheader.el (nnheader-insert-file-contents):
      * lisp/progmodes/pascal.el (pascal-outline-mode):
      Doc fixes re obsolete aliases.
      ; * src/frame.c (do_switch_frame): Comment.
      19afff31
  3. 12 Feb, 2018 1 commit
    • Eli Zaretskii's avatar
      Avoid aborts in cm.c due to too small TTY frame · a22820a3
      Eli Zaretskii authored
      * src/frame.c (frame_windows_min_size): Limit TTY frames to a
      minimum height large enough to allow for a menu bar, the mode
      line, one text line and one echo-area line.  This avoids aborts in
      cm.c:cmcheckmagic.  (Bug#30320)
      a22820a3
  4. 01 Jan, 2018 1 commit
  5. 15 Dec, 2017 2 commits
    • Paul Eggert's avatar
      FOR_EACH_FRAME no longer assumes frame-list · e019c35d
      Paul Eggert authored
      This cleans up a recent fix related to Bug#29661.
      Suggested by Stefan Monnier in:
      https://lists.gnu.org/r/emacs-devel/2017-12/msg00544.html
      * src/frame.c (next_frame, prev_frame, delete_frame):
      Restore debugging checks that Vframe_list is non-nil,
      as FOR_EACH_FRAME no longer has these checks.
      (delete_frame): Remove no-longer-needed checks that Vframe_list is
      non-nil, as FOR_EACH_FRAME no longer assumes that.
      * src/frame.h (FOR_EACH_FRAME): Do not assume Vframe_list is non-nil.
      e019c35d
    • Martin Rudalics's avatar
      Don't run FOR_EACH_FRAME when there's no frame left (Bug#29961) · 9bf66c6b
      Martin Rudalics authored
      This does not fix Bug#29961 but avoids that Emacs segfaults when
      trying to shut down because it lost connection to the X server.
      
      * src/dispnew.c (check_glyph_memory):
      * src/frame.c (delete_frame): Don't run FOR_EACH_FRAME when
      there's no frame left (Bug#29961).
      9bf66c6b
  6. 26 Nov, 2017 1 commit
  7. 18 Nov, 2017 1 commit
  8. 11 Nov, 2017 1 commit
    • Eli Zaretskii's avatar
      Fix comparisons with tip_frame in GTK builds · 7657a867
      Eli Zaretskii authored
      * src/xterm.c (x_update_begin, x_new_font):
      * src/xfns.c (Fx_display_monitor_attributes_list):
      * src/frame.c (Fframe_list) [USE_GTK]: Don't consider tip_frame a
      tooltip frame unless its 'tooltip' parameter is non-nil.  (Bug#26747)
      7657a867
  9. 29 Oct, 2017 1 commit
    • Martin Rudalics's avatar
      Fix minibuffer window related docs and strings (Bug#28978) · 4189d0ef
      Martin Rudalics authored
      * src/frame.c (Vdefault_minibuffer_frame): Fix doc-string.
      * src/window.c (Fminibuffer_selected_window): Fix doc-string.
      * doc/lispref/frames.texi (Buffer Parameters): Rewrite
      description of `minibuffer' parameter.
      * doc/lispref/minibuf.texi (Minibuffer Windows): Reorder
      entries and partly rewrite section.
      (Minibuffer Misc): Clarify description of
      `minibuffer-selected-window'.
      * etc/NEWS: Mention new semantics of 'minibuffer' frame
      parameter.
      4189d0ef
  10. 02 Oct, 2017 2 commits
    • Eli Zaretskii's avatar
      Fix the --without-x build · d09ac150
      Eli Zaretskii authored
      * src/frame.c (Ficonify_frame) [HAVE_WINDOW_SYSTEM]: Use
      frame_parent only in GUI builds to avoid compilation errors in
      --without-x builds.  (Bug#28611)
      d09ac150
    • Paul Eggert's avatar
      Prefer HTTPS to HTTP for gnu.org · 5172fa02
      Paul Eggert authored
      This fixes some URLs I omitted from my previous pass,
      notably those in lists.gnu.org.  Although lists.gnu.org
      does not yet support TLS 1.1, TLS 1.0 is better than nothing.
      * lisp/erc/erc.el (erc-official-location):
      * lisp/mail/emacsbug.el (report-emacs-bug):
      Use https:, not http:.
      5172fa02
  11. 01 Oct, 2017 1 commit
    • Martin Rudalics's avatar
      Improve handling of iconification of child frames (Bug#28611) · b03b4f6d
      Martin Rudalics authored
      * src/frame.c (Ficonify_frame): Handle `iconify-child-frame' option.
      (syms_of_frame): New symbols Qiconify_top_level and Qmake_invisible.
      (iconify_child_frame): New option.
      * lisp/cus-start.el (iconify-child-frame): Add customization
      properties.
      * doc/lispref/frames.texi (Child Frames): Describe new option
      `iconify-child-frame'.  Don't index "top-level frame" twice.
      b03b4f6d
  12. 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
  13. 03 Sep, 2017 1 commit
  14. 23 Aug, 2017 1 commit
    • Alan Third's avatar
      Add ability to change macOS WM theme (bug#27973) · 7baa50ec
      Alan Third authored
      * src/frame.c (make_frame, frame_parms, syms_of_frame)
      [NS_IMPL_COCOA]: Add ns-appearance and ns-transparent-titlebar
      options.
      * src/frame.h (ns_appearance_type) [NS_IMPL_COCOA]: Add enum to
      represent NSAppearance options.
      (struct frame) [NS_IMPL_COCOA]: Add ns_appearance and
      ns_transparent_titlebar frame parameters.
      * src/nsfns.m (ns_frame_parm_handlers) [NS_IMPL_COCOA]: Add
      ns_set_appearance and ns_set_transparent_titlebar handlers.
      (Sx_create_frame): Handle ns-appearance and ns-transparent-titlebar
      frame parameters.
      (Qdark): Add new symbol for use with ns-appearance.
      * src/nsterm.h (ns_set_appearance, ns_set_transparent_titlebar)
      [NS_IMPL_COCOA]: Add prototypes.
      * src/nsterm.m (ns_set_appearance, ns_set_transparent_titlebar)
      [NS_IMPL_COCOA]: New functions.
      (initFrameFromEmacs) [NS_IMPL_COCOA]: Handle ns-appearance and
      ns-transparent-titlebar frame parameters.
      * doc/lispref/frames.texi (Window Management Parameters): Document
      ns-apperance and ns-transparent-titlebar.
      7baa50ec
  15. 25 Jun, 2017 2 commits
    • Paul Eggert's avatar
      Port recent frame changes to GCC 7 · b2f81598
      Paul Eggert authored
      * src/frame.c (keep_ratio): New arg P.  Caller changed.  Since it
      is non-null, it avoids a GCC 7 warning that FRAME_PARENT_FRAME
      might return null.  This also avoids a run-time test.
      b2f81598
    • Martin Rudalics's avatar
      Provide additional support for child frames · 1886246f
      Martin Rudalics authored
      Provide mouse dragging and resizing of frames.  Allow resizing
      frames proportionally.  Provide additional functionality for
      child frames.  Minor bug fixes.
      
      * lisp/frame.el (frame-border-width, frame-pixel-width)
      (frame-pixel-height): Alias to `frame-internal-border-width',
      `frame-native-width' and `frame-native-height'.
      (frame-inner-width, frame-inner-height, frame-outer-width)
      (frame-outer-height): New functions.
      * lisp/minibuffer.el (completion-auto-help): Fix typo.
      * lisp/mouse.el (mouse-drag-line, mouse-drag-mode-line)
      (mouse-drag-header-line): Allow moving a frame by dragging the
      mode line of its bottommost window (on a minibuffer-less frame)
      or the header line of its topmost window.
      (mouse-drag-vertical-line): Mention argument in doc-string.
      (mouse-resize-frame, mouse-drag-frame, mouse-drag-left-edge)
      (mouse-drag-top-left-corner, mouse-drag-top-edge)
      (mouse-drag-top-right-corner, mouse-drag-right-edge)
      (mouse-drag-bottom-right-corner, mouse-drag-bottom-edge)
      (mouse-drag-bottom-left-corner): New functions for resizing a
      frame by dragging its internal border together with
      corresponding key bindings.
      * lisp/tooltip.el (tooltip-frame-parameters): Add
      'no-special-glyphs' to default parameters and update version
      tag.
      * lisp/window.el (frame-auto-hide-function): Add choice to make
      frame invisible and update version tag.
      (window--delete): Handle 'auto-hide-function' frame parameter.
      (window--maybe-raise-frame): Respect 'no-focus-on-map' and
      'no-accept-focus' frame parameters.
      (display-buffer--action-function-custom-type): Add
      `display-buffer-in-child-frame'.
      (display-buffer): Mention `display-buffer-in-child-frame' in
      doc-string.
      (display-buffer-in-child-frame): New action function for
      `display-buffer'.
      (window--sanitize-margin): Return zero when MARGIN cannot be
      sanitized.
      (fit-frame-to-buffer): Major rewrite to handle child frames and
      'fit-frame-to-buffer-sizes' and 'fit-frame-to-buffer-margins'
      frame parameters.
      (window-largest-empty-rectangle--maximums-1)
      (window-largest-empty-rectangle--maximums)
      (window-largest-empty-rectangle--disjoint-maximums)
      (window-largest-empty-rectangle): New functions.
      
      * src/dispextern.h (WINDOW_WANTS_MODELINE_P)
      (WINDOW_WANTS_HEADER_LINE_P): Remove.  Functionality is now
      provided by corresponding functions window_wants_modeline and
      window_wants_header_line in window.c.  Adjust users.
      * src/dispnew.c (adjust_glyph_matrix)
      (buffer_posn_from_coords): Use window_wants_modeline and
      window_wants_header_line instead of WINDOW_WANTS_MODELINE_P and
      WINDOW_WANTS_HEADER_LINE_P.
      * src/frame.c (keep_ratio): New function.
      (adjust_frame_size): Call keep_ratio for each of F's child
      frames.
      (make_frame): Initialize no_special_glyphs slot.
      (frame_internal_border_part): New function.
      (Fframe_pixel_width, Fframe_pixel_height, Fborder_width): Rename
      to Fframe_native_width, Fframe_native_height mand
      Fframe_internal_border_width.
      (frame_parm_table): Add Qno_special_glyphs entry.
      (frame_float_type): New enumeration type.
      (frame_float): New function to handle frame size and position
      ratios.
      (x_set_frame_parameters): Handle size and position ratios.
      (x_set_no_special_glyphs): New function
      (x_figure_window_size): Handle size and position ratios.
      (syms_of_frame): Add Qdisplay_monitor_attributes_list,
      Qno_special_glyphs, Qframe_edges, Qkeep_ratio, Qwidth_only,
      Qheight_only, Qleft_only and Qtop_only.
      * src/frame.h (internal_border_part): New enumeration type.
      (struct frame): New slot no_special_glyphs.
      (FRAME_NO_SPECIAL_GLYPHS): New macro.
      * src/gtkutil.c (xg_frame_restack): Return immediately for
      GTK versions before 2.18.0.
      * src/keyboard.c (internal_border_parts): New array constant.
      (make_lispy_position): For frames with border dragging enabled
      return internal border part.
      (syms_of_keyboard): New symbols Qdrag_internal_border,
      Qleft_edge, Qtop_left_corner, Qtop_edge, Qtop_right_corner,
      Qright_edge, Qbottom_right_corner, Qbottom_edge and
      Qbottom_left_corner.
      * src/minibuf.c (read_minibuf_unwind): When exiting the
      minibuffer deal with frames that have the 'minibuffer-exit'
      parameter set.
      (syms_of_minibuf): New symbol Qminibuffer_exit.
      * src/nsfns.m (frame_parm_handler): Add entry for
      x_set_no_special_glyphs.
      (Fx_create_frame): Handle 'no-special-glyphs' parameter.
      Intitialize new cursor types for dragging frame borders.
      * src/nsterm.h (struct ns_output): Add new cursor types for
      dragging frame borders.
      * src/w32fns.c (w32_frame_parm_handlers): Add entry for
      x_set_no_special_glyphs.
      (Fx_create_frame): Handle 'no-special-glyphs' parameter.
      Intitialize new cursor types for dragging frame borders.
      * src/w32term.h (struct w32_output): Add new cursor types for
      dragging frame borders.
      * src/window.c (coordinates_in_window)
      (Fwindow_line_height, window_internal_height): Use
      window_wants_modeline and window_wants_header_line instead of
      WINDOW_WANTS_MODELINE_P and WINDOW_WANTS_HEADER_LINE_P.
      (Fwindow_lines_pixel_dimensions): New function.
      (window_parameter): New function.
      (Fwindow_parameter): Call window_parameter.
      (window_wants_mode_line, window_wants_header_line): New
      functions replacing the macros WINDOW_WANTS_MODELINE_P and
      WINDOW_WANTS_HEADER_LINE_P from dispextern.h.
      (syms_of_window): New symbols Qmode_line_format and
      Qheader_line_format.
      * src/window.h: Reorganize and re-comment macros.  Use
      window_wants_modeline and window_wants_header_line instead of
      WINDOW_WANTS_MODELINE_P and WINDOW_WANTS_HEADER_LINE_P.
      (MINI_NON_ONLY_WINDOW_P, MINI_ONLY_WINDOW_P): Minor rewrite.
      (WINDOW_BUFFER): New macro.
      (WINDOW_BOX_LEFT_EDGE_COL, WINDOW_BOX_RIGHT_EDGE_COL): Remove.
      * src/xdisp.c (window_text_bottom_y, window_box_height)
      (window_box, start_display)
      (compute_window_start_on_continuation_line)
      (try_cursor_movement, redisplay_window)
      (try_window_reusing_current_matrix, try_window_id)
      (display_line, expose_window): Use window_wants_modeline and
      window_wants_header_line instead of WINDOW_WANTS_MODELINE_P and
      WINDOW_WANTS_HEADER_LINE_P.
      (pos_visible_p, display_mode_lines): Respect W's
      'mode-line-format' and 'header-line-format' window parameters.
      (init_iterator): Use window_wants_modeline and
      window_wants_header_line instead of WINDOW_WANTS_MODELINE_P and
      WINDOW_WANTS_HEADER_LINE_P.  For tip frames respect
      no_special_glyphs value.
      (note_mouse_highlight): Set frame border cursors when on
      internal border.
      (x_draw_right_divider, x_draw_bottom_divider): Try to improve
      drawing of window dividers.
      * src/xfns.c (mouse_cursor): Add entries for border parts.
      (mouse_cursor_types): Add entries for cursor types to drag
      frame borders.
      (INSTALL_CURSOR): Add entries for new cursor types to drag
      frame borders.
      (Fx_create_frame): Handle 'no-special-glyphs' parameter.
      (x_frame_parm_handlers): Add entry for
      x_set_no_special_glyphs.
      (Vx_window_left_edge_shape, Vx_window_top_left_corner_shape)
      (Vx_window_top_edge_shape, Vx_window_top_right_corner_shape)
      (Vx_window_right_edge_shape)
      (Vx_window_bottom_right_corner_shape)
      (Vx_window_bottom_edge_shape)
      (Vx_window_bottom_left_corner_shape): New variables.
      (x_frame_restack): Call xg_frame_restack only for GTK versions
      starting with 2.18.0.
      * src/xterm.c (x_free_frame_resources): Remove new cursors for
      dragging frame borders.
      * src/xterm.h (struct x_output): Add new cursor types for
      dragging frame borders.
      
      * doc/lispref/display.texi (Size of Displayed Text): Document
      `window-lines-pixel-dimensions'.
      * doc/lispref/elisp.texi (Top): Add entry for "Mouse Dragging
      Parameters".
      * doc/lispref/frames.texi (Frame Size): Replace
      frame-pixel-width/-height by frame-native-width/-height.  Add
      frame-inner-width/-height and frame-outer-width/-height docs.
      (Position Parameters): Describe specifying position as ratios.
      Clarify remark about positions relative to bottom/ridge display
      edge.
      (Size Parameters): Describe specifying sizes as ratios.
      Describe 'fit-frame-to-buffer-margins' and
      'fit-frame-to-buffer-sizes' parameters.
      (Layout Parameters): Describe 'no-special-glyphs' parameter.
      (Frame Interaction Parameters): Describe 'auto-hide-function',
      'minibuffer-exit' and 'keep-ratio' parameters.
      (Mouse Dragging Parameters): New section describing
      'drag-internal-border', 'drag-with-header-line',
      'drag-with-mode-line', 'snap-width', 'top-visible' and
      'bottom-visible' parameters.
      (Management Parameters): Mention that `override-redirect' has
      no effect on MS Windows.
      (Font and Color Parameters): Mention child frames for `alpha'
      parameter.
      (Child Frames): Rewrite section with description and cross
      references to new frame parameters added.
      * doc/lispref/modes.texi (Mode Line Basics): Mention
      'mode-line-format' and 'header-line-format' window parameters.
      * doc/lispref/windows.texi (Resizing Windows): Mention effect
      of `fit-frame-to-buffer-margins' for child frames.
      (Display Action Functions): New action function
      `display-buffer-in-child-frame'.
      (Quitting Windows): Mention `make-frame-invisible' as optional
      value of `frame-auto-hide-function' and `auto-hide-function'
      frame paameter.
      (Coordinates and Windows): Describe new function
      `window-largest-empty-rectangle'.
      (Window Parameters): Describe new parameters 'mode-line-format'
      and 'header-line-format'.  Index all window parameters described
      in this section.
      1886246f
  16. 30 Apr, 2017 1 commit
    • Martin Rudalics's avatar
      Fix `delete-frame' behavior including Bug#26682 · 0943cc18
      Martin Rudalics authored
      * src/frame.c (other_frames): Accept two arguments now.  Don't
      care about minibuffer window.  Don't care about visibility when
      called from delete_frame with FORCE true (Bug#26682).
      (delete_frame, Fmake_frame_invisible): Adjust other_frames
      calls.
      * src/w32term.c (w32_read_socket): Don't add a move frame event
      for an invisible frame.
      * lisp/frame.el (handle-delete-frame): Don't kill Emacs when
      attempting to delete a surrogate minibuffer frame.
      0943cc18
  17. 19 Apr, 2017 1 commit
    • Alan Third's avatar
      Add new frame functionality to NS port · aca21d42
      Alan Third authored
      * lisp/frame.el (frame-restack): Call ns-frame-restack.
      * src/keyboard.c (kbd_buffer_get_event) [HAVE_NS]: Enable
      MOVE_FRAME_EVENT handling.
      * src/frame.h:
      * src/frame.c: Enable 'z-group', 'undecorated' and 'parent' frame
      definitions.
      * src/nsfns.m: Add x_set_z_group, x_set_parent_frame and
      x_set_undecorated (Cocoa only) to handler struct.
      (Fx_create_frame): Handle 'z-group', 'parent-frame' and 'undecorated'
      frame parameter.
      (Fns_frame_restack): New function.
      * src/nsmenu.m (free_frame_tool_bar, update_frame_tool_bar):
      FRAME_TOOLBAR_HEIGHT is no longer a variable.
      * src/nsterm.h (NS_PARENT_WINDOW_LEFT_POS, NS_PARENT_WINDOW_TOP_POS):
      Add #defines to find the screen position of the parent frame.
      (NS_TOP_POS): Remove defun.
      (EmacsView): Remove redundant toolbar variables and add createToolbar
      method.
      (FRAME_NS_TITLEBAR_HEIGHT, FRAME_TOOLBAR_HEIGHT): Always calculate the
      values instead of storing them in a variable.
      * src/nsterm.m (x_set_offset, windowDidMove): Take parent frame
      position into account when positioning frames.
      (initFrameFromEmacs): Remove toolbar creation code and handle new
      frame parameters.
      (x_set_window_size): Remove toolbar height calculation.
      (x_set_z_group):
      (x_set_parent_frame):
      (x_set_undecorated) [NS_IMPL_COCOA]: New function.
      (x_destroy_window): Detach parent if child closes.
      (updateFrameSize): Change NSTRACE message to reflect new reality and
      no longer reset frame size.
      (windowWillResize): Don’t change NS window name when the titlebar
      is invisible.
      (createToolbar): Move toolbar creation code into it’s own method.
      (toggleFullScreen): FRAME_TOOLBAR_HEIGHT and FRAME_NS_TITLEBAR_HEIGHT
      are no longer variables.
      (windowDidMove): Fire MOVE_FRAME_EVENT Emacs event.
      aca21d42
  18. 14 Apr, 2017 1 commit
  19. 12 Apr, 2017 3 commits
    • Martin Rudalics's avatar
      New internal-border face and args for select-window and x-focus-frame · c25005ed
      Martin Rudalics authored
      Add `internal-border' face and handle it whenever clearing the
      internal border.  If NORECORD equals the symbol
      'mark-for-redisplay', `select-window' will not record the window
      but still mark it for redisplay.  The new argument NOACTIVATE
      for `x-focus-frame' tries to not activate FRAME when set.
      
      * lisp/faces.el (internal-border): New face.
      * lisp/mwheel.el (mwheel-scroll): Select window to scroll with
      `mark-for-redisplay'.
      * lisp/scroll-bar.el (scroll-bar-drag)
      (scroll-bar-horizontal-drag, scroll-bar-scroll-down)
      (scroll-bar-scroll-up, scroll-bar-toolkit-scroll)
      (scroll-bar-toolkit-horizontal-scroll): Select window to scroll
      with `mark-for-redisplay'.
      * lisp/window.el (handle-select-window): When
      `focus-follows-mouse' is not 'auto-raise' try to not activate
      FRAME.
      * src/dispextern.h (face_id): Add INTERNAL_BORDER_FACE_ID.
      * src/frame.c (Fx_focus_frame): New argument NOACTIVATE.
      * src/frame.h (x_focus_frame): Update extern declaration.
      * src/gtkutil.c (xg_clear_under_internal_border): Remove
      function.
      (xg_frame_resized, xg_frame_set_char_size): Call
      x_clear_under_internal_border.
      (xg_tool_bar_callback): Adapt x_focus_frame call.
      * src/gtkutil.h (xg_clear_under_internal_border): Remove
      declaration.
      * src/nsfns.m (x_focus_frame): Add argument NOACTIVATE.
      * src/w32fns.c (x_clear_under_internal_border): Fill border
      with internal-border background if specified.
      * src/w32term.h (x_clear_under_internal_border): Add extern
      declaration.
      * src/w32term.c (x_after_update_window_line): Fill border
      with internal-border background if specified.
      (w32_set_vertical_scroll_bar, w32_set_horizontal_scroll_bar)
      (x_scroll_bar_clear, w32_read_socket): Call
      x_clear_under_internal_border.
      (x_focus_frame): New argument NOACTIVATE.
      * src/window.c (select_window): Mark WINDOW for redisplay when
      NORECORD equals 'mark-for-redisplay'.
      (Fselect_window): Update doc-string.
      (syms_of_window): Define Qmark_for_redisplay.
      * src/xdisp.c (clear_garbaged_frames, echo_area_display)
      (redisplay_internal): Call x_clear_under_internal_border.
      * src/xfaces.c (lookup_basic_face): Handle `window-divider'
      and `internal-border' faces.
      (realize_basic_faces): Realize `internal-border' face.
      (syms_of_xfaces): Define Qinternal_border.
      * src/xfns.c (x_set_internal_border_width): Remove call for
      xg_clear_under_internal_border.
      (x_focus_frame): New argument NOACTIVATE.  When non-nil try to not
      activate frame.
      * src/xterm.c (x_fill_rectangle): No more static.
      (x_clear_under_internal_border, x_after_update_window_line):
      Fill border with internal-border background if specified.
      (xt_horizontal_action_hook): Rewrite.
      (handle_one_xevent): Call x_clear_under_internal_border.
      * src/xterm.h (x_fill_rectangle): Add extern declaration.
      c25005ed
    • Paul Eggert's avatar
      Port recent frame changes to --enable-gcc-warnings · 8720f601
      Paul Eggert authored
      * src/frame.c (next_frame, prev_frame):
      Remove now-redundant assertions.
      * src/frame.h (FOR_EACH_FRAME): Assume Vframe_list is nonempty.
      8720f601
    • Martin Rudalics's avatar
      Add new frame parameters and associated functions · 3fdd3bb5
      Martin Rudalics authored
      Add new frame parameters `undecorated', `override-redirect',
      `parent-frame', `skip-taskbar', `no-focus-on-map',
      `no-accept-focus', `z-group', `delete-before', `no-other-frame',
      `mouse-wheel-frame', `min-width', `min-height'.  Add new
      functions `frame-restack' and `frame-list-z-order'.
      
      * lisp/cus-start.el (focus-follows-mouse): Adapt customization
      type.
      * lisp/frame.el (handle-delete-frame): Handle child and
      `delete-before' frames.
      (other-frame): Stop looking for other frame after one round.
      (frame-list-z-order, frame-restack): New functions.
      (delete-other-frames): Handle child frames.
      * lisp/frameset.el (frameset-persistent-filter-alist)
      (frameset--record-relationships): Handle `delete-before',
      `parent-frame' and `mouse-wheel-frame' parameters.  Rename
      latter from `frameset--record-minibuffer-relationships'.
      (frameset--restore-frame): Handle ‘parent-frame’ parameter
      specially.
      (frameset-restore): Handle `delete-before', `parent-frame' and
      `mouse-wheel-frame' parameters.
      * lisp/mwheel.el (mwheel-scroll): Handle `mouse-wheel-frame'
      parameter.
      * lisp/window.el (window--min-size-ignore-p): Fix doc-string.
      (mouse-autoselect-window-select, handle-select-window): Major
      rewrite.  Try to not ignore errors.  Handle auto-selection of
      child frames and different values of `focus-follows-mouse'.
      * src/frame.c (frame_windows_min_size): Handle new `min-width'
      and `min-height' frame parameters.
      (make_frame): Initialize new frame structure members.
      (do_switch_frame): Don't reset internal_last_event_frame for
      descendant frames.
      (Fframe_parent, frame_ancestor_p, Fframe_ancestor_p): New
      functions.
      (candidate_frame): Don't return `no-other-frame' frame.
      (other_frames): New function replacing other_visible_frames.
      (delete_frame): Rewrite.  Handle child and `delete-before' frames.
      (Fmake_frame_invisible): Call other_frames.
      (store_frame_param): Check `delete-before' and `parent-frame'
      parameters for circular dependencies.
      (frame_parms, syms_of_frame): Add entries for and define new
      frame parameters.
      (focus_follows_mouse): New meaningful value `auto-raise'.
      * src/frame.h (z_group): New enumeration type.
      (frame): New slots parent_frame, undecorated, override_redirect,
      skip_taskbar, no_focus_on_map, no_accept_focus, z_group.
      (fset_parent_frame): New inlined function.
      (FRAME_UNDECORATED, FRAME_OVERRIDE_REDIRECT)
      (FRAME_PARENT_FRAME, FRAME_SKIP_TASKBAR, FRAME_NO_FOCUS_ON_MAP)
      (FRAME_NO_ACCEPT_FOCUS, FRAME_Z_GROUP, FRAME_Z_GROUP_NONE)
      (FRAME_Z_GROUP_ABOVE, FRAME_Z_GROUP_ABOVE_SUSPENDED)
      (FRAME_Z_GROUP_BELOW): New macros.
      (frame_ancestor_p): Add declaration.
      * src/gtkutil.c (xg_create_frame_widgets): Handle
      `undecorated' and `override-redirect' frame parameters.
      (x_wm_set_size_hint): None for child frames.
      (xg_set_undecorated, xg_frame_restack, xg_set_skip_taskbar)
      (xg_set_no_focus_on_map, xg_set_no_accept_focus)
      (xg_set_override_redirect): New functions.
      (xg_update_scrollbar_pos, xg_update_horizontal_scrollbar_pos):
      Don't let scrollbars obscure child frames.
      * src/gtkutil.h: (xg_set_undecorated, xg_frame_restack)
      (xg_set_skip_taskbar, xg_set_no_focus_on_map)
      (xg_set_no_accept_focus, xg_set_override_redirect): Add extern
      declarations.
      * src/nsfns.m (ns_frame_parm_handlers): Add entries for new
      frame parameters.
      (Fx_create_frame): Install `min-width' and `min-height' frame
      parameters.
      * src/nsterm.m (mouseMoved:): Handle focus_follows_mouse change.
      * src/w32fns.c (WS_EX_NOACTIVATE): Define if necessary.
      (x_real_positions): Handle child frames.
      (x_set_menu_bar_lines): Don't for child frames.
      (x_set_undecorated, x_set_parent_frame, x_set_skip_taskbar)
      (x_set_no_focus_on_map, x_set_no_accept_focus)
      (x_set_z_group): New functions.
      (w32_createvscrollbar, w32_createhscrollbar): Don't draw
      scroll bars over child frames.
      (w32_createwindow): Handle new frame parameters and child frames.
      (w32_wnd_proc): Let mouse clicks into a child frame activate
      the frame.  Try to handle the `no-accept-focus' parameter.  Do
      SetFocus when our window is brought to top or becomes the
      foreground window.
      (w32_window): Don't initialize menu bar for child frames.
      (Fx_create_frame): Handle new frame parameters.
      (x_create_tip_frame): Set explicit_parent slot.
      (w32_dialog_in_progress): New function.
      (Fx_file_dialog): Handle `z-group-above' frames.
      (w32_frame_list_z_order, Fw32_frame_list_z_order)
      (w32_frame_restack, Fw32_frame_restack): New functions.
      (w32_frame_parm_handlers): Add entries for new frame
      parameters.
      * src/w32font.c (Fx_select_font): Handle `z-group-above'
      frames during font selection dialogue.
      * src/w32term.c (construct_mouse_wheel): Construct mouse wheel
      event from F's w32 window.
      (w32_mouse_position): Handle child frames.
      (w32_set_vertical_scroll_bar, w32_set_horizontal_scroll_bar):
      Don't draw scroll bars over child frames.
      (w32_read_socket): Always erase background of child frames.
      When generating SELECT_WINDOW_EVENTs handle new value of
      `focus-follows-mouse' and handle `no-accept-focus' parameter.
      Handle `mouse-wheel-frame' parameter.
      (x_calc_absolute_position, x_set_offset, x_set_window_size):
      Handle child frames.
      (x_make_frame_visible): Handle child frames specially.  Handle
      `no-focus-on-map' parameter.
      * src/w32term.h (w32_dialog_in_progress): Add external
      declaration.
      * src/xdisp.c (x_consider_frame_title, prepare_menu_bars): Not
      for child frames.
      * src/xfns.c (Xm/MwmUtil.h): Include for WM hints.
      (PropMotifWmHints, PROP_MOTIF_WM_HINTS_ELEMENTS): Define for
      non-Motif, non-GTK case.
      (x_real_pos_and_offsets): Handle child frames.
      (x_set_undecorated, x_set_parent_frame)
      (x_set_no_focus_on_map, x_set_no_accept_focus)
      (x_set_override_redirect): New functions.
      (x_set_menu_bar_lines): Not for child frames.
      (x_window): Handle `undecorated' and `override_redirect' cases.
      (Fx_create_frame): Handle new frame parameters.
      (frame_geometry): Handle child frames and outer border.
      (x_frame_list_z_order, Fx_frame_list_z_order)
      (x_frame_restack, Fx_frame_restack): New functions.
      (Fx_file_dialog, Fx_select_font): Set x_menu_set_in_use.
      (x_frame_parm_handlers): Add entries for new frame parameters.
      * src/xmenu.c (x_menu_set_in_use): Handle `z-group-above'
      frames.
      * src/xterm.c (x_set_frame_alpha): Don't set alpha of parent
      for child frames.
      (XTmouse_position): Handle child frames.
      (x_scroll_bar_create, x_scroll_bar_expose): Don't let scroll
      bars obscure child frames.
      (handle_one_xevent): Handle child frame positions.  If necessary
      set `skip-taskbar' and reassign proper `z-group' when we are
      mapped.  When generating SELECT_WINDOW_EVENTs handle new value
      of `focus-follows-mouse'.  Handle `mouse-wheel-frame' parameter.
      Let mouse clicks into a child frame activate the frame.
      (x_calc_absolute_position, x_set_offset): Handle child frames
      specially.
      (x_set_skip_taskbar, x_set_z_group): New functions.
      (x_make_frame_visible): Handle child frames.
      (ATOM_REFS_INIT): Add entries for
      Xatom_net_wm_state_skip_taskbar, Xatom_net_wm_state_above,
      Xatom_net_wm_state_below.
      * src/xterm.h (top-level): Declare Xatom_net_wm_state_above,
      Xatom_net_wm_state_below and Xatom_net_wm_state_skip_taskbar.
      (x_set_skip_taskbar, x_set_z_group): Add extern declarations.
      3fdd3bb5
  20. 11 Apr, 2017 1 commit
    • Martin Rudalics's avatar
      Frame movement, focus and hook related changes · ea6c880a
      Martin Rudalics authored
      New hook `move-frame-functions'.  Run `focus-in-hook'
      after switching to frame that gets focus.  Don't run
      XMoveWindow for GTK.
      
      * lisp/frame.el (handle-move-frame, frame-size-changed-p): New
      functions.
      
      * src/frame.c (do_switch_frame): Simplify code.
      (Fhandle_switch_frame): Switch frame before running
      `handle-focus-in'.
      (Vfocus_in_hook, Vfocus_out_hook): Clarify doc-strings.
      (Vmove_frame_functions): New hook variable.
      * src/keyboard.c (kbd_buffer_get_event): Handle
      MOVE_FRAME_EVENT.  Handle SELECT_WINDOW_EVENT separately.
      (head_table): Add Qmove_frame entry.
      (syms_of_keyboard): Add Qmove_frame.
      (keys_of_keyboard): Define key for `move-frame'.
      * src/termhooks.h (event_kind): Add MOVE_FRAME_EVENT.
      * src/w32term.c (w32_read_socket): Create MOVE_FRAME_EVENT.
      * src/window.c (run_window_size_change_functions): Record size of
      FRAME's minibuffer window too.
      * src/xterm.c (handle_one_xevent): Create MOVE_FRAME_EVENT.
      (x_set_offset): For GTK call gtk_widget_move instead of
      XMoveWindow.
      ea6c880a
  21. 05 Apr, 2017 1 commit
    • Paul Eggert's avatar
      Minor cleanups related to type-of · f1d34d91
      Paul Eggert authored
      * src/data.c (Frecordp): Rename from Frecordp_p, for consistency.
      * src/data.c (syms_of_data):
      * src/frame.c (syms_of_frame): Put all the primitive type names
      together, under the "Types that type-of returns" comment.
      f1d34d91
  22. 17 Mar, 2017 2 commits
  23. 02 Mar, 2017 2 commits
    • Paul Eggert's avatar
      Restore XFLOATINT but with restricted args · 56aaaf9b
      Paul Eggert authored
      Turn instances of extract_float into XFLOAT_DATA when possible,
      and to a resurrected XFLOATINT when the arg is a number.
      The resurrected XFLOATINT is more like XFLOAT and XINT in
      that is valid only if its arg is a number.  This clarifies
      the ways in which floats can be extracted at the C level.
      * src/editfns.c (styled_format):
      * src/floatfns.c (extract_float, Fexpt):
      Use XFLOATINT rather than open-coding it.
      * src/fns.c (internal_equal):
      * src/image.c (imagemagick_load_image):
      * src/xdisp.c (resize_mini_window):
      Prefer XFLOAT_DATA to extract_float on values known to be floats.
      * src/frame.c (x_set_screen_gamma):
      * src/frame.h (NUMVAL):
      * src/image.c (x_edge_detection, compute_image_size):
      * src/lread.c (read_filtered_event):
      * src/window.c (Fset_window_vscroll):
      * src/xdisp.c (handle_single_display_spec, try_scrolling)
      (redisplay_window, calc_pixel_width_or_height, x_produce_glyphs)
      (on_hot_spot_p):
      Prefer XFLOATINT to extract_float on values known to be numbers.
      * src/lisp.h (XFLOATINT): Bring back this function, except
      it now assumes its argument is a number.
      56aaaf9b
    • Paul Eggert's avatar
      Remove XFLOATINT · d0d26c13
      Paul Eggert authored
      * src/lisp.h (XFLOATINT): Remove this alias for extract_float.
      All callers changed to use extract_float.
      * src/frame.h (NUMVAL): Now an inline function, not a macro.
      d0d26c13
  24. 24 Feb, 2017 1 commit
    • Stefan Monnier's avatar
      Minor redisplay optimisations · dee86744
      Stefan Monnier authored
      * src/frame.c (Ficonify_frame): No need to redisplay everything.
      
      * src/xdisp.c (overlay_arrows_changed_p): Add `set_redisplay' argument.
      (redisplay_internal): Use it to avoid redisplaying everything.
      (try_window_id): Use it keep the same behavior as before.
      dee86744
  25. 22 Jan, 2017 1 commit
    • Paul Eggert's avatar
      Improve uses of CHECK_LIST etc. · 0a49f158
      Paul Eggert authored
      * src/eval.c (FletX): Report an error for invalid constructs like
      ‘(let* (a . 0))’, so that ‘let*’ is more consistent with ‘let’.
      (lambda_arity): Use plain CHECK_CONS.
      * src/fns.c (CHECK_LIST_END): Move from here to lisp.h.
      (Fcopy_alist): Remove unnecessary CHECK_LIST call, since
      concat does that for us.
      (Fnthcdr, Fmember, Fmemql, Fdelete, Fnreverse):
      Use CHECK_LIST_END, not CHECK_LIST_CONS.  This hoists a
      runtime check out of the loop.
      (Fmemq): Simplify and use CHECK_LIST_END instead of CHECK_LIST.
      (Fassq, Fassoc, Frassq, Frassoc):
      Simplify and use CHECK_LIST_END instead of CAR.
      (assq_no_quit, assoc_no_quit): Simplify and assume proper list.
      (Fnconc): Use plain CHECK_CONS, and do-while instead of while loop.
      * src/fontset.c (Fnew_fontset):
      * src/frame.c (Fmodify_frame_parameters):
      Use CHECK_LIST_END at end, rather than CHECK_LIST at start, for a
      more-complete check.
      * src/gfilenotify.c (Fgfile_add_watch):
      Omit unnecessary CHECK_LIST, since Fmember does that for us.
      * src/lisp.h (lisp_h_CHECK_LIST_CONS, CHECK_LIST_CONS):
      Remove; no longer used.
      (CHECK_LIST_END): New inline function.
      0a49f158
  26. 01 Jan, 2017 1 commit
  27. 22 Dec, 2016 1 commit
    • Paul Eggert's avatar
      Pacify --enable-gcc-warnings · b10bd719
      Paul Eggert authored
      * src/charset.c (load_charset_map):
      * src/coding.c (decode_coding_object):
      * src/frame.c (make_frame):
      * src/window.c (Frecenter):
      Mark locals with UNINIT to silence false alarms from
      -Wmaybe-uninitialized.
      * src/lisp.h (SYMBOL_ALIAS, SYMBOL_BLV, SYMBOL_FWD)
      (SET_SYMBOL_ALIAS, SET_SYMBOL_BLV, SET_SYMBOL_FWD):
      Check and assume that values are nonnull.  This pacifies
      -Wmaybe-uninitialized in Fmake_variable_buffer_local and
      Fmake_local_variable.
      b10bd719
  28. 21 Dec, 2016 1 commit
    • Stefan Monnier's avatar
      * src/data.c (Fmake_variable_frame_local): Remove · a6063ffe
      Stefan Monnier authored
      * src/lisp.h (struct Lisp_Buffer_Local_Value): Remove `frame_local'.
      
      * src/data.c (swap_in_symval_forwarding, set_internal)
      (set_symbol_trapped_write, make_blv, Fmake_variable_buffer_local)
      (Fmake_local_variable, Fkill_local_variable, Flocal_variable_p):
      Don't pay attention to ->frame_local any more.
      (syms_of_data): Remove Qtrapping_frame_local and don't defsubr
      Smake_variable_frame_local.
      
      * etc/NEWS (Incompatible Lisp Changes in Emacs 26.1): Announce removal
      of make-variable-frame-local.
      
      * lisp/help-fns.el (describe-variable): Don't handle the now impossible
      frame-local case.
      
      * lisp/subr.el (make-variable-frame-local): Remove obsolescence data.
      
      * src/frame.c (store_frame_param):
      * src/eval.c (specbind): Don't pay attention to ->frame_local any more.
      
      * src/widget.c (first_frame_p): Remove, unused.
      a6063ffe
  29. 06 Nov, 2016 1 commit
    • Paul Eggert's avatar
      Modernize usage of 'macOS' in doc and comments · dc152c54
      Paul Eggert authored
      Apple changed the spelling of its operating system again, to "macOS",
      effective with macOS 10.12 Sierra (2016-09-20).  Change Emacs
      documentation and comments to match this.  Stick with older OS
      spellings ("OS X", "Mac OS X") when talking about older releases where
      the older names are more correct.
      dc152c54
  30. 29 Oct, 2016 1 commit
    • Daniel Colascione's avatar
      Add double-buffering support to reduce flicker · c2907158
      Daniel Colascione authored
      * src/dispextern.h (struct glyph_string): Remove window member
      (block_buffer_flips, unblock_buffer_flips)
      (buffer_flipping_blocked_p): Declare.
      
      * src/xterm.h (struct x_display_info): New member supports_xdbe.
      (struct x_output): New members draw_desc and need_buffer_flip.
      (FRAME_X_DRAWABLE, FRAME_X_RAW_DRAWABLE)
      (FRAME_X_DOUBLE_BUFFERED_P)
      (FRAME_X_NEED_BUFFER_FLIP): New macros.
      (set_up_x_back_buffer, tear_down_x_back_buffer)
      (initial_set_up_x_back_buffer): Declare.
      
      * src/xterm.c: Include Xdbe.h.
      (x_begin_cr_clip, x_fill_rectangle, x_draw_rectangle)
      (x_draw_vertical_window_border, x_update_end)
      (x_setup_relief_color, x_draw_relief_rect)
      (x_draw_fringe_bitmap, x_shift_glyphs_for_insert)
      (x_scroll_run, x_draw_hollow_cursor, x_draw_bar_cursor): Use
      FRAME_X_DRAWABLE instead of FRAME_X_WINDOW; rename local
      variables appropriately; substitute calls to XClearArea with
      x_clear_area, which DTRT for double buffering.
      (x_clear_window, x_clear_area): In double-buffering mode, use
      rect-drawing X functions instead of XClearWindow and
      XClearArea, which always operate on the front buffer.
      (show_back_buffer): New function.
      (XTframe_up_to_date): Call show_back_buffer when done.
      (x_clear_frame, x_clear_frame_area): Remove obsolete calls to
      gtk_widget_queue_draw to refresh scroll bars; scroll bars are
      now independent X windows.
      (handle_one_xevent): Call font_drop_xrender_surfaces when
      XftDraw might need regenerating; perform buffer flip when
      responding to Expose events; issue front-buffer clearing
      commands as stopgap while we wait for redisplay.
      Call flush_dirty_back_buffers.
      (x_make_frame_visible): Un-bitrot comment; move XSETFRAME
      earlier in function.
      (x_free_frame_resources): Call tear_down_x_back_buffer when
      destroying frame.
      (x_term_init): Attempt to initialize double buffer extension.
      (x_flip_and_flush): New function.
      (x_redisplay_interface): Point to x_flip_and_flush instead of
      x_flip directly.
      (flush_dirty_back_buffers): New function.
      (x_create_terminal): Register buffer_flipping_unblocked_hook.
      
      * src/xftfont.c (xftfont_drop_xrender_surfaces): Use
      FRAME_X_DRAWABLE instead of FRAME_X_WINDOW.
      (xftfont_draw): Call x_mark_frame_dirty.
      (xftfont_drop_xrender_surfaces): New function.
      (syms_of_xftfont): Register it.
      
      * src/xfont.c (xfont_draw): Use FRAME_X_DRAWABLE instead of
      FRAME_X_WINDOW.
      
      * src/xfns.c: Include Xdbe.h.
      (x_set_inhibit_double_buffering, set_up_x_back_buffer)
      (Fx_double_buffered_p): New functions.
      (x_window): Call initial_set_up_x_back_buffer.
      (x_make_gc): Use FRAME_X_DRAWABLE instead of FRAME_X_WINDOW.
      (Fx_create_frame): Configure `inhibit-double-buffering'
      frame parameter.
      (x_create_tip_frame): Call initial_set_up_x_back_buffer.
      (x_frame_parm_handlers): Register
      x_set_inhibit_double_buffering.
      (syms_of_xfns): Register Sx_double_buffered_p.
      (x_mark_frame_dirty): Define.
      
      * src/xfaces.c (x_create_gc): Use FRAME_X_DRAWABLE instead of
      FRAME_X_WINDOW.
      
      * src/xdisp.c (remember_mouse_glyph, init_glyph_string): Use
      FRAME_X_DRAWABLE instead of FRAME_X_WINDOW.
      (redisplay_internal): Restart redisplay if a frame is garbaged
      during updating; explain why. Block buffer flips
      during redisplay.
      (redisplay_preserve_echo_area): Block buffer flip during call
      to redisplay_internal.
      (buffer_flip_blocked_depth): New variable.
      (block_buffer_flips, unblock_buffer_flips)
      (buffer_flipping_blocked_p): New functions.
      (init_glyph_string): Stop setting window member of struct
      glyph_string.
      
      * src/w32fns.c (w32_frame_parm_handlers): Add placeholder for
      x_set_inhibit_double_buffering.
      
      * src/termhooks.h (struct terminal): Add
      buffer_flipping_unblocked_hook.
      
      * src/nsfns.m (ns_frame_parm_handlers): Add placeholder for
      x_set_inhibit_double_buffering.
      
      * src/image.c (x_create_bitmap_from_data)
      (x_create_bitmap_from_file, x_create_x_image_and_pixmap)
      (Create_Pixmap_From_Bitmap_Data)
      (x_create_bitmap_from_xpm_data, xpm_load, gs_load): Use
      FRAME_X_DRAWABLE instead of FRAME_X_WINDOW; rename local
      variables appropriately.
      
      * src/gtkutil.c: Include Xdbe.h.
      (xg_get_widget_from_map): Forward declare.
      (xg_clear_under_internal_border): Remove obsolete calls to
      refresh scroll bars.
      (xg_create_frame_widgets): Call initial_set_up_x_back_buffer.
      (xg_free_frame_widgets): Call tear_down_x_back_buffer; reset
      FRAME_X_DRAWABLE as well as FRAME_X_WINDOW and for the
      same reason.
      (xg_set_background_color): Set scroll bar background colors.
      (xg_finish_scroll_bar_creation): New function with common
      logic of xg_create_scroll_bar, xg_create_horizontal_scroll_bar. Force
      scroll bars to be real X11 windows.
      (xg_create_scroll_bar, xg_create_horizontal_scroll_bar): Call
      xg_finish_scroll_bar_creation.
      (xg_update_scrollbar_pos, xg_update_horizontal_scrollbar_pos):
      Remove obsolete calls to refresh scroll bars; fix comments.
      
      * src/ftxfont.c (ftxfont_get_gcs, ftxfont_draw_bitmap,
      (ftxfont_draw_background): Use FRAME_X_DRAWABLE instead of
      FRAME_X_WINDOW.
      
      * src/frame.c (frame_parms): Add table entry for new
      `inhibit-double-buffering' frame parameter
      (syms_of_frame): Register Qinhibit_double_buffering.
      
      * src/font.h (struct font_driver): Add new `flush_frame_caches' hook.
      (font_drop_xrender_surfaces): Declare.
      
      * src/font.c (font_drop_xrender_surfaces): New function.
      
      * src/Makefile.in (XDBE_LIBS, XDBE_CFLAGS): Substitute.
      
      * etc/NEWS: Mention use of double buffering
      
      * doc/lispref/frames.texi (Management Parameters): Document
      `inhibit-double-buffering' frame parameters.
      (Visibility of Frames): Document `x-double-buffered-p'.
      
      * configure.ac: Check for the X double buffer extension
      c2907158
  31. 22 Oct, 2016 1 commit
  32. 17 Oct, 2016 1 commit
    • Martin Rudalics's avatar
      Fix frame focus redirection with shared minibuffer windows (Bug#24500) · 421c0512
      Martin Rudalics authored
      * src/frame.c (do_switch_frame): Redirect frame focus also when
      the frame switched to has its minibuffer window on the selected
      frame.
      * src/window.c (candidate_window_p): To qualify as candidate
      it's not sufficient for the window's frame to just share the
      minibuffer window - it must be active as well.
      421c0512
  33. 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