diff options
author | Michael Albinus <michael.albinus@gmx.de> | 2013-01-12 20:24:27 +0100 |
---|---|---|
committer | Michael Albinus <michael.albinus@gmx.de> | 2013-01-12 20:24:27 +0100 |
commit | 71c661e4e6ab3857804113bc41fc2310343c9169 (patch) | |
tree | fe91dfc0b0ec0cdfe888871c5f9b3dbd312330e1 /lisp/autorevert.el | |
parent | 2daddd9e8a133c80e582e364afd65949a8b2f9d9 (diff) | |
download | emacs-71c661e4e6ab3857804113bc41fc2310343c9169.tar.gz |
* autorevert.el (auto-revert-notify-handler): Use `file-equal-p'.
Diffstat (limited to 'lisp/autorevert.el')
-rw-r--r-- | lisp/autorevert.el | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/lisp/autorevert.el b/lisp/autorevert.el index 51146950a5c..c9180482cd9 100644 --- a/lisp/autorevert.el +++ b/lisp/autorevert.el @@ -531,17 +531,14 @@ will use an up-to-date value of `auto-revert-interval'" (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 () |