Emacs fu.

Kevin D. Clark kclark at CetaceanNetworks.com
Wed Jun 11 17:57:04 EDT 2003


ken at flyingtoasters.net writes:

> Hi, all.  I am not, alas, an Emacs guru, so when one of my engineers had
> the following problem, while I think it rang a bell, I can't for the life
> of me remember how to resolve it.  He edits Verilog files, some large,
> some smaller.  The small ones get the spiffy Verilog mode formatting;
> however, the large ones don't.  He thinks he saw an error "Buffer too
> large" flash up -- however, the machine he's on has goooooobs (4 GB) of
> RAM, so it's almost certainly not a system restraint, but an Emacs
> configuration constraint.
> 
> Where do I change it?

Short answer:

        (setq font-lock-maximum-size nil)

Alternate answer:

Consider using lazy-lock instead.  This will cause Emacs to try to
fontify only the part of the buffer that is visible, and not
everything:

Here's a snippet from my .emacs:

    ;;; ********************
    ;;; lazy-lock is a package which speeds up the highlighting of files
    ;;; by doing it "on-the-fly" -- only the visible portion of the
    ;;; buffer is fontified.  The results may not always be quite as
    ;;; accurate as using full font-lock or fast-lock, but it's *much*
    ;;; faster.  No more annoying pauses when you load files.
    
    (add-hook 'font-lock-mode-hook 'turn-on-lazy-lock)
    ;; I personally don't like "stealth mode" (where lazy-lock starts
    ;; fontifying in the background if you're idle for 30 seconds)
    ;; because it takes too long to wake up again on my piddly Sparc 1+.
    (setq lazy-lock-stealth-time nil)


Hope this helps,

--kevin
-- 
"You say there's no way of knowing whether Excelsius' subjects groan,
when beaten, purely because of the electrons hopping around
inside--like wheels grinding out the mimicry of a voice--or whether
they really groan, that is, because they honestly experience the pain?
A pretty distinction, this! No, Trurl, a sufferer is not one who hands
you his suffering, so that you may touch it, weigh it, bite it like a
coin; a sufferer is one who behaves like a sufferer!"

"The Seventh Sally, or How Trurl's Own Perfection Led to No Good", 
Stanislaw Lem




More information about the gnhlug-discuss mailing list