[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r111501: * autorevert.el (auto-revert
From: |
Michael Albinus |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r111501: * autorevert.el (auto-revert-notify-handler): Use `file-equal-p'. |
Date: |
Sat, 12 Jan 2013 20:24:27 +0100 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 111501
committer: Michael Albinus <address@hidden>
branch nick: trunk
timestamp: Sat 2013-01-12 20:24:27 +0100
message:
* autorevert.el (auto-revert-notify-handler): Use `file-equal-p'.
modified:
lisp/ChangeLog
lisp/autorevert.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2013-01-12 13:30:00 +0000
+++ b/lisp/ChangeLog 2013-01-12 19:24:27 +0000
@@ -2,6 +2,7 @@
* autorevert.el (auto-revert-notify-watch-descriptor): Give it
`permanent-local' property.
+ (auto-revert-notify-handler): Use `file-equal-p'.
2013-01-12 Eli Zaretskii <address@hidden>
=== modified file 'lisp/autorevert.el'
--- a/lisp/autorevert.el 2013-01-12 13:30:00 +0000
+++ b/lisp/autorevert.el 2013-01-12 19:24:27 +0000
@@ -531,17 +531,14 @@
(when (featurep 'inotify) (cl-assert (memq 'modify action)))
(when (featurep 'w32notify) (cl-assert (eq 'modified action)))
(cl-assert (bufferp buffer))
- (when (stringp file)
- (cl-assert (string-equal
- ;; w32notify returns the basename of the file
- ;; without its leading directories; inotify
- ;; returns its full absolute file name.
- (file-name-nondirectory (directory-file-name file))
- (file-name-nondirectory (directory-file-name
- (buffer-file-name buffer))))))
-
- ;; Mark buffer modified.
(with-current-buffer buffer
+ (when (and (stringp file) (stringp buffer-file-name))
+ ;; w32notify returns the basename of the file without its
+ ;; leading directories; inotify returns its full absolute
+ ;; file name.
+ (cl-assert (file-equal-p file buffer-file-name)))
+
+ ;; Mark buffer modified.
(setq auto-revert-notify-modified-p t))))))
(defun auto-revert-active-p ()
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r111501: * autorevert.el (auto-revert-notify-handler): Use `file-equal-p'.,
Michael Albinus <=