From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Antipov Newsgroups: gmane.emacs.devel Subject: Re: [patch] proposal tiny cleanup for window code Date: Wed, 07 Nov 2007 16:32:22 +0300 Message-ID: <4731BE66.3030507@yandex.ru> References: <47319A3B.7030200@yandex.ru> <4731B61D.7040106@gmx.at> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------070106090606010800060700" X-Trace: ger.gmane.org 1194443322 27605 80.91.229.12 (7 Nov 2007 13:48:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 7 Nov 2007 13:48:42 +0000 (UTC) Cc: emacs-devel@gnu.org To: martin rudalics Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Nov 07 14:48:46 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IplGv-0000Zc-C8 for ged-emacs-devel@m.gmane.org; Wed, 07 Nov 2007 14:48:45 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IplGk-0004S9-66 for ged-emacs-devel@m.gmane.org; Wed, 07 Nov 2007 08:48:34 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IplDL-0001oN-7z for emacs-devel@gnu.org; Wed, 07 Nov 2007 08:45:03 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IplDK-0001o4-Gq for emacs-devel@gnu.org; Wed, 07 Nov 2007 08:45:02 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IplDK-0001nw-Ah for emacs-devel@gnu.org; Wed, 07 Nov 2007 08:45:02 -0500 Original-Received: from smtp1.yandex.ru ([213.180.223.87]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IplDJ-0004S0-MY for emacs-devel@gnu.org; Wed, 07 Nov 2007 08:45:02 -0500 Original-Received: from rtsoft2.corbina.net ([85.21.88.2]:23481 "EHLO localhost.localdomain" smtp-auth: "dmantipov" TLS-CIPHER: TLS-PEER-CN1: ) by mail.yandex.ru with ESMTP id S8372787AbXKGNot (ORCPT ); Wed, 7 Nov 2007 16:44:49 +0300 X-Comment: RFC 2476 MSA function at smtp1.yandex.ru logged sender identity as: dmantipov User-Agent: Thunderbird 2.0.0.6 (X11/20070926) In-Reply-To: <4731B61D.7040106@gmx.at> X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 1) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:82734 Archived-At: This is a multi-part message in MIME format. --------------070106090606010800060700 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit martin rudalics wrote: > hence (the "implied") too_small_ok can be set to t when nodelete_p > initially equals 2 and your version is not semantically equivalent to > the previous one. Please verify again. Argh, you're right. But, it still should be enough to make too_small_ok local instead of a member of struct window... Dmitry --------------070106090606010800060700 Content-Type: text/x-patch; name="too_small_ok-drop-2.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="too_small_ok-drop-2.patch" Index: doc/lispref/ChangeLog =================================================================== RCS file: /sources/emacs/emacs/doc/lispref/ChangeLog,v retrieving revision 1.15 diff -u -r1.15 ChangeLog --- doc/lispref/ChangeLog 31 Oct 2007 04:08:29 -0000 1.15 +++ doc/lispref/ChangeLog 7 Nov 2007 13:39:04 -0000 @@ -1,3 +1,7 @@ +2007-11-07 Dmitry Antipov + + * internals.texi (Window Internals): Remove description of too_small_ok. + 2007-10-31 Richard Stallman * strings.texi (Creating Strings): Null strings from concat not unique. Index: doc/lispref/internals.texi =================================================================== RCS file: /sources/emacs/emacs/doc/lispref/internals.texi,v retrieving revision 1.2 diff -u -r1.2 internals.texi --- doc/lispref/internals.texi 6 Sep 2007 04:27:42 -0000 1.2 +++ doc/lispref/internals.texi 7 Nov 2007 13:39:04 -0000 @@ -1280,9 +1280,6 @@ Non-@code{nil} means current value of @code{start} was the beginning of a line when it was chosen. -@item too_small_ok -Non-@code{nil} means don't delete this window for becoming ``too small.'' - @item height_fixed_p This field is temporarily set to 1 to fix the height of the selected window when the echo area is resized. Index: src/ChangeLog =================================================================== RCS file: /sources/emacs/emacs/src/ChangeLog,v retrieving revision 1.5979 diff -u -r1.5979 ChangeLog --- src/ChangeLog 6 Nov 2007 09:27:17 -0000 1.5979 +++ src/ChangeLog 7 Nov 2007 13:39:04 -0000 @@ -1,3 +1,8 @@ +2007-11-07 Dmitry Antipov + + * window.h (struct window): Remove too_small_ok. + * window.c (size_window): New local variable prevent_deletion_p. + 2007-11-06 Jan Dj,Ad(Brv * gtkutil.c (xg_tool_bar_menu_proxy): Handle GTK_IMAGE_ICON_NAME and Index: src/window.c =================================================================== RCS file: /sources/emacs/emacs/src/window.c,v retrieving revision 1.597 diff -u -r1.597 window.c --- src/window.c 26 Oct 2007 20:56:47 -0000 1.597 +++ src/window.c 7 Nov 2007 13:39:10 -0000 @@ -3027,7 +3027,7 @@ struct window *w = XWINDOW (window); struct window *c; Lisp_Object child, *forward, *sideward; - int old_size, min_size, safe_min_size; + int old_size, min_size, safe_min_size, prevent_deletion_p; check_min_window_sizes (); size = max (0, size); @@ -3048,8 +3048,8 @@ safe_min_size = window_min_size_2 (w, 0); } - if (old_size < min_size && nodelete_p != 2) - w->too_small_ok = Qt; + /* Don't delete this window even if it becomes "too small". */ + prevent_deletion_p = (old_size < min_size && nodelete_p != 2); /* Move the following test here since otherwise the preceding test doesn't make sense. martin. */ @@ -3059,7 +3059,7 @@ /* Maybe delete WINDOW if it's too small. */ if (nodelete_p != 1 && !NILP (w->parent)) { - if (!MINI_WINDOW_P (w) && !NILP (w->too_small_ok)) + if (!MINI_WINDOW_P (w) && prevent_deletion_p) min_size = width_p ? MIN_SAFE_WINDOW_WIDTH : MIN_SAFE_WINDOW_HEIGHT; if (min_size < safe_min_size) min_size = safe_min_size; Index: src/window.h =================================================================== RCS file: /sources/emacs/emacs/src/window.h,v retrieving revision 1.73 diff -u -r1.73 window.h --- src/window.h 2 Oct 2007 21:55:26 -0000 1.73 +++ src/window.h 7 Nov 2007 13:39:10 -0000 @@ -221,9 +221,6 @@ /* If redisplay in this window goes beyond this buffer position, must run the redisplay-end-trigger-hook. */ Lisp_Object redisplay_end_trigger; - /* Non-nil means don't delete this window for becoming "too small". */ - Lisp_Object too_small_ok; - /* Original window height and top before mini-window was enlarged. */ Lisp_Object orig_total_lines, orig_top_line; --------------070106090606010800060700 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel --------------070106090606010800060700--