From: ckugmk@yahoo.com (trex_eater)
Subject: custom function to highlight keywords
Date: 19 Mar 2003 21:40:00 -0800 [thread overview]
Message-ID: <419874ab.0303192140.1e084495@posting.google.com> (raw)
Time to time I have to look at huge log files for certain key words.
So, I wrote a small lisp function to highlight the keywords. I figured
some of the syntax from looking at few lisp codes.
The function high-on1 works fine. The function high-on2 does not work.
Can some one point out what I am doing wrong. Thanks.
(defun high-on1 ()
(setq my-keywords '(("\\(setq\\|font-lock\\|keywords\\)"
(0 my-new-face))))
(setq font-lock-keywords (append font-lock-keywords my-keywords))
)
(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))
)
next reply other threads:[~2003-03-20 5:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-03-20 5:40 trex_eater [this message]
2003-03-20 9:24 ` custom function to highlight keywords foomaster1200
2003-03-20 15:01 ` trex_eater
2003-03-21 16:26 ` Kevin Rodgers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=419874ab.0303192140.1e084495@posting.google.com \
--to=ckugmk@yahoo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.