comparison lisp/font-lock.el @ 20851:26c5d61bc3fd

(font-lock-keywords): Doc fix.
author Richard M. Stallman <rms@gnu.org>
date Fri, 06 Feb 1998 06:10:30 +0000
parents 6bede5bff2c5
children c6e733c90ed8
comparison
equal deleted inserted replaced
20850:ffbaaba0bf76 20851:26c5d61bc3fd
293 293
294 ;; Fontification variables: 294 ;; Fontification variables:
295 295
296 (defvar font-lock-keywords nil 296 (defvar font-lock-keywords nil
297 "A list of the keywords to highlight. 297 "A list of the keywords to highlight.
298 Each element should be of the form: 298 Each element should have one of these forms:
299 299
300 MATCHER 300 MATCHER
301 (MATCHER . MATCH) 301 (MATCHER . MATCH)
302 (MATCHER . FACENAME) 302 (MATCHER . FACENAME)
303 (MATCHER . HIGHLIGHT) 303 (MATCHER . HIGHLIGHT)
316 316
317 MATCH-HIGHLIGHT should be of the form: 317 MATCH-HIGHLIGHT should be of the form:
318 318
319 (MATCH FACENAME OVERRIDE LAXMATCH) 319 (MATCH FACENAME OVERRIDE LAXMATCH)
320 320
321 Where MATCHER can be either the regexp to search for, or the function name to 321 where MATCHER can be either the regexp to search for, or the function name to
322 call to make the search (called with one argument, the limit of the search) and 322 call to make the search (called with one argument, the limit of the search) and
323 return non-nil if it succeeds (and set `match-data' appropriately). 323 return non-nil if it succeeds (and set `match-data' appropriately).
324 MATCHER regexps can be generated via the function `regexp-opt'. MATCH is the 324 MATCHER regexps can be generated via the function `regexp-opt'. MATCH is the
325 subexpression of MATCHER to be highlighted. MATCH can be calculated via the 325 subexpression of MATCHER to be highlighted. MATCH can be calculated via the
326 function `regexp-opt-depth'. FACENAME is an expression whose value is the face 326 function `regexp-opt-depth'. FACENAME is an expression whose value is the face
349 349
350 MATCH-ANCHORED should be of the form: 350 MATCH-ANCHORED should be of the form:
351 351
352 (MATCHER PRE-MATCH-FORM POST-MATCH-FORM MATCH-HIGHLIGHT ...) 352 (MATCHER PRE-MATCH-FORM POST-MATCH-FORM MATCH-HIGHLIGHT ...)
353 353
354 Where MATCHER is as for MATCH-HIGHLIGHT with one exception; see below. 354 where MATCHER is as for MATCH-HIGHLIGHT with one exception; see below.
355 PRE-MATCH-FORM and POST-MATCH-FORM are evaluated before the first, and after 355 PRE-MATCH-FORM and POST-MATCH-FORM are evaluated before the first, and after
356 the last, instance MATCH-ANCHORED's MATCHER is used. Therefore they can be 356 the last, instance MATCH-ANCHORED's MATCHER is used. Therefore they can be
357 used to initialise before, and cleanup after, MATCHER is used. Typically, 357 used to initialise before, and cleanup after, MATCHER is used. Typically,
358 PRE-MATCH-FORM is used to move to some position relative to the original 358 PRE-MATCH-FORM is used to move to some position relative to the original
359 MATCHER, before starting with MATCH-ANCHORED's MATCHER. POST-MATCH-FORM might 359 MATCHER, before starting with MATCH-ANCHORED's MATCHER. POST-MATCH-FORM might