[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: emacs-w3m underlines everything and mixesup URLs (new w3m-0.5?)
Katsumi Yamaoka <yamaoka@jpl.org> writes:
> Thanks. I've modified w3m.el in the CVS head so that it deletes
> all overlays before rendering a page. Although I think it is no
> more than a workaround, I will ask Masatake YAMATO, who changed
> Emacs at 2004-03-26.
Unfortunately I don't speak Japanese (yet) so I couldn't really follow
the rest of thread but I thought I would post what I found. The
problem is indeed related to that change. Here is a small example to
demonstrate it:
(progn
(pop-to-buffer "Oink")
(insert "hello\nthis\nis\nsome\ntext")
(overlay-put (make-overlay 7 11 nil t) 'face 'highlight)
(sit-for 2)
(erase-buffer)
(insert "more\ntext"))
With previous versions of emacs the text inserted after the
(erase-buffer) did not inherit the overlay (so the text wasn't
highlighted), with current CVS emacs it does. This only happens if
the FRONT-ADVANCE flag is set in make-overlay.
The following patch (which undoes the change) restores the original
behavior:
*** insdel.c.~1.177.~ Sun Apr 4 14:49:41 2004
--- insdel.c Mon Apr 5 20:33:37 2004
***************
*** 445,451 ****
- disordered overlays in the slot `overlays_before' of current_buffer. */
if (adjusted)
{
- fix_start_end_in_overlays(from, to);
fix_overlays_before (current_buffer, from, to);
}
}
--- 445,450 ----
--
Istvan