emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Uninformative comment in files.el


From: Yoni Rabkin Katzenell
Subject: Re: Uninformative comment in files.el
Date: Wed, 12 Dec 2007 16:22:01 +0200
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.50 (gnu/linux)

martin rudalics <address@hidden> writes:

>> After reading that thread (which I neglected to do beforehand, sorry)
>
> Not your fault.  The TODO item should have included a link to that
> thread.
>
>> I still think that revert-buffer should remove all overlays and the mark.
>
> I think your patch is correct but am not sure about a number of related
> issues.  For example, is auto-reverting affected by your change and
> how?

Good point, nothing comes to mind but I'd have to check that carefully
to answer.

> Is `remove-overlays' the right function to remove all overlays in a
> buffer or should we provide a simpler function that doesn't check
> overlay boundaries?  
> Is `overlay-recenter' needed in this context?

Doing something like:

(save-excursion
  (overlay-recenter (point-max))
  (dolist (o (overlays-in (point-min) (point-max)))
    (delete-overlay o)))

... might be enough to efficiently and unconditionally nuke all the
overlays in a buffer. I have no idea if the difference between that and
the `remove-overlays' code actually matters.

As for the rest of the questions, they are so far removed from my simple
patch that I should definitely not attempt to answer unless I intend to
do some homework beforehand. They require a breadth of Emacs knowledge I
don't have at the moment.

Maybe I'll prepare a better patch after looking all that stuff up (if
nobody beats me to it).

-- 
   "Cut your own wood and it will warm you twice"




reply via email to

[Prev in Thread] Current Thread [Next in Thread]