From: Paul Eggert Date: Mon, 1 Aug 2022 07:38:34 +0000 (-0700) Subject: Fix time comparison in primitive-undo X-Git-Tag: emacs-29.0.90~1447^2~573 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=72c3efd7d0ca72e12f76c5f057fd3ac9bb61b13f;p=emacs.git 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. --- 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.