1. 29 Dec, 2017 1 commit
  2. 23 Nov, 2017 1 commit
  3. 13 Nov, 2017 1 commit
    • Paul Eggert's avatar
      Change vectorlike from struct to union · 5d68dc9a
      Paul Eggert authored
      * src/lisp.h (vectorlike_headed): Change from struct to union.
      All uses changed.  Since it has only one member, this does not
      change semantics.  This is designed to simplify future changes
      needed to fix bugs like Bug#29040.  All uses changed.
      5d68dc9a
  4. 07 Nov, 2017 1 commit
  5. 04 Nov, 2017 1 commit
  6. 30 Oct, 2017 1 commit
    • Martin Rudalics's avatar
      Fix doc and doc-strings for minibuffer window related functions (Bug#28978) · d10c9479
      Martin Rudalics authored
      These fixes were suggested by Drew Adams.
      
      * src/window.c (Fminibuffer_selected_window): Disambiguate
      doc-string.
      * doc/lispref/minibuf.texi (Intro to Minibuffers)
      (Minibuffer Windows, Recursive Mini, Minibuffer Misc):  Avoid
      the term "currently active minibuffer window".  Disambiguate
      documentation of `minibuffer-selected-window'.
      d10c9479
  7. 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
  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. 09 Sep, 2017 1 commit
  10. 06 Jul, 2017 1 commit
    • Paul Eggert's avatar
      Spelling fixes · 20e9a00f
      Paul Eggert authored
      * lisp/org/org-table.el (org-table-sort-lines):
      Fix misspelling in prompt.
      * lisp/org/ox-ascii.el (org-ascii--describe-datum):
      Fix misspelling in call to org-element-lineage.
      20e9a00f
  11. 25 Jun, 2017 1 commit
    • 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
  12. 27 May, 2017 1 commit
    • Martin Rudalics's avatar
      Minor doc and doc-string fixes (Bug#27091) · 704fea97
      Martin Rudalics authored
      * src/window.c (Fset_window_scroll_bars): Fix doc-string.
      
      * doc/lispref/display.texi (Fringe Size/Pos, Scroll Bars)
      (Display Margins): Mention that `set-window-buffer' may override
      settings made by `set-window-fringes', `set-window-scroll-bars'
      and `set-window-margins'.
      * doc/lispref/windows.texi (Buffers and Windows): Fix doc of
      `set-window-buffer'.
      704fea97
  13. 27 Apr, 2017 1 commit
  14. 12 Apr, 2017 1 commit
    • 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
  15. 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
  16. 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
  17. 03 Feb, 2017 4 commits
    • Noam Postavsky's avatar
      Fix scrolling with partial lines · b9be4c14
      Noam Postavsky authored
      * src/xdisp.c (partial_line_height): New function.
      (try_scrolling):
      * src/window.c (window_scroll_pixel_based): Use it for calculating the
      pixel scroll margin correctly in a window with partial lines.
      b9be4c14
    • Noam Postavsky's avatar
      Make limit on scroll-margin variable · e27a91cd
      Noam Postavsky authored
      * src/xdisp.c (maximum-scroll-margin): New variable.
      * lisp/cus-start.el: Make it customizable.
      * etc/NEWS: Mention it.
      * doc/emacs/display.texi (Auto Scrolling):
      * doc/lispref/windows.texi (Textual Scrolling): Document it.
      * src/window.c (window_scroll_pixel_based): Use it instead of hardcoding
      division by 4 (Bug #5718).
      e27a91cd
    • Noam Postavsky's avatar
      Don't count mode line for scroll-margin limit · c92fc7a2
      Noam Postavsky authored
      * src/window.c (window_scroll_margin): Use window_box_height to avoid
      counting header line, scrollbars for scroll-margin limit (Bug #5718).
      c92fc7a2
    • Noam Postavsky's avatar
      Refactor uses of scroll_margin to a function · d17e92da
      Noam Postavsky authored
      Its effective range needs to be clamped between 0 and (window height /
      4), so it's better to have this constraint in a single place.
      
      * src/window.c (window_scroll_margin): New function.
      (window_scroll_pixel_based, window_scroll_line_based):
      (Frecenter, Fmove_to_window_line):
      * src/xdisp.c (try_scrolling, try_cursor_movement):
      (redisplay_window, try_window, try_window_id): Use it.
      d17e92da
  18. 01 Feb, 2017 1 commit
    • Paul Eggert's avatar
      Remove immediate_quit. · 33be5003
      Paul Eggert authored
      The old code that sets and clears immediate_quit was
      ineffective except when Emacs is running in terminal mode, and
      has problematic race conditions anyway, so remove it.  This
      will introduce some hangs when Emacs runs in terminal mode,
      and these hangs should be fixed in followup patches.
      * src/keyboard.c (immediate_quit): Remove.  All uses removed.
      33be5003
  19. 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
  20. 01 Jan, 2017 1 commit
  21. 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
  22. 01 Dec, 2016 1 commit
  23. 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
  24. 05 Sep, 2016 1 commit
    • Eli Zaretskii's avatar
      Avoid assertion violations when scrolling narrowed buffer · 6acff252
      Eli Zaretskii authored
      * src/window.c (window_scroll_pixel_based):
      * src/xdisp.c (pos_visible_p): Don't allow simulated redisplay to
      start outside the accessible portion of the buffer.  This avoids
      assertion violations when some Lisp narrows the buffer to less
      than the current window, and then attempts to scroll the buffer.
      6acff252
  25. 03 Aug, 2016 2 commits
  26. 02 Aug, 2016 1 commit
  27. 27 Jun, 2016 1 commit
    • Eli Zaretskii's avatar
      Fix 'move-to-window-line' when EOB is on last screen line · defdee72
      Eli Zaretskii authored
      * src/window.c (displayed_window_lines): Fix an off-by-one error
      when the bottom of the last display line is exactly at window's
      last pixel.  Remove kludgey fix for TTY frames that is no longer
      needed.  (Bug#15760)
      (Fmove_to_window_line): Doc fix.
      
      * doc/lispref/positions.texi (Screen Lines): Clarify and make more
      accurate the documentation of 'move-to-window-line'.
      defdee72
  28. 08 Jun, 2016 1 commit
  29. 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
  30. 27 Mar, 2016 1 commit
    • Paul Eggert's avatar
      Rename C names to match Lisp symbols better · f41f573e
      Paul Eggert authored
      This was inspired by commit e65c3079,
      which fixed a bug where the C name for a symbol disagreed with the
      symbol name itself.  Fix other instances of disagreements that I found.
      Although this doesn’t fix a bug, it should make code easier to follow.
      The remaining disagreements are idiosyncratic: Qminus, Qplus,
      Qsans__serif, Qbackquote, Qcomma, Qcomma_at, Qcomma_dot.
      All uses changed.
      * src/alloc.c (QAutomatic_GC): Rename from Qautomatic_gc.
      * src/dbusbind.c (QCsystem): Rename from QCdbus_system_bus.
      (QCsession): Rename from QCdbus_session_bus.
      (QCtimeout): Rename from QCdbus_timeout.
      (QCbyte): Rename from QCdbus_type_byte.
      (QCboolean): Rename from QCdbus_type_boolean.
      (QCint16): Rename from QCdbus_type_int16.
      (QCuint16): Rename from QCdbus_type_uint16.
      (QCint32): Rename from QCdbus_type_int32.
      (QCuint32): Rename from QCdbus_type_uint32.
      (QCint64): Rename from QCdbus_type_int64.
      (QCuint64): Rename from QCdbus_type_uint64.
      (QCdouble): Rename from QCdbus_type_double.
      (QCstring): Rename from QCdbus_type_string.
      (QCobject_path): Rename from QCdbus_type_object_path.
      (QCsignature): Rename from QCdbus_type_signature.
      (QCunix_fd): Rename from QCdbus_type_unix_fd.
      (QCarray): Rename from QCdbus_type_array.
      (QCvariant): Rename from QCdbus_type_variant.
      (QCstruct): Rename from QCdbus_type_struct.
      (QCdict_entry): Rename from QCdbus_type_dict_entry.
      (QCserial): Rename from QCdbus_registered_serial.
      (QCmethod): Rename from QCdbus_registered_method.
      (QCsignal): Rename from QCdbus_registered_signal.
      * src/emacs-module.c (Qinternal__module_call):
      Rename from Qinternal_module_call.
      * src/frame.c (Qwindow__pixel_to_total):
      Rename from Qwindow_pixel_to_total.
      * src/gnutls.c (QChostname): Rename from QCgnutls_bootprop_hostname.
      (QCpriority): Rename from QCgnutls_bootprop_priority.
      (QCtrustfiles): Rename from QCgnutls_bootprop_trustfiles.
      (QCkeylist): Rename from QCgnutls_bootprop_keylist.
      (QCcrlfiles): Rename from QCgnutls_bootprop_crlfiles.
      (QCmin_prime_bits): Rename from QCgnutls_bootprop_min_prime_bits.
      (QCloglevel): Rename from QCgnutls_bootprop_loglevel.
      (QCcomplete_negotiation): Rename from QCgnutls_complete_negotiation.
      (QCverify_flags): Rename from QCgnutls_bootprop_verify_flags.
      (QCverify_error): Rename from QCgnutls_bootprop_verify_error.
      * src/w32fns.c (Qfont_parameter): Rename from Qfont_param.
      (Qgnutls): Rename from Qgnutls_dll.
      (Qlibxml2): Rename from Qlibxml2_dll.
      (Qzlib): Rename from Qzlib_dll.
      * src/w32select.c (Qutf_16le_dos): Rename from QUNICODE.
      * src/window.c (Qwindow__resize_root_window):
      Rename from Qwindow_resize_root_window.
      (Qwindow__resize_root_window_vertically):
      Rename from Qwindow_resize_root_window_vertically.
      (Qwindow__sanitize_window_sizes):
      Rename from Qwindow_sanitize_window_sizes.
      (Qwindow__pixel_to_total): Rename from Qwindow_pixel_to_total.
      * src/xdisp.c (Qredisplay_internal_xC_functionx):
      Rename from Qredisplay_internal.
      * src/xfns.c (Qfont_parameter): Rename from Qfont_param.
      * src/xselect.c (Q_EMACS_TMP_): Rename from QEMACS_TMP.
      f41f573e
  31. 26 Mar, 2016 1 commit
    • Martin Rudalics's avatar
      Safely run window size change functions · cad9d76e
      Martin Rudalics authored
      * src/window.c (run_window_size_change_functions): Use
      safe_call1 when running a size change function.
      (grow_mini_window, shrink_mini_window): Report error when
      minibuffer window cannot be resized.
      cad9d76e
  32. 20 Mar, 2016 1 commit
  33. 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
  34. 23 Feb, 2016 2 commits
    • Paul Eggert's avatar
      Minor cleanups for async DNS etc. · 82848cf6
      Paul Eggert authored
      * src/frame.h (FRAME_WINDOW_CONFIGURATION_CHANGED):
      Omit unnecessary parens.
      * src/gnutls.c (gnutls_try_handshake, emacs_gnutls_deinit)
      (gnutls_verify_boot):
      Use bool for boolean.
      (ATTRIBUTE_FORMAT_PRINTF): Add printf attribute.
      * src/process.c (free_dns_request, Fmake_network_process):
      Allocate and free async request control block all in one go.
      (set_network_socket_coding_system, finish_after_tls_connection)
      (connect_network_socket):
      Now static.
      (conv_numerical_to_lisp): 2nd arg is now int, not unsigned.
      (Fmake_network_process): Use list1 for brevity.
      (wait_for_socket_fds): 2nd arg is now const ptr.
      * src/process.h (struct Lisp_Process.dns_request):
      Now struct gaicb *, not struct gaicb **, since there was always
      exactly one.  All uses changed.
      * src/window.c, src/window.h (run_window_configuration_change_hook):
      Now static.
      82848cf6
    • Martin Rudalics's avatar
      Fix `window-configuration-change-hook' and `window-size-change-functions' · 8e7712c7
      Martin Rudalics authored
      (1) Run `window-configuration-change-hook' if and only if at least
      one window was deleted or created or shows another buffer since
      last redisplay.
      
      (2) Run `window-size-change-functions' if and only if at least
      one window changed its size since last redisplay (in a few cases
      `window-size-change-functions' will also run when no window
      changed its size).
      
      (3) Provide two functions `window-pixel-height-before-size-change'
      and `window-pixel-width-before-size-change' that allow to easily
      detect which window changed size.
      
      * src/frame.h (struct frame): New boolean member
      window_configuration_changed.
      (FRAME_WINDOW_SIZES_CHANGED): Remove macro.
      (FRAME_WINDOW_CONFIGURATION_CHANGED): New macro.
      * src/frame.c (adjust_frame_size): Don't run
      `window-configuration-change-hook'.
      * src/window.h (struct window): New fields
      pixel_width_before_size_change and pixel_height_before_size_change.
      (WINDOW_INTERNAL_P): New macro.
      * src/window.c (Fwindow_pixel_width_before_size_change)
      (Fwindow_pixel_height_before_size_change): New functions.
      (Fdelete_other_windows_internal, Fwindow_resize_apply)
      (resize_frame_windows, Fsplit_window_internal)
      (Fdelete_window_internal, grow_mini_window)
      (shrink_mini_window, Fresize_mini_window_internal): Don't call
      FRAME_WINDOW_SIZES_CHANGED.
      (window_size_changed, window_set_before_size_change_sizes)
      (run_window_size_change_functions): New functions.
      (make_window): Initialize pixel_width_before_size_change and
      pixel_height_before_size_change.
      (Fdelete_window_internal): Don't call
      run_window_configuration_change_hook.
      (struct saved_window): Add pixel_height_before_size_change and
      pixel_width_before_size_change.
      (Fset_window_configuration): Try to identify window configuration
      changes correctly so run_window_configuration_change_hook and
      run_window_size_change_functions run only if configuration and size
      really changed.
      (save_window_save): Set the pixel_height_before_size_change and
      pixel_width_before_size_change fields.
      (Vwindow_size_change_functions): Move here definiton from xdisp.c.
      * src/xdisp.c (prepare_menu_bars, redisplay_internal): Call
      run_window_size_change_functions.
      (Vwindow_size_change_functions): Move definition to window.c.
      * src/xfns.c (x_set_menu_bar_lines): Don't call
      run_window_configuration_change_hook.
      * doc/lispref/windows.texi (Window Sizes): Document new
      functions `window-pixel-height-before-size-change' and
      `window-pixel-width-before-size-change'.
      (Window Configurations): Mention that this may trigger
      execution of `window-size-change-functions' although no window
      changed size.
      (Window Hooks): Update descriptions of `window-size-change-functions'
      and `window-configuration-change-hook'.
      8e7712c7