From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kevin Rodgers Newsgroups: gmane.emacs.help Subject: Re: Case insensitive font-lock Date: Mon, 15 Aug 2005 11:08:02 -0600 Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1124126866 21468 80.91.229.2 (15 Aug 2005 17:27:46 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 15 Aug 2005 17:27:46 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Aug 15 19:27:45 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1E4iiT-0004X5-8R for geh-help-gnu-emacs@m.gmane.org; Mon, 15 Aug 2005 19:25:41 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1E4ilq-0005er-K8 for geh-help-gnu-emacs@m.gmane.org; Mon, 15 Aug 2005 13:29:10 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1E4ikF-0005Ha-W6 for help-gnu-emacs@gnu.org; Mon, 15 Aug 2005 13:27:33 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1E4ikA-0005Ed-OW for help-gnu-emacs@gnu.org; Mon, 15 Aug 2005 13:27:29 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1E4ik8-00055B-JD for help-gnu-emacs@gnu.org; Mon, 15 Aug 2005 13:27:24 -0400 Original-Received: from [80.91.229.2] (helo=ciao.gmane.org) by monty-python.gnu.org with esmtp (TLS-1.0:RSA_AES_128_CBC_SHA:16) (Exim 4.34) id 1E4im8-0008K7-Cv for help-gnu-emacs@gnu.org; Mon, 15 Aug 2005 13:29:28 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1E4iTl-0000Vd-CO for help-gnu-emacs@gnu.org; Mon, 15 Aug 2005 19:10:29 +0200 Original-Received: from 207.167.42.60 ([207.167.42.60]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 15 Aug 2005 19:10:29 +0200 Original-Received: from ihs_4664 by 207.167.42.60 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 15 Aug 2005 19:10:29 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-To: help-gnu-emacs@gnu.org Original-Lines: 83 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 207.167.42.60 User-Agent: Mozilla Thunderbird 0.9 (X11/20041105) X-Accept-Language: en-us, en In-Reply-To: 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:28738 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:28738 Bert Geens wrote: > I'm writing a major mode (http://www.lair.be/projects_fvwm-mode.php) for > the Fvwm window manager, now as Fvwm's keywords are case insensitive I was > wondering if there is an easy way to make font lock ignore the casing of > the keywords. ,----[ C-h v font-lock-keywords-case-fold-search RET ] | font-lock-keywords-case-fold-search's value is nil | | Documentation: | *Non-nil means the patterns in `font-lock-keywords' are case-insensitive. | This is normally set via `font-lock-defaults'. | | Defined in `font-lock'. `---- ,----[ C-h v font-lock-defaults RET ] | font-lock-defaults's value is nil | | Documentation: | Defaults for Font Lock mode specified by the major mode. | Defaults should be of the form: | | (KEYWORDS KEYWORDS-ONLY CASE-FOLD SYNTAX-ALIST SYNTAX-BEGIN ...) | | KEYWORDS may be a symbol (a variable or function whose value is the keywords to | use for fontification) or a list of symbols. If KEYWORDS-ONLY is non-nil, | syntactic fontification (strings and comments) is not performed. | If CASE-FOLD is non-nil, the case of the keywords is ignored when fontifying. | If SYNTAX-ALIST is non-nil, it should be a list of cons pairs of the form | (CHAR-OR-STRING . STRING) used to set the local Font Lock syntax table, for | keyword and syntactic fontification (see `modify-syntax-entry'). | | If SYNTAX-BEGIN is non-nil, it should be a function with no args used to move | backwards outside any enclosing syntactic block, for syntactic fontification. | Typical values are `beginning-of-line' (i.e., the start of the line is known to | be outside a syntactic block), or `beginning-of-defun' for programming modes or | `backward-paragraph' for textual modes (i.e., the mode-dependent function is | known to move outside a syntactic block). If nil, the beginning of the buffer | is used as a position outside of a syntactic block, in the worst case. | | These item elements are used by Font Lock mode to set the variables | `font-lock-keywords', `font-lock-keywords-only', | `font-lock-keywords-case-fold-search', `font-lock-syntax-table' and | `font-lock-beginning-of-syntax-function', respectively. | | Further item elements are alists of the form (VARIABLE . VALUE) and are in no | particular order. Each VARIABLE is made buffer-local before set to VALUE. | | Currently, appropriate variables include `font-lock-mark-block-function'. | If this is non-nil, it should be a function with no args used to mark any | enclosing block of text, for fontification via M-g M-g. | Typical values are `mark-defun' for programming modes or `mark-paragraph' for | textual modes (i.e., the mode-dependent function is known to put point and mark | around a text block relevant to that mode). | | Other variables include that for syntactic keyword fontification, | `font-lock-syntactic-keywords' | and those for buffer-specialized fontification functions, | `font-lock-fontify-buffer-function', `font-lock-unfontify-buffer-function', | `font-lock-fontify-region-function', `font-lock-unfontify-region-function', | `font-lock-inhibit-thing-lock' and `font-lock-maximum-size'. | | Defined in `font-lock'. `---- -- Kevin Rodgers