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 18:07:32 -0800 Message-ID: <3859A6A238864D3D82B0DE219A88A724@us.oracle.com> References: <67E1B9EC96D94790BEA9EF4E01430D8F@us.oracle.com> 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 1327111685 5876 80.91.229.12 (21 Jan 2012 02:08:05 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 21 Jan 2012 02:08:05 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: "'ishi soichi'" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Jan 21 03:08:01 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 1RoQN5-0003r6-Ma for geh-help-gnu-emacs@m.gmane.org; Sat, 21 Jan 2012 03:07:59 +0100 Original-Received: from localhost ([::1]:44741 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RoQMz-0006V4-7x for geh-help-gnu-emacs@m.gmane.org; Fri, 20 Jan 2012 21:07:53 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:57007) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RoQMu-0006Uo-Kh for help-gnu-emacs@gnu.org; Fri, 20 Jan 2012 21:07:49 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RoQMt-00060p-AC for help-gnu-emacs@gnu.org; Fri, 20 Jan 2012 21:07:48 -0500 Original-Received: from rcsinet15.oracle.com ([148.87.113.117]:26098) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RoQMt-00060g-4q for help-gnu-emacs@gnu.org; Fri, 20 Jan 2012 21:07:47 -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 q0L27cYC016558 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 21 Jan 2012 02:07:39 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 q0L27bhC019219 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 21 Jan 2012 02:07:38 GMT Original-Received: from abhmt108.oracle.com (abhmt108.oracle.com [141.146.116.60]) by acsmt357.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id q0L27bBR006526; Fri, 20 Jan 2012 20:07:37 -0600 Original-Received: from dradamslap1 (/10.159.46.117) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 20 Jan 2012 18:07:37 -0800 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: Thread-Index: AczX2s7XudLItf8uTRmbVNH3oN54OwABjOXQ 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.0A090208.4F1A1DEC.005D,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:83532 Archived-At: > Sorry for my poor explanation. > What I want is an interactive function that turns on/off > face changes by command. > > Say, a buffer is in "my-mode". The above > (define-generic-mode ... ) will AUTOMATICALLY apply the face > definitions to all characters as soon as the buffer is > opened (assuming the mode definition recognizes its file extension). > I would rather develop a function that applies the faces > AT WILL even after the buffer is opened IN THAT MODE. > For example, a buffer is in "my-mode" but none of the words > in that buffer is applied with any faces. > Now I will implement a function, (defun my-mode-face-1 () > (interactive)...), then a certain set of words in that > buffer is bold-faced. After that, I will implement another > function, (defun my-mode-face-2 () (interactive) ...), then > another set of the words in that buffer is italic-faced. And so on... > > If it does not make sense, please ask me again. I appreciate it. Sorry, I don't have much time right now - perhaps someone else can help. If you just want to highlight stuff then perhaps have a look here: http://www.emacswiki.org/emacs/FaceMenuPlus http://www.emacswiki.org/emacs/HighlightLibrary