From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.devel Subject: RE: need a way to override defface? Date: Sat, 14 Jul 2007 15:58:49 -0700 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1184453996 16632 80.91.229.12 (14 Jul 2007 22:59:56 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 14 Jul 2007 22:59:56 +0000 (UTC) To: Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jul 15 00:59:55 2007 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 1I9qab-0008KY-Tj for ged-emacs-devel@m.gmane.org; Sun, 15 Jul 2007 00:59:50 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I9qab-0000hK-6Y for ged-emacs-devel@m.gmane.org; Sat, 14 Jul 2007 18:59:49 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1I9qaY-0000gX-2w for emacs-devel@gnu.org; Sat, 14 Jul 2007 18:59:46 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1I9qaV-0000gJ-O9 for emacs-devel@gnu.org; Sat, 14 Jul 2007 18:59:44 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I9qaV-0000gG-GV for emacs-devel@gnu.org; Sat, 14 Jul 2007 18:59:43 -0400 Original-Received: from rgminet01.oracle.com ([148.87.113.118]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1I9qaU-0000kS-UG for emacs-devel@gnu.org; Sat, 14 Jul 2007 18:59:43 -0400 Original-Received: from agmgw1.us.oracle.com (agmgw1.us.oracle.com [152.68.180.212]) by rgminet01.oracle.com (Switch-3.2.4/Switch-3.1.6) with ESMTP id l6EMxeWL021315 for ; Sat, 14 Jul 2007 16:59:40 -0600 Original-Received: from acsmt350.oracle.com (acsmt350.oracle.com [141.146.40.150]) by agmgw1.us.oracle.com (Switch-3.2.0/Switch-3.2.0) with ESMTP id l6EJ5H04008348 for ; Sat, 14 Jul 2007 16:59:39 -0600 Original-Received: from dhcp-amer-csvpn-gw1-141-144-64-122.vpn.oracle.com by acsmt351.oracle.com with ESMTP id 3039979261184453938; Sat, 14 Jul 2007 15:58:58 -0700 X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3138 In-Reply-To: X-Brightmail-Tracker: AAAAAQAAAAI= X-Brightmail-Tracker: AAAAAQAAAAI= X-Whitelist: TRUE X-Whitelist: TRUE X-detected-kernel: Linux 2.4-2.6 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:74796 Archived-At: > From: Drew Adams Sent: Monday, July 09, 2007 8:00 PM > > > `setq' will override a value already given to a variable by > > > `defvar' or `defcustom', but is there a way to override a face already > > > defined by `defface'? Interactively, you can use `C-M-x' on another > > > `defface' to override the previous definition, but how can you do that > > > programmatically (without resorting to `eval-defun')? > > > > > > If there is no good way to do this, how about adding one? > > > > What about the set-face-* functions? > > Sure. What I meant, however, was something analogous to what > `setq' does for `defvar' and `defcustom'. Something, for instance, that > a user can put in .emacs to override a predefined `defface'. > > Yes, I realize that users can use Customize, but I'm thinking of something > less interactive. > > As another example, I just sent a message to the list about a buff-menu.el > patch. In order for others to try it out, I need to tell people to > explicitly use `C-M-x' on a particular `defface' sexp. This is because > buff-menu.el is preloaded, it calls `defface', and the patch gives a > different definition of one of the faces. It would be simpler to > give people a snippet of code to load (not eval with `C-M-x'), to override > the predefined `defface'. Anyone else have an idea about this?