From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.help Subject: RE: change faces interactively Date: Fri, 20 Jan 2012 07:30:49 -0800 Message-ID: <67E1B9EC96D94790BEA9EF4E01430D8F@us.oracle.com> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1327073482 18637 80.91.229.12 (20 Jan 2012 15:31:22 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 20 Jan 2012 15:31:22 +0000 (UTC) To: "'ishi soichi'" , Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jan 20 16:31:17 2012 Return-path: Envelope-to: geh-help-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 1RoGQt-0006on-KD for geh-help-gnu-emacs@m.gmane.org; Fri, 20 Jan 2012 16:31:16 +0100 Original-Received: from localhost ([::1]:42140 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RoGQs-0008SN-VE for geh-help-gnu-emacs@m.gmane.org; Fri, 20 Jan 2012 10:31:14 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:53784) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RoGQh-0008Rx-8f for help-gnu-emacs@gnu.org; Fri, 20 Jan 2012 10:31:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RoGQb-0001Ia-GC for help-gnu-emacs@gnu.org; Fri, 20 Jan 2012 10:31:03 -0500 Original-Received: from rcsinet15.oracle.com ([148.87.113.117]:21305) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RoGQb-0001IP-70 for help-gnu-emacs@gnu.org; Fri, 20 Jan 2012 10:30:57 -0500 Original-Received: from ucsinet21.oracle.com (ucsinet21.oracle.com [156.151.31.93]) by rcsinet15.oracle.com (Switch-3.4.4/Switch-3.4.4) with ESMTP id q0KFUrvg008554 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 20 Jan 2012 15:30:54 GMT Original-Received: from acsmt357.oracle.com (acsmt357.oracle.com [141.146.40.157]) by ucsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id q0KFUqtA001407 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 20 Jan 2012 15:30:53 GMT Original-Received: from abhmt118.oracle.com (abhmt118.oracle.com [141.146.116.70]) by acsmt357.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id q0KFUqCE017890; Fri, 20 Jan 2012 09:30:52 -0600 Original-Received: from dradamslap1 (/10.159.44.241) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 20 Jan 2012 07:30:52 -0800 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: Thread-Index: AczXRv0LaVSRtU2CTWKA8O5+g+fdggAQIcGg X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-Source-IP: ucsinet21.oracle.com [156.151.31.93] X-CT-RefId: str=0001.0A090202.4F1988AE.01AF,ss=1,re=0.000,fgs=0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1) X-Received-From: 148.87.113.117 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:83529 Archived-At: > I'm trying to develop an interactive function that changes faces. > For example, one way to change the face is > > ;;changes face of "think", "thinks", and "thought" > (define-generic-mode my-mode > nil nil > '(("think?\\w*\\|thought" . 'org-warning)) nil nil) > > But this changes the face according to the mode, not the > interactive command input. > > Is there anyway to develop an interactive function like that ? > (defun change-face-to-one () (interactive) ...) Not quite sure what you're asking. Do you just want to modify a set of faces FS so they look the same as some given face G? If so, you can define a command that reads the names of the faces to modify (FS) and the face to copy (G), and then, in the body of the function, call `copy-face' to modify each of the former (each F in FS).