diff options
| author | Michael Albinus | 2013-01-12 20:24:27 +0100 |
|---|---|---|
| committer | Michael Albinus | 2013-01-12 20:24:27 +0100 |
| commit | 71c661e4e6ab3857804113bc41fc2310343c9169 (patch) | |
| tree | fe91dfc0b0ec0cdfe888871c5f9b3dbd312330e1 | |
| parent | 2daddd9e8a133c80e582e364afd65949a8b2f9d9 (diff) | |
| download | emacs-71c661e4e6ab3857804113bc41fc2310343c9169.tar.gz emacs-71c661e4e6ab3857804113bc41fc2310343c9169.zip | |
* autorevert.el (auto-revert-notify-handler): Use `file-equal-p'.
| -rw-r--r-- | lisp/ChangeLog | 1 | ||||
| -rw-r--r-- | lisp/autorevert.el | 17 |
2 files changed, 8 insertions, 10 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7a8c5f2f490..7723528c886 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -2,6 +2,7 @@ | |||
| 2 | 2 | ||
| 3 | * autorevert.el (auto-revert-notify-watch-descriptor): Give it | 3 | * autorevert.el (auto-revert-notify-watch-descriptor): Give it |
| 4 | `permanent-local' property. | 4 | `permanent-local' property. |
| 5 | (auto-revert-notify-handler): Use `file-equal-p'. | ||
| 5 | 6 | ||
| 6 | 2013-01-12 Eli Zaretskii <eliz@gnu.org> | 7 | 2013-01-12 Eli Zaretskii <eliz@gnu.org> |
| 7 | 8 | ||
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'" | |||
| 531 | (when (featurep 'inotify) (cl-assert (memq 'modify action))) | 531 | (when (featurep 'inotify) (cl-assert (memq 'modify action))) |
| 532 | (when (featurep 'w32notify) (cl-assert (eq 'modified action))) | 532 | (when (featurep 'w32notify) (cl-assert (eq 'modified action))) |
| 533 | (cl-assert (bufferp buffer)) | 533 | (cl-assert (bufferp buffer)) |
| 534 | (when (stringp file) | ||
| 535 | (cl-assert (string-equal | ||
| 536 | ;; w32notify returns the basename of the file | ||
| 537 | ;; without its leading directories; inotify | ||
| 538 | ;; returns its full absolute file name. | ||
| 539 | (file-name-nondirectory (directory-file-name file)) | ||
| 540 | (file-name-nondirectory (directory-file-name | ||
| 541 | (buffer-file-name buffer)))))) | ||
| 542 | |||
| 543 | ;; Mark buffer modified. | ||
| 544 | (with-current-buffer buffer | 534 | (with-current-buffer buffer |
| 535 | (when (and (stringp file) (stringp buffer-file-name)) | ||
| 536 | ;; w32notify returns the basename of the file without its | ||
| 537 | ;; leading directories; inotify returns its full absolute | ||
| 538 | ;; file name. | ||
| 539 | (cl-assert (file-equal-p file buffer-file-name))) | ||
| 540 | |||
| 541 | ;; Mark buffer modified. | ||
| 545 | (setq auto-revert-notify-modified-p t)))))) | 542 | (setq auto-revert-notify-modified-p t)))))) |
| 546 | 543 | ||
| 547 | (defun auto-revert-active-p () | 544 | (defun auto-revert-active-p () |