help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: custom function to highlight keywords


From: Kevin Rodgers
Subject: Re: custom function to highlight keywords
Date: Fri, 21 Mar 2003 09:26:59 -0700
User-agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:0.9.4.1) Gecko/20020406 Netscape6/6.2.2

trex_eater wrote:

foomaster1200 <foomaster1200@yahoo.com> 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)))

--
<a href="mailto:&lt;kevin.rodgers&#64;ihs.com&gt;";>Kevin Rodgers</a>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]