From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii 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 05:28:28 -0400 Message-ID: References: <19651.37838.815906.240014@fencepost.gnu.org> <87r5fed7hf.fsf@uwakimon.sk.tsukuba.ac.jp> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1287999735 6925 80.91.229.12 (25 Oct 2010 09:42:15 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 25 Oct 2010 09:42:15 +0000 (UTC) Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org To: "Stephen J. Turnbull" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Oct 25 11:42:13 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 1PAJZE-0007gU-Mb for ged-emacs-devel@m.gmane.org; Mon, 25 Oct 2010 11:42:12 +0200 Original-Received: from localhost ([127.0.0.1]:36982 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PAJQ9-00066Q-NE for ged-emacs-devel@m.gmane.org; Mon, 25 Oct 2010 05:32:49 -0400 Original-Received: from [140.186.70.92] (port=40055 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PAJPu-000634-FK for emacs-devel@gnu.org; Mon, 25 Oct 2010 05:32:35 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PAJLx-0003TO-Us for emacs-devel@gnu.org; Mon, 25 Oct 2010 05:28:31 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]:37451) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PAJLx-0003TJ-T7 for emacs-devel@gnu.org; Mon, 25 Oct 2010 05:28:29 -0400 Original-Received: from eliz by fencepost.gnu.org with local (Exim 4.69) (envelope-from ) id 1PAJLw-00031i-Nb; Mon, 25 Oct 2010 05:28:28 -0400 In-reply-to: <87r5fed7hf.fsf@uwakimon.sk.tsukuba.ac.jp> (stephen@xemacs.org) 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:132085 Archived-At: > From: "Stephen J. Turnbull" > Cc: Stefan Monnier , > Eli Zaretskii , > emacs-devel@gnu.org > Date: Mon, 25 Oct 2010 17:03:40 +0900 > > 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. Actually, the common code is quite abundant, because the back-end specific code is not well separated from the platform independent code that manipulates Emacs internal objects. This causes maintenance headaches, whereby work on the same bug or feature needs to be done in several places. E.g., I recently discovered that various bugfixes and new features introduced into mouse highlight were done only in the GUI parts of the display engine, even though the TTY display also supports mouse highlight (with GPM). This was because the TTY code used a slightly tailored version of a function that was originally written for in xterm.c. Then the GUI variant of that function was developed, while the TTY variant was simply forgotten in its original shape. So keeping the common code common makes sense even if Emacs will never be used on X and MS-Windows in the same session, and even if the back-ends are very different.