From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Daniel Colascione Newsgroups: gmane.emacs.devel Subject: Re: [PATCH 9/9] Detect window-system from display name Date: Tue, 07 Aug 2012 10:09:53 -0700 Message-ID: <50214BE1.3070602@dancol.org> References: <94f53f9a4d2d8ebe852360652eeee429520f3d9f.1344326992.git.dancol@dancol.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig91CAC91299BA4AE430044194" X-Trace: dough.gmane.org 1344359403 4454 80.91.229.3 (7 Aug 2012 17:10:03 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 7 Aug 2012 17:10:03 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Aug 07 19:10:04 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SynI7-0002BH-Ut for ged-emacs-devel@m.gmane.org; Tue, 07 Aug 2012 19:10:00 +0200 Original-Received: from localhost ([::1]:49299 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SynI7-00013F-5g for ged-emacs-devel@m.gmane.org; Tue, 07 Aug 2012 13:09:59 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:45377) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SynI4-00012z-Jc for emacs-devel@gnu.org; Tue, 07 Aug 2012 13:09:57 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SynI3-0001Cl-Hx for emacs-devel@gnu.org; Tue, 07 Aug 2012 13:09:56 -0400 Original-Received: from dancol.org ([96.126.100.184]:38276) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SynI3-0001Cg-Bd for emacs-devel@gnu.org; Tue, 07 Aug 2012 13:09:55 -0400 Original-Received: from c-76-22-66-162.hsd1.wa.comcast.net ([76.22.66.162] helo=[192.168.1.2]) by dancol.org with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.72) (envelope-from ) id 1SynI3-0007Z6-0G; Tue, 07 Aug 2012 10:09:55 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:14.0) Gecko/20120713 Thunderbird/14.0 In-Reply-To: X-Enigmail-Version: 1.4.3 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 96.126.100.184 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:152267 Archived-At: This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig91CAC91299BA4AE430044194 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 8/7/12 8:50 AM, Stefan Monnier wrote: >> +(defvar display-format-alist nil >> + "Alist of patterns to decode display names. >> +The car of each entry is a regular expression matching a display >> +name string. The cdr is a symbol giving the window-system that >> +handles the corresponding kind of display.") > [...] >> +(add-to-list 'display-format-alist '("\\`ns\\'" . ns)) > [...] >> +(add-to-list 'display-format-alist '("\\`windows\\'" . w32)) > [...] >> +(add-to-list 'display-format-alist '("\\`[^:]*:[0-9]+\\(\\.[0-9]+\\)?= \\'" . x)) >=20 > Better just put all three entries directly in the defvar. But then the code that defvars the variable needs to know about all the window systems we might use. It seems cleaner to have the window-system-specific code add the window-system-specific alist entries.= --------------enig91CAC91299BA4AE430044194 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (Darwin) Comment: GPGTools - http://gpgtools.org iEYEARECAAYFAlAhS+IACgkQ17c2LVA10VuXvgCgjyroX3ttlVLu6odFm5fgkely v/8AoOninq8uW/m+enU5u66VqiYBEplV =P77u -----END PGP SIGNATURE----- --------------enig91CAC91299BA4AE430044194--