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

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

Re: Running highlight-regexp in elisp function - not working


From: Alex Kost
Subject: Re: Running highlight-regexp in elisp function - not working
Date: Fri, 04 Apr 2014 08:46:14 +0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Angus Comber (2014-04-03 16:17 +0400) wrote:

> Hi
>
> I want to run this elisp code to highlight various sections of text in a
> particular type of log file.
>
> I tried:
>
> (defun abc-log ()
>   "abc log file highlighting"
>   (interactive)
>   (goto-char (point-min))
>   (highlight-regexp "message Event.*" hi-yellow)
> )
>
> But when I run I get error:
>
> Symbol's value as variable is void: hi-yellow
>
> And it doesn't highlight.
>
> I just want to be able to highlight-regexp on specific text and use
> hi-yellow.  What am I doing wrong?
>

The error says it all: you use `hi-yellow' as a variable, it should be:

(highlight-regexp "message Event.*" 'hi-yellow)



reply via email to

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