emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 72c3efd7d0 15/16: Fix time comparison in primitive-undo


From: Paul Eggert
Subject: master 72c3efd7d0 15/16: Fix time comparison in primitive-undo
Date: Mon, 1 Aug 2022 04:17:28 -0400 (EDT)

branch: master
commit 72c3efd7d0ca72e12f76c5f057fd3ac9bb61b13f
Author: Paul Eggert <eggert@cs.ucla.edu>
Commit: Paul Eggert <eggert@cs.ucla.edu>

    Fix time comparison in primitive-undo
    
    * 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 | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/lisp/simple.el b/lisp/simple.el
index 2ef8a3cf00..e7768837f6 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]