From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Adrian Robert Newsgroups: gmane.emacs.bugs Subject: bug#4381: 23.1.50; Cocoa Emacs: face background for 'region set in ns-win.el after .emacs Date: Thu, 24 Sep 2009 12:15:31 -0400 Message-ID: References: <1247DB83-08F4-4294-988D-494669656649@gmail.com> <82F117D9-CE52-4B25-98CA-0ABAAF0EC35F@gmail.com> <148ADF99-61FF-430A-BCC3-471FDAE93BB8@gmail.com> Reply-To: Adrian Robert , 4381@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v753.1) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1253810853 1949 80.91.229.12 (24 Sep 2009 16:47:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 24 Sep 2009 16:47:33 +0000 (UTC) Cc: 4381@emacsbugs.donarmstrong.com, Erik Charlebois To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Sep 24 18:47:25 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MqrTT-0006Ib-PK for geb-bug-gnu-emacs@m.gmane.org; Thu, 24 Sep 2009 18:47:20 +0200 Original-Received: from localhost ([127.0.0.1]:33246 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MqrTS-0006lw-VT for geb-bug-gnu-emacs@m.gmane.org; Thu, 24 Sep 2009 12:47:18 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MqrTN-0006lr-S3 for bug-gnu-emacs@gnu.org; Thu, 24 Sep 2009 12:47:13 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MqrTI-0006kg-Tg for bug-gnu-emacs@gnu.org; Thu, 24 Sep 2009 12:47:12 -0400 Original-Received: from [199.232.76.173] (port=40633 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MqrTI-0006kN-Go for bug-gnu-emacs@gnu.org; Thu, 24 Sep 2009 12:47:08 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:46236) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MqrTH-0006kr-Iu for bug-gnu-emacs@gnu.org; Thu, 24 Sep 2009 12:47:07 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n8OGl4fc019309; Thu, 24 Sep 2009 09:47:05 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id n8OGK8LI012111; Thu, 24 Sep 2009 09:20:08 -0700 Resent-Date: Thu, 24 Sep 2009 09:20:08 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Adrian Robert Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs , owner@emacsbugs.donarmstrong.com 2Resent-Date: Thu, 24 Sep 2009 16:20:08 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 4381 X-Emacs-PR-Package: emacs,ns X-Emacs-PR-Keywords: Original-Received: via spool by 4381-submit@emacsbugs.donarmstrong.com id=B4381.125380885211365 (code B ref 4381); Thu, 24 Sep 2009 16:20:08 +0000 Original-Received: (at 4381) by emacsbugs.donarmstrong.com; 24 Sep 2009 16:14:12 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from mail-qy0-f197.google.com (mail-qy0-f197.google.com [209.85.221.197]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n8OGEAkh011360 for <4381@emacsbugs.donarmstrong.com>; Thu, 24 Sep 2009 09:14:11 -0700 Original-Received: by qyk35 with SMTP id 35so1527865qyk.19 for <4381@emacsbugs.donarmstrong.com>; Thu, 24 Sep 2009 09:14:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:in-reply-to:references :mime-version:content-type:message-id:cc:content-transfer-encoding :from:subject:date:to:x-mailer; bh=oUDyxRZEtkAscTjJHQOcl/4ls/NeeFYEMCyXVTrRTYY=; b=snPbzhBUOfqW23cNwKyntPpWExlxZGWoF+O9xYEB3jSfKUEzhONx+ZBDb7TxshKsRl Q2jQthHqCqXduKPZqe4DsSfduPCzJS5T0Ns14FUSJIIPG2Mh1Us5623qGK4ODGw9iFfX 0bFqVwtpO7PMj0uP/BBmAn//BVQ8lajiaGthU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=in-reply-to:references:mime-version:content-type:message-id:cc :content-transfer-encoding:from:subject:date:to:x-mailer; b=Ba1O9LdauWgD3JrGOZq5wROVXZ5lhWvReZk1dmb2Yel+uRv55ojZr3GcHmAprbvXnW UxNYwc/oWwZR6wvoz0btDg80fkMdNht6bosZRL1xPau6Lz+lw+cIQJfcvlsRlqnezAzr 1i86JwAu0LdMw0fWBlYbbRoo+qfwzObOq2s/I= Original-Received: by 10.224.23.10 with SMTP id p10mr3402720qab.72.1253808844008; Thu, 24 Sep 2009 09:14:04 -0700 (PDT) Original-Received: from ?10.0.1.3? (dpc6745214221.direcpc.com [67.45.214.221]) by mx.google.com with ESMTPS id 22sm643334qyk.14.2009.09.24.09.13.53 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 24 Sep 2009 09:14:01 -0700 (PDT) In-Reply-To: X-Mailer: Apple Mail (2.753.1) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Resent-Date: Thu, 24 Sep 2009 12:47:12 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:31456 Archived-At: On Sep 24, 2009, at 11:14 AM, Stefan Monnier wrote: >>>> Colors there are defined for dark and light backgrounds, which >>>> is not supported by the NS implementation. >>> Why isn't it supported? >> The only system-defined selection color on NS platforms is for the >> unconfigurable standard background color of white. > > I'm not sure we're talking about the same thing. The lisp/faces.el > notion of dark/light background doesn't have anything to do with the > desktop's background, but with the Emacs buffers's default background > (i.e. whether the background color of the `default' face is rather > light or rather dark). No, we are. The background of content panes in apps under NS (text editors, email readers, PDF viewers, etc.) is unconfigurably fixed to be white. So the system-defined selection color will work well with light backgrounds, but not dark. The patch I attached handles this in a reasonable way though. >> --- faces.el.~1.446.~ 2009-09-05 15:33:48.000000000 -0400 >> +++ faces.el 2009-09-23 23:06:19.000000000 -0400 >> @@ -2281,6 +2281,8 @@ terminal type to a different value." >> (defface region >> '((((class color) (min-colors 88) (background dark)) >> :background "blue3") >> + (((class color) (min-colors 88) (background light) (type ns)) >> + :background "ns_selection_color") >> (((class color) (min-colors 88) (background light)) >> :background "lightgoldenrod2") >> (((class color) (min-colors 16) (background dark)) > > Could you add a comment explaining why you put (background light) in > the specs? I guess it's because the ns_selection_color is (almost) > always defined with the assumption that it will be used on text > displayed on a light background., right? Something like: ;; Region face: under NS, use the system-defined selection color ;; (optimized for the system-fixed white background of other apps), ;; if background is light.