aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMartin Rudalics2014-09-25 09:01:35 +0200
committerMartin Rudalics2014-09-25 09:01:35 +0200
commit340e4cce7aaa1de72d384e4889f0f8aa65025874 (patch)
treee7d176a1736129a32d195a2f763661e32dece05e /src
parent2494447b719e8d50eee6fc04b83b44b957b67957 (diff)
downloademacs-340e4cce7aaa1de72d384e4889f0f8aa65025874.tar.gz
emacs-340e4cce7aaa1de72d384e4889f0f8aa65025874.zip
Remove code left dead after 2014-07-27 changes.
* frame.c (frame_inhibit_resize): * widget.c (EmacsFrameResize): * window.c (resize_frame_windows, Fset_window_configuration): * xdisp.c (expose_frame): * xfns.c (x_change_tool_bar_height): * xmenu.c (update_frame_menubar): * xterm.c (handle_one_xevent, x_new_font, x_set_window_size_1): Remove code left dead after 2014-07-27 changes.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog11
-rw-r--r--src/frame.c15
-rw-r--r--src/widget.c9
-rw-r--r--src/window.c416
-rw-r--r--src/xdisp.c2
-rw-r--r--src/xfns.c2
-rw-r--r--src/xmenu.c8
-rw-r--r--src/xterm.c26
8 files changed, 12 insertions, 477 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 74576709ffa..e6805691ecb 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,14 @@
12014-09-25 Martin Rudalics <rudalics@gmx.at>
2
3 * frame.c (frame_inhibit_resize):
4 * widget.c (EmacsFrameResize):
5 * window.c (resize_frame_windows, Fset_window_configuration):
6 * xdisp.c (expose_frame):
7 * xfns.c (x_change_tool_bar_height):
8 * xmenu.c (update_frame_menubar):
9 * xterm.c (handle_one_xevent, x_new_font, x_set_window_size_1):
10 Remove code left dead after 2014-07-27 changes.
11
12014-09-25 Paul Eggert <eggert@cs.ucla.edu> 122014-09-25 Paul Eggert <eggert@cs.ucla.edu>
2 13
3 Fix local_cons etc. to not exhaust the stack when in a loop. 14 Fix local_cons etc. to not exhaust the stack when in a loop.
diff --git a/src/frame.c b/src/frame.c
index 75bb7e45105..f1d8662aff1 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -219,21 +219,6 @@ frame_inhibit_resize (struct frame *f, bool horizontal)
219 || FRAME_TERMCAP_P (f) || FRAME_MSDOS_P (f)); 219 || FRAME_TERMCAP_P (f) || FRAME_MSDOS_P (f));
220} 220}
221 221
222#if 0
223bool
224frame_inhibit_resize (struct frame *f, bool horizontal)
225{
226 Lisp_Object fullscreen = get_frame_param (f, Qfullscreen);
227
228 return (frame_inhibit_implied_resize
229 || EQ (fullscreen, Qfullboth)
230 || EQ (fullscreen, Qfullscreen)
231 || EQ (fullscreen, Qmaximized)
232 || (horizontal && EQ (fullscreen, Qfullwidth))
233 || (!horizontal && EQ (fullscreen, Qfullheight)));
234}
235#endif
236
237static void 222static void
238set_menu_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval) 223set_menu_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
239{ 224{
diff --git a/src/widget.c b/src/widget.c
index b5b76bb306b..baa6a2ab917 100644
--- a/src/widget.c
+++ b/src/widget.c
@@ -579,15 +579,6 @@ EmacsFrameResize (Widget widget)
579 if (true || frame_resize_pixelwise) 579 if (true || frame_resize_pixelwise)
580 { 580 {
581 int width, height; 581 int width, height;
582/** int width = (ew->core.width **/
583/** - FRAME_SCROLL_BAR_AREA_WIDTH (f) **/
584/** - FRAME_TOTAL_FRINGE_WIDTH (f) **/
585/** - 2 * FRAME_INTERNAL_BORDER_WIDTH (f)); **/
586
587/** int height = (ew->core.height **/
588/** - FRAME_TOOLBAR_HEIGHT (f) **/
589/** - FRAME_SCROLL_BAR_AREA_HEIGHT (f) **/
590/** - 2 * FRAME_INTERNAL_BORDER_WIDTH (f)); **/
591 582
592 pixel_to_text_size (ew, ew->core.width, ew->core.height, &width, &height); 583 pixel_to_text_size (ew, ew->core.width, ew->core.height, &width, &height);
593 change_frame_size (f, width, height, 0, 1, 0, 1); 584 change_frame_size (f, width, height, 0, 1, 0, 1);
diff --git a/src/window.c b/src/window.c
index ce651abdda9..f05ea561263 100644
--- a/src/window.c
+++ b/src/window.c
@@ -4163,7 +4163,6 @@ resize_frame_windows (struct frame *f, int size, bool horflag, bool pixelwise)
4163 new_pixel_size = max (horflag 4163 new_pixel_size = max (horflag
4164 ? size 4164 ? size
4165 : (size 4165 : (size
4166/** - FRAME_TOP_MARGIN_HEIGHT (f) **/
4167 - ((FRAME_HAS_MINIBUF_P (f) 4166 - ((FRAME_HAS_MINIBUF_P (f)
4168 && !FRAME_MINIBUF_ONLY_P (f)) 4167 && !FRAME_MINIBUF_ONLY_P (f))
4169 ? FRAME_LINE_HEIGHT (f) : 0)), 4168 ? FRAME_LINE_HEIGHT (f) : 0)),
@@ -4175,7 +4174,6 @@ resize_frame_windows (struct frame *f, int size, bool horflag, bool pixelwise)
4175 new_size = max (horflag 4174 new_size = max (horflag
4176 ? size 4175 ? size
4177 : (size 4176 : (size
4178/** - FRAME_TOP_MARGIN (f) **/
4179 - ((FRAME_HAS_MINIBUF_P (f) 4177 - ((FRAME_HAS_MINIBUF_P (f)
4180 && !FRAME_MINIBUF_ONLY_P (f)) 4178 && !FRAME_MINIBUF_ONLY_P (f))
4181 ? 1 : 0)), 4179 ? 1 : 0)),
@@ -6462,420 +6460,6 @@ the return value is nil. Otherwise the value is t. */)
6462} 6460}
6463 6461
6464 6462
6465#if 0
6466DEFUN ("set-window-configuration", Fset_window_configuration,
6467 Sset_window_configuration, 1, 1, 0,
6468 doc: /* Set the configuration of windows and buffers as specified by CONFIGURATION.
6469CONFIGURATION must be a value previously returned
6470by `current-window-configuration' (which see).
6471If CONFIGURATION was made from a frame that is now deleted,
6472only frame-independent values can be restored. In this case,
6473the return value is nil. Otherwise the value is t. */)
6474 (Lisp_Object configuration)
6475{
6476 register struct save_window_data *data;
6477 struct Lisp_Vector *saved_windows;
6478 Lisp_Object new_current_buffer;
6479 Lisp_Object frame;
6480 struct frame *f;
6481 ptrdiff_t old_point = -1;
6482
6483 CHECK_WINDOW_CONFIGURATION (configuration);
6484
6485 data = (struct save_window_data *) XVECTOR (configuration);
6486 saved_windows = XVECTOR (data->saved_windows);
6487
6488 new_current_buffer = data->current_buffer;
6489 if (!BUFFER_LIVE_P (XBUFFER (new_current_buffer)))
6490 new_current_buffer = Qnil;
6491 else
6492 {
6493 if (XBUFFER (new_current_buffer) == current_buffer)
6494 /* The code further down "preserves point" by saving here PT in
6495 old_point and then setting it later back into PT. When the
6496 current-selected-window and the final-selected-window both show
6497 the current buffer, this suffers from the problem that the
6498 current PT is the window-point of the current-selected-window,
6499 while the final PT is the point of the final-selected-window, so
6500 this copy from one PT to the other would end up moving the
6501 window-point of the final-selected-window to the window-point of
6502 the current-selected-window. So we have to be careful which
6503 point of the current-buffer we copy into old_point. */
6504 if (EQ (XWINDOW (data->current_window)->contents, new_current_buffer)
6505 && WINDOWP (selected_window)
6506 && EQ (XWINDOW (selected_window)->contents, new_current_buffer)
6507 && !EQ (selected_window, data->current_window))
6508 old_point = marker_position (XWINDOW (data->current_window)->pointm);
6509 else
6510 old_point = PT;
6511 else
6512 /* BUF_PT (XBUFFER (new_current_buffer)) gives us the position of
6513 point in new_current_buffer as of the last time this buffer was
6514 used. This can be non-deterministic since it can be changed by
6515 things like jit-lock by mere temporary selection of some random
6516 window that happens to show this buffer.
6517 So if possible we want this arbitrary choice of "which point" to
6518 be the one from the to-be-selected-window so as to prevent this
6519 window's cursor from being copied from another window. */
6520 if (EQ (XWINDOW (data->current_window)->contents, new_current_buffer)
6521 /* If current_window = selected_window, its point is in BUF_PT. */
6522 && !EQ (selected_window, data->current_window))
6523 old_point = marker_position (XWINDOW (data->current_window)->pointm);
6524 else
6525 old_point = BUF_PT (XBUFFER (new_current_buffer));
6526 }
6527
6528 frame = XWINDOW (SAVED_WINDOW_N (saved_windows, 0)->window)->frame;
6529 f = XFRAME (frame);
6530
6531 /* If f is a dead frame, don't bother rebuilding its window tree.
6532 However, there is other stuff we should still try to do below. */
6533 if (FRAME_LIVE_P (f))
6534 {
6535 Lisp_Object window;
6536 Lisp_Object dead_windows = Qnil;
6537 register Lisp_Object tem, par, pers;
6538 register struct window *w;
6539 register struct saved_window *p;
6540 struct window *root_window;
6541 struct window **leaf_windows;
6542 int n_leaf_windows;
6543 ptrdiff_t k;
6544 int i, n;
6545 ptrdiff_t count = SPECPDL_INDEX ();
6546 /* If the frame has been resized since this window configuration was
6547 made, we change the frame to the size specified in the
6548 configuration, restore the configuration, and then resize it
6549 back. We keep track of the prevailing height in these variables. */
6550 int previous_frame_text_height = FRAME_TEXT_HEIGHT (f);
6551 int previous_frame_text_width = FRAME_TEXT_WIDTH (f);
6552 /* int previous_frame_menu_bar_height = FRAME_MENU_BAR_HEIGHT (f); */
6553 /* int previous_frame_tool_bar_height = FRAME_TOOL_BAR_HEIGHT (f); */
6554 /* int previous_frame_lines = FRAME_LINES (f); */
6555 /* int previous_frame_cols = FRAME_COLS (f); */
6556 int previous_frame_menu_bar_lines = FRAME_MENU_BAR_LINES (f);
6557 int previous_frame_tool_bar_lines = FRAME_TOOL_BAR_LINES (f);
6558
6559 /* Don't do this within the main loop below: This may call Lisp
6560 code and is thus potentially unsafe while input is blocked. */
6561 for (k = 0; k < saved_windows->header.size; k++)
6562 {
6563 p = SAVED_WINDOW_N (saved_windows, k);
6564 window = p->window;
6565 w = XWINDOW (window);
6566 if (BUFFERP (w->contents)
6567 && !EQ (w->contents, p->buffer)
6568 && BUFFER_LIVE_P (XBUFFER (p->buffer)))
6569 /* If a window we restore gets another buffer, record the
6570 window's old buffer. */
6571 call1 (Qrecord_window_buffer, window);
6572 }
6573
6574 /* Consider frame unofficial, temporarily. */
6575 f->official = false;
6576 /* The mouse highlighting code could get screwed up
6577 if it runs during this. */
6578 block_input ();
6579
6580 if (data->frame_text_width != previous_frame_text_width
6581 || data->frame_text_height != previous_frame_text_height)
6582 /* Make frame size fit the one in data, so window sizes restored
6583 from data match those of the frame. */
6584 adjust_frame_size (f, data->frame_text_width,
6585 data->frame_text_height, 5, 0);
6586
6587 if (data->frame_menu_bar_lines != previous_frame_menu_bar_lines)
6588 {
6589#ifdef HAVE_WINDOW_SYSTEM
6590 if (FRAME_WINDOW_P (f))
6591 x_set_menu_bar_lines (f, make_number (data->frame_menu_bar_lines),
6592 make_number (0));
6593 else /* TTY or MSDOS */
6594#endif
6595 set_menu_bar_lines (f, make_number (data->frame_menu_bar_lines),
6596 make_number (0));
6597 }
6598#ifdef HAVE_WINDOW_SYSTEM
6599 if (data->frame_tool_bar_lines != previous_frame_tool_bar_lines)
6600 x_set_tool_bar_lines (f, make_number (data->frame_tool_bar_lines),
6601 make_number (0));
6602#endif
6603
6604 /* "Swap out" point from the selected window's buffer
6605 into the window itself. (Normally the pointm of the selected
6606 window holds garbage.) We do this now, before
6607 restoring the window contents, and prevent it from
6608 being done later on when we select a new window. */
6609 if (! NILP (XWINDOW (selected_window)->contents))
6610 {
6611 w = XWINDOW (selected_window);
6612 set_marker_both (w->pointm,
6613 w->contents,
6614 BUF_PT (XBUFFER (w->contents)),
6615 BUF_PT_BYTE (XBUFFER (w->contents)));
6616 }
6617
6618 fset_redisplay (f);
6619 FRAME_WINDOW_SIZES_CHANGED (f) = 1;
6620
6621 /* Problem: Freeing all matrices and later allocating them again
6622 is a serious redisplay flickering problem. What we would
6623 really like to do is to free only those matrices not reused
6624 below. */
6625 root_window = XWINDOW (FRAME_ROOT_WINDOW (f));
6626 leaf_windows = alloca (count_windows (root_window)
6627 * sizeof *leaf_windows);
6628 n_leaf_windows = get_leaf_windows (root_window, leaf_windows, 0);
6629
6630 /* Kludge Alert!
6631 Mark all windows now on frame as "deleted".
6632 Restoring the new configuration "undeletes" any that are in it.
6633
6634 Save their current buffers in their height fields, since we may
6635 need it later, if a buffer saved in the configuration is now
6636 dead. */
6637 delete_all_child_windows (FRAME_ROOT_WINDOW (f));
6638
6639 for (k = 0; k < saved_windows->header.size; k++)
6640 {
6641 p = SAVED_WINDOW_N (saved_windows, k);
6642 window = p->window;
6643 w = XWINDOW (window);
6644 wset_next (w, Qnil);
6645
6646 if (!NILP (p->parent))
6647 wset_parent
6648 (w, SAVED_WINDOW_N (saved_windows, XFASTINT (p->parent))->window);
6649 else
6650 wset_parent (w, Qnil);
6651
6652 if (!NILP (p->prev))
6653 {
6654 wset_prev
6655 (w, SAVED_WINDOW_N (saved_windows, XFASTINT (p->prev))->window);
6656 wset_next (XWINDOW (w->prev), p->window);
6657 }
6658 else
6659 {
6660 wset_prev (w, Qnil);
6661 if (!NILP (w->parent))
6662 wset_combination (XWINDOW (w->parent),
6663 (XINT (p->total_cols)
6664 != XWINDOW (w->parent)->total_cols),
6665 p->window);
6666 }
6667
6668 /* If we squirreled away the buffer, restore it now. */
6669 if (BUFFERP (w->combination_limit))
6670 wset_buffer (w, w->combination_limit);
6671 w->pixel_left = XFASTINT (p->pixel_left);
6672 w->pixel_top = XFASTINT (p->pixel_top);
6673 w->pixel_width = XFASTINT (p->pixel_width);
6674 w->pixel_height = XFASTINT (p->pixel_height);
6675 w->left_col = XFASTINT (p->left_col);
6676 w->top_line = XFASTINT (p->top_line);
6677 w->total_cols = XFASTINT (p->total_cols);
6678 w->total_lines = XFASTINT (p->total_lines);
6679 wset_normal_cols (w, p->normal_cols);
6680 wset_normal_lines (w, p->normal_lines);
6681 w->hscroll = XFASTINT (p->hscroll);
6682 w->suspend_auto_hscroll = !NILP (p->suspend_auto_hscroll);
6683 w->min_hscroll = XFASTINT (p->min_hscroll);
6684 w->hscroll_whole = XFASTINT (p->hscroll_whole);
6685 wset_display_table (w, p->display_table);
6686 w->left_margin_cols = XINT (p->left_margin_cols);
6687 w->right_margin_cols = XINT (p->right_margin_cols);
6688 w->left_fringe_width = XINT (p->left_fringe_width);
6689 w->right_fringe_width = XINT (p->right_fringe_width);
6690 w->fringes_outside_margins = !NILP (p->fringes_outside_margins);
6691 w->scroll_bar_width = XINT (p->scroll_bar_width);
6692 w->scroll_bar_height = XINT (p->scroll_bar_height);
6693 wset_vertical_scroll_bar_type (w, p->vertical_scroll_bar_type);
6694 wset_horizontal_scroll_bar_type (w, p->horizontal_scroll_bar_type);
6695 wset_dedicated (w, p->dedicated);
6696 wset_combination_limit (w, p->combination_limit);
6697 /* Restore any window parameters that have been saved.
6698 Parameters that have not been saved are left alone. */
6699 for (tem = p->window_parameters; CONSP (tem); tem = XCDR (tem))
6700 {
6701 pers = XCAR (tem);
6702 if (CONSP (pers))
6703 {
6704 if (NILP (XCDR (pers)))
6705 {
6706 par = Fassq (XCAR (pers), w->window_parameters);
6707 if (CONSP (par) && !NILP (XCDR (par)))
6708 /* Reset a parameter to nil if and only if it
6709 has a non-nil association. Don't make new
6710 associations. */
6711 Fsetcdr (par, Qnil);
6712 }
6713 else
6714 /* Always restore a non-nil value. */
6715 Fset_window_parameter (window, XCAR (pers), XCDR (pers));
6716 }
6717 }
6718
6719 if (BUFFERP (p->buffer) && BUFFER_LIVE_P (XBUFFER (p->buffer)))
6720 /* If saved buffer is alive, install it. */
6721 {
6722 wset_buffer (w, p->buffer);
6723 w->start_at_line_beg = !NILP (p->start_at_line_beg);
6724 set_marker_restricted (w->start, p->start, w->contents);
6725 set_marker_restricted (w->pointm, p->pointm, w->contents);
6726 set_marker_restricted (w->old_pointm, p->old_pointm, w->contents);
6727 /* As documented in Fcurrent_window_configuration, don't
6728 restore the location of point in the buffer which was
6729 current when the window configuration was recorded. */
6730 if (!EQ (p->buffer, new_current_buffer)
6731 && XBUFFER (p->buffer) == current_buffer)
6732 Fgoto_char (w->pointm);
6733 }
6734 else if (BUFFERP (w->contents) && BUFFER_LIVE_P (XBUFFER (w->contents)))
6735 /* Keep window's old buffer; make sure the markers are real. */
6736 {
6737 /* Set window markers at start of visible range. */
6738 if (XMARKER (w->start)->buffer == 0)
6739 set_marker_restricted_both (w->start, w->contents, 0, 0);
6740 if (XMARKER (w->pointm)->buffer == 0)
6741 set_marker_restricted_both
6742 (w->pointm, w->contents,
6743 BUF_PT (XBUFFER (w->contents)),
6744 BUF_PT_BYTE (XBUFFER (w->contents)));
6745 if (XMARKER (w->old_pointm)->buffer == 0)
6746 set_marker_restricted_both
6747 (w->old_pointm, w->contents,
6748 BUF_PT (XBUFFER (w->contents)),
6749 BUF_PT_BYTE (XBUFFER (w->contents)));
6750 w->start_at_line_beg = 1;
6751 }
6752 else if (!NILP (w->start))
6753 /* Leaf window has no live buffer, get one. */
6754 {
6755 /* Get the buffer via other_buffer_safely in order to
6756 avoid showing an unimportant buffer and, if necessary, to
6757 recreate *scratch* in the course (part of Juanma's bs-show
6758 scenario from March 2011). */
6759 wset_buffer (w, other_buffer_safely (Fcurrent_buffer ()));
6760 /* This will set the markers to beginning of visible
6761 range. */
6762 set_marker_restricted_both (w->start, w->contents, 0, 0);
6763 set_marker_restricted_both (w->pointm, w->contents, 0, 0);
6764 set_marker_restricted_both (w->old_pointm, w->contents, 0, 0);
6765 w->start_at_line_beg = 1;
6766 if (!NILP (w->dedicated))
6767 /* Record this window as dead. */
6768 dead_windows = Fcons (window, dead_windows);
6769 /* Make sure window is no more dedicated. */
6770 wset_dedicated (w, Qnil);
6771 }
6772 }
6773
6774 fset_root_window (f, data->root_window);
6775 /* Arrange *not* to restore point in the buffer that was
6776 current when the window configuration was saved. */
6777 if (EQ (XWINDOW (data->current_window)->contents, new_current_buffer))
6778 set_marker_restricted (XWINDOW (data->current_window)->pointm,
6779 make_number (old_point),
6780 XWINDOW (data->current_window)->contents);
6781
6782 /* In the following call to `select-window', prevent "swapping out
6783 point" in the old selected window using the buffer that has
6784 been restored into it. We already swapped out that point from
6785 that window's old buffer.
6786
6787 Do not record the buffer here. We do that in a separate call
6788 to select_window below. See also Bug#16207. */
6789 select_window (data->current_window, Qt, 1);
6790 BVAR (XBUFFER (XWINDOW (selected_window)->contents),
6791 last_selected_window)
6792 = selected_window;
6793
6794 if (NILP (data->focus_frame)
6795 || (FRAMEP (data->focus_frame)
6796 && FRAME_LIVE_P (XFRAME (data->focus_frame))))
6797 Fredirect_frame_focus (frame, data->focus_frame);
6798
6799 /* Set the frame size to the value it had before this function. */
6800 if (previous_frame_text_width != FRAME_TEXT_WIDTH (f)
6801 || previous_frame_text_height != FRAME_TEXT_HEIGHT (f))
6802 adjust_frame_size (f, previous_frame_text_width,
6803 previous_frame_text_height, 5, 0);
6804
6805 if (previous_frame_menu_bar_lines != FRAME_MENU_BAR_LINES (f))
6806 {
6807#ifdef HAVE_WINDOW_SYSTEM
6808 if (FRAME_WINDOW_P (f))
6809 x_set_menu_bar_lines (f,
6810 make_number (previous_frame_menu_bar_lines),
6811 make_number (0));
6812 else /* TTY or MSDOS */
6813#endif
6814 set_menu_bar_lines (f, make_number (previous_frame_menu_bar_lines),
6815 make_number (0));
6816 }
6817#ifdef HAVE_WINDOW_SYSTEM
6818 if (previous_frame_tool_bar_lines != FRAME_TOOL_BAR_LINES (f))
6819 x_set_tool_bar_lines (f, make_number (previous_frame_tool_bar_lines),
6820 make_number (0));
6821#endif
6822
6823 /* Now, free glyph matrices in windows that were not reused. */
6824 for (i = n = 0; i < n_leaf_windows; ++i)
6825 {
6826 if (NILP (leaf_windows[i]->contents))
6827 free_window_matrices (leaf_windows[i]);
6828 else if (EQ (leaf_windows[i]->contents, new_current_buffer))
6829 ++n;
6830 }
6831
6832 /* Make frame official again and apply frame size changes if
6833 needed. */
6834 f->official = true;
6835 adjust_frame_size (f, -1, -1, 1, 0);
6836
6837 adjust_frame_glyphs (f);
6838 unblock_input ();
6839
6840 /* Scan dead buffer windows. */
6841 for (; CONSP (dead_windows); dead_windows = XCDR (dead_windows))
6842 {
6843 window = XCAR (dead_windows);
6844 if (WINDOW_LIVE_P (window) && !EQ (window, FRAME_ROOT_WINDOW (f)))
6845 delete_deletable_window (window);
6846 }
6847
6848 /* Record the selected window's buffer here. The window should
6849 already be the selected one from the call above. */
6850 select_window (data->current_window, Qnil, 0);
6851
6852 /* Fselect_window will have made f the selected frame, so we
6853 reselect the proper frame here. Fhandle_switch_frame will change the
6854 selected window too, but that doesn't make the call to
6855 Fselect_window above totally superfluous; it still sets f's
6856 selected window. */
6857 if (FRAME_LIVE_P (XFRAME (data->selected_frame)))
6858 do_switch_frame (data->selected_frame, 0, 0, Qnil);
6859
6860 run_window_configuration_change_hook (f);
6861 }
6862
6863 if (!NILP (new_current_buffer))
6864 {
6865 Fset_buffer (new_current_buffer);
6866 /* If the new current buffer doesn't appear in the selected
6867 window, go to its old point (see bug#12208). */
6868 if (!EQ (XWINDOW (data->current_window)->contents, new_current_buffer))
6869 Fgoto_char (make_number (old_point));
6870 }
6871
6872 Vminibuf_scroll_window = data->minibuf_scroll_window;
6873 minibuf_selected_window = data->minibuf_selected_window;
6874
6875 return (FRAME_LIVE_P (f) ? Qt : Qnil);
6876}
6877#endif
6878
6879void 6463void
6880restore_window_configuration (Lisp_Object configuration) 6464restore_window_configuration (Lisp_Object configuration)
6881{ 6465{
diff --git a/src/xdisp.c b/src/xdisp.c
index 1ddabf34b9e..3137c8438fe 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -30145,8 +30145,6 @@ expose_frame (struct frame *f, int x, int y, int w, int h)
30145 r.x = r.y = 0; 30145 r.x = r.y = 0;
30146 r.width = FRAME_TEXT_WIDTH (f); 30146 r.width = FRAME_TEXT_WIDTH (f);
30147 r.height = FRAME_TEXT_HEIGHT (f); 30147 r.height = FRAME_TEXT_HEIGHT (f);
30148/** r.width = FRAME_COLUMN_WIDTH (f) * FRAME_COLS (f); **/
30149/** r.height = FRAME_LINE_HEIGHT (f) * FRAME_LINES (f); **/
30150 } 30148 }
30151 else 30149 else
30152 { 30150 {
diff --git a/src/xfns.c b/src/xfns.c
index b19e5df5802..9d217cdb4d9 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -1140,10 +1140,8 @@ x_change_tool_bar_height (struct frame *f, int height)
1140 1140
1141 adjust_frame_size (f, -1, -1, 4, 0); 1141 adjust_frame_size (f, -1, -1, 4, 0);
1142 1142
1143/** #if !defined USE_X_TOOLKIT **/
1144 if (FRAME_X_WINDOW (f)) 1143 if (FRAME_X_WINDOW (f))
1145 x_clear_under_internal_border (f); 1144 x_clear_under_internal_border (f);
1146/** #endif **/
1147 1145
1148#endif /* USE_GTK */ 1146#endif /* USE_GTK */
1149} 1147}
diff --git a/src/xmenu.c b/src/xmenu.c
index 8bb8d17369c..e3f1a17fbce 100644
--- a/src/xmenu.c
+++ b/src/xmenu.c
@@ -627,7 +627,6 @@ update_frame_menubar (struct frame *f)
627 xg_update_frame_menubar (f); 627 xg_update_frame_menubar (f);
628#else 628#else
629 struct x_output *x; 629 struct x_output *x;
630/** int columns, rows; **/
631 630
632 eassert (FRAME_X_P (f)); 631 eassert (FRAME_X_P (f));
633 632
@@ -637,10 +636,6 @@ update_frame_menubar (struct frame *f)
637 return; 636 return;
638 637
639 block_input (); 638 block_input ();
640 /* Save the size of the frame because the pane widget doesn't accept
641 to resize itself. So force it. */
642/** columns = FRAME_COLS (f); **/
643/** rows = FRAME_LINES (f); **/
644 639
645 /* Do the voodoo which means "I'm changing lots of things, don't try 640 /* Do the voodoo which means "I'm changing lots of things, don't try
646 to refigure sizes until I'm done." */ 641 to refigure sizes until I'm done." */
@@ -661,8 +656,7 @@ update_frame_menubar (struct frame *f)
661 XtManageChild (x->edit_widget); 656 XtManageChild (x->edit_widget);
662 lw_refigure_widget (x->column_widget, True); 657 lw_refigure_widget (x->column_widget, True);
663 658
664 /* Force the pane widget to resize itself with the right values. */ 659 /* Force the pane widget to resize itself. */
665/** EmacsFrameSetCharSize (x->edit_widget, columns, rows); **/
666 adjust_frame_size (f, FRAME_TEXT_WIDTH (f), FRAME_TEXT_HEIGHT (f), 2, 0); 660 adjust_frame_size (f, FRAME_TEXT_WIDTH (f), FRAME_TEXT_HEIGHT (f), 2, 0);
667 unblock_input (); 661 unblock_input ();
668#endif 662#endif
diff --git a/src/xterm.c b/src/xterm.c
index 9aea0684927..974e29dfc88 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -7560,9 +7560,6 @@ handle_one_xevent (struct x_display_info *dpyinfo,
7560 SET_FRAME_GARBAGED (f); 7560 SET_FRAME_GARBAGED (f);
7561 cancel_mouse_face (f); 7561 cancel_mouse_face (f);
7562 } 7562 }
7563
7564/** FRAME_PIXEL_WIDTH (f) = event->xconfigure.width; **/
7565/** FRAME_PIXEL_HEIGHT (f) = event->xconfigure.height; **/
7566#endif /* not USE_GTK */ 7563#endif /* not USE_GTK */
7567#endif 7564#endif
7568 7565
@@ -8647,7 +8644,6 @@ x_new_font (struct frame *f, Lisp_Object font_object, int fontset)
8647 FRAME_LINE_HEIGHT (f) = FONT_HEIGHT (font); 8644 FRAME_LINE_HEIGHT (f) = FONT_HEIGHT (font);
8648 8645
8649#ifndef USE_X_TOOLKIT \ 8646#ifndef USE_X_TOOLKIT \
8650/** FRAME_TOOL_BAR_HEIGHT (f) = FRAME_TOOL_BAR_LINES (f) * FRAME_LINE_HEIGHT (f); **/
8651 FRAME_MENU_BAR_HEIGHT (f) = FRAME_MENU_BAR_LINES (f) * FRAME_LINE_HEIGHT (f); 8647 FRAME_MENU_BAR_HEIGHT (f) = FRAME_MENU_BAR_LINES (f) * FRAME_LINE_HEIGHT (f);
8652#endif 8648#endif
8653 8649
@@ -9490,18 +9486,6 @@ x_set_window_size_1 (struct frame *f, int change_gravity, int width, int height,
9490{ 9486{
9491 int pixelwidth, pixelheight; 9487 int pixelwidth, pixelheight;
9492 9488
9493/** if (pixelwise) **/
9494/** { **/
9495/** pixelwidth = FRAME_TEXT_TO_PIXEL_WIDTH (f, width); **/
9496/** pixelheight = FRAME_TEXT_TO_PIXEL_HEIGHT (f, height); **/
9497/** } **/
9498/** else **/
9499/** { **/
9500/** pixelwidth = FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, width); **/
9501/** pixelheight = FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, height); **/
9502/** } **/
9503
9504/** FRAME_TOOL_BAR_HEIGHT (f) = FRAME_TOOLBAR_HEIGHT (f); **/
9505 pixelwidth = (pixelwise 9489 pixelwidth = (pixelwise
9506 ? FRAME_TEXT_TO_PIXEL_WIDTH (f, width) 9490 ? FRAME_TEXT_TO_PIXEL_WIDTH (f, width)
9507 : FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, width)); 9491 : FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, width));
@@ -9509,16 +9493,6 @@ x_set_window_size_1 (struct frame *f, int change_gravity, int width, int height,
9509 ? FRAME_TEXT_TO_PIXEL_HEIGHT (f, height) 9493 ? FRAME_TEXT_TO_PIXEL_HEIGHT (f, height)
9510 : FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, height))); 9494 : FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, height)));
9511 9495
9512/** pixelwidth = ((pixelwise ? width : (width * FRAME_COLUMN_WIDTH (f))) **/
9513/** + FRAME_SCROLL_BAR_AREA_WIDTH (f) **/
9514/** + FRAME_TOTAL_FRINGE_WIDTH (f) **/
9515/** + 2 * FRAME_INTERNAL_BORDER_WIDTH (f)); **/
9516
9517/** pixelheight = ((pixelwise ? height : (height * FRAME_LINE_HEIGHT (f))) **/
9518/** + FRAME_TOOLBAR_HEIGHT (f) **/
9519/** + FRAME_SCROLL_BAR_AREA_HEIGHT (f) **/
9520/** + 2 * FRAME_INTERNAL_BORDER_WIDTH (f)); **/
9521
9522 if (change_gravity) f->win_gravity = NorthWestGravity; 9496 if (change_gravity) f->win_gravity = NorthWestGravity;
9523 x_wm_set_size_hint (f, 0, 0); 9497 x_wm_set_size_hint (f, 0, 0);
9524 XResizeWindow (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f), 9498 XResizeWindow (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f),