From e40f39bec34feeec893fb66625f19cc4663cd217 Mon Sep 17 00:00:00 2001 From: Alexander Gramiak Date: Sun, 14 Apr 2019 09:27:50 -0600 Subject: [PATCH] Backport: * lisp/frame.el (frame--size-history): Fix infloop. (Bug#35272) --- lisp/frame.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lisp/frame.el b/lisp/frame.el index a0e62e1d69d..30f6ca91ba6 100644 --- a/lisp/frame.el +++ b/lisp/frame.el @@ -1446,14 +1446,16 @@ selected frame." (with-current-buffer (get-buffer-create "*frame-size-history*") (erase-buffer) (insert (format "Frame size history of %s\n" frame)) - (while (listp (setq entry (pop history))) + (while (consp (setq entry (pop history))) (when (eq (car entry) frame) (pop entry) (insert (format "%s" (pop entry))) (move-to-column 24 t) (while entry (insert (format " %s" (pop entry)))) - (insert "\n")))))) + (insert "\n"))) + (unless frame-size-history + (insert "Frame size history is nil.\n"))))) (declare-function x-frame-edges "xfns.c" (&optional frame type)) (declare-function w32-frame-edges "w32fns.c" (&optional frame type)) -- 2.39.2