unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* font-lock-fontify-syntactically-region: could someone check?
@ 2007-02-25  3:39 T. V. Raman
  2007-02-25  3:59 ` Miles Bader
  2007-02-25  7:55 ` Ralf Angeli
  0 siblings, 2 replies; 6+ messages in thread
From: T. V. Raman @ 2007-02-25  3:39 UTC (permalink / raw)
  To: emacs-devel

Hi,

I'm seeing the following bug in conjunction with emacspeak, and
at this point  have almost convinced myself that it's not
emacspeak.

Could someone try the following test for me:

Create a file foo.tex 
with something like the following:

%this is a comment
This is not a comment 

and see if the second line (which is not a comment) gets

I find that in my environment, once font-lock finds a comment in
a .tex file, all lines following the comment get fontified as a
comment -- unless I set font-lock-keywords-only to t.

It's somewhat difficult for me to check this without emacspeak
loaded, since I'm  basically dead in the water if emacspeak isn't loaded.
fontified as a comment?
 Thanks, 
 --Raman

-- 
Best Regards,
--raman

      
Email:  raman@users.sf.net
WWW:    http://emacspeak.sf.net/raman/
AIM:    emacspeak       GTalk: tv.raman.tv@gmail.com
PGP:    http://emacspeak.sf.net/raman/raman-almaden.asc
Google: tv+raman 
IRC:    irc://irc.freenode.net/#emacs

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

* Re: font-lock-fontify-syntactically-region: could someone check?
  2007-02-25  3:39 font-lock-fontify-syntactically-region: could someone check? T. V. Raman
@ 2007-02-25  3:59 ` Miles Bader
  2007-02-25  7:55 ` Ralf Angeli
  1 sibling, 0 replies; 6+ messages in thread
From: Miles Bader @ 2007-02-25  3:59 UTC (permalink / raw)
  To: raman; +Cc: emacs-devel

"T. V. Raman" <raman@users.sf.net> writes:
> %this is a comment
> This is not a comment 
>
> and see if the second line (which is not a comment) gets

Seems to work properly in my emacs (version 23, from CVS about 01-feb):

The first line is fontified as a comment, the second line is not.

-miles

-- 
"Don't just question authority,
Don't forget to question me."
-- Jello Biafra

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

* Re: font-lock-fontify-syntactically-region: could someone check?
  2007-02-25  3:39 font-lock-fontify-syntactically-region: could someone check? T. V. Raman
  2007-02-25  3:59 ` Miles Bader
@ 2007-02-25  7:55 ` Ralf Angeli
  2007-02-25 18:25   ` T. V. Raman
  1 sibling, 1 reply; 6+ messages in thread
From: Ralf Angeli @ 2007-02-25  7:55 UTC (permalink / raw)
  To: raman; +Cc: emacs-devel

* T. V. Raman (2007-02-25) writes:

> Could someone try the following test for me:
>
> Create a file foo.tex 
> with something like the following:
>
> %this is a comment
> This is not a comment 
>
> and see if the second line (which is not a comment) gets
> fontified as a comment?

With `emacs -Q' this is working correctly.

> It's somewhat difficult for me to check this without emacspeak
> loaded, since I'm  basically dead in the water if emacspeak isn't loaded.

What version of emacspeak are you using?  Older versions included a
buggy version of `regexp-opt'.

-- 
Ralf

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

* Re: font-lock-fontify-syntactically-region: could someone check?
  2007-02-25  7:55 ` Ralf Angeli
@ 2007-02-25 18:25   ` T. V. Raman
  2007-02-25 19:15     ` Ralf Angeli
  0 siblings, 1 reply; 6+ messages in thread
From: T. V. Raman @ 2007-02-25 18:25 UTC (permalink / raw)
  To: angeli; +Cc: raman, emacs-devel


I'm using the version out of the Emacspeak svn repository --- and
the buggy regexp-opt was nuked a long time ago:-)

Incidentally the bug doesn't manifest itself in anything but the
tex derived modes, so I'm suspecting  there is bad interaction
between the tex-specific syntatic fontifier and emacspeak; the
bug does not happen in any of the other modes e.g. lisp, python,
perl, or c (or their derivatives).

I stepped through the code with debug-on-entry but got very
confused by the complexity in font-lock --- so I'm still at a
loss.

The bug shows up in vanilla tex-mode (i.e. the one that ships
with emacs 22), texinfo-mode -- as well as all modes provided by
auctex. (from comments in the auctex code, it looks like the
cloned and later adopted the syntactic fontifier from tex-mode.el)

