unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* font-lock-beginning-of-syntax-function semi-obsolete?
@ 2005-04-21 14:40 Lute Kamstra
  2005-04-25 17:25 ` Stefan Monnier
  0 siblings, 1 reply; 5+ messages in thread
From: Lute Kamstra @ 2005-04-21 14:40 UTC (permalink / raw)


I'm updating lispref/modex.texi and noticed that the docstring of
font-lock-beginning-of-syntax-function says that it is semi-obsolete:

  *Non-nil means use this function to move back outside all constructs.
  When called with no args it should move point backward to a place which
  is not in a string or comment and not within any bracket-pairs (or else,
  a place such that any bracket-pairs outside it can be ignored for Emacs
  syntax analysis and fontification).

  If this is nil, the beginning of the buffer is used, which is
  always correct but tends to be slow.
  This is normally set via `font-lock-defaults'.
  This variable is semi-obsolete; we recommend setting
  `syntax-begin-function' instead.

So, how do you make Font Lock use the function in the variable
syntax-begin-function to move to top level?

Lute.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: font-lock-beginning-of-syntax-function semi-obsolete?
  2005-04-21 14:40 font-lock-beginning-of-syntax-function semi-obsolete? Lute Kamstra
@ 2005-04-25 17:25 ` Stefan Monnier
  2005-04-25 18:08   ` Lute Kamstra
  0 siblings, 1 reply; 5+ messages in thread
From: Stefan Monnier @ 2005-04-25 17:25 UTC (permalink / raw)
  Cc: emacs-devel

> So, how do you make Font Lock use the function in the variable
> syntax-begin-function to move to top level?

I don't understand the question.  What have you tried?


        Stefan

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: font-lock-beginning-of-syntax-function semi-obsolete?
  2005-04-25 17:25 ` Stefan Monnier
@ 2005-04-25 18:08   ` Lute Kamstra
  2005-05-20  9:24     ` Lute Kamstra
  0 siblings, 1 reply; 5+ messages in thread
From: Lute Kamstra @ 2005-04-25 18:08 UTC (permalink / raw)
  Cc: emacs-devel

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> So, how do you make Font Lock use the function in the variable
>> syntax-begin-function to move to top level?
>
> I don't understand the question.  What have you tried?

>From what I understand, font-lock-beginning-of-syntax-function is
initialized from font-lock-defaults.  You can either specify nil or a
function name.  If you specify nil, Font Lock uses the beginning of
the buffer.  If you specify a function, Font Lock uses that function.
How do you make Font Lock use the function in the variable
syntax-begin-function?

Lute.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: font-lock-beginning-of-syntax-function semi-obsolete?
  2005-04-25 18:08   ` Lute Kamstra
@ 2005-05-20  9:24     ` Lute Kamstra
  2005-05-20 13:02       ` Stefan Monnier
  0 siblings, 1 reply; 5+ messages in thread
From: Lute Kamstra @ 2005-05-20  9:24 UTC (permalink / raw)
  Cc: emacs-devel

Lute Kamstra <Lute.Kamstra.lists@xs4all.nl> writes:

> Stefan Monnier <monnier@iro.umontreal.ca> writes:
>
>>> So, how do you make Font Lock use the function in the variable
>>> syntax-begin-function to move to top level?
>>
>> I don't understand the question.  What have you tried?
>
>> From what I understand, font-lock-beginning-of-syntax-function is
> initialized from font-lock-defaults.  You can either specify nil or a
> function name.  If you specify nil, Font Lock uses the beginning of
> the buffer.  If you specify a function, Font Lock uses that function.
> How do you make Font Lock use the function in the variable
> syntax-begin-function?

Can somebody confirm that this change is correct?

Lute.


Index: lisp/font-lock.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/font-lock.el,v
retrieving revision 1.256
diff -c -r1.256 font-lock.el
*** lisp/font-lock.el	19 May 2005 02:15:09 -0000	1.256
--- lisp/font-lock.el	20 May 2005 09:22:48 -0000
***************
*** 563,573 ****
  a place such that any bracket-pairs outside it can be ignored for Emacs
  syntax analysis and fontification).
  
! If this is nil, the beginning of the buffer is used, which is
! always correct but tends to be slow.
! This is normally set via `font-lock-defaults'.
! This variable is semi-obsolete; we recommend setting
! `syntax-begin-function' instead.")
  
  (defvar font-lock-mark-block-function nil
    "*Non-nil means use this function to mark a block of text.
--- 563,573 ----
  a place such that any bracket-pairs outside it can be ignored for Emacs
  syntax analysis and fontification).
  
! If this is nil, Font Lock uses `syntax-begin-function' to move back
! outside of any comment, string, or sexp.  This variable is semi-obsolete;
! we recommend setting `syntax-begin-function' instead.
! 
! This is normally set via `font-lock-defaults'.")
  
  (defvar font-lock-mark-block-function nil
    "*Non-nil means use this function to mark a block of text.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: font-lock-beginning-of-syntax-function semi-obsolete?
  2005-05-20  9:24     ` Lute Kamstra
@ 2005-05-20 13:02       ` Stefan Monnier
  0 siblings, 0 replies; 5+ messages in thread
From: Stefan Monnier @ 2005-05-20 13:02 UTC (permalink / raw)
  Cc: emacs-devel

> Can somebody confirm that this change is correct?

Confirmed,


        Stefan

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2005-05-20 13:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-04-21 14:40 font-lock-beginning-of-syntax-function semi-obsolete? Lute Kamstra
2005-04-25 17:25 ` Stefan Monnier
2005-04-25 18:08   ` Lute Kamstra
2005-05-20  9:24     ` Lute Kamstra
2005-05-20 13:02       ` Stefan Monnier

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).