From b9e809c2d78844d1ddc700bca429bee25a437ba5 Mon Sep 17 00:00:00 2001 From: Martin Rudalics Date: Wed, 8 Jun 2011 15:00:51 +0200 Subject: [PATCH] New symbols in window.c. * 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. --- src/ChangeLog | 10 ++++++++-- src/window.c | 54 ++++++++++++++++++++++++++++++++++++++------------- 2 files changed, 48 insertions(+), 16 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 076b470e532..d9a5345746d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -4,7 +4,7 @@ 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. + (MIN_SAFE_WINDOW_WIDTH, MIN_SAFE_WINDOW_HEIGHT): Define here. * window.c (Fwindow_height, Fwindow_width, Fwindow_full_width_p): Remove. @@ -28,7 +28,13 @@ (Fset_window_configuration, saved_window) (Fcurrent_window_configuration, save_window_save): Handle new members of window structure. - (WINDOW_TOTAL_SIZE): Move to window.h. + (WINDOW_TOTAL_SIZE, MIN_SAFE_WINDOW_WIDTH) + (MIN_SAFE_WINDOW_HEIGHT): Move to window.h. + (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. 2011-06-07 Martin Rudalics diff --git a/src/window.c b/src/window.c index 85e076b4188..393a2478ce1 100644 --- a/src/window.c +++ b/src/window.c @@ -51,9 +51,14 @@ along with GNU Emacs. If not, see . */ #endif Lisp_Object Qwindowp, Qwindow_live_p; -static Lisp_Object Qwindow_configuration_p; -static Lisp_Object Qdisplay_buffer; +static Lisp_Object Qwindow_configuration_p, Qrecord_window_buffer; +static Lisp_Object Qwindow_deletable_p, Qdelete_window, Qdisplay_buffer; +static Lisp_Object Qreplace_buffer_in_windows, Qget_mru_window; +static Lisp_Object Qresize_root_window, Qresize_root_window_vertically; static Lisp_Object Qscroll_up, Qscroll_down, Qscroll_command; +static Lisp_Object Qsafe, Qabove, Qbelow; +static Lisp_Object Qauto_buffer_name; + static Lisp_Object Qwindow_size_fixed; static int displayed_window_lines (struct window *); @@ -2941,18 +2946,6 @@ replace_buffer_in_all_windows (Lisp_Object buffer) /* Set the height of WINDOW and all its inferiors. */ -/* The smallest acceptable dimensions for a window. Anything smaller - might crash Emacs. */ - -#define MIN_SAFE_WINDOW_WIDTH (2) -#define MIN_SAFE_WINDOW_HEIGHT (1) - -/* For wp non-zero the total number of columns of window w. Otherwise - the total number of lines of w. */ - -#define WINDOW_TOTAL_SIZE(w, wp) \ - (wp ? WINDOW_TOTAL_COLS (w) : WINDOW_TOTAL_LINES (w)) - /* If *ROWS or *COLS are too small a size for FRAME, set them to the minimum allowable size. */ @@ -7406,12 +7399,45 @@ syms_of_window (void) Qwindow_live_p = intern_c_string ("window-live-p"); staticpro (&Qwindow_live_p); + Qwindow_deletable_p = intern_c_string ("window-deletable-p"); + staticpro (&Qwindow_deletable_p); + + Qdelete_window = intern_c_string ("delete-window"); + staticpro (&Qdelete_window); + + Qresize_root_window = intern_c_string ("resize-root-window"); + staticpro (&Qresize_root_window); + + Qresize_root_window_vertically = intern_c_string ("resize-root-window-vertically"); + staticpro (&Qresize_root_window_vertically); + + Qsafe = intern_c_string ("safe"); + staticpro (&Qsafe); + Qdisplay_buffer = intern_c_string ("display-buffer"); staticpro (&Qdisplay_buffer); + Qreplace_buffer_in_windows = intern_c_string ("replace-buffer-in-windows"); + staticpro (&Qreplace_buffer_in_windows); + + Qrecord_window_buffer = intern_c_string ("record-window-buffer"); + staticpro (&Qrecord_window_buffer); + + Qget_mru_window = intern_c_string ("get-mru-window"); + staticpro (&Qget_mru_window); + Qtemp_buffer_show_hook = intern_c_string ("temp-buffer-show-hook"); staticpro (&Qtemp_buffer_show_hook); + Qabove = intern_c_string ("above"); + staticpro (&Qabove); + + Qbelow = intern_c_string ("below"); + staticpro (&Qbelow); + + Qauto_buffer_name = intern_c_string ("auto-buffer-name"); + staticpro (&Qauto_buffer_name); + staticpro (&Vwindow_list); minibuf_selected_window = Qnil; -- 2.39.2