emacs-pretest-bug
[Top][All Lists]
Advanced

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

Re: autorevert doesn't change mode-line-modified anymore


From: Luc Teirlinck
Subject: Re: autorevert doesn't change mode-line-modified anymore
Date: Mon, 18 Oct 2004 17:14:58 -0500 (CDT)

Klaus Zeitler wrote:

   autorevert behavior has changed recently. When I move (outside the emacs
   session) a write-protected file to a readable file, that I have in an emacs
   buffer, (and vice versa) emacs autoreverts the file contents, but doesn't
   update the variable  buffer-read-only anymore, i.e. the read-only status
   remains the same. In emacs 21.2 the read-only status was updated correctly.

   The call to revert-buffer in auto-revert-buffers moved recently to
   auto-revert-handler and was encapsulated with a let statement:
     (let ((buffer-read-only buffer-read-only))
       (revert-buffer 'ignore-auto 'dont-ask 'preserve-modes))

   What was the reason for this change?

Because, with the old behavior, if a user explicitly marked a buffer
read-only, autorevert would make it writable again, whenever it
reverted the buffer.  The fact that the file is writable does not
necessarily mean that the user wants the buffer to be writable.

Sincerely,

Luc.





reply via email to

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