From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dan Nicolaescu Newsgroups: gmane.emacs.devel Subject: Re: a review of the merge (Re: Emacs.app merged) Date: Sun, 20 Jul 2008 04:56:54 -0700 Message-ID: <200807201156.m6KBus7O008807@sallyv1.ics.uci.edu> References: <1C66F1FC-BF82-4365-944D-ADCC4D1F435C@gmail.com> <200807160925.m6G9PuVj012462@sallyv1.ics.uci.edu> <200807162123.m6GLNmIw021022@sallyv1.ics.uci.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1216555197 873 80.91.229.12 (20 Jul 2008 11:59:57 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 20 Jul 2008 11:59:57 +0000 (UTC) Cc: Stefan Monnier , emacs- devel To: Adrian Robert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jul 20 14:00:46 2008 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.50) id 1KKXan-0001Ke-A3 for ged-emacs-devel@m.gmane.org; Sun, 20 Jul 2008 14:00:45 +0200 Original-Received: from localhost ([127.0.0.1]:56992 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KKXZu-0002JN-A3 for ged-emacs-devel@m.gmane.org; Sun, 20 Jul 2008 07:59:50 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KKXZp-0002JI-HF for emacs-devel@gnu.org; Sun, 20 Jul 2008 07:59:45 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KKXZn-0002J6-1M for emacs-devel@gnu.org; Sun, 20 Jul 2008 07:59:44 -0400 Original-Received: from [199.232.76.173] (port=50989 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KKXZm-0002J3-OB for emacs-devel@gnu.org; Sun, 20 Jul 2008 07:59:42 -0400 Original-Received: from sallyv1.ics.uci.edu ([128.195.1.109]:41785) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA1:24) (Exim 4.60) (envelope-from ) id 1KKXZm-00013z-6h for emacs-devel@gnu.org; Sun, 20 Jul 2008 07:59:42 -0400 X-ICS-MailScanner-Watermark: 1217159815.74759@u6rvbMazMatPeZ0aW/7B6A Original-Received: from mothra.ics.uci.edu (mothra.ics.uci.edu [128.195.6.93]) by sallyv1.ics.uci.edu (8.13.7+Sun/8.13.7) with ESMTP id m6KBus7O008807; Sun, 20 Jul 2008 04:56:54 -0700 (PDT) In-Reply-To: (Adrian Robert's message of "Sat, 19 Jul 2008 21:27:35 -0400") Original-Lines: 34 X-ICS-MailScanner: Found to be clean X-ICS-MailScanner-SpamCheck: not spam, SpamAssassin (score=-1.44, required 5, autolearn=disabled, ALL_TRUSTED -1.44) X-ICS-MailScanner-From: dann@mothra.ics.uci.edu X-detected-kernel: by monty-python.gnu.org: Solaris 10 (beta) 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:101011 Archived-At: Adrian Robert writes: > On Jul 16, 2008, at 5:23 PM, Dan Nicolaescu wrote: > > > Stefan Monnier writes: > > > > We probably need some common file for these functions (and the > > humongous > > x-colors list) to avoid all the duplication that is happening now. > > If the x-colors list were put in a common file, with RGB specs, then > each non-X GUI could share it at the cost of a few lines to iterate > through the list --e.g.: > > lisp var has a list of char *name, unsigned char r,g,b > > macfns.c: > colormap_t *mac_color_map = malloc(length-of-list); > foreach-list-element mac_color_map[i] = { RGB_TO_ULONG(r,g,b), name > }; > > w32fns.c: > colormap_t *w32_color_map = malloc(length-of-list); > foreach-list-element w32_color_map[i] = { name, PALETTERGB(r,g,b) }; > > nsterm.m: > NSColorList *cl = [[NSColorList alloc] init]; > foreach-list-element [cl setColor: > [NSColor colorWithCalibratedRed:r green: g blue:b alpha: 1.0] > forKey: [NSString stringWithUTF8String: name]]; Let's go one step at a time: please make the nsterm.m code use something like this. After having some working code it would be easy to move the big color array definition into some sort of a common file.