From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juanma Barranquero Newsgroups: gmane.emacs.bugs Subject: bug#9785: w32-default-color-map should be obsolete Date: Tue, 18 Oct 2011 17:32:31 +0200 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1318952062 19229 80.91.229.12 (18 Oct 2011 15:34:22 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 18 Oct 2011 15:34:22 +0000 (UTC) To: 9785@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Oct 18 17:34:18 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RGBgD-0001Gh-QG for geb-bug-gnu-emacs@m.gmane.org; Tue, 18 Oct 2011 17:34:14 +0200 Original-Received: from localhost ([::1]:54944 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RGBgD-0007K6-6s for geb-bug-gnu-emacs@m.gmane.org; Tue, 18 Oct 2011 11:34:13 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:40824) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RGBg6-0007It-SP for bug-gnu-emacs@gnu.org; Tue, 18 Oct 2011 11:34:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RGBg5-0000Ya-LO for bug-gnu-emacs@gnu.org; Tue, 18 Oct 2011 11:34:06 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:60129) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RGBg5-0000YW-Jk for bug-gnu-emacs@gnu.org; Tue, 18 Oct 2011 11:34:05 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1RGBh0-0008RD-FD for bug-gnu-emacs@gnu.org; Tue, 18 Oct 2011 11:35:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juanma Barranquero Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 18 Oct 2011 15:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 9785 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: Bug-Gnu-Emacs Original-Received: via spool by submit@debbugs.gnu.org id=B.131895206232387 (code B ref -1); Tue, 18 Oct 2011 15:35:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 18 Oct 2011 15:34:22 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RGBgM-0008QJ-B0 for submit@debbugs.gnu.org; Tue, 18 Oct 2011 11:34:22 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RGBgI-0008Q3-UZ for submit@debbugs.gnu.org; Tue, 18 Oct 2011 11:34:19 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RGBfH-0000GM-IV for submit@debbugs.gnu.org; Tue, 18 Oct 2011 11:33:16 -0400 Original-Received: from lists.gnu.org ([140.186.70.17]:58107) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RGBfH-0000GH-FC for submit@debbugs.gnu.org; Tue, 18 Oct 2011 11:33:15 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:40678) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RGBfF-0007HA-Rb for bug-gnu-emacs@gnu.org; Tue, 18 Oct 2011 11:33:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RGBfE-0000C9-SU for bug-gnu-emacs@gnu.org; Tue, 18 Oct 2011 11:33:13 -0400 Original-Received: from mail-qw0-f41.google.com ([209.85.216.41]:58294) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RGBfE-0000B6-Ib for bug-gnu-emacs@gnu.org; Tue, 18 Oct 2011 11:33:12 -0400 Original-Received: by qadb17 with SMTP id b17so636140qad.0 for ; Tue, 18 Oct 2011 08:33:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type :content-transfer-encoding; bh=Lb9vKu/I0d7LF+RcnguyXv7DPUlHOG8iPMz0Hb5mOQA=; b=gsLT9nJZ8T3upO2vqkj+NxWMr+ZPVWPl17EdMjss/8gES9GznisY9XpJhB0F44ubp6 gpJnh5Aa9pKgp2JK4FbdrnMvYPZb6he8orHJ3oo48YcT8/IC/zgiISIcuWcSvc2DRtAg cC8V4xO9Jv+YW/PT6ERX+LofH0QIlOIYOrCLs= Original-Received: by 10.68.13.35 with SMTP id e3mr5694499pbc.31.1318951991146; Tue, 18 Oct 2011 08:33:11 -0700 (PDT) Original-Received: by 10.143.165.16 with HTTP; Tue, 18 Oct 2011 08:32:31 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Tue, 18 Oct 2011 11:35:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:52795 Archived-At: Package: emacs Severity: minor After revno:106121, the w32-specific function w32-default-color-map is only used from C, in w32fns.c:Fx_open_connection, to initialize the color map in case ~/rgb.txt and etc/rgb.txt are not found. It does not seem useful to expose it to elisp, so I suggest turning it into an internal function, and marking the elisp interface as obsolete. =C2=A0 =C2=A0 Juanma 2011-10-18 Juanma Barranquero * w32fns.c (w32_default_color_map): New function, extracted from Fw32_default_color_map. (Fw32_default_color_map, Fx_open_connection): Use it. 2011-10-18 Juanma Barranquero * term/w32-win.el (w32-default-color-map): Declare obsolete. =3D=3D=3D modified file 'lisp/term/w32-win.el' --- lisp/term/w32-win.el 2011-05-04 14:03:16 +0000 +++ lisp/term/w32-win.el 2011-10-18 14:40:13 +0000 @@ -85,6 +85,7 @@ (define-obsolete-function-alias 'w32-select-font 'x-select-font "23.1") (defvar w32-color-map) ;; defined in w32fns.c +(make-obsolete 'w32-default-color-map nil "24.1") (declare-function w32-send-sys-command "w32fns.c") (declare-function set-message-beep "w32console.c") =3D=3D=3D modified file 'src/w32fns.c' --- src/w32fns.c 2011-07-08 12:46:17 +0000 +++ src/w32fns.c 2011-10-18 14:35:09 +0000 @@ -635,9 +635,8 @@ {"LightGreen" , PALETTERGB (144,238,144)}, }; -DEFUN ("w32-default-color-map", Fw32_default_color_map, Sw32_default_color= _map, - 0, 0, 0, doc: /* Return the default color map. */) - (void) +static Lisp_Object +w32_default_color_map (void) { int i; colormap_t *pc =3D w32_color_map; @@ -658,6 +657,13 @@ return (cmap); } +DEFUN ("w32-default-color-map", Fw32_default_color_map, Sw32_default_color= _map, + 0, 0, 0, doc: /* Return the default color map. */) + (void) +{ + return w32_default_color_map (); +} + static Lisp_Object w32_color_map_lookup (char *colorname) { @@ -4768,7 +4773,7 @@ UNGCPRO; } if (NILP (Vw32_color_map)) - Vw32_color_map =3D Fw32_default_color_map (); + Vw32_color_map =3D w32_default_color_map (); /* Merge in system logical colors. */ add_system_logical_colors_to_map (&Vw32_color_map);