]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix time comparison in primitive-undo
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 1 Aug 2022 07:38:34 +0000 (00:38 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 1 Aug 2022 08:17:18 +0000 (01:17 -0700)
* lisp/simple.el (primitive-undo): Fix time comparison.
The old code was a circa-2013 mistranslation of what used to be in
src/undo.c’s Fprimitive_undo.

lisp/simple.el

index 2ef8a3cf00319811a23762fd2e3f796f338e82e9..e7768837f6f90f08f0822e49f0049036ff38bbb3 100644 (file)
@@ -3543,10 +3543,7 @@ Return what remains of the list."
                  (setq visited-file-time
                       (with-current-buffer (buffer-base-buffer)
                         (visited-file-modtime))))
-             (when (or (equal time visited-file-time)
-                       (and (consp time)
-                            (equal (list (car time) (cdr time))
-                                   visited-file-time)))
+            (when (time-equal-p time visited-file-time)
                (unlock-buffer)
                (set-buffer-modified-p nil))))
           ;; Element (nil PROP VAL BEG . END) is property change.