From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Jan D." Newsgroups: gmane.emacs.devel Subject: Re: Be prepared for "code clean-up" in CVS head Date: Tue, 4 Mar 2003 18:23:05 +0100 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: <5x3cm3p0vw.fsf@kfs2.cua.dk> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 (Apple Message framework v482) Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1046799209 15600 80.91.224.249 (4 Mar 2003 17:33:29 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 4 Mar 2003 17:33:29 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Tue Mar 04 18:33:27 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18qGGD-0003eT-00 for ; Tue, 04 Mar 2003 18:31:25 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 18qGZe-0003BE-00 for ; Tue, 04 Mar 2003 18:51:30 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18qGBm-0006RA-02 for emacs-devel@quimby.gnus.org; Tue, 04 Mar 2003 12:26:50 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18qGAP-0006Cn-00 for emacs-devel@gnu.org; Tue, 04 Mar 2003 12:25:25 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18qGA0-00063A-00 for emacs-devel@gnu.org; Tue, 04 Mar 2003 12:25:03 -0500 Original-Received: from stubby.bodenonline.com ([193.201.16.94]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18qG8o-0005Tr-00 for emacs-devel@gnu.org; Tue, 04 Mar 2003 12:23:46 -0500 Original-Received: from accessno42.bodenonline.com (IDENT:root@accessno42.bodenonline.com [193.201.16.44]) h24IGgkw015642; Tue, 4 Mar 2003 19:16:47 +0100 Original-To: storm@cua.dk (Kim F. Storm) In-Reply-To: <5x3cm3p0vw.fsf@kfs2.cua.dk> X-Mailer: Apple Mail (2.482) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Emacs development discussions. List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:12092 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:12092 > I don't intend to make a lot of changes to identify and merge > duplicate code, but I will at least merge the code and definitions > that are related to the changes I'm going to make to facilitate the > "fringe/margin swap" and the per-window configurations. There is a lot of duplication between macmenu.c, w32menu.c and xmenu.c There are many functions in all three that deals with taking apart a menu specification, allocating menu entries and walking through Lisp structures that are line by line identical. There is not a line of GUI code in them. > On a closely related matter, it seems that some corners of the code > _could_ work with multiple GUI output devices, e.g. W32 and X, but > many parts of the code definitely does not support that, particularly > much of the code ported to W32 and MAC uses the X-specific names of > both functions and #defines, and they also defines structs and types > to match the X-specific names... So it is hard for me to see how > they can co-exist without a really MAJOR cleanup. > > If we decide that we DO NOT want to support such cross-GUI hybrids, a > lot more of the duplicate code could be cleaned up. I think this might be a lot of work, and it is of course harder to maintain each port independently. > I don't really care whether such cross-GUI hybrids is possible, but I > do care about making emacs easier to maintain -- and the current code > duplication is a major hazzle in that respect. So if we decide not to > support the cross-GUI hybrids, I think I can cleanup a good deal more > of (almost) duplicated code. Just getting rid of duplication of non-GUI related code would be a major step forward. About code cleanup, how about removing the pure X (i.e. not Xt, not GTK) parts? That would not reduce the duplication but would remove a lot of #ifdef:s. Is there a configuration that has X but not Xt? Jan D.