Subject: Re: bug#17730: 24.4.50; (elisp) `Syntactic Font Lock': undescribed OTHER-VARS

From: Lars Ingebrigtsen <[email-masked]>
Date: Fri, 29 Apr 2016 22:41:44 +0200

Drew Adams <[email-masked]> writes:

> The doc refers to "an OTHER-VARS element in `font-lock-defaults':
>
>  Variable: font-lock-syntactic-face-function
>  If this variable is non-`nil', it should be a function to determine
>  which face to use for a given syntactic element (a string or a
>  comment).  The value is normally set through an OTHER-VARS element
>  in `font-lock-defaults'.
>
> Incomprehensible.  There is no "an OTHER-VARS element" described
> anywhere in the doc of `font-lock-defaults' or in the link in the next
> paragraph (node `Faces for Font Lock').

After looking through font-core.el for several seconds, I don't have any
idea, either, what this is supposed to mean.  This is the full text:

The previous version was:

-Specify this variable using @var{other-vars} in
 @code{font-lock-defaults}.

and

-Major modes normally set this variable with @var{other-vars} in
-@code{font-lock-defaults}.

but vc-region-history on the doc string of that variable seems to say
that it has never talked about "other-vars".

Anybody want to take a guess at what this is supposed to mean?

 -- Variable: font-lock-syntactic-face-function
     If this variable is non-‘nil’, it should be a function to determine
     which face to use for a given syntactic element (a string or a
     comment).  The value is normally set through an OTHER-VARS element
     in ‘font-lock-defaults’.

     The function is called with one argument, the parse state at point
     returned by ‘parse-partial-sexp’, and should return a face.  The
     default value returns ‘font-lock-comment-face’ for comments and
     ‘font-lock-string-face’ for strings (*note Faces for Font Lock::).

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no