From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Stefan Monnier" Newsgroups: gmane.emacs.devel Subject: Re: Be prepared for "code clean-up" in CVS head Date: Mon, 10 Mar 2003 13:32:36 -0500 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <200303101832.h2AIWaiE027326@rum.cs.yale.edu> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1047321331 13046 80.91.224.249 (10 Mar 2003 18:35:31 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 10 Mar 2003 18:35:31 +0000 (UTC) Cc: "Kim F. Storm" Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Mon Mar 10 19:35:28 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 18sS7U-0003Nt-00 for ; Mon, 10 Mar 2003 19:35:28 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 18sSTr-0005aS-00 for ; Mon, 10 Mar 2003 19:58:35 +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 18sS6m-0005QY-08 for emacs-devel@quimby.gnus.org; Mon, 10 Mar 2003 13:34:44 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18sS68-0005Bj-00 for emacs-devel@gnu.org; Mon, 10 Mar 2003 13:34:04 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18sS5G-0004kI-00 for emacs-devel@gnu.org; Mon, 10 Mar 2003 13:33:11 -0500 Original-Received: from rum.cs.yale.edu ([128.36.229.169]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18sS4k-0004Z2-00 for emacs-devel@gnu.org; Mon, 10 Mar 2003 13:32:38 -0500 Original-Received: from rum.cs.yale.edu (localhost [127.0.0.1]) by rum.cs.yale.edu (8.12.8/8.12.8) with ESMTP id h2AIWbj6027328; Mon, 10 Mar 2003 13:32:37 -0500 Original-Received: (from monnier@localhost) by rum.cs.yale.edu (8.12.8/8.12.8/Submit) id h2AIWaiE027326; Mon, 10 Mar 2003 13:32:36 -0500 X-Mailer: exmh version 2.4 06/23/2000 with nmh-1.0.4 Original-To: "Jan D." Original-cc: emacs-devel@gnu.org 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:12246 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:12246 > > 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. Yes, we need to kill that duplicated code. > > 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 think merging all the duplicated code will make it harder to eventually get multi-GUI support. It might even make it easier in some places. And the real problems will be the same anyway. > 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? --with-x-toolkit=no will give you that. I don't know how many people use such a config, tho. Stefan