From 72c3efd7d0ca72e12f76c5f057fd3ac9bb61b13f Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 1 Aug 2022 00:38:34 -0700 Subject: [PATCH] Fix time comparison in primitive-undo MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit * 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 2ef8a3cf003..e7768837f6f 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. -- 2.39.2