bugespresso-mode - Bugs: bug #27018, Please remove call to...

 
 

bug #27018: Please remove call to font-lock-fontify-buffer

Submitter:  Lennart Borgman <lborgman2>
Submitted:  Sat 11 Jul 2009 06:49:23 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 11 Jul 2009 07:31:14 PM UTC, comment #2: 

Hi Daniel,

This looks complicated. I guess the problem is that you need to parse the file from top to bottom. And yes, that is a problem in MuMaMo where I finally rewrote the chunk dividing to be done from top to bottom.

I think jit-lock is prepared to help you with this, but I do not know exactly how. There is something about a second more exact parsing pass. As I understand it the idea is that in the first pass you do it quickly. The purpose is to be able to jump around in the file without having to fontify from the beginning. However since programming languages must be read from start to end that fails sometimes. That is where the second pass comes in.

You may perhaps need to ask on Emacs Devel since this is a quite complicated task.

Lennart Borgman <lborgman2>
Sat 11 Jul 2009 07:23:07 PM UTC, comment #1: 

Here's the relevant comment explaining why we make that call:

;; Important to fontify the whole buffer syntactically! If we don't,
;; then we might have regular expression literals that aren't marked
;; as strings, which will screw up parse-partial-sexp, scan-lists,
;; etc. and and produce maddening "unbalanced parenthesis" errors.
;; When we attempt to find the error and scroll to the portion of
;; the buffer containing the problem, JIT-lock will apply the
;; correct syntax to the regular expresion literal and the problem
;; will mysteriously disappear.

i.e., we need to scan the buffer for regular expression literals. Now, we could just scan the buffer for these constructs and give them the appropriate text properties, but that's essentially what font-lock-fontify-buffer is doing, since we're binding font-lock-keywords to nil while we make that call (which means we're left with only applying the syntactic keywords.).

What's the nXhtml-compatible way of doing this?

Daniel Colascione <quotemstr>
Group administrator
Sat 11 Jul 2009 06:49:23 PM UTC, original submission:  

The call to font-lock-fontify-buffer in espresso-mode is a bit problematic. It currently destroys font locking in nXhtml/MuMaMo. Could you please consider removing it?

What is it supposed to do? I saw some other problems too with it.

Lennart Borgman <lborgman2>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by quotemstr (Posted a comment)
  • -email is unavailable- added by lborgman2 (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.13-3230.
    Corresponding source code