all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Glenn Morris <rgm@gnu.org>
Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org
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 04:20:15 -0400	[thread overview]
Message-ID: <E1PAIHv-0006O9-L9@fencepost.gnu.org> (raw)
In-Reply-To: <bb4ocaswdj.fsf@fencepost.gnu.org> (message from Glenn Morris on Mon, 25 Oct 2010 00:56:56 -0400)

> Cc: Eli Zaretskii <eliz@gnu.org>,  emacs-devel@gnu.org
> From: Glenn Morris <rgm@gnu.org>
> Date: Mon, 25 Oct 2010 00:56:56 -0400
> 
> 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.
> 
> Does anyone know what the reason for this design choice was?

It's not a conscious design choice, just a historical accident.

> Was it just that each port was developed independently by copying
> the X files and modifying them, and nobody ever merged them?

Yes.  Also because the original X-centric design never bothered to
separate the parts which are specific to X from purely Emacs
internals.  This made copy/paste job much easier than the refactoring
required for adding yet another windowing backend.

Btw, "nobody ever merged them" is not entirely true.  Over the years,
several such merges were done; as result, we now have menu.c where
previously there were only xmenu.c and w32menu.c, and also several
functions were moved from xterm.c/w32term.c to xdisp.c.  So it's more
accurate to say that the merge was never completed.

In my experience, most of the job that's left should start by defining
portable (and opaque, as far as possible) data types, and portable
wrapper functions, that will have different definitions on different
platforms.  If this is done well, the rest should be almost a
mechanical job.

> Or is/was there some advantage to this duplication?

No advantages; only disadvantages.



  parent reply	other threads:[~2010-10-25  8:20 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <E1P9lT2-0005WD-37@internal.in.savannah.gnu.org>
     [not found] ` <jwvmxq4pez1.fsf-monnier+emacs@gnu.org>
2010-10-24  2:02   ` [Emacs-diffs] /srv/bzr/emacs/trunk r102057: Make all 3 copies of x-select-enable-clipboard have the same doc Glenn Morris
2010-10-24  5:08     ` Dan Nicolaescu
2010-10-24 19:45       ` Glenn Morris
2010-10-25 13:25         ` Adrian Robert
2010-10-25 14:51           ` Dan Nicolaescu
2010-10-26  2:59             ` ns-win.el [was Re: [Emacs-diffs] /srv/bzr/emacs/trunk r102057: Make all 3 copies of x-select-enable-clipboard have the same doc.] Glenn Morris
2010-10-26  4:25               ` ns-win.el Glenn Morris
2010-10-26  4:54                 ` ns-win.el CHENG Gao
2010-10-26  5:10                 ` ns-win.el Adrian Robert
2010-10-26 15:18                 ` ns-win.el Stefan Monnier
2010-10-26  5:07               ` ns-win.el [was Re: [Emacs-diffs] /srv/bzr/emacs/trunk r102057: Make all 3 copies of x-select-enable-clipboard have the same doc.] Adrian Robert
2010-10-26  6:45                 ` ns-win.el Glenn Morris
2010-10-26  7:47                   ` ns-win.el Eli Zaretskii
2010-10-26 10:49                   ` ns-win.el Adrian Robert
2010-10-26 15:27                     ` ns-win.el Stefan Monnier
2010-10-26 19:25                       ` ns-win.el Glenn Morris
2010-10-26 19:57                         ` ns-win.el Adrian Robert
2010-10-26  6:50                 ` ns-win.el Glenn Morris
2010-10-26  7:49                   ` ns-win.el Eli Zaretskii
2010-10-26 13:08                     ` ns-win.el Ted Zlatanov
2010-10-26 14:42                       ` ns-win.el Eli Zaretskii
2010-10-26 17:35                         ` ns-win.el Ted Zlatanov
2010-10-26  7:32                 ` ns-win.el Daniel Pittman
2010-10-24  7:55     ` [Emacs-diffs] /srv/bzr/emacs/trunk r102057: Make all 3 copies of x-select-enable-clipboard have the same doc Eli Zaretskii
2010-10-24 19:47       ` Glenn Morris
2010-10-25  0:54         ` Stefan Monnier
2010-10-25  4:56           ` Glenn Morris
2010-10-25  8:03             ` Stephen J. Turnbull
2010-10-25  9:28               ` Eli Zaretskii
2010-10-25  8:20             ` Eli Zaretskii [this message]
2010-10-28  3:54           ` moving x-select* [was Re: [Emacs-diffs] /srv/bzr/emacs/trunk r102057: Make all 3 copies of x-select-enable-clipboard have the same doc.] Glenn Morris
2010-10-28  4:06             ` Eli Zaretskii
2010-10-28  5:32               ` Jason Rumney
2010-10-28  6:40                 ` Chad Brown
2010-10-28 13:54                   ` moving x-select* Jason Rumney
2010-10-28 15:28                     ` Chad Brown
2010-10-28 14:23             ` Stefan Monnier

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

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

  git send-email \
    --in-reply-to=E1PAIHv-0006O9-L9@fencepost.gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=rgm@gnu.org \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.