>>>>> "Ralf" == Ralf Angeli <angeli@caeruleus.net> writes:
    Ralf> * T. V. Raman (2007-02-25) writes:
    >> Could someone try the following test for me:
    >> 
    >> Create a file foo.tex with something like the following:
    >> 
    >> %this is a comment This is not a comment
    >> 
    >> and see if the second line (which is not a comment) gets
    >> fontified as a comment?
    Ralf> 
    Ralf> With `emacs -Q' this is working correctly.
    Ralf> 
    >> It's somewhat difficult for me to check this without
    >> emacspeak loaded, since I'm basically dead in the water if
    >> emacspeak isn't loaded.
    Ralf> 
    Ralf> What version of emacspeak are you using?  Older
    Ralf> versions included a buggy version of `regexp-opt'.
    Ralf> 
    Ralf> -- Ralf

-- 
Best Regards,
--raman

      
Email:  raman@users.sf.net
WWW:    http://emacspeak.sf.net/raman/
AIM:    emacspeak       GTalk: tv.raman.tv@gmail.com
PGP:    http://emacspeak.sf.net/raman/raman-almaden.asc
Google: tv+raman 
IRC:    irc://irc.freenode.net/#emacs

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

* Re: font-lock-fontify-syntactically-region: could someone check?
  2007-02-25 18:25   ` T. V. Raman
@ 2007-02-25 19:15     ` Ralf Angeli
  2007-02-25 21:27       ` T. V. Raman
  0 siblings, 1 reply; 6+ messages in thread
From: Ralf Angeli @ 2007-02-25 19:15 UTC (permalink / raw)
  To: raman; +Cc: emacs-devel

* T. V. Raman (2007-02-25) writes:

> I stepped through the code with debug-on-entry but got very
> confused by the complexity in font-lock --- so I'm still at a
> loss.
>
> The bug shows up in vanilla tex-mode (i.e. the one that ships
> with emacs 22), texinfo-mode -- as well as all modes provided by
> auctex. (from comments in the auctex code, it looks like the
> cloned and later adopted the syntactic fontifier from tex-mode.el)

emacspeak-advice.el contains the following code:

(add-hook 'text-mode-hook
          (function (lambda ()
                      (modify-syntax-entry 10 " "))))

In TeX-related modes a newline is considered the end of a comment.
The code above sets its syntax to whitespace, though.  Like this no
comment end can be found.

-- 
Ralf

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

* Re: font-lock-fontify-syntactically-region: could someone check?
  2007-02-25 19:15     ` Ralf Angeli
@ 2007-02-25 21:27       ` T. V. Raman
  0 siblings, 0 replies; 6+ messages in thread
From: T. V. Raman @ 2007-02-25 21:27 UTC (permalink / raw)
  To: angeli; +Cc: raman, emacs-devel

Yes, I think this is it.

Thanks for catching it for me -- I was looking in all the wrong places.

>>>>> "Ralf" == Ralf Angeli <angeli@caeruleus.net> writes:
    Ralf> * T. V. Raman (2007-02-25) writes:
    >> I stepped through the code with debug-on-entry but got
    >> very confused by the complexity in font-lock --- so I'm
    >> still at a loss.
    >> 
    >> The bug shows up in vanilla tex-mode (i.e. the one that
    >> ships with emacs 22), texinfo-mode -- as well as all modes
    >> provided by auctex. (from comments in the auctex code, it
    >> looks like the cloned and later adopted the syntactic
    >> fontifier from tex-mode.el)
    Ralf> 
    Ralf> emacspeak-advice.el contains the following code:
    Ralf> 
    Ralf> (add-hook 'text-mode-hook (function (lambda ()
    Ralf> (modify-syntax-entry 10 " "))))
    Ralf> 
    Ralf> In TeX-related modes a newline is considered the end of
    Ralf> a comment.  The code above sets its syntax to
    Ralf> whitespace, though.  Like this no comment end can be
    Ralf> found.
    Ralf> 
    Ralf> -- Ralf

-- 
Best Regards,
--raman

      
Email:  raman@users.sf.net
WWW:    http://emacspeak.sf.net/raman/
AIM:    emacspeak       GTalk: tv.raman.tv@gmail.com
PGP:    http://emacspeak.sf.net/raman/raman-almaden.asc
Google: tv+raman 
IRC:    irc://irc.freenode.net/#emacs

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

end of thread, other threads:[~2007-02-25 21:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-02-25  3:39 font-lock-fontify-syntactically-region: could someone check? T. V. Raman
2007-02-25  3:59 ` Miles Bader
2007-02-25  7:55 ` Ralf Angeli
2007-02-25 18:25   ` T. V. Raman
2007-02-25 19:15     ` Ralf Angeli
2007-02-25 21:27       ` T. V. Raman

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).