emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Be prepared for "code clean-up" in CVS head


From: Jan D.
Subject: Re: Be prepared for "code clean-up" in CVS head
Date: Tue, 4 Mar 2003 18:23:05 +0100


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.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]