- 04 Nov, 2011 1 commit
-
-
Eli Zaretskii authored
src/window.c (Fwindow_body_size): Mention in the doc string that the return value is in frame's canonical units. lisp/window.el (window-body-height, window-body-width): Mention in the doc string that the return values are in frame's canonical units. doc/lispref/windows.texi (Window Sizes): Mention in the doc string that the return values of `window-body-height' and `window-body-width' are in frame's canonical units.
-
- 01 Nov, 2011 1 commit
-
-
Martin Rudalics authored
* window.c (temp_output_buffer_show): Don't use Vtemp_buffer_show_specifiers. (Vtemp_buffer_show_specifiers): Remove unused variable. * help.el (with-help-window): Don't reference temp-buffer-show-specifiers in doc-string.
-
- 28 Oct, 2011 1 commit
-
-
Dan Nicolaescu authored
-
- 27 Oct, 2011 1 commit
-
-
Juanma Barranquero authored
-
- 15 Oct, 2011 1 commit
-
-
Martin Rudalics authored
* window.c (coordinates_in_window): Rewrite and delabelize vertical border check. (Bug#5357) (Bug#9618)
-
- 24 Sep, 2011 1 commit
-
-
Chong Yidong authored
Minor doc fixes for switch-to-buffer, window-prev-buffers, set-window-prev-buffers, set-window-next-buffers.
-
- 09 Sep, 2011 1 commit
-
-
Juanma Barranquero authored
-
- 08 Sep, 2011 1 commit
-
-
Martin Rudalics authored
* window.c (Fset_window_prev_buffers, Fset_window_next_buffers): Operate on live windows only. * window.el (window-deletable-p): Make sure window is live before invoking window-prev-buffers.
-
- 04 Sep, 2011 1 commit
-
-
Paul Eggert authored
(window_scroll_line_based, Frecenter): Check that an Emacs fixnum is in range before assigning it to 'int'. (Frecenter, Fmove_to_window_line): Use EMACS_INT, not int, for values converted from Emacs fixnums. (Frecenter): Don't wrap around a line count if it is out of 'int' range; instead, treat it as an extreme value. (Fset_window_configuration, compare_window_configurations): Use ptrdiff_t, not int, for index that might exceed 2 GiB.
-
- 05 Aug, 2011 1 commit
-
-
Eli Zaretskii authored
Add diagnostic facility for monitoring memory allocated for cache shelving. src/xdisp.c (display_line): Release buffer allocated for shelved bidi cache. (Bug#9221) src/bidi.c (bidi_shelve_cache, bidi_unshelve_cache): Track total amount allocated this far in `bidi_cache_total_alloc'. (bidi_unshelve_cache): Accept an additional argument JUST_FREE; if non-zero, only free the data buffer without restoring the cache contents. All callers changed. src/dispextern.h (bidi_unshelve_cache): Update prototype. src/xdisp.c (SAVE_IT, pos_visible_p, move_it_in_display_line_to) (move_it_in_display_line, move_it_to) (move_it_vertically_backward, move_it_by_lines): Replace the call to xfree to an equivalent call to bidi_unshelve_cache. (move_it_in_display_line_to): Fix logic of returning MOVE_POS_MATCH_OR_ZV in the bidi case.
-
- 19 Jul, 2011 1 commit
-
-
Paul Eggert authored
* character.c (lisp_string_width): * composite.c (composition_table_size, n_compositions) (get_composition_id, composition_gstring_from_id): * dispextern.h (struct glyph_string.cmp_id, struct composition_it.id): * xdisp.c (BUILD_COMPOSITE_GLYPH_STRING): * window.c (Frecenter): Use ptrdiff_t, not int, for composition IDs. * composite.c (get_composition_id): Check for integer overflow. * composite.h: Adjust prototypes to match the above changes.
-
- 12 Jul, 2011 1 commit
-
-
Lars Magne Ingebrigtsen authored
Fixes: debbugs:4199
-
- 05 Jul, 2011 1 commit
-
-
Eli Zaretskii authored
Solves crashes due to overflow of bidi cache stack. Make sure cache is saved and restored around all temporary iterations. src/dispnew.c (buffer_posn_from_coords): Save and restore the bidi cache around display iteration. src/window.c (Fwindow_end, window_scroll_pixel_based) (displayed_window_lines, Frecenter): Save and restore the bidi cache around display iteration. src/bidi.c (bidi_unshelve_cache): Ensure we have enough space before restoring the shelved cache. (bidi_cache_ensure_space): Don't assume the required size is just one BIDI_CACHE_CHUNK away. src/xdisp.c (back_to_previous_visible_line_start, reseat_1) (init_iterator): Empty the bidi cache "stack".
-
- 02 Jul, 2011 1 commit
-
-
Martin Rudalics authored
* window.h (window): Remove clone_number slot. * window.c (Fwindow_clone_number, Fset_window_clone_number): Remove. (make_parent_window, make_window, saved_window) (Fset_window_configuration, save_window_save): Don't deal with clone numbers. * buffer.c (Qclone_number): Remove declaration. (sort_overlays, overlay_strings): Don't deal with clone numbers. * window.el (window-state-get-1): Don't assign clone numbers. Add clone-of item to list of window parameters. (window-state-put-2): Don't process clone numbers. (display-buffer-alist): Fix doc-string.
-
- 29 Jun, 2011 1 commit
-
-
Martin Rudalics authored
* window.c (resize_root_window, grow_mini_window) (shrink_mini_window): Rename Qresize_root_window to Qwindow_resize_root_window and Qresize_root_window_vertically to Qwindow_resize_root_window_vertically. * window.el (normalize-live-buffer): Rename to window-normalize-buffer. (normalize-live-frame): Rename to window-normalize-frame. (normalize-any-window): Rename to window-normalize-any-window. (normalize-live-window): Rename to window-normalize-live-window. (make-window-atom): Rename to window-make-atom. (window-resize-reset): Rename to window--resize-reset. (window-resize-reset-1): Rename to window--resize-reset-1. (resize-mini-window): Rename to window--resize-mini-window. (resize-subwindows-skip-p): Rename to window--resize-subwindows-skip-p. (resize-subwindows-normal): Rename to window--resize-subwindows-normal. (resize-subwindows): Rename to window--resize-subwindows. (resize-other-windows): Rename to window--resize-siblings. (resize-this-window): Rename to window--resize-this-window. (resize-root-window): Rename to window--resize-root-window. (resize-root-window-vertically): Rename to window--resize-root-window-vertically. (normalize-buffer-to-display): Rename to window-normalize-buffer-to-display. (normalize-buffer-to-switch-to): Rename to window-normalize-buffer-to-switch-to. Correspondingly update all callers of the functions listed above. (display-buffer-alist, display-buffer-normalize-arguments) (display-buffer-normalize-options, display-buffer) (display-buffer-alist-set): Use "function" instead of "fun-with-args".
-
- 27 Jun, 2011 2 commits
-
-
Martin Rudalics authored
* window.c (resize_window_check): Rename to window_resize_check. (resize_window_apply): Rename to window_resize_apply. (Fresize_window_apply): Rename to Fwindow_resize_apply. (Fdelete_other_windows_internal, resize_frame_windows) (Fsplit_window_internal, Fdelete_window_internal) (grow_mini_window, shrink_mini_window) (Fresize_mini_window_internal): Fix callers accordingly. * window.el (resize-window-reset): Rename to window-resize-reset. (resize-window-reset-1): Rename to window-resize-reset-1. (resize-window): Rename to window-resize. (window-min-height, window-min-width) (resize-mini-window, resize-this-window, resize-root-window) (resize-root-window-vertically, adjust-window-trailing-edge) (enlarge-window, shrink-window, maximize-window) (minimize-window, delete-window, quit-restore-window) (split-window, balance-windows, balance-windows-area-adjust) (balance-windows-area, window-state-put-2) (display-buffer-even-window-sizes, display-buffer-set-height) (display-buffer-set-width, set-window-text-height) (fit-window-to-buffer): Rename all "resize-window" prefixed calls to use the "window-resize" prefix convention. (display-buffer-alist): Fix symbol for label specifier. (display-buffer-reuse-window): Set reuse-dedicated to cdr of corresponding specifier. Reported by Juanma Barranquero <lekktu@gmail.com>.
-
Martin Rudalics authored
* window.c (Fwindow_vchild): Rename to Fwindow_top_child. (Fwindow_hchild): Rename to Fwindow_left_child. (Fwindow_next): Rename to Fwindow_next_sibling. (Fwindow_prev): Rename to Fwindow_prev_sibling. * window.el (window-right, window-left, window-child) (window-child-count, window-last-child) (window-iso-combination-p, walk-window-tree-1) (window-atom-check-1, window-tree-1, delete-window) (window-state-get-1, display-buffer-even-window-sizes): Adapt to new naming conventions - window-vchild, window-hchild, window-next and window-prev are now called window-top-child, window-left-child, window-next-sibling and window-prev-sibling respectively.
-
- 24 Jun, 2011 1 commit
-
-
Juanma Barranquero authored
-
- 12 Jun, 2011 1 commit
-
-
Martin Rudalics authored
* frame.c (make_frame): Call other_buffer_safely instead of other_buffer. * window.c (temp_output_buffer_show): Call display_buffer with second argument Vtemp_buffer_show_specifiers and reset latter immediately after the call. (Vtemp_buffer_show_specifiers): New variable. (auto_window_vscroll_p, next_screen_context_lines) (Vscroll_preserve_screen_position): Remove leading asterisks from doc-strings.
-
- 11 Jun, 2011 3 commits
-
-
Paul Eggert authored
(record_buffer, Funrecord_buffer): Rename local to avoid shadowing. (record_buffer): Remove unused local. * frame.c (other_visible_frames, frame_buffer_list): Now static. (set_frame_buffer_list): Remove; unused. * frame.h (other_visible_frames): Remove decl. * keyboard.h (menu_items_inuse): Declare only if USE_GTK || USE_MOTIF. * lisp.h (frame_buffer_list, set_frame_buffer_list): Remove decls. (add_gpm_wait_descriptor, delete_gpm_wait_descriptor): Declare only if HAVE_GPM. * menu.c (menu_items_inuse): Now static unless USE_GTK || USE_MOTIF. * process.c (add_gpm_wait_descriptor, delete_gpm_wait_descriptor): Define only if HAVE_GPM. * widget.c (EmacsFrameResize, emacsFrameClassRec): Now static. (update_hints_inhibit): Remove; never set. All uses removed. * widgetprv.h (emacsFrameClassRec): Remove decl. * window.c (delete_deletable_window): Now returns void, since it wasn't returning anything. (compare_window_configurations): Remove unused locals. * xfns.c (x_set_scroll_bar_default_width): Remove unused locals. * xmenu.c (x_menu_set_in_use): Define only if USE_GTK || USE_MOTIF. Omit no-longer-needed #ifdef USE_X_TOOLKIT, since USE_X_TOOLKIT is implied by USE_GTK || USE_MOTIF. (dialog_selection_callback) [!USE_GTK]: Prefer intptr_t for integers the same widths as pointers. This follows up on the 2011-05-06 patch. * xterm.c (x_alloc_lighter_color_for_widget): Define only if USE_LUCID. * xterm.h: Likewise. (x_menu_set_in_use): Declare only if USE_GTK || USE_MOTIF.
-
Martin Rudalics authored
* window.c (delete_deletable_window): Re-add. (Fset_window_configuration): Rewrite to handle dead buffers and consequently deletable windows. (window_tree, Fwindow_tree): Remove. Supply functionality in window.el. (compare_window_configurations): Simplify code. * window.el (window-tree-1, window-tree): New functions, moving the latter to window.el. (bw-get-tree, bw-get-tree-1, bw-find-tree-sub) (bw-find-tree-sub-1, bw-l, bw-t, bw-r, bw-b, bw-dir, bw-eqdir) (bw-refresh-edges): Remove. (balance-windows-1, balance-windows-2): New functions. (balance-windows): Rewrite in terms of window tree functions, balance-windows-1 and balance-windows-2. (bw-adjust-window): Remove. (balance-windows-area-adjust): New function with functionality of bw-adjust-window but using resize-window. (set-window-text-height): Rewrite doc-string. Use normalize-live-window and resize-window. (enlarge-window-horizontally, shrink-window-horizontally): Rename argument to DELTA. (window-buffer-height): New function. (fit-window-to-buffer, shrink-window-if-larger-than-buffer): Rewrite using new window resize routines. (kill-buffer-and-window, mouse-autoselect-window-select): Use ignore-errors instead of condition-case. (quit-window): Call delete-frame instead of delete-windows-on for the only buffer on frame.
-
Martin Rudalics authored
* buffer.c: New Lisp objects Qbuffer_list_update_hook and Qclone_number. Remove external declaration of Qdelete_window. (Fbuffer_list): Rewrite doc-string. Minor restructuring of code. (Fget_buffer_create, Fmake_indirect_buffer, Frename_buffer): Run Qbuffer_list_update_hook if allowed. (Fother_buffer): Rewrite doc-string. Major rewrite for new buffer list implementation. (other_buffer_safely): New function. (Fkill_buffer): Replace call to replace_buffer_in_all_windows by calls to replace_buffer_in_windows and replace_buffer_in_windows_safely. Run Qbuffer_list_update_hook if allowed. (record_buffer): Inhibit quitting and rewrite using quittable functions. Run Qbuffer_list_update_hook if allowed. (Frecord_buffer, Funrecord_buffer): New functions. (switch_to_buffer_1, Fswitch_to_buffer): Remove. Move switch-to-buffer to window.el. (bury-buffer): Move to window.el. (Vbuffer_list_update_hook): New variable. * lisp.h (other_buffer_safely): Add prototype in buffer.c section. * window.h (resize_frame_windows): Move up in code. (Fwindow_frame): Remove EXFUN. (replace_buffer_in_all_windows): Remove prototype. (replace_buffer_in_windows_safely): Add prototype. * window.c: Declare Qdelete_window static again. Move down declaration of select_count. (Fnext_window, Fprevious_window): Rewrite doc-strings. (Fother_window): Move to window.el. (window_loop): Remove DELETE_BUFFER_WINDOWS and UNSHOW_BUFFER cases. Add REPLACE_BUFFER_IN_WINDOWS_SAFELY case. (Fdelete_windows_on, Freplace_buffer_in_windows): Move to window.el. (replace_buffer_in_windows): Implement by calling Qreplace_buffer_in_windows. (replace_buffer_in_all_windows): Remove with some functionality moved into replace_buffer_in_windows_safely. (replace_buffer_in_windows_safely): New function. (select_window_norecord, select_frame_norecord): Move in front of run_window_configuration_change_hook. Remove now obsolete declarations. (Fset_window_buffer): Rewrite doc-string. Call Qrecord_window_buffer. (keys_of_window): Move binding for other-window to window.el. * loadup.el (top-level): Load window before files for the sake of replace-buffer-in-windows. * files.el (read-buffer-to-switch) (switch-to-buffer-other-window) (switch-to-buffer-other-frame, display-buffer-other-frame): Move to window.el. * simple.el (get-next-valid-buffer, last-buffer, next-buffer) (previous-buffer): Move to window.el. * bindings.el (unbury-buffer): Move to window.el. * window.el (delete-other-windows-vertically): Move after definition of delete-other-windows. (other-window, delete-windows-on, replace-buffer-in-windows): Move here from window.c. (record-window-buffer, unrecord-window-buffer) (set-window-buffer-start-and-point, switch-to-prev-buffer) (switch-to-next-buffer): New functions. (get-next-valid-buffer, last-buffer, next-buffer): Move here from simple.el. Call switch-to-next-buffer. (previous-buffer): Move here from simple.el. Call switch-to-prev-buffer. (bury-buffer): Move here from buffer.c. Switch to previous buffer when window cannot be deleted. (unbury-buffer): Move here from bindings.el. (ctl-x-map): Move binding for other-window from window.c to here. (read-buffer-to-switch, switch-to-buffer-other-window) (switch-to-buffer-other-frame): Move here from files.el. (normalize-buffer-to-switch-to): New functions. (switch-to-buffer): Move here from buffer.c. Use read-buffer-to-switch and normalize-buffer-to-switch-to.
-
- 10 Jun, 2011 4 commits
-
-
Paul Eggert authored
* data.c (Qcompiled_function, Qframe, Qvector): * image.c (QimageMagick, Qsvg): * minibuf.c (Qmetadata): * window.c (resize_window_check, resize_root_window): Now static. * window.h (resize_window_check, resize_root_window): Remove decls.
-
Paul Eggert authored
(window_deletion_count, delete_deletable_window): Remove; unused. (window_body_lines): Now static. (Fdelete_other_windows_internal): Mark vars as initialized. Make sure 'resize_failed' is initialized. (run_window_configuration_change_hook): Rename local to avoid shadowing. (resize_window_apply): Remove unused local. * window.h (delete_deletable_window): Remove decl.
-
Eli Zaretskii authored
src/window.h (resize_frame_windows, resize_window_check) (delete_deletable_window, resize_root_window) (resize_frame_windows): Declare prototypes. src/ window.c (resize_window_apply): Make definition be "static" to match the prototype.
-
Martin Rudalics authored
* window.c: Remove declarations of Qwindow_size_fixed, window_min_size_1, window_min_size_2, window_min_size, size_window, window_fixed_size_p, enlarge_window, delete_window. Remove static from declaration of Qdelete_window, it's temporarily needed by Fbury_buffer. (replace_window): Don't assign orig_top_line and orig_total_lines. (Fdelete_window, delete_window): Remove. Window deletion is handled by window.el. (window_loop): Remove DELETE_OTHER_WINDOWS case. Replace Fdelete_window calls with calls to Qdelete_window. (Fdelete_other_windows): Remove. Deleting other windows is handled by window.el. (window_fixed_size_p): Remove. Fixed-sizeness of windows is handled in window.el. (window_min_size_2, window_min_size_1, window_min_size): Remove. Window minimum sizes are handled in window.el. (shrink_windows, size_window, set_window_height) (set_window_width, change_window_heights, window_height) (window_width, CURBEG, CURSIZE, enlarge_window) (adjust_window_trailing_edge, Fadjust_window_trailing_edge) (Fenlarge_window, Fshrink_window): Remove. Window resizing is handled in window.el. (make_dummy_parent): Rename to make_parent_window and give it a second argument horflag. (make_window): Don't set resize_proportionally any more. (Fsplit_window): Remove. Windows are split in window.el. (save_restore_action, save_restore_orig_size) (shrink_window_lowest_first, save_restore_orig_size): Remove. Resize mini windows in window.el. (grow_mini_window, shrink_mini_window): Implement by calling Qresize_root_window_vertically, resize_window_check and resize_window_apply. (saved_window, Fset_window_configuration, save_window_save): Do not handle orig_top_line, orig_total_lines, and resize_proportionally. (window_min_height, window_min_width): Move to window.el. (keys_of_window): Move bindings for delete-other-windows, split-window, delete-window and enlarge-window to window.el. * buffer.c: Temporarily extern Qdelete_window. (Fbury_buffer): Temporarily call Qdelete_window instead of Fdelete_window (Fbury_buffer will move to window.el soon). * frame.c (set_menu_bar_lines_1): Remove code handling orig_top_line and orig_total_lines. * dispnew.c (adjust_frame_glyphs_initially): Don't use set_window_height but set heights directly. (change_frame_size_1): Use resize_frame_windows. * xdisp.c (init_xdisp): Don't use set_window_height but set heights directly. * xfns.c (x_set_menu_bar_lines, x_set_tool_bar_lines): Use resize_frame_windows instead of change_window_heights and run run_window_configuration_change_hook. * w32fns.c (x_set_tool_bar_lines): Use resize_frame_windows instead of change_window_heights and run run_window_configuration_change_hook. * window.el (window-min-height, window-min-width): Move here from window.c. Add defcustoms and rewrite doc-strings. (resize-mini-window, resize-window): New functions. (adjust-window-trailing-edge, enlarge-window, shrink-window): Move here from window.c. (maximize-window, minimize-window): New functions. (delete-window, delete-other-windows, split-window): Move here from window.c. (window-split-min-size): New function. (split-window-keep-point): Mention split-window-above-each-other instead of split-window-vertically. (split-window-above-each-other, split-window-vertically): Rename split-window-vertically to split-window-above-each-other and provide defalias for old definition. (split-window-side-by-side, split-window-horizontally): Rename split-window-horizontally to split-window-side-by-side and provide defalias for the old definition. (ctl-x-map): Move bindings for delete-window, delete-other-windows and enlarge-window here from window.c. Replace bindings for split-window-vertically and split-window-horizontally by bindings for split-window-above-each-other and split-window-side-by-side. * cus-start.el (all): Remove entries for window-min-height and window-min-width. Add entries for window-splits and window-nest.
-
- 09 Jun, 2011 1 commit
-
-
Martin Rudalics authored
* window.c (replace_window): Rename second argument REPLACEMENT to NEW. New third argument SETFLAG. Rewrite. (delete_window, make_dummy_parent): Call replace_window with third argument 1. (window_list_1): Move down in code. (run_window_configuration_change_hook): Move set_buffer part before select_frame_norecord part in order to unwind correctly. Rename count1 to count. (recombine_windows, delete_deletable_window, resize_root_window) (Fdelete_other_windows_internal) (Frun_window_configuration_change_hook, make_parent_window) (resize_window_check, resize_window_apply, Fresize_window_apply) (resize_frame_windows, Fsplit_window_internal) (Fdelete_window_internal, Fresize_mini_window_internal): New functions. (syms_of_window): New variables Vwindow_splits and Vwindow_nest.
-
- 08 Jun, 2011 4 commits
-
-
Paul Eggert authored
-
Martin Rudalics authored
* window.c: (WINDOW_TOTAL_SIZE, MIN_SAFE_WINDOW_WIDTH) (MIN_SAFE_WINDOW_HEIGHT): Really remove them from window.c. (syms_of_window): New Lisp objects Qrecord_window_buffer, Qwindow_deletable_p, Qdelete_window, Qreplace_buffer_in_windows, Qget_mru_window, Qresize_root_window, Qresize_root_window_vertically, Qsafe, Qabove, Qbelow, Qauto_buffer_name; staticpro them.
-
Martin Rudalics authored
* window.h (window): Add some new members to window structure - normal_lines, normal_cols, new_total, new_normal, clone_number, splits, nest, prev_buffers, next_buffers. (WINDOW_TOTAL_SIZE): Move here from window.c. (MIN_SAFE_WINDOW_WIDTH, MIN_SAFE_WINDOW_HEIGHT): Define. * window.c (WINDOW_TOTAL_SIZE): Move to window.h. (make_dummy_parent): Set new members of windows structure. (make_window): Move down in code. Handle new members of window structure. (Fwindow_clone_number, Fwindow_splits, Fset_window_splits) (Fwindow_nest, Fset_window_nest, Fwindow_new_total) (Fwindow_normal_size, Fwindow_new_normal, Fwindow_prev_buffers) (Fset_window_prev_buffers, Fwindow_next_buffers) (Fset_window_next_buffers, Fset_window_clone_number): New functions. (Fwindow_hscroll, Fwindow_at, Fwindow_point, Fwindow_start) (Fwindow_end, Fwindow_line_height, Fset_window_dedicated_p): Doc-string fixes. (Fwindow_parameters, Fwindow_parameter, Fset_window_parameter): Argument WINDOW can be now internal window too. (Fwindow_use_time): Move up in code. (Fget_buffer_window): Rename argument FRAME to ALL-FRAMES. Rewrite doc-string. (Fset_window_configuration, saved_window) (Fcurrent_window_configuration, save_window_save): Handle new members of window structure.
-
Martin Rudalics authored
* window.c (Fwindow_height, Fwindow_width, Fwindow_full_width_p): Remove. * window.el (window-height): Defalias to window-total-height. (window-width): Defalias to window-body-width.
-
- 07 Jun, 2011 3 commits
-
-
Martin Rudalics authored
* window.c (window_loop): Remove handling of GET_LRU_WINDOW and GET_LARGEST_WINDOW. (Fget_lru_window, Fget_largest_window): Move to window.el. * window.el (get-lru-window, get-largest-window): Move here from window.c. Rename first argument to ALL-FRAMES. Rephrase doc-strings. (get-buffer-window-list): Rewrite using window-list-1. Rephrase doc-string.
-
Martin Rudalics authored
* window.c (delete_window, Fset_window_configuration): Call delete_all_subwindows with window as argument. (delete_all_subwindows): Take a window as argument and not a structure. Rewrite. * window.h: delete_all_subwindows now takes a Lisp_Object as argument. * frame.c (delete_frame): Call delete_all_subwindows with root window as argument.
-
Martin Rudalics authored
* window.c (Fwindow_total_size, Fwindow_left_column) (Fwindow_top_line, window_body_lines, Fwindow_body_size) (Fwindow_list_1): New functions. (window_box_text_cols): Replace with window_body_cols. (Fwindow_width, Fscroll_left, Fscroll_right): Use window_body_cols instead of window_box_text_cols. * window.h: Extern window_body_cols instead of window_box_text_cols. * indent.c (compute_motion, Fcompute_motion): Use window_body_cols instead of window_box_text_cols.
-
- 06 Jun, 2011 3 commits
-
-
Martin Rudalics authored
* lisp.h: Move EXFUNS for Fframe_root_window, Fframe_first_window and Fset_frame_selected_window to window.h. * window.h: Move EXFUNS for Fframe_root_window, Fframe_first_window and Fset_frame_selected_window here from lisp.h. * frame.c (Fwindow_frame, Fframe_first_window) (Fframe_root_window, Fframe_selected_window) (Fset_frame_selected_window): Move to window.c. (Factive_minibuffer_window): Move to minibuf.c. (Fother_visible_frames_p): New function. * minibuf.c (Factive_minibuffer_window): Move here from frame.c. * window.c (Fwindow_frame): Move here from frame.c. Accept any window as argument. (Fframe_root_window, Fframe_first_window) (Fframe_selected_window): Move here from frame.c. Accept frame or arbitrary window as argument. Update doc-strings. (Fminibuffer_window): Move up in code. (Fwindow_minibuffer_p): Move up in code and simplify. (Fset_frame_selected_window): Move here from frame.c. Marginal rewrite. (Fselected_window, select_window, Fselect_window): Move up in code. Minor doc-string fixes.
-
Martin Rudalics authored
(Fwindow_buffer): Move up and rewrite doc-string. (Fwindow_parent, Fwindow_vchild, Fwindow_hchild, Fwindow_next) (Fwindow_prev): New functions.
-
Martin Rudalics authored
* window.c (decode_window, decode_any_window): Move up in code. (Fwindowp, Fwindow_live_p): Rewrite doc-strings. (inhibit_frame_unsplittable): Remove unused variable.
-
- 11 May, 2011 1 commit
-
-
Paul Eggert authored
-
- 09 May, 2011 1 commit
-
-
Eli Zaretskii authored
Backport revisions 2011-04-24T05:30:24Z!eggert@cs.ucla.edu..2011-04-25T19:40:22Z!eggert@cs.ucla.edu (inclusive) from trunk (bug#8623) The next log entry shows the actual changes by Paul Eggert. Fix a problem with aliasing and vector headers. GCC 4.6.0 optimizes based on type-based alias analysis. For example, if b is of type struct buffer * and v of type struct Lisp_Vector *, then gcc -O2 was incorrectly assuming that &b->size != &v->size, and therefore "v->size = 1; b->size = 2; return v->size;" must therefore return 1. This assumption is incorrect for Emacs, since it type-puns struct Lisp_Vector * with many other types. To fix this problem, this patch adds a new type struct vector_header that documents the constraints on layout of vectors and pseudovectors, and helps optimizing compilers not get fooled by Emacs's type punning. It also adds the macros XSETTYPED_PVECTYPE XSETTYPED_PSEUDOVECTOR, TYPED_PSEUDOVECTORP, for similar reasons. src/lisp.h (XVECTOR_SIZE): New convenience macro. All previous uses of XVECTOR (foo)->size replaced to use this macro, to avoid the hassle of writing XVECTOR (foo)->header.size. src/lisp.h: Say "vectorlike header" rather than "vector header. (struct vectorlike_header): Rename from struct vector_header. (XVECTORLIKE_HEADER_SIZE): Renamed from XVECTOR_HEADER_SIZE. All uses changed. (XVECTOR_HEADER_SIZE): New macro, for use in XSETPSEUDOVECTOR. (XSETTYPED_PVECTYPE): New macro, specifying the name of the size member. (XSETPVECTYPE): Rewrite in terms of new macro. (XSETPVECTYPESIZE): New macro, specifying both type and size. This is a bit clearer, and further avoids the possibility of undesirable aliasing. (XSETTYPED_PSEUDOVECTOR): New macro, specifying the size. (XSETPSEUDOVECTOR): Rewrite in terms of XSETTYPED_PSEUDOVECTOR and XVECTOR_HEADER_SIZE. (XSETSUBR): Rewrite in terms of XSETTYPED_PSEUDOVECTOR and XSIZE, since Lisp_Subr is a special case (no "next" field). (ASIZE): Rewrite in terms of XVECTOR_SIZE. (struct vector_header): New type. (TYPED_PSEUDOVECTORP): New macro, also specifying the C type of the object, to help avoid aliasing. (PSEUDOVECTORP): Rewrite in terms of TYPED_PSEUDOVECTORP. (SUBRP): Likewise, since Lisp_Subr is a special case. src/lisp.h (struct Lisp_Vector, struct Lisp_Char_Table): (struct Lisp_Sub_Char_Table, struct Lisp_Bool_Vector): (struct Lisp_Hash_Table): Combine first two members into a single struct vector_header member. All uses of "size" and "next" members changed to be "header.size" and "header.next". src/buffer.h (struct buffer): Likewise. src/font.h (struct font_spec, struct font_entity, struct font): Likewise. src/frame.h (struct frame): Likewise. src/process.h (struct Lisp_Process): Likewise. src/termhooks.h (struct terminal): Likewise. src/window.c (struct save_window_data, struct saved_window): Likewise. src/window.h (struct window): Likewise. src/alloc.c (allocate_buffer, Fmake_bool_vector, allocate_pseudovector): Use XSETPVECTYPESIZE, not XSETPVECTYPE, to avoid aliasing problems. src/buffer.c (init_buffer_once): Likewise. src/lread.c (defsubr): Use XSETTYPED_PVECTYPE, since Lisp_Subr is a special case. src/process.c (Fformat_network_address): Use local var for size, for brevity. src/fns.c (vector): Remove; this old hack is no longer needed. src/bytecode.c (exec_byte_code): Don't use XVECTOR before CHECK_VECTOR.
-
- 29 Apr, 2011 1 commit
-
-
Eli Zaretskii authored
src/window.c (window_scroll_line_based): Use a marker instead of simple variables to record original value of point.
-