logo       

Re: File changed during load: msg#00013

emacs.nxml.general

Subject: Re: File changed during load

Lennart Borgman writes:

> drkm wrote:

>>Lennart Borgman writes:

>>>It would be nice if Emacs had some simple function for avoiding adding
>>>to the undo, something like (save-undo ...).

>> Something like this can be useful in this case, IMHO:

>> (defmacro save-undo-list (&rest body)
>> `(let ((buffer-undo-list buffer-undo-list))
>> ,@body))

> There is a much more elaborate macro in nxml-util.el:

> (defmacro nxml-with-unmodifying-text-property-changes (&rest body) ...)

> I can not say I understand that macro but I guess there is a reason for it?

It's not the same thing. The first inhibits adding to
'buffer-undo-list'. The second inhibits setting the buffer
modified flag to T if it was NIL before EVAL'ing BODY. Actually,
they don't inhibit anything; they restore the list (resp. the
flag) to its initial value.

But I wonder if 'save-undo-list' is really useful. IMHO it can
be just dangerous.

BTW, I think the nXML macro above restore the buffer modified
flag to NIL even if the modifications were on text (for example),
not to the tprops.

--drkm



------------------------ Yahoo! Groups Sponsor --------------------~-->
<font face=arial size=-1><a
href="http://us.ard.yahoo.com/SIG=12hhh1e8b/M=362131.6882499.7825260.1510227/D=groups/S=1706030390:TM/Y=YAHOO/EXP=1123279328/A=2889191/R=0/SIG=10r90krvo/*http://www.thebeehive.org
">Get Bzzzy! (real tools to help you find a job) Welcome to the Sweet Life
- brought to you by One Economy</a>.</font>
--------------------------------------------------------------------~->


Yahoo! Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/emacs-nxml-mode/

<*> To unsubscribe from this group, send an email to:
emacs-nxml-mode-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/







<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise