unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Stefan Monnier" <monnier+gnu/emacs@rum.cs.yale.edu>
Cc: "Kim F. Storm" <storm@cua.dk>
Subject: Re: Be prepared for "code clean-up" in CVS head
Date: Mon, 10 Mar 2003 13:32:36 -0500	[thread overview]
Message-ID: <200303101832.h2AIWaiE027326@rum.cs.yale.edu> (raw)
In-Reply-To: F603701C-4E65-11D7-BC51-00039363E640@swipnet.se

> > 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

  parent reply	other threads:[~2003-03-10 18:32 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-04 16:11 Be prepared for "code clean-up" in CVS head Kim F. Storm
2003-03-04 16:06 ` Juanma Barranquero
2003-03-04 17:23 ` Jan D.
2003-03-05 20:47   ` Richard Stallman
2003-03-05 21:49     ` Luc Teirlinck
2003-03-07 19:41       ` Richard Stallman
2003-03-06  4:27     ` Eli Zaretskii
2003-03-17  5:49       ` chad Brown
2003-03-10 18:32   ` Stefan Monnier [this message]
2003-03-05 20:47 ` Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200303101832.h2AIWaiE027326@rum.cs.yale.edu \
    --to=monnier+gnu/emacs@rum.cs.yale.edu \
    --cc=storm@cua.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).