From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tim Johnson Newsgroups: gmane.emacs.help Subject: Evaluating a 'variable' in a nested list Date: Tue, 20 Apr 2010 20:44:55 -0500 Organization: AkWebsoft Message-ID: Reply-To: tim@johnsons-web.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1273012562 30751 80.91.229.12 (4 May 2010 22:36:02 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 4 May 2010 22:36:02 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed May 05 00:36:00 2010 connect(): No such file or directory 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 1O9Qia-0007cq-8c for geh-help-gnu-emacs@m.gmane.org; Wed, 05 May 2010 00:35:56 +0200 Original-Received: from localhost ([127.0.0.1]:60865 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O9QiZ-0002Qr-Hy for geh-help-gnu-emacs@m.gmane.org; Tue, 04 May 2010 18:35:55 -0400 Original-Path: usenet.stanford.edu!postnews.google.com!news2.google.com!npeer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!nntp.supernews.com!news.supernews.com.POSTED!not-for-mail Original-NNTP-Posting-Date: Tue, 20 Apr 2010 20:44:55 -0500 Original-Newsgroups: gnu.emacs.help User-Agent: slrn/0.9.9p1 (Linux) Original-Lines: 50 Original-X-Trace: sv3-JqpnLcNOGCHKaw4TXGP4Ze7ZXUuLXLVm3PRcOLmSxtgiI1td0aBdDVTvvhX4/XQDHjQi+tMOjykJD0g!B1I9p+5zzOntgQhanIEYoqihS/JnalTRynKO7HsaBISIBGpG+S1BMxFc0vFhRKQGsydBzeo= Original-X-Complaints-To: www.supernews.com/docs/abuse.html X-DMCA-Complaints-To: www.supernews.com/docs/dmca.html X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 Original-Xref: usenet.stanford.edu gnu.emacs.help:177808 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:73245 Archived-At: I'm using emacs 23.1.1 on slackware 13.0 32-bit. I've created an elisp file to set highlighting patterns for extra keywords for the scheme programming language. The file appears thusly: ;; ================================================================ (defface scheme-font-lock-user-keywords-face '((((class color) (background light)) (:foreground "red4")) (((class color) (background dark)) (:foreground "yellow3")) (((class grayscale) (background light)) (:foreground "dimgray" :italic t)) (((class grayscale) (background dark)) (:foreground "lightgray" :italic t)) (t (:bold t))) "Font lock mode face used to highlight user-defined keywords for scheme mode." :group 'font-lock-faces) (defvar scheme-font-lock-user-keywords-face 'scheme-font-lock-user-keywords-face) ;; Test a single regex for the eq? keyword (defconst scheme-user-keywords-regexp (regexp-opt '("eq?"))) (provide 'tj-scheme) ;; ================================================================= Using http://www.gnu.org/software/emacs/manual/html_node/emacs/Font-Lock.html as an example, I have added the following to my .emacs ;; =============================================================== (require 'tj-scheme) (add-hook 'scheme-mode-hook (lambda () (font-lock-add-keywords nil '((scheme-user-keywords-regexp 1 scheme-font-lock-user-keywords-face t))))) ;; ================================================================== When I load a scheme file, syntax highlight fails and I get the following error message: """ Error during redisplay: (void-function scheme-user-keywords-regexp) """ I believe that I have coded the following form: '((scheme-user-keywords-regexp 1 scheme-font-lock-user-keywords-face t)) Incorrectly, so that 'scheme-user-keywords-regexp is being treated as a function when the hook is run. I can verify that scheme-user-keywords-regexp is being displayed correctly when I invoke C-h v Can someone advise me of the appropriate syntax for the form? thanks -- Tim tim@ johnsons-web.com||akwebsoft.com http://www.akwebsoft.com