From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: extronom Newsgroups: gmane.emacs.help Subject: set face for added font lock keywords Date: Sun, 9 Jan 2011 07:27:30 -0800 (PST) Organization: http://groups.google.com Message-ID: <865aa6b0-9ca4-4b98-8b41-ecc8c245e84d@r29g2000yqj.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: dough.gmane.org 1294613390 6592 80.91.229.12 (9 Jan 2011 22:49:50 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 9 Jan 2011 22:49:50 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Jan 09 23:49:46 2011 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Pc44y-00018e-Sf for geh-help-gnu-emacs@m.gmane.org; Sun, 09 Jan 2011 23:49:45 +0100 Original-Received: from localhost ([127.0.0.1]:46925 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pc44m-0008Sr-JN for geh-help-gnu-emacs@m.gmane.org; Sun, 09 Jan 2011 17:49:28 -0500 Original-Path: usenet.stanford.edu!postnews.google.com!r29g2000yqj.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 33 Original-NNTP-Posting-Host: 109.193.83.107 Original-X-Trace: posting.google.com 1294586850 2534 127.0.0.1 (9 Jan 2011 15:27:30 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Sun, 9 Jan 2011 15:27:30 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: r29g2000yqj.googlegroups.com; posting-host=109.193.83.107; posting-account=SOZ_cQoAAAAoF1ceGcVggos0EdX5kPNb User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Chrome/8.0.552.224 Safari/534.10, gzip(gfe) Original-Xref: usenet.stanford.edu gnu.emacs.help:184156 X-Mailman-Approved-At: Sun, 09 Jan 2011 17:46:37 -0500 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:78348 Archived-At: I'm trying to add some new keywords by doing font-lock-add-keywords so that a FIXME keyword gets highlighted, which works quite well. When I try to change the color of the used face it doesn't work and probably somebody could give me a hint what the problem is here (I'm still a newbie regarding elisp programming). Here is a function which is suppose to create a new buffer and add the appropriated keyword regexp to be highlighted then but the color can't be changed here it seems why? Maybe I'm missing some basic stuff here? (defun my-new-buffer-color () (interactive) (setq myBuffer (generate-new-buffer "myTemp")) (switch-to-buffer myBuffer) (lisp-interaction-mode) (font-lock-mode 0);; does not seem to help here??? ;; this is supposed to work but doesn't??? (set-face-foreground 'font-lock-comment-face "green" ) (set-variable font-lock-comment-face 'font-lock-comment-face) ;; highlight FIXME (font-lock-add-keywords nil '("\\" 1 font-lock-comment-face prepend)) (insert "this is a FIXME test \n") ) Thanks for any help / hint. Br