help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: longlines and global-auto-revert-mode


From: martin rudalics
Subject: Re: longlines and global-auto-revert-mode
Date: Tue, 15 Jan 2008 18:35:25 +0100
User-agent: Mozilla Thunderbird 1.0 (Windows/20041206)

> It works fine, but if longlines-mode is active, then when file is been
> modified by external program, I get not only my message, but before it I
> get question in minibuffer "filename.txt changed on disk; really edit
> the buffer? (y, n, r or C-h)". Why? I want only my message. How to
> disable this question?

Can you try the attached patch?   It's against CVS Emacs hence
if you have any problems applying it please tell me.
*** longlines.el.~1.41.~        Fri Nov 30 10:00:46 2007
--- longlines.el        Tue Jan 15 18:29:16 2008
***************
*** 136,142 ****
          (let ((buffer-undo-list t)
                (inhibit-read-only t)
              (after-change-functions nil)
!               (mod (buffer-modified-p)))
            ;; Turning off undo is OK since (spaces + newlines) is
            ;; conserved, except for a corner case in
            ;; longlines-wrap-lines that we'll never encounter from here
--- 136,143 ----
          (let ((buffer-undo-list t)
                (inhibit-read-only t)
              (after-change-functions nil)
!               (mod (buffer-modified-p))
!             buffer-file-name buffer-file-truename)
            ;; Turning off undo is OK since (spaces + newlines) is
            ;; conserved, except for a corner case in
            ;; longlines-wrap-lines that we'll never encounter from here
***************
*** 176,182 ****
          (longlines-unshow-hard-newlines))
      (let ((buffer-undo-list t)
          (after-change-functions nil)
!           (inhibit-read-only t))
        (if longlines-decoded
          (save-restriction
            (widen)
--- 177,184 ----
          (longlines-unshow-hard-newlines))
      (let ((buffer-undo-list t)
          (after-change-functions nil)
!           (inhibit-read-only t)
!         buffer-file-name buffer-file-truename)
        (if longlines-decoded
          (save-restriction
            (widen)
***************
*** 220,226 ****
         (mod (buffer-modified-p))
         (buffer-undo-list t)
         (inhibit-read-only t)
!        (inhibit-modification-hooks t))
      (while pos
        (put-text-property pos (1+ pos) 'display
                         (copy-sequence longlines-show-effect))
--- 222,229 ----
         (mod (buffer-modified-p))
         (buffer-undo-list t)
         (inhibit-read-only t)
!        (inhibit-modification-hooks t)
!        buffer-file-name buffer-file-truename)
      (while pos
        (put-text-property pos (1+ pos) 'display
                         (copy-sequence longlines-show-effect))
***************
*** 235,241 ****
        (mod (buffer-modified-p))
        (buffer-undo-list t)
        (inhibit-read-only t)
!       (inhibit-modification-hooks t))
      (while pos
        (remove-text-properties pos (1+ pos) '(display))
        (setq pos (text-property-not-all (1+ pos) (point-max) 'hard nil)))
--- 238,245 ----
        (mod (buffer-modified-p))
        (buffer-undo-list t)
        (inhibit-read-only t)
!       (inhibit-modification-hooks t)
!       buffer-file-name buffer-file-truename)
      (while pos
        (remove-text-properties pos (1+ pos) '(display))
        (setq pos (text-property-not-all (1+ pos) (point-max) 'hard nil)))

reply via email to

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