summaryrefslogtreecommitdiff
path: root/lisp/window.el
Commit message (Collapse)AuthorAgeFilesLines
* Use quit-restore-window to close tab (bug#39446)Juri Linkov2020-02-101-2/+14
| | | | | | | | | | | | | | | | | * lisp/tab-bar.el (display-buffer-in-new-tab): New function with code from display-buffer-in-tab. (display-buffer-in-tab): Call display-buffer-in-new-tab. (switch-to-buffer-other-tab): Instead of 'display-buffer-same-window' use '(reusable-frames . t)'. * lisp/windmove.el (windmove-display-in-direction): Set arg 'type' to 'tab' for window--display-buffer when creating a new tab. * lisp/window.el (quit-restore-window): Call tab-bar-close-tab when quit-restore type is 'tab'. (display-buffer-record-window): Set window-parameter 'quit-restore' to 'tab' for type 'tab'. (window--display-buffer): Set window-prev-buffers to nil for tab too.
* Improve doc-strings of 'quit-window' and 'quit-restore-window' (Bug#38819)Martin Rudalics2020-01-051-8/+8
| | | | | | * lisp/window.el (quit-restore-window, quit-window): Make doc-strings more consistent; add references to corresponding section of the Elisp manual (Bug#38819).
* Update copyright year to 2020Paul Eggert2020-01-011-1/+1
| | | | Run "TZ=UTC0 admin/update-copyright $(git ls-files)".
* New functions window-state-buffers and tab-bar-get-buffer-tab (bug#38354)Juri Linkov2019-12-031-0/+9
| | | | | | | | | | * lisp/window.el (window-state-buffers): New function. * lisp/tab-bar.el (tab-bar-get-buffer-tab): New function. * lisp/emacs-lisp/seq.el (seq-some): Add autoload cookie. * lisp/desktop.el (desktop-buffers-not-to-save-function): New variable. (desktop-save-buffer-p): Use it.
* Fix previous change to (next|previous)-bufferJuanma Barranquero2019-11-261-2/+4
| | | | | | * lisp/window.el (next-buffer, previous-buffer): If no other buffer is available, signal 'user-error' only when called interactively.
* (next|previous)-buffer no longer fail silently (bug#38384)Juanma Barranquero2019-11-261-2/+4
| | | | | | | * lisp/window.el (next-buffer, previous-buffer): Signal 'user-error' if there is no buffer to switch to. * etc/NEWS: Document it.
* 2019-11-26 Martin Rudalics <rudalics@gmx.at>Martin Rudalics2019-11-261-39/+127
| | | | | | | | | | | | * lisp/window.el (switch-to-visible-buffer): Declare obsolete. (switch-to-prev-buffer-skip): New option. (switch-to-prev-buffer, switch-to-next-buffer): Obey 'switch-to-prev-buffer-skip'. * doc/lispref/windows.texi (Window History): Remove description of 'switch-to-visible-buffer'. Describe new option 'switch-to-prev-buffer-skip' * etc/NEWS: Mention switch from 'switch-to-visible-buffer' to 'switch-to-prev-buffer-skip'.
* Fix some quoting glitches in doc stringsPaul Eggert2019-11-081-35/+35
| | | | This also fixes a misplaced "only".
* In 'bury-buffer' don't try to remove current buffer from minibuffer windowMartin Rudalics2019-10-171-2/+5
| | | | | * lisp/window.el (bury-buffer): Don't try to remove current buffer from minibuffer window.
* lisp/*.el, src/*.c: Doc fixes related to returning t vs non-nilJuanma Barranquero2019-10-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | * lisp/progmodes/flymake-proc.el (flymake-proc--find-buffer-for-file): Doc fix; return value is a buffer, not t. * lisp/progmodes/ebrowse.el (ebrowse-member-display-p): Doc fix; return value is the MEMBER argument, not nil. * lisp/files.el (hack-one-local-variable-eval-safep): * lisp/play/doctor.el (doctor-nounp, doctor-pronounp): * lisp/progmodes/flymake-proc.el (flymake-proc--check-include): * lisp/progmodes/js.el (js--broken-arrow-terminates-line-p): Doc fix; a non-nil return value is not always t. * lisp/image.el (image-type-available-p): * lisp/simple.el (region-active-p): * lisp/window.el (frame-root-window-p): * src/buffer.c (Fbuffer_live_p): * src/image.c (Finit_image_library): * src/window.c (Fwindow_minibuffer_p): Doc fix; a non-nil return value is always t. * doc/lispref/minibuf.texi (Minibuffer Windows): Doc fix.
* Fix bug recently introduced in 'fit-window-to-buffer' (Bug#37743)Martin Rudalics2019-10-141-1/+1
| | | | | * lisp/window.el (fit-window-to-buffer): Call 'window-combined-p' with right argument (Bug#37743).
* * lisp/window.el (next-buffer, previous-buffer): Add repeat count arg.Juri Linkov2019-10-141-8/+10
| | | | | * doc/emacs/buffers.texi (Select Buffer): Mention arg as repeat count. (Bug#37514)
* Minor fixes for switching to previous and next buffers (Bug#37514)Martin Rudalics2019-10-111-8/+14
| | | | | | | | | * lisp/window.el (switch-to-prev-buffer) (switch-to-next-buffer): In doc-strings add links to 'prev-buffer' and 'next-buffer'. (next-buffer, previous-buffer): Signal 'user-error' instead of 'error'. In doc-strings link to 'switch-to-prev-buffer' and 'switch-to-next-buffer'.
* Fixes for fitting windows and frames to their buffers (Bug#37563)Martin Rudalics2019-10-111-111/+141
| | | | | | | | | | | | | | * lisp/window.el (window-default-font-height) (window-default-line-height): New functions. (fit-frame-to-buffer): Interpret values of MAX-HEIGHT and MIN-HEIGHT arguments in terms of WINDOW's default line height (Bug#37563). (fit-window-to-buffer): Obey size restricting arguments even when size of WINDOW's text does not change. Do not temporarily select WINDOW and perform height/width related calculations if and only if WINDOW is accordingly combined. Interpret values of MAX-HEIGHT and MIN-HEIGHT arguments in terms of WINDOW's default line height.
* Merge branch 'feature/tabs'Juri Linkov2019-10-011-1/+4
|\
| * Frame-local tab-bar and window-local tab-line.Juri Linkov2019-08-311-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * etc/NEWS: Add 'tab-bar-mode' and 'global-tab-line-mode'. * etc/TODO: Remove tab-related items. * lisp/cus-start.el: Add tab-bar-mode, tab-bar-max-label-size. * lisp/frame.el (frame-notice-user-settings): handle tab-bar-lines. * lisp/loadup.el: Load "tab-bar". * lisp/menu-bar.el (menu-bar-options-save): Add tab-bar-mode. (menu-bar-showhide-menu): Define showhide-tab-bar. * lisp/startup.el (tab-bar-images-pixel-height): New defconst. (command-line): Reset tab-bar-mode. (x-apply-session-resources): Add "tabBar", "TabBar". * lisp/subr.el (read-key): Add tab-bar. * lisp/tab-bar.el: New file. * lisp/tab-line.el: New file. * lisp/window.el (window--dump-frame): Add tab-bar-height. * src/dispextern.h (enum window_part): Add ON_TAB_LINE. (struct glyph_matrix): Add tab_line_p. (struct glyph_row): Add tab_line_p. (MATRIX_TAB_LINE_ROW): New macro. (MATRIX_FIRST_TEXT_ROW): Handle more mode lines. (MR_PARTIALLY_VISIBLE_AT_TOP): Add WINDOW_TAB_LINE_HEIGHT. (MATRIX_TAB_LINE_HEIGHT, CURRENT_TAB_LINE_HEIGHT) (DESIRED_TAB_LINE_HEIGHT): New macros. (enum face_id): Add TAB_BAR_FACE_ID and TAB_LINE_FACE_ID. (struct it): Add tab_line_p. (tab_bar_item_idx, tab_bar_item_image): New enums. (DEFAULT_TAB_BAR_LABEL_SIZE, DEFAULT_TAB_BAR_BUTTON_MARGIN) (DEFAULT_TAB_BAR_BUTTON_RELIEF, DEFAULT_TAB_BAR_IMAGE_HEIGHT): New constants. * src/dispnew.c (adjust_glyph_matrix): Use window_wants_tab_line. (shift_glyph_matrix): Add WINDOW_TAB_LINE_HEIGHT. (clear_current_matrices, clear_desired_matrices): Call clear_glyph_matrix on tab_bar_window. (blank_row): Add WINDOW_TAB_LINE_HEIGHT. (required_matrix_height): Change 2 to 3. (fake_current_matrices): Reset tab_line_p. (adjust_frame_glyphs_for_window_redisplay): Handle tab_bar_window. Add FRAME_TAB_BAR_HEIGHT and FRAME_TAB_BAR_LINES. (free_glyphs): Handle tab_bar_window. (update_frame): Handle tab_bar_window. (update_window): Handle row->tab_line_p. (scrolling_window): Change arg type from bool to int. Change header_line_p to tab_line_p. (buffer_posn_from_coords): Add window_wants_tab_line. (mode_line_string): Use MATRIX_TAB_LINE_ROW for part ON_TAB_LINE. * src/frame.c (frame_default_tab_bar_height): New internal variable. (adjust_frame_size): Handle tab_bar_window. (make_frame): Reset tab_bar_redisplayed, tab_bar_resized and last_tab_bar_item. (Ftab_bar_pixel_width): New function. (frame_parms): Add tab-bar-lines. (gui_figure_window_size): Add new arg tabbar_p. (syms_of_frame): Add Qtab_bar_size, Qupdate_frame_tab_bar, Qfree_frame_tab_bar, Qtab_bar_lines, Stab_bar_pixel_width. Add Qtab_bar_lines to frame_inhibit_implied_resize. (tab-bar-mode): New variable. * src/frame.h (GCALIGNED_STRUCT): Add tab_bar_window, desired_tab_bar_string, current_tab_bar_string. (GCALIGNED_STRUCT): Add tab_bar_items, last_tab_bar_item, minimize_tab_bar_window_p, tab_bar_redisplayed, tab_bar_resized, tab_bar_lines, tab_bar_height, n_tab_bar_rows, n_tab_bar_items. (fset_tab_bar_items, fset_tab_bar_window) (fset_current_tab_bar_string, fset_desired_tab_bar_string): New inlines. (FRAME_TAB_BAR_LINES, FRAME_TAB_BAR_HEIGHT): New macros. (FRAME_TOP_MARGIN, FRAME_TOP_MARGIN_HEIGHT): Use FRAME_TAB_BAR_LINES. * src/fringe.c (draw_fringe_bitmap_1, update_window_fringes): Add WINDOW_TAB_LINE_HEIGHT. * src/gtkutil.c (xg_frame_set_char_size): Add FRAME_TABBAR_WIDTH. (x_wm_set_size_hint): Add FRAME_TABBAR_WIDTH. * src/keyboard.c (read_char): Handle Qtab_bar. (kbd_buffer_get_event): Handle TAB_BAR_EVENT. (make_lispy_position): Add WINDOW_TAB_LINE_HEIGHT. Handle TAB_BAR_EVENT. (tab_bar_items_vector, tab_bar_item_properties, ntab_bar_items): New internal variables. (tab_bar_items, process_tab_bar_item, set_prop_tab_bar) (parse_tab_bar_item, init_tab_bar_items, append_tab_bar_item): New functions. (read_char_x_menu_prompt, read_key_sequence): Handle Qtab_bar. (tab-bar-separator-image-expression): New variable. * src/keymap.c (syms_of_keymap): Add Qtab_bar and Qtab_line. * src/menu.c (x_popup_menu_1, Fx_popup_dialog): Handle Qtab_bar. * src/termhooks.h (enum event_kind): Add TAB_BAR_EVENT. (GCALIGNED_STRUCT): Add change_tab_bar_height_hook. * src/w32fns.c (w32_frame_parm_handlers): Add w32_set_tab_bar_lines. * src/w32term.c (w32_draw_window_cursor): Add WINDOW_TAB_LINE_HEIGHT. * src/window.c (window_body_height): Add WINDOW_TAB_LINE_HEIGHT. (Fwindow_tab_line_height): New function. (coordinates_in_window): Use window_wants_tab_line with CURRENT_TAB_LINE_HEIGHT. (window_relative_x_coord): Add ON_TAB_LINE. (Fcoordinates_in_window_p): Add ON_TAB_LINE. (window_from_coordinates): Add new arg tab_bar_p. (Fwindow_line_height): Use window_wants_tab_line with WINDOW_TAB_LINE_HEIGHT. (Fwindow_lines_pixel_dimensions): Add WINDOW_TAB_LINE_HEIGHT. (make_window): Set tab_line_height to -1. (window_wants_tab_line): New function. (window_internal_height): Use window_wants_tab_line. (window_scroll_pixel_based): Add WINDOW_TAB_LINE_HEIGHT. (Frecenter): Set minimize_tab_bar_window_p to 1. (GCALIGNED_STRUCT): Add frame_tab_bar_lines and frame_tab_bar_height. (Fcurrent_window_configuration): Set frame_tab_bar_lines and frame_tab_bar_height. (set_window_scroll_bars): Add WINDOW_TAB_LINE_HEIGHT. (syms_of_window): Add Qtab_line_format and Swindow_tab_line_height. * src/window.h (GCALIGNED_STRUCT): Add tab_line_height. (WINDOW_TAB_BAR_P, WINDOW_TAB_LINE_HEIGHT, WINDOW_TAB_LINE_LINES): New macros. (WINDOW_TOP_EDGE_Y, WINDOW_BOTTOM_EDGE_Y, WINDOW_TAB_LINE_HEIGHT): Add WINDOW_TAB_BAR_P. * src/xdisp.c (window_box_height): Add window_wants_tab_line with MATRIX_TAB_LINE_ROW and CURRENT_TAB_LINE_HEIGHT. (pos_visible_p): Use window_wants_tab_line. Add WINDOW_TAB_LINE_HEIGHT. (get_glyph_string_clip_rects): Add WINDOW_TAB_LINE_HEIGHT. (get_phys_cursor_geometry): Add WINDOW_TAB_LINE_HEIGHT. (remember_mouse_glyph): Use MATRIX_TAB_LINE_ROW for part ON_TAB_LINE. (init_iterator): Use MATRIX_TAB_LINE_ROW for TAB_LINE_FACE_ID. Add WINDOW_TAB_LINE_HEIGHT. Add window_wants_tab_line. (Fwindow_text_pixel_size): Add WINDOW_TAB_LINE_HEIGHT. (prepare_menu_bars): Call update_tab_bar. (update_tab_bar, build_desired_tab_bar_string) (display_tab_bar_line, tab_bar_height, Ftab_bar_height) (redisplay_tab_bar, tab_bar_item_info, get_tab_bar_item) (handle_tab_bar_click, note_tab_bar_highlight): New functions. (compute_window_start_on_continuation_line): Use window_wants_tab_line. (try_cursor_movement): Use window_wants_tab_line with CURRENT_TAB_LINE_HEIGHT. (redisplay_window): Use window_wants_tab_line with CURRENT_TAB_LINE_HEIGHT. (try_window_reusing_current_matrix): Use window_wants_tab_line with WINDOW_TAB_LINE_HEIGHT. (Fdump_tab_bar_row): New function. (compute_line_metrics): Add WINDOW_TAB_LINE_HEIGHT. (display_line): Use window_wants_tab_line. (display_mode_line): Set tab_line_p to true if face_id is TAB_LINE_FACE_ID. (Fformat_mode_line): Handle Qtab_line and Qtab_bar. (gui_clear_end_of_line): Add WINDOW_TAB_LINE_HEIGHT. (erase_phys_cursor): Use WINDOW_TAB_LINE_HEIGHT. (show_mouse_face): Use tab_bar_window. (note_mode_line_or_margin_highlight): Use MATRIX_TAB_LINE_ROW for area ON_TAB_LINE. (note_mouse_highlight): Call note_tab_bar_highlight, (expose_frame): Handle tab_bar_window. (syms_of_xdisp): Add Sdump_tab_bar_row and Stab_bar_height. (auto-resize-tab-bars, auto-raise-tab-bar-buttons) (tab-bar-border, tab-bar-button-margin, tab-bar-button-relief) (tab-bar-max-label-size): New variables. * src/xfaces.c (lookup_basic_face): Add TAB_LINE_FACE_ID and TAB_BAR_FACE_ID. (syms_of_xfaces): Define Qtab_bar and Qtab_line. * src/xfns.c (x_set_tab_bar_lines, x_change_tab_bar_height): New functions. (xic_set_statusarea): Add FRAME_TABBAR_TOP_HEIGHT. (frame_geometry): Add FRAME_TAB_BAR_HEIGHT and Qtab_bar_size. * src/xterm.c (x_draw_image_relief): Use tab_bar_button_relief. (x_draw_image_relief): Use TAB_BAR_FACE_ID. (handle_one_xevent): Handle tab_bar_window. (x_set_window_size_1): Add FRAME_TABBAR_WIDTH. (x_create_terminal): Set change_tab_bar_height_hook. * src/xterm.h (struct x_output): Add tabbar_top_height, tabbar_bottom_height, tabbar_left_width, tabbar_right_width tabbar_widget, tabbar_in_hbox, tabbar_is_packed. (FRAME_TABBAR_TOP_HEIGHT): Add FRAME_TABBAR_TOP_HEIGHT, FRAME_TABBAR_BOTTOM_HEIGHT, FRAME_TABBAR_HEIGHT, FRAME_TABBAR_LEFT_WIDTH, FRAME_TABBAR_RIGHT_WIDTH, FRAME_TABBAR_WIDTH.
* | * lisp/window.el (walk-windows): Simplify to use WINDOW arg of window-list-1Juri Linkov2019-09-191-6/+10
|/ | | | instead of calling select-window (bug#35385).
* Run quit-window-hook from the correct bufferLars Ingebrigtsen2019-08-231-1/+4
| | | | | * lisp/window.el (quit-window): Run the hook from the buffer specified by the WINDOW parameter.
* Call `quit-window-hook' in the `quit-window' command onlyLars Ingebrigtsen2019-08-211-6/+3
| | | | | | | | * lisp/window.el (quit-restore-window): Don't run quit-window-hook here... (quit-window): ... but here instead. Callers that call the former programmatically can decide themselves whether to call the hook. (quit-window-hook): Fix doc string.
* Add a new hook: `quit-window-hook'Lars Ingebrigtsen2019-08-191-2/+15
| | | | | | | | | | * doc/lispref/windows.texi (Quitting Windows): Mention in. * lisp/window.el (quit-restore-window): Run the new `quit-window-hook' before doing anything else (bug#9867). (quit-window): Note that the hook will be run in the doc string. * lisp/window.el (quit-window-hook): New variable.
* Issue a message on `C-x o' and there's no other windowLars Ingebrigtsen2019-08-171-0/+5
| | | | | * lisp/window.el (other-window): Issue a message when the user types `C-x o' and there's no other window to select (bug#10999).
* Issue a message on `C-x 1' when there's nothing to doLars Ingebrigtsen2019-08-171-1/+5
| | | | | * lisp/window.el (delete-other-windows): Make `C-x 1' issue a message when there's no other windows to delete (bug#10999).
* Fix doc-strings of 'display-buffer-*' functions (Bug#19461)Martin Rudalics2019-08-051-124/+186
| | | | | | | | | | | | | | * lisp/window.el (display-buffer-in-atom-window) (display-buffer-in-side-window, display-buffer-record-window) (display-buffer-use-some-frame, display-buffer-same-window) (display-buffer-reuse-window, display-buffer-pop-up-frame) (display-buffer-pop-up-window, display-buffer-in-child-frame) (display-buffer-in-direction, display-buffer-below-selected) (display-buffer-at-bottom, display-buffer-in-previous-window) (display-buffer-use-some-window) (display-buffer--maybe-pop-up-frame-or-window) (display-buffer--maybe-pop-up-frame): Fix doc-strings (Bug#19461).
* Improve documentation of 'display-buffer-*' functionsEli Zaretskii2019-08-031-10/+82
| | | | | | | | | | | | | | | | * lisp/window.el (display-buffer-in-atom-window) (display-buffer-in-side-window, display-buffer-same-window) (display-buffer--maybe-same-window) (display-buffer-reuse-window) (display-buffer-reuse-mode-window) (display-buffer-pop-up-frame, display-buffer-pop-up-window) (display-buffer--maybe-pop-up-frame-or-window) (display-buffer--maybe-pop-up-frame) (display-buffer-in-child-frame, display-buffer-in-direction) (display-buffer-below-selected, display-buffer-at-bottom) (display-buffer-in-previous-window) (display-buffer-use-some-window, display-buffer-no-window): More details about the ALIST argument in the doc string. (Bug#19461)
* Merge from origin/emacs-26Glenn Morris2019-07-301-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 8fbe462 (origin/emacs-26) ; * doc/lispref/positions.texi (List Motion... 1d9efc0 Add index for "\( in strings" (Bug#25195) 304e96f Fix doc-string of 'fit-window-to-buffer' (Bug#36848) d4c4987 Update view-mode docstring d6ca1fc ; * lisp/term.el: Add missing / to esc seq commentary. b3e2073 Fix subproc listening when setting filter to non-t (Bug#36591) f671950 * etc/NEWS.25: Belatedly announce rcirc-reconnect-delay. 7f42277 Mention term.el's \032 dir tracking in commentary (Bug#19524) 16a529e Remove upload functionality of package-x from the elisp manual 78e6c2a * etc/AUTHORS: Update. 086a56e Clarify Gravatar docs 0592467 * doc/lispref/display.texi (Defining Faces): Say a face can't... # Conflicts: # doc/emacs/programs.texi # etc/AUTHORS # lisp/term.el
| * Fix doc-string of 'fit-window-to-buffer' (Bug#36848)Martin Rudalics2019-07-301-1/+1
| | | | | | | | | | | | * lisp/window.el (fit-window-to-buffer): Fix doc-string. Suggested by Drew Adams <drew.adams@oracle.com>
* | Handle persistence of windows' scroll bar and fringes settings (Bug#36193)Martin Rudalics2019-07-221-19/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/lispref/display.texi (Fringe Size/Pos): Document new argument PERSISTENT of 'set-window-fringes'. (Scroll Bars): Document new argument PERSISTENT of 'set-window-scroll-bars'. Mention that HORIZONTAL-TYPE must be 'bottom' to show a horizontal scroll bar on mini windows. * lisp/window.el (window-min-pixel-height): For mini windows the minimum height is one line. (window--min-size-1): Use value returned by 'window-min-pixel-height' when dealing with mini windows. (window--resize-mini-window): Try to handle horizontal scroll bars and size restrictions more accurately. (window--state-put-2): Handle persistence of scroll bar settings. * src/frame.c (make_frame): Allow horizontal scroll bars in mini windows. (adjust_frame_size): Drop PIXELWISE argument in 'resize_frame_windows' calls. * src/window.c (set_window_buffer): Don't override WINDOW's scroll bar and fringe settings when marked as persistent. (resize_frame_windows): Drop fourth argument PIXELWISE - SIZE is always specified in terms of pixels. Try to handle height of mini windows more accurately. (grow_mini_window, shrink_mini_window): Use body height of mini window when calculating expected height change. Take horizontal scroll bars into account. (struct saved_window): Two new members to handle persistence of window fringes and scroll bars. (Fset_window_configuration, save_window_save): Handle persistence of fringes and scroll bars. (set_window_fringes, set_window_scroll_bars): New arguments PERSISTENT. Make dimension checks more accurate. (Fset_window_fringes): New argument PERSISTENT. (Fwindow_fringes, Fwindow_scroll_bars): Add PERSISTENT to return values. (Fset_window_scroll_bars): New argument PERSISTENT. In doc-string mention that 'bottom' must be specified to get a horizontal scroll bar in mini windows. (compare_window_configurations): Add checks for persistence of fringes and scroll bars. * src/window.h (struct window): New boolean slots 'fringes_persistent' and 'scroll_bars_persistent'. (WINDOW_HAS_HORIZONTAL_SCROLL_BAR): Allow horizontal scroll bars for mini windows. (resize_frame_windows): Remove fourth argument of 'resize_frame_windows' in external declaration. * src/xdisp.c (resize_mini_window): Use box text height to tell whether mini window height changed. (set_horizontal_scroll_bar): Set mini window's horizontal scroll bar when its type is specified as 'bottom'. * etc/NEWS: Mention new options for 'set-window-fringes' and 'set-window-scroll-bars'.
* | Have 'display-buffer-reuse-window' prefer window on selected frame (Bug#36680)Martin Rudalics2019-07-191-9/+22
| | | | | | | | | | | | | | | | * lisp/window.el (display-buffer-reuse-window): Preferably reuse window on selected frame (Bug#36680). * doc/lispref/windows.texi (Buffer Display Action Functions): Say that 'display-buffer-reuse-window' prefers window on the selected frame.
* | Revert "* lisp/calc/calc-ext.el (math-scalarp): Fix typo"Stefan Monnier2019-06-261-1/+1
| | | | | | | | This reverts commit 698ff554ac2699ec48fefc85a1307cbc4a183b0d.
* | * lisp/calc/calc-ext.el (math-scalarp): Fix typoStefan Monnier2019-06-261-1/+1
| |
* | Make winner restore point in all windows that display a bufferTino Calancha2019-06-251-0/+39
| | | | | | | | | | | | | | | | * lisp/window.el (window--before-delete-windows): New defun. (delete-window, delete-other-windows): Use it. * lisp/winner.el (winner-set): Use marker in 'window-prev-buffers' when available and different than the value returned by 'winner-get-point' (bug#23621).
* | Merge from origin/emacs-26Glenn Morris2019-06-151-7/+15
|\ \ | |/ | | | | | | | | | | | | | | f53ce87 ; ChangeLog.3 update eca2677 Fix description of 'display-buffer-in-previous-window' again ... 7be50cd Consistently use @minus{} for negative arguments # Conflicts: # ChangeLog.3
| * Fix description of 'display-buffer-in-previous-window' again (Bug#36161)Martin Rudalics2019-06-121-7/+15
| | | | | | | | | | | | | | | | | | | | | | * lisp/window.el (display-buffer-in-previous-window): Make doc-string more explicit (Bug#36161). * doc/lispref/windows.texi (Buffer Display Action Functions): Make description of 'display-buffer-in-previous-window' more explicit. (Buffer Display Action Alists): Mention 'display-buffer-in-previous-window' in description of 'reusable-frames' entry.
* | Merge from origin/emacs-26Glenn Morris2019-06-111-2/+5
|\ \ | |/ | | | | | | 5ca093d (origin/emacs-26) Fix doc of 'display-buffer-in-previous-wind... add2cac lisp/*.el: Minor docstring fixes
| * Fix doc of 'display-buffer-in-previous-window' (Bug#36161)Martin Rudalics2019-06-111-2/+5
| | | | | | | | | | | | | | * doc/lispref/windows.texi (Buffer Display Action Functions): * lisp/window.el (display-buffer-in-previous-window): Tell that 'display-buffer-in-previous-window' prefers non-selected windows (Bug#36161).
* | Add missing indentation declaration to a few macros.Philipp Stephani2019-06-111-3/+3
| | | | | | | | | | | | * lisp/window.el (with-temp-buffer-window) (with-current-buffer-window, with-displayed-buffer-window): Add missing indentation declaration
* | Consider line spacing and font height when deriving proc window sizeJohn Shahid2019-06-071-2/+4
| | | | | | | | | | | | | | * lisp/window.el (window-adjust-process-window-size): Use window-screen-lines instead of window-body-height. * lisp/term.el (term-mode): Use window-screen-lines to set the initial window height.
* | Go back to "Maintainer: emacs-devel@gnu.org"Paul Eggert2019-05-251-0/+1
| | | | | | | | | | | | Restore lines saying "Maintainer: emacs-devel@gnu.org" when there is no special maintainer for a file. Although this wasn't documented it was common practice and removing the lines didn't have consensus.
* | Fixes for "Maintainer:" and related linesPaul Eggert2019-05-191-1/+0
| | | | | | | | | | | | Mostly, this just removes "Maintainer: emacs-devel@gnu.org" lines, which are not that useful. It also cleans up and regularizes a few similar lines.
* | New buffer display action function 'display-buffer-in-direction'Martin Rudalics2019-05-191-0/+148
| | | | | | | | | | | | | | | | | | | | | | | | * lisp/window.el (windows-sharing-edge) (window--try-to-split-window-in-direction) (display-buffer-in-direction): New functions. * doc/lispref/windows.texi (Buffer Display Action Functions): Describe new action function 'display-buffer-in-direction'. (Buffer Display Action Alists): Describe new entry 'direction'. Amend description of 'window' entry. * etc/NEWS: Mention 'display-buffer-in-direction' and 'direction' and 'window' action alist entries.
* | Use display-graphic-p and display-multi-frame-p in more casesAlexander Gramiak2019-04-061-1/+3
| | | | | | | | | | | | | | | | | | * lisp/disp-table.el: * lisp/faces.el: * lisp/frame.el: * lisp/info.el (Info-fontify-node): * lisp/window.el (handle-select-window): Use display-graphic-p and display-multi-frame-p instead of explicit memq calls.
* | Rewrite minibuffer window resizing codeMartin Rudalics2019-03-111-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/frame.c (resize_mini_frames): New variable. * src/window.c (resize_mini_window_apply): New function. (grow_mini_window, shrink_mini_window): Remove PIXELWISE argument. Call resize_mini_window_apply to apply changes. (Fresize_mini_window_internal): Call resize_mini_window_apply to apply changes. (Qwindow__resize_mini_frame): New symbol. * src/window.h (grow_mini_window, shrink_mini_window): Adjust external declarations. * src/xdisp.c (resize_mini_window): For minibuffer-only frames call 'window--resize-mini-frame' if resize_mini_frames is non-nil. Offload parts of logic to grow_mini_window and shrink_mini_window which are now called without the PIXELWISE argument. (Vresize_mini_windows): Mention 'resize-mini-frames' in doc-string. * lisp/cus-start.el (resize-mini-frames): Add customization support. * lisp/window.el (window--resize-mini-window): Simplify code. (window--resize-mini-frame): New function. * doc/lispref/minibuf.texi (Minibuffer Windows): Describe new option 'resize-mini-frames'. * etc/NEWS: Mention new option 'resize-mini-frames'.
* | Merge from origin/emacs-26Glenn Morris2019-03-091-3/+21
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 0589de5 (origin/emacs-26) Fix markup of fake keys in the ELisp manual 82d4b98 Avoid errors in Auto Revert mode a3b1935 Mention empty strings in file name expansion, emacs lisp refe... a38da0d cc-mode.texi: Work around makeinfo alignment bug. Fix proble... 464ee80 Warn against recursive invocations of 'buffer-list-update-hoo... 60b5c10 Provide more details in doc-string of 'delete-windows-on' (Bu... f0be0f1 Improve documentation of 'delete-windows-on' f1bddc7 * lisp/frame.el (make-frame-command): Doc fix. (Bug#34715) 2848623 Avoid undefined behavior in gdb-mi.el dbf1837 * lisp/window.el (fit-frame-to-buffer): Make doc-string more ... 099ef44 Minor spelling and grammar fixes (bug#34756) 52fd400 Minor improvement of documentation of '(when CONDITION . SPEC)' f872b65 Improve documentation of 'auto-coding-functions' 04cad5e Fix visiting XML files with non-Unix EOL format a89fabe Update example major mode code in Elisp manual # Conflicts: # lisp/autorevert.el # lisp/window.el
| * Provide more details in doc-string of 'delete-windows-on' (Bug#34749)Martin Rudalics2019-03-081-3/+15
| | | | | | | | | | * lisp/window.el (delete-windows-on): Provide more details in doc-string (Bug#34749).
| * Improve documentation of 'delete-windows-on'Eli Zaretskii2019-03-081-0/+6
| | | | | | | | | | | | | | * doc/emacs/windows.texi (Change Window): Document 'delete-windows-on'. * lisp/window.el (delete-windows-on): Doc fix. (Bug#34749)
| * * lisp/window.el (fit-frame-to-buffer): Make doc-string more accurate.Martin Rudalics2019-03-061-4/+7
| |
* | ; * lisp/window.el (fit-frame-to-buffer): Fix once more.Martin Rudalics2019-03-061-1/+1
| |
* | * lisp/window.el (fit-frame-to-buffer): Make doc-string more accurate.Martin Rudalics2019-03-061-4/+7
| |
* | Fix handling of 'window-combination-resize' with fixed-size windowsMartin Rudalics2019-03-061-11/+33
| | | | | | | | | | | | | | | | * lisp/window.el (window-combinations): New optional argument IGNORE-FIXED. (window--combination-resizable): New function. (split-window): Fix handling of 'window-combination-resize' in the presence of fixed-size windows.
* | Fix interactive spec of some functions in window.el (Bug#34749)Martin Rudalics2019-03-051-3/+3
| | | | | | | | | | | | * lisp/window.el (delete-windows-on, quit-windows-on) (display-buffer-other-frame): Interactively, permit existing buffers only (Bug#34749).