[Top][All Lists]

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

Re: [Emacs-diffs] /srv/bzr/emacs/trunk r102057: Make all 3 copies of x-s

From: Stephen J. Turnbull
Subject: Re: [Emacs-diffs] /srv/bzr/emacs/trunk r102057: Make all 3 copies of x-select-enable-clipboard have the same doc.
Date: Mon, 25 Oct 2010 17:03:40 +0900

Glenn Morris writes:

 > I find it weird that when faced with the issue "we need to define a
 > function, eg x-display-list, on multiple platforms; it should have the
 > same arguments, doc-string, and behaviour on each platform" that Emacs
 > consistently chose to have three completely separate definitions in
 > three separate files; rather than just having one with #ifdefs for
 > each platform where needed.

Some such strategy is necessary if you are going to support different
console types in the same binary.  Eg, it is possible to support both
native MS Windows displays and X displays at the same time.

It's true that for very similar display types such as Xt and GTK+
where much of the code can be reused[1], it may make sense to create a
single file with the common code, and include it multiple times with
preprocessor tweaking to make the names fit and to register driver
functions in the right tables.  But there's no point in this for X
drivers vs. MS Windows drivers; they're going to have very little
common code.

[1]  Whether that's a good idea or not is a separate question.

reply via email to

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