From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kevin Rodgers Newsgroups: gmane.emacs.help Subject: Re: custom function to highlight keywords Date: Fri, 21 Mar 2003 09:26:59 -0700 Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <3E7B3D53.1050300@ihs.com> References: <419874ab.0303192140.1e084495@posting.google.com> <87znnq4cih.fsf@killr.ath.cx> <419874ab.0303200701.7ffa49f5@posting.google.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1048264356 20107 80.91.224.249 (21 Mar 2003 16:32:36 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 21 Mar 2003 16:32:36 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Fri Mar 21 17:32:34 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18wPRa-0005Dp-00 for ; Fri, 21 Mar 2003 17:32:34 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18wPPt-0002LA-06 for gnu-help-gnu-emacs@m.gmane.org; Fri, 21 Mar 2003 11:30:49 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!fu-berlin.de!uni-berlin.de!170.207.51.80!not-for-mail Original-Newsgroups: comp.emacs.xemacs,comp.emacs,gnu.emacs.help Original-Lines: 39 Original-NNTP-Posting-Host: 170.207.51.80 Original-X-Trace: fu-berlin.de 1048264008 75734400 170.207.51.80 (16 [82742]) User-Agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:0.9.4.1) Gecko/20020406 Netscape6/6.2.2 X-Accept-Language: en-us Original-Xref: shelby.stanford.edu comp.emacs.xemacs:70209 comp.emacs:78317 gnu.emacs.help:111291 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:7790 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:7790 trex_eater wrote: > foomaster1200 wrote in message news:<87znnq4cih.fsf@killr.ath.cx>... > >>ckugmk@yahoo.com (trex_eater) writes: >> >> >>>(defun high-on2 ( expname) >>> (interactive "Bexpname: ") >>> (setq my-temp (concat "\\(" expname "\\)" )) >>> ;; Not sure about the line below... >>> (setq my-keywords (my-temp (0 my-new-face))) >>> (setq font-lock-keywords (append font-lock-keywords my-keywords)) >>> >>I might be wrong... but: >> >> >>> (setq my-keywords (my-temp (0 my-new-face))) >>> >>is probably not what you want. You're calling a function "my-temp" >>and calling a function "0" within that. You probably get a wrong >>function error? >> > > Agreed. But what is the lisp syntax to specify that use the contents > of the variable my-temp while constructing the my-keywords in the > following line: > > setq my-keywords (my-temp (0 my-new-face))) (setq my-keywords (list my-temp '(0 my-new-face))) or (setq my-keywords `(,my-temp (0 my-new-face))) -- Kevin Rodgers