From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Stephen J. Turnbull" Newsgroups: gmane.emacs.devel 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 Message-ID: <87r5fed7hf.fsf@uwakimon.sk.tsukuba.ac.jp> References: <19651.37838.815906.240014@fencepost.gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1287993913 13850 80.91.229.12 (25 Oct 2010 08:05:13 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 25 Oct 2010 08:05:13 +0000 (UTC) Cc: Eli Zaretskii , Stefan Monnier , emacs-devel@gnu.org To: Glenn Morris Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Oct 25 10:05:11 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PAI3K-0001Sr-GS for ged-emacs-devel@m.gmane.org; Mon, 25 Oct 2010 10:05:10 +0200 Original-Received: from localhost ([127.0.0.1]:47766 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PAI3K-0001nj-2c for ged-emacs-devel@m.gmane.org; Mon, 25 Oct 2010 04:05:10 -0400 Original-Received: from [140.186.70.92] (port=35699 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PAI03-0000UO-Eq for emacs-devel@gnu.org; Mon, 25 Oct 2010 04:01:48 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PAI01-0002et-TD for emacs-devel@gnu.org; Mon, 25 Oct 2010 04:01:46 -0400 Original-Received: from imss12.cc.tsukuba.ac.jp ([130.158.254.161]:59995) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PAI00-0002eK-Cq; Mon, 25 Oct 2010 04:01:44 -0400 Original-Received: from imss12.cc.tsukuba.ac.jp (imss12.cc.tsukuba.ac.jp [127.0.0.1]) by postfix.imss71 (Postfix) with ESMTP id AD6612AF543; Mon, 25 Oct 2010 17:01:41 +0900 (JST) Original-Received: from mgmt1.sk.tsukuba.ac.jp (unknown [130.158.97.223]) by imss12.cc.tsukuba.ac.jp (Postfix) with ESMTP id 8418D2AF542; Mon, 25 Oct 2010 17:01:18 +0900 (JST) Original-Received: from uwakimon.sk.tsukuba.ac.jp (uwakimon.sk.tsukuba.ac.jp [130.158.99.156]) by mgmt1.sk.tsukuba.ac.jp (Postfix) with ESMTP id 8279C3FA050B; Mon, 25 Oct 2010 17:01:18 +0900 (JST) Original-Received: by uwakimon.sk.tsukuba.ac.jp (Postfix, from userid 1000) id 4A5ED1A3805; Mon, 25 Oct 2010 17:03:41 +0900 (JST) In-Reply-To: X-Mailer: VM 8.1.93a under 21.5 (beta29) "garbanzo" ed3b274cc037 XEmacs Lucid (x86_64-unknown-linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:132080 Archived-At: 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. Footnotes: [1] Whether that's a good idea or not is a separate question.