aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorPaul Eggert2022-08-01 00:38:34 -0700
committerPaul Eggert2022-08-01 01:17:17 -0700
commit2cd204d8bbc5ef9bc049b593f85b2fa46c07db1b (patch)
treea9f36ac790a54476628315385e1fe49e06e0f8b0 /lisp
parenta51863f73d914dbabbadb396cda2c9d360866277 (diff)
downloademacs-2cd204d8bbc5ef9bc049b593f85b2fa46c07db1b.tar.gz
emacs-2cd204d8bbc5ef9bc049b593f85b2fa46c07db1b.zip
Prefer ‘time-equal-p’ to ‘equal’ on timestamps
This is more robust since timestamps can have multiple forms. * lisp/auth-source.el (auth-source-netrc-parse): * lisp/bookmark.el (bookmark--watch-file-already-queried-p) (bookmark-maybe-load-default-file): * lisp/cedet/semantic/db.el (semanticdb-needs-refresh-p): * lisp/dired.el (dired-directory-changed-p): * lisp/files.el (dir-locals-find-file): * lisp/gnus/gnus-util.el (gnus-cache-file-contents): * lisp/gnus/nneething.el (nneething-create-mapping): * lisp/gnus/nnfolder.el (nnfolder-read-folder): * lisp/gnus/nnmaildir.el (nnmaildir--update-nov) (nnmaildir--scan, nnmaildir-request-scan) (nnmaildir-request-update-info): * lisp/gnus/nnmh.el (nnmh-update-gnus-unreads): * lisp/gnus/spam-stat.el (spam-stat-load): * lisp/mail/mailabbrev.el (mail-abbrevs-sync-aliases): * lisp/mail/sendmail.el (sendmail-sync-aliases): * lisp/net/netrc.el (netrc-parse): * lisp/nxml/rng-loc.el (rng-get-parsed-schema-locating-file): * lisp/play/cookie1.el (cookie-snarf): * lisp/vc/vc-cvs.el (vc-cvs-state-heuristic): * lisp/vc/vc-hg.el (vc-hg--ignore-patterns-valid-p) (vc-hg--cached-dirstate-search): * lisp/vc/vc-hooks.el (vc-after-save): Prefer ‘time-equal-p’ to ‘equal’ when comparing timestamps for equality.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/auth-source.el3
-rw-r--r--lisp/bookmark.el4
-rw-r--r--lisp/cedet/semantic/db.el2
-rw-r--r--lisp/dired.el3
-rw-r--r--lisp/files.el3
-rw-r--r--lisp/gnus/gnus-util.el2
-rw-r--r--lisp/gnus/nneething.el3
-rw-r--r--lisp/gnus/nnfolder.el3
-rw-r--r--lisp/gnus/nnmaildir.el10
-rw-r--r--lisp/gnus/nnmh.el2
-rw-r--r--lisp/gnus/spam-stat.el3
-rw-r--r--lisp/mail/mailabbrev.el2
-rw-r--r--lisp/mail/sendmail.el2
-rw-r--r--lisp/net/netrc.el5
-rw-r--r--lisp/nxml/rng-loc.el2
-rw-r--r--lisp/play/cookie1.el3
-rw-r--r--lisp/vc/vc-cvs.el2
-rw-r--r--lisp/vc/vc-hg.el4
-rw-r--r--lisp/vc/vc-hooks.el5
19 files changed, 36 insertions, 27 deletions
diff --git a/lisp/auth-source.el b/lisp/auth-source.el
index a802ef856dc..a36386101af 100644
--- a/lisp/auth-source.el
+++ b/lisp/auth-source.el
@@ -957,7 +957,8 @@ Note that the MAX parameter is used so we can exit the parse early."
957 result) 957 result)
958 958
959 (if (and (functionp cached-secrets) 959 (if (and (functionp cached-secrets)
960 (equal cached-mtime 960 (time-equal-p
961 cached-mtime
961 (file-attribute-modification-time 962 (file-attribute-modification-time
962 (file-attributes file)))) 963 (file-attributes file))))
963 (progn 964 (progn
diff --git a/lisp/bookmark.el b/lisp/bookmark.el
index b2130557dcc..30a03e0431e 100644
--- a/lisp/bookmark.el
+++ b/lisp/bookmark.el
@@ -1172,7 +1172,7 @@ it to the name of the bookmark currently being set, advancing
1172(defun bookmark--watch-file-already-queried-p (new-mtime) 1172(defun bookmark--watch-file-already-queried-p (new-mtime)
1173 ;; Don't ask repeatedly if user already said "no" to reloading a 1173 ;; Don't ask repeatedly if user already said "no" to reloading a
1174 ;; file with this mtime: 1174 ;; file with this mtime:
1175 (prog1 (equal new-mtime bookmark--watch-already-asked-mtime) 1175 (prog1 (time-equal-p new-mtime bookmark--watch-already-asked-mtime)
1176 (setq bookmark--watch-already-asked-mtime new-mtime))) 1176 (setq bookmark--watch-already-asked-mtime new-mtime)))
1177 1177
1178(defun bookmark-maybe-load-default-file () 1178(defun bookmark-maybe-load-default-file ()
@@ -1185,7 +1185,7 @@ it to the name of the bookmark currently being set, advancing
1185 (let ((new-mtime (nth 5 (file-attributes 1185 (let ((new-mtime (nth 5 (file-attributes
1186 (car bookmark-bookmarks-timestamp)))) 1186 (car bookmark-bookmarks-timestamp))))
1187 (old-mtime (cdr bookmark-bookmarks-timestamp))) 1187 (old-mtime (cdr bookmark-bookmarks-timestamp)))
1188 (and (not (equal new-mtime old-mtime)) 1188 (and (not (time-equal-p new-mtime old-mtime))
1189 (not (bookmark--watch-file-already-queried-p new-mtime)) 1189 (not (bookmark--watch-file-already-queried-p new-mtime))
1190 (or (eq 'silent bookmark-watch-bookmark-file) 1190 (or (eq 'silent bookmark-watch-bookmark-file)
1191 (yes-or-no-p 1191 (yes-or-no-p
diff --git a/lisp/cedet/semantic/db.el b/lisp/cedet/semantic/db.el
index 82785ec6d2e..757e46677ed 100644
--- a/lisp/cedet/semantic/db.el
+++ b/lisp/cedet/semantic/db.el
@@ -609,7 +609,7 @@ The file associated with OBJ does not need to be in a buffer."
609 (or (not (slot-boundp obj 'tags)) 609 (or (not (slot-boundp obj 'tags))
610 ;; (not (oref obj tags)) --> not needed anymore? 610 ;; (not (oref obj tags)) --> not needed anymore?
611 (/= (or (oref obj fsize) 0) actualsize) 611 (/= (or (oref obj fsize) 0) actualsize)
612 (not (equal (oref obj lastmodtime) actualmod)) 612 (not (time-equal-p (oref obj lastmodtime) actualmod))
613 ) 613 )
614 )))) 614 ))))
615 615
diff --git a/lisp/dired.el b/lisp/dired.el
index 7cdcc3438d8..f261f9f477a 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -1140,7 +1140,8 @@ If DIRNAME is already in a Dired buffer, that buffer is used without refresh."
1140 (modtime (visited-file-modtime))) 1140 (modtime (visited-file-modtime)))
1141 (or (eq modtime 0) 1141 (or (eq modtime 0)
1142 (not (eq (file-attribute-type attributes) t)) 1142 (not (eq (file-attribute-type attributes) t))
1143 (equal (file-attribute-modification-time attributes) modtime))))) 1143 (time-equal-p (file-attribute-modification-time attributes)
1144 modtime)))))
1144 1145
1145(defvar auto-revert-remote-files) 1146(defvar auto-revert-remote-files)
1146 1147
diff --git a/lisp/files.el b/lisp/files.el
index 65f9039b33e..5df19661936 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -4446,7 +4446,8 @@ This function returns either:
4446 ;; The entry MTIME should match the most recent 4446 ;; The entry MTIME should match the most recent
4447 ;; MTIME among matching files. 4447 ;; MTIME among matching files.
4448 (and cached-files 4448 (and cached-files
4449 (equal (nth 2 dir-elt) 4449 (time-equal-p
4450 (nth 2 dir-elt)
4450 (let ((latest 0)) 4451 (let ((latest 0))
4451 (dolist (f cached-files latest) 4452 (dolist (f cached-files latest)
4452 (let ((f-time 4453 (let ((f-time
diff --git a/lisp/gnus/gnus-util.el b/lisp/gnus/gnus-util.el
index ea11642cf41..9bf48b1f4c3 100644
--- a/lisp/gnus/gnus-util.el
+++ b/lisp/gnus/gnus-util.el
@@ -1254,7 +1254,7 @@ SPEC is a predicate specifier that contains stuff like `or', `and',
1254 contents value) 1254 contents value)
1255 (if (or (null (setq value (symbol-value variable))) 1255 (if (or (null (setq value (symbol-value variable)))
1256 (not (equal (car value) file)) 1256 (not (equal (car value) file))
1257 (not (equal (nth 1 value) time))) 1257 (not (time-equal-p (nth 1 value) time)))
1258 (progn 1258 (progn
1259 (setq contents (funcall function file)) 1259 (setq contents (funcall function file))
1260 (set variable (list file time contents)) 1260 (set variable (list file time contents))
diff --git a/lisp/gnus/nneething.el b/lisp/gnus/nneething.el
index 829d912cb2d..0c565a8230c 100644
--- a/lisp/gnus/nneething.el
+++ b/lisp/gnus/nneething.el
@@ -245,7 +245,8 @@ included.")
245 (while map 245 (while map
246 (if (and (member (cadr (car map)) files) 246 (if (and (member (cadr (car map)) files)
247 ;; We also remove files that have changed mod times. 247 ;; We also remove files that have changed mod times.
248 (equal (file-attribute-modification-time (file-attributes 248 (time-equal-p
249 (file-attribute-modification-time (file-attributes
249 (nneething-file-name (cadr (car map))))) 250 (nneething-file-name (cadr (car map)))))
250 (cadr (cdar map)))) 251 (cadr (cdar map))))
251 (progn 252 (progn
diff --git a/lisp/gnus/nnfolder.el b/lisp/gnus/nnfolder.el
index 5dc8e5c30d0..c3f7073a7b8 100644
--- a/lisp/gnus/nnfolder.el
+++ b/lisp/gnus/nnfolder.el
@@ -860,7 +860,8 @@ deleted. Point is left where the deleted region was."
860 (nnheader-find-file-noselect file t))))) 860 (nnheader-find-file-noselect file t)))))
861 (mm-enable-multibyte) ;; Use multibyte buffer for future copying. 861 (mm-enable-multibyte) ;; Use multibyte buffer for future copying.
862 (buffer-disable-undo) 862 (buffer-disable-undo)
863 (if (equal (cadr (assoc group nnfolder-scantime-alist)) 863 (if (time-equal-p
864 (cadr (assoc group nnfolder-scantime-alist))
864 (file-attribute-modification-time (file-attributes file))) 865 (file-attribute-modification-time (file-attributes file)))
865 ;; This looks up-to-date, so we don't do any scanning. 866 ;; This looks up-to-date, so we don't do any scanning.
866 (if (file-exists-p file) 867 (if (file-exists-p file)
diff --git a/lisp/gnus/nnmaildir.el b/lisp/gnus/nnmaildir.el
index 30f473b1291..98e074233df 100644
--- a/lisp/gnus/nnmaildir.el
+++ b/lisp/gnus/nnmaildir.el
@@ -463,7 +463,7 @@ This variable is set by `nnmaildir-request-article'.")
463 ;; usable: if the message has been edited or if nnmail-extra-headers 463 ;; usable: if the message has been edited or if nnmail-extra-headers
464 ;; has been augmented since this data was parsed from the message, 464 ;; has been augmented since this data was parsed from the message,
465 ;; then we have to reparse. Otherwise it's up-to-date. 465 ;; then we have to reparse. Otherwise it's up-to-date.
466 (when (and nov (equal mtime (nnmaildir--nov-get-mtime nov))) 466 (when (and nov (time-equal-p mtime (nnmaildir--nov-get-mtime nov)))
467 ;; The timestamp matches. Now check nnmail-extra-headers. 467 ;; The timestamp matches. Now check nnmail-extra-headers.
468 (setq old-extra (nnmaildir--nov-get-extra nov)) 468 (setq old-extra (nnmaildir--nov-get-extra nov))
469 (when (equal nnmaildir--extra old-extra) ;; common case 469 (when (equal nnmaildir--extra old-extra) ;; common case
@@ -799,7 +799,7 @@ This variable is set by `nnmaildir-request-article'.")
799 isnew 799 isnew
800 (throw 'return t)) 800 (throw 'return t))
801 (setq nattr (file-attribute-modification-time nattr)) 801 (setq nattr (file-attribute-modification-time nattr))
802 (if (equal nattr (nnmaildir--grp-new group)) 802 (if (time-equal-p nattr (nnmaildir--grp-new group))
803 (setq nattr nil)) 803 (setq nattr nil))
804 (if read-only (setq dir (and (or isnew nattr) ndir)) 804 (if read-only (setq dir (and (or isnew nattr) ndir))
805 (when (or isnew nattr) 805 (when (or isnew nattr)
@@ -811,7 +811,7 @@ This variable is set by `nnmaildir-request-article'.")
811 (rename-file x (concat cdir (nnmaildir--ensure-suffix file))))) 811 (rename-file x (concat cdir (nnmaildir--ensure-suffix file)))))
812 (setf (nnmaildir--grp-new group) nattr)) 812 (setf (nnmaildir--grp-new group) nattr))
813 (setq cattr (file-attribute-modification-time (file-attributes cdir))) 813 (setq cattr (file-attribute-modification-time (file-attributes cdir)))
814 (if (equal cattr (nnmaildir--grp-cur group)) 814 (if (time-equal-p cattr (nnmaildir--grp-cur group))
815 (setq cattr nil)) 815 (setq cattr nil))
816 (setq dir (and (or isnew cattr) cdir))) 816 (setq dir (and (or isnew cattr) cdir)))
817 (unless dir (throw 'return t)) 817 (unless dir (throw 'return t))
@@ -899,7 +899,7 @@ This variable is set by `nnmaildir-request-article'.")
899 (remhash scan-group groups)) 899 (remhash scan-group groups))
900 (setq x (file-attribute-modification-time (file-attributes srv-dir)) 900 (setq x (file-attribute-modification-time (file-attributes srv-dir))
901 scan-group (null scan-group)) 901 scan-group (null scan-group))
902 (if (equal x (nnmaildir--srv-mtime nnmaildir--cur-server)) 902 (if (time-equal-p x (nnmaildir--srv-mtime nnmaildir--cur-server))
903 (when scan-group 903 (when scan-group
904 (maphash (lambda (group-name _group) 904 (maphash (lambda (group-name _group)
905 (nnmaildir--scan group-name t groups 905 (nnmaildir--scan group-name t groups
@@ -1049,7 +1049,7 @@ This variable is set by `nnmaildir-request-article'.")
1049 (t 1049 (t
1050 markdir-mtime)))) 1050 markdir-mtime))))
1051 (puthash mark mtime new-mmth) 1051 (puthash mark mtime new-mmth)
1052 (when (equal mtime (gethash mark old-mmth)) 1052 (when (time-equal-p mtime (gethash mark old-mmth))
1053 (setq ranges (assq mark old-marks)) 1053 (setq ranges (assq mark old-marks))
1054 (if ranges (setq ranges (cdr ranges))) 1054 (if ranges (setq ranges (cdr ranges)))
1055 (throw 'got-ranges nil)) 1055 (throw 'got-ranges nil))
diff --git a/lisp/gnus/nnmh.el b/lisp/gnus/nnmh.el
index 5d016267bc6..312a4a2a828 100644
--- a/lisp/gnus/nnmh.el
+++ b/lisp/gnus/nnmh.el
@@ -539,7 +539,7 @@ as unread by Gnus.")
539 (let ((arts articles) 539 (let ((arts articles)
540 art) 540 art)
541 (while (setq art (pop arts)) 541 (while (setq art (pop arts))
542 (when (not (equal 542 (when (not (time-equal-p
543 (file-attribute-modification-time 543 (file-attribute-modification-time
544 (file-attributes (concat dir (int-to-string (car art))))) 544 (file-attributes (concat dir (int-to-string (car art)))))
545 (cdr art))) 545 (cdr art)))
diff --git a/lisp/gnus/spam-stat.el b/lisp/gnus/spam-stat.el
index 084eb3d7745..5763ac14bb3 100644
--- a/lisp/gnus/spam-stat.el
+++ b/lisp/gnus/spam-stat.el
@@ -422,7 +422,8 @@ spam-stat (spam-stat-to-hash-table '(" spam-stat-ngood spam-stat-nbad))
422 (cond (spam-stat-dirty (message "Spam stat not loaded: spam-stat-dirty t")) 422 (cond (spam-stat-dirty (message "Spam stat not loaded: spam-stat-dirty t"))
423 ((or (not (boundp 'spam-stat-last-saved-at)) 423 ((or (not (boundp 'spam-stat-last-saved-at))
424 (null spam-stat-last-saved-at) 424 (null spam-stat-last-saved-at)
425 (not (equal spam-stat-last-saved-at 425 (not (time-equal-p
426 spam-stat-last-saved-at
426 (file-attribute-modification-time 427 (file-attribute-modification-time
427 (file-attributes spam-stat-file))))) 428 (file-attributes spam-stat-file)))))
428 (progn 429 (progn
diff --git a/lisp/mail/mailabbrev.el b/lisp/mail/mailabbrev.el
index e4061bd2f14..86711a4543f 100644
--- a/lisp/mail/mailabbrev.el
+++ b/lisp/mail/mailabbrev.el
@@ -163,7 +163,7 @@ no aliases, which is represented by this being a table with no entries.)")
163 (if (file-exists-p mail-personal-alias-file) 163 (if (file-exists-p mail-personal-alias-file)
164 (let ((modtime (file-attribute-modification-time 164 (let ((modtime (file-attribute-modification-time
165 (file-attributes mail-personal-alias-file)))) 165 (file-attributes mail-personal-alias-file))))
166 (if (not (equal mail-abbrev-modtime modtime)) 166 (if (not (time-equal-p mail-abbrev-modtime modtime))
167 (progn 167 (progn
168 (setq mail-abbrev-modtime modtime) 168 (setq mail-abbrev-modtime modtime)
169 (build-mail-abbrevs))))))) 169 (build-mail-abbrevs)))))))
diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el
index 76ef65b3437..f985b2ceac4 100644
--- a/lisp/mail/sendmail.el
+++ b/lisp/mail/sendmail.el
@@ -537,7 +537,7 @@ This also saves the value of `send-mail-function' via Customize."
537 (when mail-personal-alias-file 537 (when mail-personal-alias-file
538 (let ((modtime (file-attribute-modification-time 538 (let ((modtime (file-attribute-modification-time
539 (file-attributes mail-personal-alias-file)))) 539 (file-attributes mail-personal-alias-file))))
540 (or (equal mail-alias-modtime modtime) 540 (or (time-equal-p mail-alias-modtime modtime)
541 (setq mail-alias-modtime modtime 541 (setq mail-alias-modtime modtime
542 mail-aliases t))))) 542 mail-aliases t)))))
543 543
diff --git a/lisp/net/netrc.el b/lisp/net/netrc.el
index c272c07e4c5..2f38e221781 100644
--- a/lisp/net/netrc.el
+++ b/lisp/net/netrc.el
@@ -63,8 +63,9 @@
63 "port")) 63 "port"))
64 alist elem result pair) 64 alist elem result pair)
65 (if (and netrc-cache 65 (if (and netrc-cache
66 (equal (car netrc-cache) (file-attribute-modification-time 66 (time-equal-p (car netrc-cache)
67 (file-attributes file)))) 67 (file-attribute-modification-time
68 (file-attributes file))))
68 (insert (base64-decode-string (rot13-string (cdr netrc-cache)))) 69 (insert (base64-decode-string (rot13-string (cdr netrc-cache))))
69 (insert-file-contents file) 70 (insert-file-contents file)
70 (when (string-match "\\.gpg\\'" file) 71 (when (string-match "\\.gpg\\'" file)
diff --git a/lisp/nxml/rng-loc.el b/lisp/nxml/rng-loc.el
index 0fa455cbb59..302aa05176f 100644
--- a/lisp/nxml/rng-loc.el
+++ b/lisp/nxml/rng-loc.el
@@ -414,7 +414,7 @@ or nil."
414 (setq rng-schema-locating-file-alist 414 (setq rng-schema-locating-file-alist
415 (delq cached rng-schema-locating-file-alist))) 415 (delq cached rng-schema-locating-file-alist)))
416 nil) 416 nil)
417 ((and cached (equal (nth 1 cached) mtime)) 417 ((and cached (time-equal-p (nth 1 cached) mtime))
418 (nth 2 cached)) 418 (nth 2 cached))
419 (t 419 (t
420 (setq parsed (rng-parse-schema-locating-file file)) 420 (setq parsed (rng-parse-schema-locating-file file))
diff --git a/lisp/play/cookie1.el b/lisp/play/cookie1.el
index fcdd2a7ce94..7ede8e358aa 100644
--- a/lisp/play/cookie1.el
+++ b/lisp/play/cookie1.el
@@ -123,7 +123,8 @@ Emit STARTMSG and ENDMSG before and after. Cache the result; second
123and subsequent calls on the same file won't go to disk." 123and subsequent calls on the same file won't go to disk."
124 (setq phrase-file (cookie-check-file phrase-file)) 124 (setq phrase-file (cookie-check-file phrase-file))
125 (let ((sym (intern-soft phrase-file cookie-cache))) 125 (let ((sym (intern-soft phrase-file cookie-cache)))
126 (and sym (not (equal (symbol-function sym) 126 (and sym (not (time-equal-p
127 (symbol-function sym)
127 (file-attribute-modification-time 128 (file-attribute-modification-time
128 (file-attributes phrase-file)))) 129 (file-attributes phrase-file))))
129 (yes-or-no-p (concat phrase-file 130 (yes-or-no-p (concat phrase-file
diff --git a/lisp/vc/vc-cvs.el b/lisp/vc/vc-cvs.el
index 1f81ff2e0fe..52cc42791fa 100644
--- a/lisp/vc/vc-cvs.el
+++ b/lisp/vc/vc-cvs.el
@@ -250,7 +250,7 @@ See also variable `vc-cvs-sticky-date-format-string'."
250 (let ((checkout-time (vc-file-getprop file 'vc-checkout-time)) 250 (let ((checkout-time (vc-file-getprop file 'vc-checkout-time))
251 (lastmod (file-attribute-modification-time (file-attributes file)))) 251 (lastmod (file-attribute-modification-time (file-attributes file))))
252 (cond 252 (cond
253 ((equal checkout-time lastmod) 'up-to-date) 253 ((time-equal-p checkout-time lastmod) 'up-to-date)
254 ((string= (vc-working-revision file) "0") 'added) 254 ((string= (vc-working-revision file) "0") 'added)
255 ((null checkout-time) 'unregistered) 255 ((null checkout-time) 'unregistered)
256 (t 'edited)))) 256 (t 'edited))))
diff --git a/lisp/vc/vc-hg.el b/lisp/vc/vc-hg.el
index 026f125396e..5fba2b3908a 100644
--- a/lisp/vc/vc-hg.el
+++ b/lisp/vc/vc-hg.el
@@ -966,7 +966,7 @@ REPO must be the directory name of an hg repository."
966 (attr (file-attributes (nth 0 fs))) 966 (attr (file-attributes (nth 0 fs)))
967 (current-mtime (file-attribute-modification-time attr)) 967 (current-mtime (file-attribute-modification-time attr))
968 (current-size (file-attribute-size attr))) 968 (current-size (file-attribute-size attr)))
969 (unless (and (equal saved-mtime current-mtime) 969 (unless (and (time-equal-p saved-mtime current-mtime)
970 (equal saved-size current-size)) 970 (equal saved-size current-size))
971 (setf valid nil)))) 971 (setf valid nil))))
972 valid)) 972 valid))
@@ -1037,7 +1037,7 @@ Avoids the need to repeatedly scan dirstate on repeated calls to
1037 ) 1037 )
1038 (if (and cache 1038 (if (and cache
1039 (equal dirstate (pop cache)) 1039 (equal dirstate (pop cache))
1040 (equal mtime (pop cache)) 1040 (time-equal-p mtime (pop cache))
1041 (equal size (pop cache)) 1041 (equal size (pop cache))
1042 (equal ascii-fname (pop cache))) 1042 (equal ascii-fname (pop cache)))
1043 (pop cache) 1043 (pop cache)
diff --git a/lisp/vc/vc-hooks.el b/lisp/vc/vc-hooks.el
index 80508570f32..405c9bc2ca4 100644
--- a/lisp/vc/vc-hooks.el
+++ b/lisp/vc/vc-hooks.el
@@ -631,9 +631,10 @@ Before doing that, check if there are any old backups and get rid of them."
631 (cond 631 (cond
632 ((null backend)) 632 ((null backend))
633 ((eq (vc-checkout-model backend (list file)) 'implicit) 633 ((eq (vc-checkout-model backend (list file)) 'implicit)
634 ;; If the file was saved in the same second in which it was 634 ;; If the file was saved at the same time that it was
635 ;; checked out, clear the checkout-time to avoid confusion. 635 ;; checked out, clear the checkout-time to avoid confusion.
636 (if (equal (vc-file-getprop file 'vc-checkout-time) 636 (if (time-equal-p
637 (vc-file-getprop file 'vc-checkout-time)
637 (file-attribute-modification-time (file-attributes file))) 638 (file-attribute-modification-time (file-attributes file)))
638 (vc-file-setprop file 'vc-checkout-time nil)) 639 (vc-file-setprop file 'vc-checkout-time nil))
639 (if (vc-state-refresh file backend) 640 (if (vc-state-refresh file backend)