jschaf / esup

ESUP - Emacs Start Up Profiler
401 stars 21 forks source link

Symbol's function definition is void: font-lock-ensure #12

Closed larstvei closed 10 years ago

larstvei commented 10 years ago

I get the following error when I run esup

eval: Symbol's function definition is void: font-lock-ensure

I commented out the line, at it worked fine.

I run Emacs 24.4.1 on Mac OS X yosemite.

jschaf commented 10 years ago

Ah, didn't realize that font-lock-ensure was new. Just pushed a fix to master. Lemme know if it works.

larstvei commented 10 years ago

Hi, now it messaged Fontifying *temp*... (regexps........................) 133 times.

For me changing

(if (functionp 'font-lock-ensure)
    (font-lock-ensure)
  ;; font-lock-fontify-buffer is marked as interactive only
  ;; in Emacs 25.  Call interactively to avoid
  ;; byte-compilation errors
  (call-interactively 'font-lock-fontify-buffer))

to

(when (functionp 'font-lock-ensure)
  (font-lock-ensure))

Fixed the issue. I'm not to familiar with font-lock, so not sure if this is a viable solution.

jschaf commented 10 years ago

When you ran the original code, were the results in esup fontified?

By deleting that line, I'm pretty sure you disabled font-lock so you shouldn't have any syntax highlighting.

larstvei commented 10 years ago

True! I tried to call font-lock-fontify-buffer non-interactively, and that worked just fine. When it's called interactively it runs in verbose, and ends up generating a lot of messages (and this seriously slows it down).

I did not get any warnings or errors when I compiled it. If you get warnings/errors you could see if running font-lock-default-fontify-buffer instead helps? I'm pretty sure that will work just the same, but have no idea if it will work in Emacs 25.

larstvei commented 10 years ago

Works great, thanks!